-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State file shows initial public_ip and not an eip #1425
Comments
I have similar issue with my outputs. These outputs generate different public_ip during the first apply. The second apply fix that issue and output contains the right values. Adding depends_on doesn't help. resource "template_file" "example_template" {
depends_on = ["aws_eip.some_instance"]
filename = "template-some_instance"
vars {
some_instance_public_ip = "${aws_instance.some_instance.public_ip}"
}
}
output "public_ips" {
value = "${template_file.example_template.rendered}"
} |
Hey folks, definitely see the issue here. Terraform is simply reflecting the upstream behavior of the AWS API, which changes the reported value of Since the I'm wondering if this is a scenario that we can handle with a documentation warning on the field? Something like:
What do you think? |
Hi @phinze, |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
During the initial creation (for example during https://www.terraform.io/intro/getting-started/provision.html) if you have an EC2 instance with an EIP associated to it during apply
terraform show
lists the public_ip as what is presumably the IP address before the EIP is attached. Re-runningterraform refresh
fixes the state file. Should this detail be correct on first orchestration?The text was updated successfully, but these errors were encountered: