-
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
data/aws_iam_policy_document - additional json validation #27055
data/aws_iam_policy_document - additional json validation #27055
Conversation
Community NoteVoting for Prioritization
For Submitters
|
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 🚀.
% make testacc TESTARGS='-run=TestAccIAMPolicyDocumentDataSource_' PKG=iam ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 3 -run=TestAccIAMPolicyDocumentDataSource_ -timeout 180m
=== RUN TestAccIAMPolicyDocumentDataSource_basic
=== PAUSE TestAccIAMPolicyDocumentDataSource_basic
=== RUN TestAccIAMPolicyDocumentDataSource_singleConditionValue
=== PAUSE TestAccIAMPolicyDocumentDataSource_singleConditionValue
=== RUN TestAccIAMPolicyDocumentDataSource_conditionWithBoolValue
=== PAUSE TestAccIAMPolicyDocumentDataSource_conditionWithBoolValue
=== RUN TestAccIAMPolicyDocumentDataSource_source
=== PAUSE TestAccIAMPolicyDocumentDataSource_source
=== RUN TestAccIAMPolicyDocumentDataSource_sourceList
=== PAUSE TestAccIAMPolicyDocumentDataSource_sourceList
=== RUN TestAccIAMPolicyDocumentDataSource_sourceConflicting
=== PAUSE TestAccIAMPolicyDocumentDataSource_sourceConflicting
=== RUN TestAccIAMPolicyDocumentDataSource_sourceListConflicting
=== PAUSE TestAccIAMPolicyDocumentDataSource_sourceListConflicting
=== RUN TestAccIAMPolicyDocumentDataSource_override
=== PAUSE TestAccIAMPolicyDocumentDataSource_override
=== RUN TestAccIAMPolicyDocumentDataSource_overrideList
=== PAUSE TestAccIAMPolicyDocumentDataSource_overrideList
=== RUN TestAccIAMPolicyDocumentDataSource_noStatementMerge
=== PAUSE TestAccIAMPolicyDocumentDataSource_noStatementMerge
=== RUN TestAccIAMPolicyDocumentDataSource_noStatementOverride
=== PAUSE TestAccIAMPolicyDocumentDataSource_noStatementOverride
=== RUN TestAccIAMPolicyDocumentDataSource_duplicateSid
=== PAUSE TestAccIAMPolicyDocumentDataSource_duplicateSid
=== RUN TestAccIAMPolicyDocumentDataSource_sourcePolicyValidJSON
=== PAUSE TestAccIAMPolicyDocumentDataSource_sourcePolicyValidJSON
=== RUN TestAccIAMPolicyDocumentDataSource_overridePolicyDocumentValidJSON
=== PAUSE TestAccIAMPolicyDocumentDataSource_overridePolicyDocumentValidJSON
=== RUN TestAccIAMPolicyDocumentDataSource_overrideJSONValidJSON
=== PAUSE TestAccIAMPolicyDocumentDataSource_overrideJSONValidJSON
=== RUN TestAccIAMPolicyDocumentDataSource_sourceJSONValidJSON
=== PAUSE TestAccIAMPolicyDocumentDataSource_sourceJSONValidJSON
=== RUN TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_stringAndSlice
=== PAUSE TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_stringAndSlice
=== RUN TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipals
=== PAUSE TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipals
=== RUN TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipalsGov
=== PAUSE TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipalsGov
=== RUN TestAccIAMPolicyDocumentDataSource_version20081017
=== PAUSE TestAccIAMPolicyDocumentDataSource_version20081017
=== CONT TestAccIAMPolicyDocumentDataSource_basic
=== CONT TestAccIAMPolicyDocumentDataSource_noStatementOverride
=== CONT TestAccIAMPolicyDocumentDataSource_sourceJSONValidJSON
--- PASS: TestAccIAMPolicyDocumentDataSource_basic (14.14s)
=== CONT TestAccIAMPolicyDocumentDataSource_version20081017
--- PASS: TestAccIAMPolicyDocumentDataSource_noStatementOverride (14.17s)
=== CONT TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipalsGov
acctest.go:719: skipping tests; current partition (aws) does not equal aws-us-gov
--- SKIP: TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipalsGov (0.00s)
=== CONT TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipals
--- PASS: TestAccIAMPolicyDocumentDataSource_sourceJSONValidJSON (14.49s)
=== CONT TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_stringAndSlice
--- PASS: TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_multiplePrincipals (13.07s)
=== CONT TestAccIAMPolicyDocumentDataSource_sourceConflicting
--- PASS: TestAccIAMPolicyDocumentDataSource_StatementPrincipalIdentifiers_stringAndSlice (13.04s)
=== CONT TestAccIAMPolicyDocumentDataSource_noStatementMerge
--- PASS: TestAccIAMPolicyDocumentDataSource_version20081017 (22.69s)
=== CONT TestAccIAMPolicyDocumentDataSource_overrideList
--- PASS: TestAccIAMPolicyDocumentDataSource_noStatementMerge (13.79s)
=== CONT TestAccIAMPolicyDocumentDataSource_override
--- PASS: TestAccIAMPolicyDocumentDataSource_sourceConflicting (14.11s)
=== CONT TestAccIAMPolicyDocumentDataSource_sourceListConflicting
--- PASS: TestAccIAMPolicyDocumentDataSource_sourceListConflicting (2.89s)
=== CONT TestAccIAMPolicyDocumentDataSource_overridePolicyDocumentValidJSON
=== CONT TestAccIAMPolicyDocumentDataSource_overrideJSONValidJSON
--- PASS: TestAccIAMPolicyDocumentDataSource_overrideList (14.25s)
--- PASS: TestAccIAMPolicyDocumentDataSource_override (13.69s)
=== CONT TestAccIAMPolicyDocumentDataSource_conditionWithBoolValue
=== CONT TestAccIAMPolicyDocumentDataSource_singleConditionValue
--- PASS: TestAccIAMPolicyDocumentDataSource_overridePolicyDocumentValidJSON (14.36s)
--- PASS: TestAccIAMPolicyDocumentDataSource_overrideJSONValidJSON (14.70s)
=== CONT TestAccIAMPolicyDocumentDataSource_sourcePolicyValidJSON
--- PASS: TestAccIAMPolicyDocumentDataSource_conditionWithBoolValue (13.81s)
=== CONT TestAccIAMPolicyDocumentDataSource_sourceList
--- PASS: TestAccIAMPolicyDocumentDataSource_singleConditionValue (13.68s)
=== CONT TestAccIAMPolicyDocumentDataSource_duplicateSid
--- PASS: TestAccIAMPolicyDocumentDataSource_sourcePolicyValidJSON (14.06s)
=== CONT TestAccIAMPolicyDocumentDataSource_source
--- PASS: TestAccIAMPolicyDocumentDataSource_sourceList (13.61s)
--- PASS: TestAccIAMPolicyDocumentDataSource_duplicateSid (14.80s)
--- PASS: TestAccIAMPolicyDocumentDataSource_source (22.05s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 105.897s
@mtt88 Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.34.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. Thank you! |
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. |
Description
Adds additional validation to user supplied JSON attributes on
override_policy_documents
.Note that this change introduces additional validation on deprecated attributes (
override_json
,source_json
). Supplying invalid JSON to these fields did not cause a 'panic' or crash and this validation + additional tests exists for completeness and to prevent against future regressions.Relations
Closes #27022.
Closes #24847
Relates #26640.
References
Output from Acceptance Testing