-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
awsproviderlint: Enforce kms_key_id as ARN attribute in AWSAT001 check #13996
Conversation
Previously, test failures could include these outside AWS Commercial: ``` --- FAIL: TestAccAWSEBSSnapshot_withKms (88.99s) testing.go:684: Step 0 error: Check failed: Check 2/2 error: aws_ebs_snapshot.test: Attribute 'kms_key_id' didn't match "^arn:aws:kms:[a-z]{2}-[a-z]+-\\d{1}:[0-9]{12}:key/[a-z0-9-]{36}$", got "arn:aws-us-gov:kms:us-gov-west-1:123456789012:key/59dff49a-68bc-407d-959c-deb91757d55b" ``` New AWSAT001 check test failures: ``` aws/resource_aws_db_instance_test.go:187:6: AWSAT001: prefer resource.TestCheckResourceAttrPair() or ARN check functions (e.g. testAccMatchResourceAttrRegionalARN) aws/resource_aws_ebs_snapshot_test.go:127:6: AWSAT001: prefer resource.TestCheckResourceAttrPair() or ARN check functions (e.g. testAccMatchResourceAttrRegionalARN) aws/resource_aws_fsx_windows_file_system_test.go:92:6: AWSAT001: prefer resource.TestCheckResourceAttrPair() or ARN check functions (e.g. testAccMatchResourceAttrRegionalARN) aws/resource_aws_rds_cluster_instance_test.go:207:6: AWSAT001: prefer resource.TestCheckResourceAttrPair() or ARN check functions (e.g. testAccMatchResourceAttrRegionalARN) ``` Output from acceptance testing in AWS Commercial: ``` --- PASS: TestAccAWSEBSSnapshot_withKms (41.72s) --- PASS: TestAccAWSDBInstance_kmsKey (486.55s) --- PASS: TestAccAWSRDSClusterInstance_kmsKey (691.04s) ``` Output from acceptance testing in AWS GovCloud (US) (hardcoded AZ and service availability PreCheck test failures will be separately addressed in the future): ``` --- PASS: TestAccAWSEBSSnapshot_withKms (60.17s) --- PASS: TestAccAWSDBInstance_kmsKey (479.81s) --- FAIL: TestAccAWSRDSClusterInstance_kmsKey (17.37s) TestAccAWSRDSClusterInstance_kmsKey: testing.go:684: Step 0 error: errors during apply: Error: error creating RDS cluster: InvalidVPCNetworkStateFault: Availability zones '[us-west-2a, us-west-2b, us-west-2c]' are unavailable in this region, please choose another zone set. --- FAIL: TestAccAWSFsxWindowsFileSystem_basic (1743.81s) TestAccAWSFsxWindowsFileSystem_basic: testing.go:684: Step 0 error: errors during apply: Error: Error creating FSx filesystem: RequestError: send request failed caused by: Post "https://fsx.us-gov-west-1.amazonaws.com/": dial tcp: lookup fsx.us-gov-west-1.amazonaws.com: no such host ```
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 👍
Relevant output of acceptance tests:
--- PASS: TestAccAWSEBSSnapshot_withKms (36.25s)
--- PASS: TestAccAWSDBInstance_kmsKey (469.07s)
--- PASS: TestAccAWSFsxWindowsFileSystem_basic (3162.94s)
--- PASS: TestAccAWSRDSClusterInstance_kmsKey (698.58s)
This has been released in version 2.69.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:
Previously, test failures could include these outside AWS Commercial:
New AWSAT001 check test failures:
Output from acceptance testing in AWS Commercial:
Output from acceptance testing in AWS GovCloud (US) (hardcoded AZ and service availability PreCheck test failures will be separately addressed in the future):