-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Feature Request] Provide beanstalk zoneids lookup. Either as data source or resource attribute. #2952
Comments
Hi @beanaroo! Since this table of zone ids is included in the AWS documentation, it seems reasonable to encode it into Terraform, though of course this would (just as with the other similar tables we have hard-coded in the provider) require a provider upgrade each time a new region is added to the table. As you say, the usual way we've exposed this sort of thing in the past is via a combination of a data source for ad-hoc lookups and a In this case, the latter might look like this: resource "aws_route53_record" "example_api_elb_alias_a" {
provider = "aws.invenco"
zone_id = "${data.aws_route53_zone.example_api_elb.zone_id}"
name = "api.example.com"
type = "A"
alias {
name = "${aws_elastic_beanstalk_environment.example_api.cname}"
zone_id = "${aws_elastic_beanstalk_environment.example_api.zone_id}"
evaluate_target_health = false
}
} The Terraform team at HashiCorp probably won't be able to work on this in the near future, but we'd be happy to review a pull request if you or someone else has the time and motivation to implement it. There are some existing zone id lookup tables for other services that could serve as examples. Alternatively, if others would also like to see this implemented I'd encourage adding a 👍 upvote reaction to the original issue comment (not to this comment), which we use as one of the inputs to prioritize work for the Terraform team. |
Thanks, @apparentlymart! That makes sense. Unfortunately the I do think hardcoding this in terraform based on aws documentation isn't sustainable and it would be better if AWS exposed these programmatically somehow. I'll close this until there is a better option for sourcing the zone ids |
Hi @beanaroo! I'm actually going to reopen this temporarily since there was a PR (#3208) submitted to resolve it. It saves everyone from maintaining their own variables or hardcoding themselves, which is a better user experience. I think for now we should allow this as a hardcoded region-ID mapping in the provider, even if it is not ideally automated, as we already maintain some other mappings like ELB hosted zone IDs. We already have this maintenance burden and luckily AWS is not spinning up new regions too often. 😄 |
The new datasource |
This has been released in terraform-provider-aws version 1.9.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Terraform Version
v0.11.1
Affected Resource(s)
Terraform Configuration Files
Description
I find myself repeating the above variable in many places, across multiple environments and stacks. The zone_id data source doesn't work because they are not owned by the account(s). They are static and it would be great if we could look them up programmatically.
Maybe a data source? Or even better, as an attribute of an environment?
References
The text was updated successfully, but these errors were encountered: