Terraform-provider-aws: aws_route53_record - aggregate multiple changes into a single request.

Created on 1 Feb 2018  路  5Comments  路  Source: hashicorp/terraform-provider-aws

Hello,
I'm using terraform to manage a route53 zone.
Today I needed to change 4 hosts from A to CNAME. This resulted in a total of 18 ChangeResourceRecordSets requests from terraform.
The change also failed for 2 of the records because you can't have a CNAME record together with other records. The A record was deleted which left me with no record at all.
The new records were only created when I ran terraform again.

Could this please be improved? Changes to the same hosted zone should be aggregated into a minimum number of API requests.
E.g. for my change today, a single request with 8 Change elements (4x DELETE, 4x CREATE) would have worked.

Cheers!

Terraform Version

Terraform v0.11.3

  • provider.aws v1.8.0

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_route53_record

Terraform Configuration Files

One aws_route_53 per name/type combination. Many of those.

Expected Behavior

Only one ChangeResourceRecordSets requests. Names should always resolve to something.

Actual Behavior

18 ChangeResourceRecordSets requests. Some names could not be resolved.

Steps to Reproduce

  1. Change some records in the same hosted zone
  2. terraform apply

Important Factoids

enhancement provider servicroute53

Most helpful comment

I'm also having this problem, so please don't close.

All 5 comments

Hi @joernheissler, there are two facets to the issue you outlined above. 馃槃

The change also failed for 2 of the records because you can't have a CNAME record together with other records.

Could you please double check the open repository issues for label:service/route53 and see if any already fit your case there? I believe I have seen something similar to your use case.

As for the rest here, this is a great use case in our "combining API requests" enhancement issue that is #2553. Currently, the Terraform resource model does not support this functionality across multiple resources. Could you 馃憤 that issue and comment with your use case there? I think its valuable feedback.

If you find the Route53 issue you outlined, we would prefer to condense the issues and discussions to existing tickets by closing this one. If not, that's okay too, we'll just need more information including debug logs for the bug. Thanks!

I did check, but I checked again: #1094, #1852 are related, #126 might be too.
I think that those 3 bugs and this one can be resolved at the same time with the help of #2553.

If you find the Route53 issue you outlined, we would prefer to condense the issues and discussions to existing tickets by closing this one

Feel free to pick one issue and close the others. I really don't care which :-)

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 also having this problem, so please don't close.

Was this page helpful?
0 / 5 - 0 ratings