-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Conversation
refactor errors and use isAWSErr + enums refactor tests
There was a problem hiding this 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$")), |
There was a problem hiding this comment.
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{ |
There was a problem hiding this comment.
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. 👍
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! |
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! |
Community Note
Release note for CHANGELOG:
Output from acceptance testing: