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

aws_eip: deprecate vpc attribute #31567

Merged
merged 10 commits into from
May 25, 2023
Merged

aws_eip: deprecate vpc attribute #31567

merged 10 commits into from
May 25, 2023

Conversation

johnsonaj
Copy link
Contributor

Description

Relations

Closes #26714

References

Output from Acceptance Testing

$ make testacc TESTS="TestAccEC2EIP_basic|TestAccEC2EIP_noVPC|TestAccEC2EIP_disappears" PKG=ec2
                                                                                   
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2EIP_basic|TestAccEC2EIP_noVPC|TestAccEC2EIP_disappears'  -timeout 180m
--- PASS: TestAccEC2EIP_disappears (11.60s)
--- PASS: TestAccEC2EIP_noVPC (15.72s)
--- PASS: TestAccEC2EIP_basic (15.73s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	18.994s

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels May 24, 2023
@johnsonaj johnsonaj added this to the v5.0.0 milestone May 24, 2023
@johnsonaj johnsonaj added the enhancement Requests to existing resources that expand the functionality or scope. label May 24, 2023
@gdavison gdavison self-assigned this May 24, 2023
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

Will there we a follow-up PR to update aws_eip resources used in other service tests?

--- PASS: TestAccEC2EIP_disappears (22.62s)
--- PASS: TestAccEC2EIP_BYOIPAddress_default (24.51s)
--- PASS: TestAccEC2EIP_noVPC (26.63s)
--- PASS: TestAccEC2EIP_networkBorderGroup (26.66s)
--- PASS: TestAccEC2EIP_basic (27.47s)
--- PASS: TestAccEC2EIP_PublicIPv4Pool_default (27.67s)
--- PASS: TestAccEC2EIP_NetworkInterface_twoEIPsOneInterface (34.03s)
--- PASS: TestAccEC2EIP_networkInterface (36.04s)
--- PASS: TestAccEC2EIP_tags (48.45s)
--- PASS: TestAccEC2EIP_instance (86.77s)
--- PASS: TestAccEC2EIP_association (107.38s)
--- PASS: TestAccEC2EIP_Instance_notAssociated (123.28s)
--- PASS: TestAccEC2EIP_Instance_reassociate (125.37s)
--- PASS: TestAccEC2EIP_Instance_associatedUserPrivateIP (147.51s)

.changelog/31567.txt Outdated Show resolved Hide resolved
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
ForceNew: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this and vpc are both marked ForceNew, will it destroy an existing EIP if someone updates their config from vpc = true to domain = "vpc"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call. It does not. I went ahead and added a test to verify

$ make testacc TESTS="TestAccEC2EIP_migrateVPCToDomain" PKG=ec2

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2EIP_migrateVPCToDomain'  -timeout 180m
--- PASS: TestAccEC2EIP_migrateVPCToDomain (30.98s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	34.189s

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. examples Introduces or discusses updates to examples. service/cloud9 Issues and PRs that pertain to the cloud9 service. service/codebuild Issues and PRs that pertain to the codebuild service. service/eks Issues and PRs that pertain to the eks service. service/globalaccelerator Issues and PRs that pertain to the globalaccelerator service. service/mwaa Issues and PRs that pertain to the mwaa service. service/shield Issues and PRs that pertain to the shield service. service/transfer Issues and PRs that pertain to the transfer service. service/vpc Issues and PRs that pertain to the vpc service. service/wafv2 Issues and PRs that pertain to the wafv2 service. and removed size/M Managed by automation to categorize the size of a PR. labels May 25, 2023
@johnsonaj
Copy link
Contributor Author

@gdavison updated all the tests and examples that use aws_eip to domain = "vpc"

@johnsonaj johnsonaj merged commit 13253ef into main May 25, 2023
48 checks passed
@johnsonaj johnsonaj deleted the td-aws_eip-depreacate-vpc branch May 25, 2023 13:46
github-actions bot pushed a commit that referenced this pull request May 25, 2023
@github-actions
Copy link

This functionality has been released in v5.0.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!

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2023
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. examples Introduces or discusses updates to examples. service/cloud9 Issues and PRs that pertain to the cloud9 service. service/codebuild Issues and PRs that pertain to the codebuild service. service/ec2 Issues and PRs that pertain to the ec2 service. service/eks Issues and PRs that pertain to the eks service. service/globalaccelerator Issues and PRs that pertain to the globalaccelerator service. service/mwaa Issues and PRs that pertain to the mwaa service. service/shield Issues and PRs that pertain to the shield service. service/transfer Issues and PRs that pertain to the transfer service. service/vpc Issues and PRs that pertain to the vpc service. service/wafv2 Issues and PRs that pertain to the wafv2 service. size/L 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.

resource/aws_eip: Deprecate vpc and make domain a settable parameter
2 participants