Skip to content
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

resource/aws_route53_zone: Support multiple vpc associations, deprecate vpc_id and vpc_region, and enhance acceptance testing #6299

Merged
merged 1 commit into from
Oct 30, 2018

Conversation

bflad
Copy link
Member

@bflad bflad commented Oct 30, 2018

Route53 Hosted Zones can have multiple VPC associations. Previously, the resource would error when attempting to import a zone with multiple associations. I wasn't planning on this large refactoring but trying to get the other changes in highlighted the need to bring this resource up to more current practices.

Closes #892
Closes #5317
Closes #5736

Changes:

  • Add vpc TypeSet attribute to support exclusive management and import of multiple VPC associations
  • Deprecate vpc_id and vpc_region attributes in favor of vpc, adding note to Version 2 Upgrade Guide
  • Call Read instead of Update after Create
  • Refactor Create/Read/Update/Delete to return error message context, use AWS Go SDK helpers to prevent panics, use AWS Go SDK constants, always call d.Set(), and use isAWSErr()
  • Add acceptance testing for delegation_set_id attribute
  • Enhance acceptance testing for tags to test updates
  • Migrate _importBasic acceptance test to Import TestStep in all acceptance tests

Output from acceptance testing:

--- PASS: TestAccAWSRoute53Zone_basic (73.02s)
--- PASS: TestAccAWSRoute53Zone_VPCRegion (73.44s)
--- PASS: TestAccAWSRoute53Zone_DelegationSetID (76.95s)
--- PASS: TestAccAWSRoute53Zone_Comment (81.43s)
--- PASS: TestAccAWSRoute53Zone_VPCID (82.88s)
--- PASS: TestAccAWSRoute53Zone_multiple (84.98s)
--- PASS: TestAccAWSRoute53Zone_VPC_Single (88.03s)
--- PASS: TestAccAWSRoute53Zone_Tags (91.95s)
--- PASS: TestAccAWSRoute53Zone_VPC_Multiple (140.49s)
--- PASS: TestAccAWSRoute53Zone_VPC_Updates (226.21s)
--- PASS: TestAccAWSRoute53Zone_ForceDestroy (249.03s)
--- PASS: TestAccAWSRoute53Zone_ForceDestroy_TrailingPeriod (249.05s)

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/route53 Issues and PRs that pertain to the route53 service. labels Oct 30, 2018
@bflad bflad requested a review from a team October 30, 2018 03:22
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 30, 2018
…te vpc_id and vpc_region, and enhance acceptance testing

Changes:
* Add `vpc` TypeSet attribute to support exclusive management and import of multiple VPC associations
* Deprecate `vpc_id` and `vpc_region` attributes in favor of `vpc`, adding note to Version 2 Upgrade Guide
* Refactor Create/Read/Update/Delete to return error message context, use AWS Go SDK helpers to prevent panics, always call d.Set(), and use isAWSErr()
* Add acceptance testing for delegation_set_id attribute
* Enhance acceptance testing for tags to test updates
* Migrate _importBasic acceptance test to Import TestStep in all acceptance tests

Output from acceptance testing:

```
--- PASS: TestAccAWSRoute53Zone_basic (73.02s)
--- PASS: TestAccAWSRoute53Zone_VPCRegion (73.44s)
--- PASS: TestAccAWSRoute53Zone_DelegationSetID (76.95s)
--- PASS: TestAccAWSRoute53Zone_Comment (81.43s)
--- PASS: TestAccAWSRoute53Zone_VPCID (82.88s)
--- PASS: TestAccAWSRoute53Zone_multiple (84.98s)
--- PASS: TestAccAWSRoute53Zone_VPC_Single (88.03s)
--- PASS: TestAccAWSRoute53Zone_Tags (91.95s)
--- PASS: TestAccAWSRoute53Zone_VPC_Multiple (140.49s)
--- PASS: TestAccAWSRoute53Zone_VPC_Updates (226.21s)
--- PASS: TestAccAWSRoute53Zone_ForceDestroy (249.03s)
--- PASS: TestAccAWSRoute53Zone_ForceDestroy_TrailingPeriod (249.05s)
```
Copy link
Member

@alexsomesan alexsomesan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As much as I can tell, looks good!

@bflad bflad added this to the v1.42.0 milestone Oct 30, 2018
@bflad bflad merged commit b92d9b6 into master Oct 30, 2018
@bflad bflad deleted the f-aws_route53_zone-vpc branch October 30, 2018 14:13
bflad added a commit that referenced this pull request Oct 30, 2018
@bflad
Copy link
Member Author

bflad commented Nov 1, 2018

This has been released in version 1.42.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 2, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/route53 Issues and PRs that pertain to the route53 service. size/XXL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't import private Route53 Hosted Zone with more than one VPC association
2 participants