-
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
aws_route53_record recreates wildcard record every time #501
Comments
Unescaping problem. It's no surprise that the octal ASCII value for asterisk is 052. |
I was going to fix this myself, @mitchellh but alas I can't even build terraform from current master HEAD. # github.com/hashicorp/terraform/builtin/providers/aws
builtin/providers/aws/resource_aws_autoscaling_group.go:244: g.LoadBalancerNames[0].LoadBalancerName undefined (type string has no field or method LoadBalancerName)
builtin/providers/aws/resource_aws_launch_configuration.go:156: lc.SecurityGroups[0].SecurityGroup undefined (type string has no field or method SecurityGroup)
builtin/providers/aws/structure.go:137: undefined: autoscaling.SecurityGroup
builtin/providers/aws/structure.go:146: undefined: autoscaling.AvailabilityZone
builtin/providers/aws/structure.go:155: undefined: autoscaling.LoadBalancerName
make: *** [updatedeps] Error 2 I was thinking of adding this to const testAccRoute53RecordConfig = `
resource "aws_route53_zone" "main" {
name = "notexample.com"
}
resource "aws_route53_record" "default" {
zone_id = "${aws_route53_zone.main.zone_id}"
name = "www.notexample.com"
type = "A"
ttl = "30"
records = ["127.0.0.1", "127.0.0.27"]
}
resource "aws_route53_record" "wildcard" {
zone_id = "${aws_route53_zone.main.zone_id}"
name = "*.notexample.com"
type = "A"
ttl = "30"
records = ["127.0.0.1"]
}
` and using an incantation with |
Fixes a bug in Route53 and wildcard entries. Refs #501. Also fixes: - an issue in the library where we don't fully wait for the results, because the error code/condition changed with the migration to aws-sdk-go - a limitation in the test, where we only consider the first record returned
Thanks for reporting this @delitescere – sorry for the silence. I have a fix in PR #1222 , though it's kind of ugly (manually searching for |
cc @philk too, since he's the original reporter |
Hey @philk and @delitescere – #1222 was just merged into |
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'm trying to create a wildcard record like this:
Totally works fine and shows up in my .tfstate file. When I refresh (or attempt to apply with a refresh) the refresh deletes the entry from my .tfstate file causing the record to get recreated on apply (not a duplicate, just overwritten). Tried it with CNAME type and same result.
I would guess it has something to do with the API returning a strange response.
aws route53 list-resource-record-sets
returns\\052.domain.com
instead of*.domain.com
as expected:The text was updated successfully, but these errors were encountered: