Closed atward closed 5 years ago
Given examples here:
{ "Version": "2012-10-17", "Id": "PutObjPolicy", "Statement": [ { "Sid": "DenyIncorrectEncryptionHeader", "Effect": "Deny", "Principal": "*", "Action": "s3:PutObject", "Resource": "arn:aws:s3:::<bucket_name>/*", "Condition": { "StringNotEquals": { "s3:x-amz-server-side-encryption": "AES256" } } }, { "Sid": "DenyUnEncryptedObjectUploads", "Effect": "Deny", "Principal": "*", "Action": "s3:PutObject", "Resource": "arn:aws:s3:::<bucket_name>/*", "Condition": { "Null": { "s3:x-amz-server-side-encryption": true } } } ] }
1st, does not recognise Principal:*
unable to convert: json: cannot unmarshal string into Go struct field jsonStatement.Principal of type map[string]converter.stringOrStringArray
2nd, does not convert json booleans to terraform strings
condition { test = "Null" variable = "s3:x-amz-server-side-encryption" values = [""] }
Thanks for the report! Fixed and released as release 1.2.0
Given examples here:
1st, does not recognise Principal:*
2nd, does not convert json booleans to terraform strings