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

r/aws_efs_file_system - refactor tagging and tests #11654

Merged
merged 3 commits into from
Jan 24, 2020

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Jan 18, 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

Release note for CHANGELOG:

NONE

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSEFSFileSystem_'
--- PASS: TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption (58.26s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy (98.61s)
--- PASS: TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps (102.44s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy_update (108.44s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy_removal (110.03s)
--- PASS: TestAccAWSEFSFileSystem_basic (113.80s)
--- PASS: TestAccAWSEFSFileSystem_pagedTags (120.53s)
--- PASS: TestAccAWSEFSFileSystem_ThroughputMode (126.65s)
--- PASS: TestAccAWSEFSFileSystem_kmsKey (127.22s)
--- PASS: TestAccAWSEFSFileSystem_tags (164.91s)
--- PASS: TestAccAWSEFSFileSystem_disappears (87.66s)

@DrFaust92 DrFaust92 requested a review from a team January 18, 2020 08:02
@ghost ghost added size/L Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/efs Issues and PRs that pertain to the efs service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jan 18, 2020
@DrFaust92 DrFaust92 changed the title r/aws_efs_file_system - refactor tagging r/aws_efs_file_system - refactor tagging and tests Jan 18, 2020
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Jan 18, 2020
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 24, 2020
@bflad bflad self-assigned this Jan 24, 2020
@bflad bflad added this to the v2.47.0 milestone Jan 24, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @DrFaust92 🚀

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption (25.32s)
--- PASS: TestAccAWSEFSFileSystem_pagedTags (45.14s)
--- PASS: TestAccAWSEFSFileSystem_ThroughputMode (53.13s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy (67.97s)
--- PASS: TestAccAWSEFSFileSystem_basic (70.60s)
--- PASS: TestAccAWSEFSFileSystem_kmsKey (75.09s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy_removal (80.93s)
--- PASS: TestAccAWSEFSFileSystem_disappears (85.33s)
--- PASS: TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps (106.19s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy_update (127.86s)
--- PASS: TestAccAWSEFSFileSystem_tags (128.90s)

Output from acceptance testing in AWS GovCloud (US) (unrelated test failure fix noted in the review):

--- PASS: TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption (24.79s)
--- FAIL: TestAccAWSEFSFileSystem_basic (27.99s)
--- PASS: TestAccAWSEFSFileSystem_disappears (30.58s)
--- PASS: TestAccAWSEFSFileSystem_kmsKey (49.76s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy_removal (53.12s)
--- PASS: TestAccAWSEFSFileSystem_tags (62.95s)
--- PASS: TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps (81.86s)
--- PASS: TestAccAWSEFSFileSystem_ThroughputMode (87.62s)
--- PASS: TestAccAWSEFSFileSystem_pagedTags (90.78s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy (117.45s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy_update (123.65s)

resource.TestCheckResourceAttr(resourceName, "throughput_mode", efs.ThroughputModeBursting),
testAccCheckEfsFileSystem(resourceName, &desc),
testAccCheckEfsFileSystemPerformanceMode(resourceName, "generalPurpose"),
resource.TestMatchResourceAttr(resourceName, "dns_name", regexp.MustCompile("^[^.]+.efs.us-west-2.amazonaws.com$")),
Copy link
Contributor

Choose a reason for hiding this comment

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

To prevent testing issues in regions outside us-west-2 and partitions outside AWS Commercial, we will separately introduce a new TestCheckFunc that can replace these hardcoded DNS hostname checks.

--- FAIL: TestAccAWSEFSFileSystem_basic (27.99s)
    testing.go:640: Step 0 error: Check failed: Check 6/6 error: aws_efs_file_system.test: Attribute 'dns_name' didn't match "^[^.]+.efs.us-west-2.amazonaws.com$", got "fs-e91c94e8.efs.us-gov-west-1.amazonaws.com"

input := &efs.DeleteTagsInput{
FileSystemId: aws.String(identifier),
TagKeys: aws.StringSlice(removedTags.IgnoreAws().Keys()),
input := &efs.UntagResourceInput{
Copy link
Contributor

Choose a reason for hiding this comment

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

It appears these new APIs are available in AWS GovCloud (US) as well, which meets our bar for switching these calls. 👍

@bflad bflad merged commit d46cb8a into hashicorp:master Jan 24, 2020
@bflad bflad added technical-debt Addresses areas of the codebase that need refactoring or redesign. and removed enhancement Requests to existing resources that expand the functionality or scope. labels Jan 24, 2020
bflad added a commit that referenced this pull request Jan 24, 2020
@DrFaust92 DrFaust92 deleted the r/efs-tags-refactor branch January 24, 2020 16:27
@ghost
Copy link

ghost commented Jan 30, 2020

This has been released in version 2.47.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 Mar 27, 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 Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/efs Issues and PRs that pertain to the efs service. size/XL 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