Skip to content

Commit

Permalink
Processed feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
borremosch-db committed Jan 17, 2025
1 parent 28dc5d2 commit d1cc672
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
5 changes: 4 additions & 1 deletion aws/data_aws_unity_catalog_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ func generateReadContext(ctx context.Context, d *schema.ResourceData, m *common.
"sqs:ListQueueTags",
"sns:ListTopics",
},
Resources: "*",
Resources: []string{
fmt.Sprintf("arn:%s:sqs:*:*:csms-*", awsPartition),
fmt.Sprintf("arn:%s:sns:*:*:csms-*", awsPartition),
},
},
&awsIamPolicyStatement{
Sid: "ManagedFileEventsTeardownStatement",
Expand Down
20 changes: 16 additions & 4 deletions aws/data_aws_unity_catalog_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ func TestDataAwsUnityCatalogPolicy(t *testing.T) {
"sqs:ListQueueTags",
"sns:ListTopics"
],
"Resource": "*"
"Resource": [
"arn:aws:sqs:*:*:csms-*",
"arn:aws:sns:*:*:csms-*"
]
},
{
"Sid": "ManagedFileEventsTeardownStatement",
Expand Down Expand Up @@ -208,7 +211,10 @@ func TestDataAwsUnityCatalogPolicyFullKms(t *testing.T) {
"sqs:ListQueueTags",
"sns:ListTopics"
],
"Resource": "*"
"Resource": [
"arn:aws:sqs:*:*:csms-*",
"arn:aws:sns:*:*:csms-*"
]
},
{
"Sid": "ManagedFileEventsTeardownStatement",
Expand Down Expand Up @@ -306,7 +312,10 @@ func TestDataAwsUnityCatalogPolicyWithoutKMS(t *testing.T) {
"sqs:ListQueueTags",
"sns:ListTopics"
],
"Resource": "*"
"Resource": [
"arn:aws:sqs:*:*:csms-*",
"arn:aws:sns:*:*:csms-*"
]
},
{
"Sid": "ManagedFileEventsTeardownStatement",
Expand Down Expand Up @@ -417,7 +426,10 @@ func TestDataAwsUnityCatalogPolicyPartionGov(t *testing.T) {
"sqs:ListQueueTags",
"sns:ListTopics"
],
"Resource": "*"
"Resource": [
"arn:aws-us-gov:sqs:*:*:csms-*",
"arn:aws-us-gov:sns:*:*:csms-*"
]
},
{
"Sid": "ManagedFileEventsTeardownStatement",
Expand Down

0 comments on commit d1cc672

Please sign in to comment.