Difference between revisions of "Self."

From wikieduonline
Jump to navigation Jump to search
Line 8: Line 8:
 
  {{provisioner example}}
 
  {{provisioner example}}
  
 +
 +
resource "aws_instance" "web" {
 +
  # ...
 +
 +
  provisioner "local-exec" {
 +
    command    = "echo The server's IP address is ${self.private_ip}"
 +
    [[on_failure]] = continue
 +
  }
 +
}
  
 
== See also ==
 
== See also ==

Revision as of 08:43, 31 March 2023

self.ipv4_address
self.private_ip


Related

 resource "aws_instance" "your_web" {
  # ...

  provisioner "local-exec" {
    command = "echo The server's IP address is ${self.private_ip}"
  }
}


resource "aws_instance" "web" {
  # ...

  provisioner "local-exec" {
    command    = "echo The server's IP address is ${self.private_ip}"
    on_failure = continue
  }
}

See also

Advertising: