Merge pull request #28579 from ChadBailey/patch-2
Added clarity: remote-exec connection requirement
This commit is contained in:
commit
43f960b197
|
@ -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
|
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`
|
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](/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
|
-> **Note:** Provisioners should only be used as a last resort. For most
|
||||||
common situations there are better alternatives. For more information, see
|
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" {
|
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" {
|
provisioner "remote-exec" {
|
||||||
inline = [
|
inline = [
|
||||||
"puppet apply",
|
"puppet apply",
|
||||||
|
|
Loading…
Reference in New Issue