-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
AWS Route53 record fails to apply when instance is stopped / shutdown #173
Comments
Also affected by this issue. We wouldn't mind if it goes to something bogus IP in this case. Is there any good workaround for this? |
Hopefully you found an answer by now @ezyang but my workaround is to use
|
Thank you, that is a good workaround. (I worked around it by not
shutting off instances lol)
Excerpts from andrew-j-price's message of 2019-05-27 20:10:26 -0700:
… Hopefully you found an answer by now @ezyang but my workaround is to use `coalesce` to set a dummy value.
```
resource "aws_route53_record" "microk8s_record" {
count = "${var.enable_microk8s}"
zone_id = "${var.aws_route53_zone_id}"
name = "micro.example.com"
type = "A"
ttl = "150"
records = ["${coalesce(aws_instance.microk8s_aio.public_ip, var.dummy_ip)}"]
}
```
|
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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. |
This issue was originally opened by @bmalynovytch as hashicorp/terraform#6770. It was migrated here as part of the provider split. The original body of the issue is below.
Dear all,
I'm facing a recurrent issue.
When applying configuration with some AWS instances that are shutdown / stopped, with Route53 records attached, Terraform tries to apply a new (empty) value to the
aws_route53_record
which fails:Terraform Version
Affected Resource(s)
Expected Behavior
Do not apply a new value if it does not match the validation pattern.
Actual Behavior
Request fails, trying to apply an invalid (empty) value.
Steps to Reproduce
aws_instance
aws_route53_record
of typeA
, using the previously created instance's gathered IP address (aws_instance.myhost.public_ip
)terraform apply
terraform apply
References
This issue is related to comment hashicorp/terraform#1579 (comment)
The text was updated successfully, but these errors were encountered: