Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1- define

...

https://www.terraform.io/intro/getting-started/outputs.html


#ouput the public IP@ with the cmd: "terraform output ip"
output "ip" {
  value = "${aws_instance.vminstance1.public_ip}"
}


output "ip" {
  value = "${aws_eip.ip.public_ip}"
}


$ terraform output ip
50.17.232.209