Merge pull request #28579 from ChadBailey/patch-2

Added clarity: remote-exec connection requirement
This commit is contained in:
Laura Pacilio 2021-09-09 15:09:31 -04:00 committed by GitHub
commit 43f960b197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -12,7 +12,8 @@ The `remote-exec` provisioner invokes a script on a remote resource after it
is created. This can be used to run a configuration management tool, bootstrap
into a cluster, etc. To invoke a local process, see the `local-exec`
[provisioner](/docs/language/resources/provisioners/local-exec.html) instead. The `remote-exec`
provisioner supports both `ssh` and `winrm` type [connections](/docs/language/resources/provisioners/connection.html).
provisioner requires a [connection](/docs/language/resources/provisioners/connection.html)
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
@ -24,6 +25,15 @@ common situations there are better alternatives. For more information, see
resource "aws_instance" "web" {
# ...
# Establishes connection to be used by all
# generic remote provisioners (i.e. file/remote-exec)
connection {
type = "ssh"
user = "root"
password = var.root_password
host = self.public_ip
}
provisioner "remote-exec" {
inline = [
"puppet apply",