hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.84k stars 9.19k forks source link

r/aws_ec2_transit_gateway_vpc_attachment: Prevent drift for existing resources #39519

Closed ewbankkit closed 1 month ago

ewbankkit commented 1 month ago

Description

Marks security_group_referencing_support as Computed to prevent plan drift for resources created prior to v5.69.0.

Relations

Closes https://github.com/hashicorp/terraform-provider-aws/issues/39518.

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccTransitGateway_serial/VpcAttachment_SecurityGroupReferencing\|TestAccTransitGateway_serial/VpcAttachment_basic' PKG=ec2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.1 test ./internal/service/ec2/... -v -count 1 -parallel 20  -run=TestAccTransitGateway_serial/VpcAttachment_SecurityGroupReferencing\|TestAccTransitGateway_serial/VpcAttachment_basic -timeout 360m
=== RUN   TestAccTransitGateway_serial
=== PAUSE TestAccTransitGateway_serial
=== CONT  TestAccTransitGateway_serial
=== RUN   TestAccTransitGateway_serial/VpcAttachment_SecurityGroupReferencingSupportV5690Diff
=== RUN   TestAccTransitGateway_serial/VpcAttachment_SecurityGroupReferencingSupportExistingResource
=== RUN   TestAccTransitGateway_serial/VpcAttachment_basic
=== PAUSE TestAccTransitGateway_serial/VpcAttachment_basic
=== RUN   TestAccTransitGateway_serial/VpcAttachment_SecurityGroupReferencingSupport
=== CONT  TestAccTransitGateway_serial/VpcAttachment_basic
--- PASS: TestAccTransitGateway_serial (1051.85s)
    --- PASS: TestAccTransitGateway_serial/VpcAttachment_SecurityGroupReferencingSupportV5690Diff (362.28s)
    --- PASS: TestAccTransitGateway_serial/VpcAttachment_SecurityGroupReferencingSupportExistingResource (378.81s)
    --- PASS: TestAccTransitGateway_serial/VpcAttachment_SecurityGroupReferencingSupport (310.76s)
    --- PASS: TestAccTransitGateway_serial/VpcAttachment_basic (310.72s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2    1368.213s
% make testacc TESTARGS='-run=TestAccTransitGateway_serial/VpcAttachmentAccepter_basic' PKG=ec2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.1 test ./internal/service/ec2/... -v -count 1 -parallel 20  -run=TestAccTransitGateway_serial/VpcAttachmentAccepter_basic -timeout 360m
=== RUN   TestAccTransitGateway_serial
=== PAUSE TestAccTransitGateway_serial
=== CONT  TestAccTransitGateway_serial
=== RUN   TestAccTransitGateway_serial/VpcAttachmentAccepter_basic
=== PAUSE TestAccTransitGateway_serial/VpcAttachmentAccepter_basic
=== CONT  TestAccTransitGateway_serial/VpcAttachmentAccepter_basic
--- PASS: TestAccTransitGateway_serial (0.00s)
    --- PASS: TestAccTransitGateway_serial/VpcAttachmentAccepter_basic (347.68s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2    353.265s
% make testacc TESTARGS='-run=TestAccTransitGateway_serial/Gateway_SecurityGroupReferencingSupport\|TestAccTransitGateway_serial/Gateway_basic' PKG=ec2 
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.1 test ./internal/service/ec2/... -v -count 1 -parallel 20  -run=TestAccTransitGateway_serial/Gateway_SecurityGroupReferencingSupport\|TestAccTransitGateway_serial/Gateway_basic -timeout 360m
=== RUN   TestAccTransitGateway_serial
=== PAUSE TestAccTransitGateway_serial
=== CONT  TestAccTransitGateway_serial
=== RUN   TestAccTransitGateway_serial/Gateway_SecurityGroupReferencingSupportExistingResource
=== RUN   TestAccTransitGateway_serial/Gateway_SecurityGroupReferencingSupport
=== RUN   TestAccTransitGateway_serial/Gateway_basic
=== PAUSE TestAccTransitGateway_serial/Gateway_basic
=== CONT  TestAccTransitGateway_serial/Gateway_basic
--- PASS: TestAccTransitGateway_serial (449.18s)
    --- PASS: TestAccTransitGateway_serial/Gateway_SecurityGroupReferencingSupportExistingResource (232.41s)
    --- PASS: TestAccTransitGateway_serial/Gateway_SecurityGroupReferencingSupport (216.77s)
    --- PASS: TestAccTransitGateway_serial/Gateway_basic (130.80s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2    585.513s
github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

For Submitters

ewbankkit commented 1 month ago
% make golangci-lint PKG=ec2
make: golangci-lint Checks / 1 of 3...
make: golangci-lint Checks / 2 of 3...
WARN [config_reader] The configuration option `linters.errcheck.ignore` is deprecated, please use `linters.errcheck.exclude-functions`. 
make: golangci-lint Checks / 3 of 3...
github-actions[bot] commented 1 month ago

This functionality has been released in v5.70.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[bot] commented 1 week ago

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.