File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 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) {
236236 })
237237}
238238
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+
239254func TestAccIAMPolicyDocumentDataSource_noStatementMerge (t * testing.T ) {
240255 ctx := acctest .Context (t )
241256 resource .ParallelTest (t , resource.TestCase {
@@ -1022,6 +1037,18 @@ data "aws_iam_policy_document" "test_source_conflicting" {
10221037}
10231038`
10241039
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+
10251052var testAccPolicyDocumentSourceConflictingExpectedJSON = `{
10261053 "Version": "2012-10-17",
10271054 "Statement": [
You can’t perform that action at this time.
0 commit comments