-
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_elb_hosted_zone_id data source doesn't support Network Load Balancers #7988
Comments
I'd like to work on this, it's currently just a hardcoded map so what's the best way to add nlb zone id's without breaking things?
|
So I've decided to use the following and then I'm adding a "type" (application, classic, or network). argument to aws_elb_hosted_zone_id which will be assigned to either index. application/classic will get the first, network get's the second.
I'll validate in a similar fashion as https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_lambda_function.go#L24 but I think I'll need to hardcode the value options unless someone can suggest a better option. It appears that elb and elbv2 only list application and network as a const and I'd like to also list a "classic" option but I can't find any reference. Any ideas? |
GovCloud regions aren't documented for either yet: Their Route 53 Hosted Zone IDs (Network Load Balancers) in case anyone picks this up: "us-gov-east-1": "Z1ZSMQQ6Q24QQ8",
"us-gov-west-1": "ZMG1MZ2THAWF1", |
Thanks @PatMyron I'll pick this back up. |
Is there any workaround? Also, I'm hosted in |
I think it just never got looked at. If @bflad has any input I can update with any desired changes. |
Obviously will fix any conflicts as well, currently on mobile. |
It's not as nice as the aws_elb_hosted_zone_id data source, but for anyone using nginx ingress you can get your zone_id this way:
|
This functionality has been released in v4.15.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. 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. |
Community Note
Description
aws_elb_hosted_zone_id data source supports Application Load Balancers and Classic Load Balancers (which use the same hosted zone id), but not Network Load Balancers (their hosted zone ids are different, see: https://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region).
As an example, the configuration defined below will return "Z32O12XQLNTSW2" as hosted ID zone, but it's impossible to retrieve network load balancer equivalent: "Z2IFOLAFXWLO4F".
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: