Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question

In terraform, say you create an Elastic IP resource (to get a static/non-changing public IP you can assign to an EC2 instance), as follows:

resource "aws_eip" "ip" {
  instance = "${aws_instance.example.id}"
}

After elastic ip resource is created, it will have an exported variable called "public_ip". Create a output variable called "ip" that will expose this value (as output to "terraform apply" or to a module that uses your module)

[...]

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

^^ note the keyword "output" for the block type


Question

In terraform, say you create an Elastic IP resource (to get a static/non-changing public IP you can assign to an EC2 instance), as follows:

resource "aws_eip" "ip" {
  instance = "${aws_instance.example.id}"
}

After elastic ip resource is created, it will have an exported variable called "public_ip". Create a output variable called "ip" that will expose this value (as output to "terraform apply" or to a module that uses your module)

[...]

Answer
?

Question

In terraform, say you create an Elastic IP resource (to get a static/non-changing public IP you can assign to an EC2 instance), as follows:

resource "aws_eip" "ip" {
  instance = "${aws_instance.example.id}"
}

After elastic ip resource is created, it will have an exported variable called "public_ip". Create a output variable called "ip" that will expose this value (as output to "terraform apply" or to a module that uses your module)

[...]

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

^^ note the keyword "output" for the block type


Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.