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

tests/resource/aws_default_security_group: Remove hardcoded us-east-1 handling #16026

Merged
merged 2 commits into from
Nov 11, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Nov 4, 2020

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

Reference: #8316
Reference: #15737
Reference: #15791

Release note for CHANGELOG:

NONE

Previously in AWS GovCloud (US):

=== RUN   TestAccAWSDefaultSecurityGroup_Classic_basic
TestAccAWSDefaultSecurityGroup_Classic_basic: provider_test.go:196: [{0 error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.
  status code: 403, request id: fc6cf64f-8c40-4e8b-a37c-a82d8c6a69c9  []}]
--- FAIL: TestAccAWSDefaultSecurityGroup_Classic_basic (0.40s)

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSDefaultSecurityGroup_Classic_basic (16.47s)
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_empty (0.00s)

Output from acceptance testing in AWS GovCloud (US):

--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_basic (2.90s)
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_empty (0.00s)

… handling

Reference: #8316
Reference: #15737
Reference: #15791

Previously in AWS GovCloud (US):

```
=== RUN   TestAccAWSDefaultSecurityGroup_Classic_basic
TestAccAWSDefaultSecurityGroup_Classic_basic: provider_test.go:196: [{0 error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.
  status code: 403, request id: fc6cf64f-8c40-4e8b-a37c-a82d8c6a69c9  []}]
--- FAIL: TestAccAWSDefaultSecurityGroup_Classic_basic (0.40s)
```

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAWSDefaultSecurityGroup_Classic_basic (16.47s)
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_empty (0.00s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_basic (2.90s)
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_empty (0.00s)
```
@bflad bflad added the technical-debt Addresses areas of the codebase that need refactoring or redesign. label Nov 4, 2020
@bflad bflad requested a review from a team as a code owner November 4, 2020 21:22
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 4, 2020
@YakDriver YakDriver self-assigned this Nov 10, 2020
@YakDriver
Copy link
Member

Going to investigate this failure more:

Commercial:

--- PASS: TestAWSDefaultSecurityGroupMigrateState (0.14s)
--- PASS: TestAWSDefaultSecurityGroupMigrateState_empty (0.16s)
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_empty (0.00s)
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_basic (0.00s)
--- FAIL: TestAccAWSDefaultSecurityGroup_Vpc_basic (7.88s)
--- PASS: TestAccAWSDefaultSecurityGroup_Vpc_empty (15.24s)

Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

TestAccAWSDefaultSecurityGroup_Vpc_basic is consistently failing. It looks like it wasn't directly changed but is expecting us-east-1.

Attribute 'arn' expected "arn:aws:ec2:us-east-1:187416307283:security-group/sg-08749b1cfe35c9563",
got "arn:aws:ec2:us-west-2:187416307283:security-group/sg-08749b1cfe35c9563"

@bflad
Copy link
Contributor Author

bflad commented Nov 10, 2020

The new commit should fix that issue -- both the regular region test and EC2-Classic region test were using the ARN checking function. 🤦 Please note that this resource testing needs to be run with no parallelism locally until #16018 is reviewed and merged.

Output from acceptance testing in AWS Commercial:

--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_empty (0.00s)
--- PASS: TestAccAWSDefaultSecurityGroup_Vpc_basic (54.56s)
--- PASS: TestAccAWSDefaultSecurityGroup_Classic_basic (16.91s)
--- PASS: TestAccAWSDefaultSecurityGroup_Vpc_empty (33.82s)

Output from acceptance testing in AWS GovCloud (US):

--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_empty (0.00s)
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_basic (2.96s)
--- PASS: TestAccAWSDefaultSecurityGroup_Vpc_empty (38.18s)
--- PASS: TestAccAWSDefaultSecurityGroup_Vpc_basic (62.71s)

Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

Looking great! 💯

GovCloud:

--- PASS: TestAccAWSDefaultSecurityGroup_Vpc_basic (55.09s)
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_basic (2.79s)
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_empty (0.00s)

Commercial:

--- PASS: TestAccAWSDefaultSecurityGroup_Vpc_basic (47.26s)
--- SKIP: TestAccAWSDefaultSecurityGroup_Classic_empty (0.00s)
--- PASS: TestAccAWSDefaultSecurityGroup_Classic_basic (12.43s)

@bflad bflad added this to the v3.15.0 milestone Nov 11, 2020
@bflad bflad merged commit 7ffe041 into master Nov 11, 2020
@bflad bflad deleted the t-aws_default_security_group-remove-ec2-classic-fixes branch November 11, 2020 00:05
@ghost
Copy link

ghost commented Nov 12, 2020

This has been released in version 3.15.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!

@ghost
Copy link

ghost commented Dec 11, 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 as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. size/M Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign. 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