File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,21 @@ func TestAccIAMPolicyDocumentDataSource_overrideList(t *testing.T) {
236
236
})
237
237
}
238
238
239
+ func TestAccIAMPolicyDocumentDataSource_invalidSidValid (t * testing.T ) {
240
+ ctx := acctest .Context (t )
241
+ resource .ParallelTest (t , resource.TestCase {
242
+ PreCheck : func () { acctest .PreCheck (ctx , t ) },
243
+ ErrorCheck : acctest .ErrorCheck (t , names .IAMServiceID ),
244
+ ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories ,
245
+ Steps : []resource.TestStep {
246
+ {
247
+ Config : testAccPolicyDocumentDataSourceConfig_invalidSid ,
248
+ PlanOnly : true ,
249
+ },
250
+ },
251
+ })
252
+ }
253
+
239
254
func TestAccIAMPolicyDocumentDataSource_noStatementMerge (t * testing.T ) {
240
255
ctx := acctest .Context (t )
241
256
resource .ParallelTest (t , resource.TestCase {
@@ -1022,6 +1037,18 @@ data "aws_iam_policy_document" "test_source_conflicting" {
1022
1037
}
1023
1038
`
1024
1039
1040
+ var testAccPolicyDocumentDataSourceConfig_invalidSid = `
1041
+ data "aws_iam_policy_document" "test" {
1042
+ statement {
1043
+ sid = "Invalid SID"
1044
+ actions = [
1045
+ "s3:ListAllMyBuckets",
1046
+ "s3:GetBucketLocation",
1047
+ ]
1048
+ }
1049
+ }
1050
+ `
1051
+
1025
1052
var testAccPolicyDocumentSourceConflictingExpectedJSON = `{
1026
1053
"Version": "2012-10-17",
1027
1054
"Statement": [
You can’t perform that action at this time.
0 commit comments