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_ec2_managed_prefix_list: Prevent entry description update errors #19095

Merged
merged 2 commits into from
Apr 27, 2021

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Apr 23, 2021

Community Note

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

Previously:

=== CONT  TestAccAwsEc2ManagedPrefixList_Entry_Description
    resource_aws_ec2_managed_prefix_list_test.go:162: Step 3/3 error: Error running apply: exit status 1

        Error: error updating EC2 Managed Prefix List (pl-07236fe64b781b5b3): InvalidParameterValue: Request cannot contain Cidr 1.0.0.0/8 in both AddPrefixListEntries and RemovePrefixListEntries
                status code: 400, request id: d3904b6e-f434-4610-b6e7-923bd582ef70

          on terraform_plugin_test.tf line 2, in resource "aws_ec2_managed_prefix_list" "test":
           2: resource "aws_ec2_managed_prefix_list" "test" {

--- FAIL: TestAccAwsEc2ManagedPrefixList_Entry_Description (31.81s)

Output from acceptance testing:

--- PASS: TestAccAwsEc2ManagedPrefixList_disappears (21.48s)
--- PASS: TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6 (28.02s)
--- PASS: TestAccAwsEc2ManagedPrefixList_basic (28.21s)
--- PASS: TestAccAwsEc2ManagedPrefixList_Name (34.87s)
--- PASS: TestAccAwsEc2ManagedPrefixList_Entry_Description (41.21s)
--- PASS: TestAccAwsEc2ManagedPrefixList_Entry_Cidr (42.44s)
--- PASS: TestAccAwsEc2ManagedPrefixList_Tags (50.13s)

…e errors

Previously:

```
=== CONT  TestAccAwsEc2ManagedPrefixList_Entry_Description
    resource_aws_ec2_managed_prefix_list_test.go:162: Step 3/3 error: Error running apply: exit status 1

        Error: error updating EC2 Managed Prefix List (pl-07236fe64b781b5b3): InvalidParameterValue: Request cannot contain Cidr 1.0.0.0/8 in both AddPrefixListEntries and RemovePrefixListEntries
                status code: 400, request id: d3904b6e-f434-4610-b6e7-923bd582ef70

          on terraform_plugin_test.tf line 2, in resource "aws_ec2_managed_prefix_list" "test":
           2: resource "aws_ec2_managed_prefix_list" "test" {

--- FAIL: TestAccAwsEc2ManagedPrefixList_Entry_Description (31.81s)
```

Output from acceptance testing:

```
--- PASS: TestAccAwsEc2ManagedPrefixList_disappears (21.48s)
--- PASS: TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6 (28.02s)
--- PASS: TestAccAwsEc2ManagedPrefixList_basic (28.21s)
--- PASS: TestAccAwsEc2ManagedPrefixList_Name (34.87s)
--- PASS: TestAccAwsEc2ManagedPrefixList_Entry_Description (41.21s)
--- PASS: TestAccAwsEc2ManagedPrefixList_Entry_Cidr (42.44s)
--- PASS: TestAccAwsEc2ManagedPrefixList_Tags (50.13s)
```
@bflad bflad added the bug Addresses a defect in current functionality. label Apr 23, 2021
@bflad bflad requested a review from a team as a code owner April 23, 2021 20:26
@ghost ghost 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 Apr 23, 2021
@ewbankkit ewbankkit self-assigned this Apr 23, 2021
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAwsEc2ManagedPrefixList_' ACCTEST_PARALLELISM=4 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 4 -run=TestAccAwsEc2ManagedPrefixList_ -timeout 180m
=== RUN   TestAccAwsEc2ManagedPrefixList_basic
=== PAUSE TestAccAwsEc2ManagedPrefixList_basic
=== RUN   TestAccAwsEc2ManagedPrefixList_disappears
=== PAUSE TestAccAwsEc2ManagedPrefixList_disappears
=== RUN   TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6
=== PAUSE TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6
=== RUN   TestAccAwsEc2ManagedPrefixList_Entry_Cidr
=== PAUSE TestAccAwsEc2ManagedPrefixList_Entry_Cidr
=== RUN   TestAccAwsEc2ManagedPrefixList_Entry_Description
=== PAUSE TestAccAwsEc2ManagedPrefixList_Entry_Description
=== RUN   TestAccAwsEc2ManagedPrefixList_Name
=== PAUSE TestAccAwsEc2ManagedPrefixList_Name
=== RUN   TestAccAwsEc2ManagedPrefixList_Tags
=== PAUSE TestAccAwsEc2ManagedPrefixList_Tags
=== CONT  TestAccAwsEc2ManagedPrefixList_basic
=== CONT  TestAccAwsEc2ManagedPrefixList_Entry_Description
=== CONT  TestAccAwsEc2ManagedPrefixList_Name
=== CONT  TestAccAwsEc2ManagedPrefixList_Tags
--- PASS: TestAccAwsEc2ManagedPrefixList_basic (21.95s)
=== CONT  TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6
--- PASS: TestAccAwsEc2ManagedPrefixList_Name (31.66s)
=== CONT  TestAccAwsEc2ManagedPrefixList_Entry_Cidr
--- PASS: TestAccAwsEc2ManagedPrefixList_Entry_Description (39.02s)
=== CONT  TestAccAwsEc2ManagedPrefixList_disappears
--- PASS: TestAccAwsEc2ManagedPrefixList_Tags (44.43s)
--- PASS: TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6 (23.55s)
--- PASS: TestAccAwsEc2ManagedPrefixList_disappears (20.12s)
--- PASS: TestAccAwsEc2ManagedPrefixList_Entry_Cidr (34.67s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	69.521s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAwsEc2ManagedPrefixList_' ACCTEST_PARALLELISM=4
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 4 -run=TestAccAwsEc2ManagedPrefixList_ -timeout 180m
=== RUN   TestAccAwsEc2ManagedPrefixList_basic
=== PAUSE TestAccAwsEc2ManagedPrefixList_basic
=== RUN   TestAccAwsEc2ManagedPrefixList_disappears
=== PAUSE TestAccAwsEc2ManagedPrefixList_disappears
=== RUN   TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6
=== PAUSE TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6
=== RUN   TestAccAwsEc2ManagedPrefixList_Entry_Cidr
=== PAUSE TestAccAwsEc2ManagedPrefixList_Entry_Cidr
=== RUN   TestAccAwsEc2ManagedPrefixList_Entry_Description
=== PAUSE TestAccAwsEc2ManagedPrefixList_Entry_Description
=== RUN   TestAccAwsEc2ManagedPrefixList_Name
=== PAUSE TestAccAwsEc2ManagedPrefixList_Name
=== RUN   TestAccAwsEc2ManagedPrefixList_Tags
=== PAUSE TestAccAwsEc2ManagedPrefixList_Tags
=== CONT  TestAccAwsEc2ManagedPrefixList_basic
=== CONT  TestAccAwsEc2ManagedPrefixList_Entry_Description
=== CONT  TestAccAwsEc2ManagedPrefixList_Tags
=== CONT  TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6
=== CONT  TestAccAwsEc2ManagedPrefixList_basic
    resource_aws_ec2_managed_prefix_list_test.go:350: skipping acceptance testing: InvalidAction: The action DescribeManagedPrefixLists is not valid for this web service.
        	status code: 400, request id: c5f9903e-b826-4b39-811f-53acb1f9518a
--- SKIP: TestAccAwsEc2ManagedPrefixList_basic (1.83s)
=== CONT  TestAccAwsEc2ManagedPrefixList_Entry_Cidr
=== CONT  TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6
    resource_aws_ec2_managed_prefix_list_test.go:350: skipping acceptance testing: InvalidAction: The action DescribeManagedPrefixLists is not valid for this web service.
        	status code: 400, request id: 97aa1ba2-5d53-4889-8c03-c8683df20335
--- SKIP: TestAccAwsEc2ManagedPrefixList_AddressFamily_IPv6 (1.86s)
=== CONT  TestAccAwsEc2ManagedPrefixList_Name
=== CONT  TestAccAwsEc2ManagedPrefixList_Entry_Description
    resource_aws_ec2_managed_prefix_list_test.go:350: skipping acceptance testing: InvalidAction: The action DescribeManagedPrefixLists is not valid for this web service.
        	status code: 400, request id: 36b99604-20b6-4075-acb0-17149b9668d5
--- SKIP: TestAccAwsEc2ManagedPrefixList_Entry_Description (1.87s)
=== CONT  TestAccAwsEc2ManagedPrefixList_disappears
=== CONT  TestAccAwsEc2ManagedPrefixList_Tags
    resource_aws_ec2_managed_prefix_list_test.go:350: skipping acceptance testing: InvalidAction: The action DescribeManagedPrefixLists is not valid for this web service.
        	status code: 400, request id: 00276266-0996-401f-88aa-69752d3d43cb
--- SKIP: TestAccAwsEc2ManagedPrefixList_Tags (1.89s)
=== CONT  TestAccAwsEc2ManagedPrefixList_Entry_Cidr
    resource_aws_ec2_managed_prefix_list_test.go:350: skipping acceptance testing: InvalidAction: The action DescribeManagedPrefixLists is not valid for this web service.
        	status code: 400, request id: 0c47bad7-3c9f-49ff-b161-5ffb251dcde7
--- SKIP: TestAccAwsEc2ManagedPrefixList_Entry_Cidr (0.32s)
=== CONT  TestAccAwsEc2ManagedPrefixList_Name
    resource_aws_ec2_managed_prefix_list_test.go:350: skipping acceptance testing: InvalidAction: The action DescribeManagedPrefixLists is not valid for this web service.
        	status code: 400, request id: d967f898-7431-43e2-a2b1-abbb8dbc3ecc
--- SKIP: TestAccAwsEc2ManagedPrefixList_Name (0.33s)
=== CONT  TestAccAwsEc2ManagedPrefixList_disappears
    resource_aws_ec2_managed_prefix_list_test.go:350: skipping acceptance testing: InvalidAction: The action DescribeManagedPrefixLists is not valid for this web service.
        	status code: 400, request id: 5db73db3-aff7-4284-8062-ec05232eeeed
--- SKIP: TestAccAwsEc2ManagedPrefixList_disappears (0.37s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	5.168s

@bflad bflad merged commit a28a210 into main Apr 27, 2021
@bflad bflad deleted the b-aws_ec2_managed_prefix_list-description-update branch April 27, 2021 19:08
@github-actions github-actions bot added this to the v3.38.0 milestone Apr 27, 2021
github-actions bot pushed a commit that referenced this pull request Apr 27, 2021
@ghost
Copy link

ghost commented Apr 30, 2021

This has been released in version 3.38.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 for triage. Thanks!

@github-actions
Copy link

github-actions bot commented Jun 1, 2021

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 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. size/M 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.

2 participants