From fc4ceedc6d2b5d2a93511e5dadd442c984044745 Mon Sep 17 00:00:00 2001 From: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> Date: Wed, 5 Jan 2022 11:08:33 -0500 Subject: [PATCH] Remove overview page and update notes on provisioner pages --- .../language/resources/provisioners/chef.mdx | 3 ++- .../resources/provisioners/connection.mdx | 27 ++++++++++--------- .../language/resources/provisioners/file.mdx | 4 +-- .../resources/provisioners/habitat.mdx | 3 ++- .../language/resources/provisioners/index.mdx | 12 --------- .../resources/provisioners/local-exec.mdx | 4 +-- .../resources/provisioners/null_resource.mdx | 4 +++ .../resources/provisioners/puppet.mdx | 3 ++- .../resources/provisioners/remote-exec.mdx | 6 ++--- .../provisioners/salt-masterless.mdx | 3 ++- 10 files changed, 34 insertions(+), 35 deletions(-) delete mode 100644 website/docs/language/resources/provisioners/index.mdx diff --git a/website/docs/language/resources/provisioners/chef.mdx b/website/docs/language/resources/provisioners/chef.mdx index 9ec4887e2..99419c11e 100644 --- a/website/docs/language/resources/provisioners/chef.mdx +++ b/website/docs/language/resources/provisioners/chef.mdx @@ -11,7 +11,8 @@ The `chef` provisioner installs, configures and runs the Chef Client on a remote resource. The `chef` provisioner supports both `ssh` and `winrm` type [connections](/language/resources/provisioners/connection). -!> **Note:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. For more information, see [the main Provisioners page](/language/resources/provisioners). +!> **Warning:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. Refer to +[Declaring Provisioners](/language/resources/provisioners/syntax) for more details. ## Requirements diff --git a/website/docs/language/resources/provisioners/connection.mdx b/website/docs/language/resources/provisioners/connection.mdx index eb1ccff5f..22a4c16a0 100644 --- a/website/docs/language/resources/provisioners/connection.mdx +++ b/website/docs/language/resources/provisioners/connection.mdx @@ -11,19 +11,10 @@ Most provisioners require access to the remote resource via SSH or WinRM, and expect a nested `connection` block with details about how to connect. -> **Note:** Provisioners should only be used as a last resort. For most -common situations there are better alternatives. For more information, see -[the main Provisioners page](/language/resources/provisioners). +common situations there are better alternatives. Refer to +[Declaring Provisioners](/language/resources/provisioners/syntax) for more details. --> **Note:** In Terraform 0.11 and earlier, providers could set default values -for some connection settings, so that `connection` blocks could sometimes be -omitted. This feature was removed in 0.12 in order to make Terraform's behavior -more predictable. - --> **Note:** Since the SSH connection type is most often used with -newly-created remote resources, validation of SSH host keys is disabled by -default. In scenarios where this is not acceptable, a separate mechanism for -key distribution could be established and the `host_key` directive documented -below explicitly set to verify against a specific key or signing CA. +## Connection Block Connection blocks don't take a block label, and can be nested within either a `resource` or a `provisioner`. @@ -37,6 +28,18 @@ One use case for providing multiple connections is to have an initial provisioner connect as the `root` user to set up user accounts, and have subsequent provisioners connect as a user with more limited permissions. +Since the SSH connection type is most often used with +newly-created remote resources, validation of SSH host keys is disabled by +default. In scenarios where this is not acceptable, a separate mechanism for +key distribution could be established and the `host_key` directive documented +below explicitly set to verify against a specific key or signing CA. + +-> **Note:** In Terraform 0.11 and earlier, providers could set default values +for some connection settings, so that `connection` blocks could sometimes be +omitted. This feature was removed in 0.12 in order to make Terraform's behavior +more predictable. + + ## Example usage ```hcl diff --git a/website/docs/language/resources/provisioners/file.mdx b/website/docs/language/resources/provisioners/file.mdx index 83dfb7a90..255814cd7 100644 --- a/website/docs/language/resources/provisioners/file.mdx +++ b/website/docs/language/resources/provisioners/file.mdx @@ -13,8 +13,8 @@ executing Terraform to the newly created resource. The `file` provisioner supports both `ssh` and `winrm` type [connections](/language/resources/provisioners/connection). -> **Note:** Provisioners should only be used as a last resort. For most -common situations there are better alternatives. For more information, see -[the main Provisioners page](/language/resources/provisioners). +common situations there are better alternatives. Refer to +[Declaring Provisioners](/language/resources/provisioners/syntax) for more details. ## Example usage diff --git a/website/docs/language/resources/provisioners/habitat.mdx b/website/docs/language/resources/provisioners/habitat.mdx index c8ab535d1..cdd8f8bf9 100644 --- a/website/docs/language/resources/provisioners/habitat.mdx +++ b/website/docs/language/resources/provisioners/habitat.mdx @@ -9,7 +9,8 @@ description: >- The `habitat` provisioner installs the [Habitat](https://habitat.sh) supervisor and loads configured services. This provisioner only supports Linux targets using the `ssh` connection type at this time. -!> **Note:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. For more information, see [the main Provisioners page](/language/resources/provisioners). +!> **Warning:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. Refer to +[Declaring Provisioners](/language/resources/provisioners/syntax) for more details. ## Requirements diff --git a/website/docs/language/resources/provisioners/index.mdx b/website/docs/language/resources/provisioners/index.mdx deleted file mode 100644 index badd56b09..000000000 --- a/website/docs/language/resources/provisioners/index.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -page_title: Provisioners Overview - Configuration Language -description: >- - Provisioners model specific actions on a local or remote machine to prepare - servers or other infrastructure for service. ---- - -# Provisioners - -Provisioners can be used to model specific actions on the local machine or on a -remote machine in order to prepare servers or other infrastructure objects for -service. diff --git a/website/docs/language/resources/provisioners/local-exec.mdx b/website/docs/language/resources/provisioners/local-exec.mdx index 02eec0ef7..8298cfbe7 100644 --- a/website/docs/language/resources/provisioners/local-exec.mdx +++ b/website/docs/language/resources/provisioners/local-exec.mdx @@ -19,8 +19,8 @@ run, there is no guarantee that it will be in an operable state - for example system services such as `sshd` may not be started yet on compute resources. -> **Note:** Provisioners should only be used as a last resort. For most -common situations there are better alternatives. For more information, see -[the main Provisioners page](/language/resources/provisioners). +common situations there are better alternatives. Refer to +[Declaring Provisioners](/language/resources/provisioners/syntax) for more details. ## Example usage diff --git a/website/docs/language/resources/provisioners/null_resource.mdx b/website/docs/language/resources/provisioners/null_resource.mdx index 3e7b3fd65..0ba1294a9 100644 --- a/website/docs/language/resources/provisioners/null_resource.mdx +++ b/website/docs/language/resources/provisioners/null_resource.mdx @@ -19,6 +19,10 @@ details](/language/resources/provisioners/connection) on a `null_resource`. You use its `triggers` argument and any meta-arguments to control exactly where in the dependency graph its provisioners will run. +-> **Note:** Provisioners should only be used as a last resort. For most +common situations there are better alternatives. Refer to +[Declaring Provisioners](/language/resources/provisioners/syntax) for more details. + ## Example usage ```hcl diff --git a/website/docs/language/resources/provisioners/puppet.mdx b/website/docs/language/resources/provisioners/puppet.mdx index e0894c271..5563a369e 100644 --- a/website/docs/language/resources/provisioners/puppet.mdx +++ b/website/docs/language/resources/provisioners/puppet.mdx @@ -11,7 +11,8 @@ The `puppet` provisioner installs, configures and runs the Puppet agent on a remote resource. The `puppet` provisioner supports both `ssh` and `winrm` type [connections](/language/resources/provisioners/connection). -!> **Note:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. For more information, see [the main Provisioners page](/language/resources/provisioners). +!> **Warning:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. Refer to +[Declaring Provisioners](/language/resources/provisioners/syntax) for more details. ## Requirements diff --git a/website/docs/language/resources/provisioners/remote-exec.mdx b/website/docs/language/resources/provisioners/remote-exec.mdx index 4b4d94274..89ce5c109 100644 --- a/website/docs/language/resources/provisioners/remote-exec.mdx +++ b/website/docs/language/resources/provisioners/remote-exec.mdx @@ -18,8 +18,8 @@ provisioner requires a [connection](/language/resources/provisioners/connection) and supports both `ssh` and `winrm`. -> **Note:** Provisioners should only be used as a last resort. For most -common situations there are better alternatives. For more information, see -[the main Provisioners page](/language/resources/provisioners). +common situations there are better alternatives. Refer to +[Declaring Provisioners](/language/resources/provisioners/syntax) for more details. ## Example usage @@ -27,7 +27,7 @@ common situations there are better alternatives. For more information, see resource "aws_instance" "web" { # ... - # Establishes connection to be used by all + # Establishes connection to be used by all # generic remote provisioners (i.e. file/remote-exec) connection { type = "ssh" diff --git a/website/docs/language/resources/provisioners/salt-masterless.mdx b/website/docs/language/resources/provisioners/salt-masterless.mdx index 70fd17dbe..45aade11f 100644 --- a/website/docs/language/resources/provisioners/salt-masterless.mdx +++ b/website/docs/language/resources/provisioners/salt-masterless.mdx @@ -12,7 +12,8 @@ Type: `salt-masterless` The `salt-masterless` Terraform provisioner provisions machines built by Terraform using [Salt](http://saltstack.com/) states, without connecting to a Salt master. The `salt-masterless` provisioner supports `ssh` [connections](/language/resources/provisioners/connection). -!> **Note:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. For more information, see [the main Provisioners page](/language/resources/provisioners). +!> **Warning:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. Refer to +[Declaring Provisioners](/language/resources/provisioners/syntax) for more details. ## Requirements