-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Possible Bug in aws/s3_bucket provider populating the hosted_zone_id attribute #3334
Comments
Are you by any chance using eu-central-1 region? I've encountered the same error. |
Yes. I'm running in eu-central-1. sirry to mention this before.
|
Hey @railsbros-dirk – sorry for the silence here. I believe this issue is fixed now, as I'm not able to reproduce it. The fix should have been introduced in 0.6.2, so if you're still hitting this let me know. I used this config to test, and things worked as expected: resource "aws_s3_bucket" "styleguide" {
bucket = "styleguide.staging.tftesting.com"
acl = "public-read"
website {
index_document = "index.html"
error_document = "error.html"
}
}
resource "aws_route53_zone" "primary" {
name = "tftesting.com"
}
resource "aws_route53_record" "styleguide" {
zone_id = "${aws_route53_zone.primary.id}"
name = "styleguide.staging.tftesting.com"
type = "A"
alias {
name = "${aws_s3_bucket.styleguide.website_domain}"
zone_id = "${aws_s3_bucket.styleguide.hosted_zone_id}"
evaluate_target_health = true
}
}
output "hosted" {
value = "${aws_s3_bucket.styleguide.hosted_zone_id}"
} |
Sorry, only had the chance to test this today. I still don't get a
My config is the same as yours. What region do tested this in? I'm running in |
Yep, found it, patch incoming.. |
Fix sent in #4236 , turns out we have a typo 😦 |
Thanks for the fast fix. And damn those typos😊
|
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. |
I want to create a S3 bucket enabled for 'Static Website Hosting' and creating a Route53 alias record for it. This is the part of my config to do so:
Creating the bucket works as expected but the Route53 record resource fails with the following error (Searching for this didn't yielded any results so far):
It seems the
aws_s3_bucket
doesn't return any value forhosted_zone_id
. I added the attribute to the output my config and it was empty. Finally adding thezone_id
manually to the Terraform config made everything work. But obviously this is not what I wanted ;-)I already found the issue #2210 which seemed to relate to this overall topic. I guess someone already tested this while working on the issue. Thus I don't know if I made something wrong in my config or if this is a real bug.
Thanks for helping out!
The text was updated successfully, but these errors were encountered: