Skip to content

Commit

Permalink
Fix pre-commit by moving policydoc to yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
xschildw committed Nov 16, 2023
1 parent d942836 commit 0a51a25
Showing 1 changed file with 19 additions and 27 deletions.
46 changes: 19 additions & 27 deletions templates/IAM/snowflake-synapse-access.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,25 @@ Resources:
SnowflakeServicePolicy:
Type: 'AWS::IAM::ManagedPolicy'
Properties:
PolicyDocument: |
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:GetObjectVersion"
],
"Resource": !Sub "arn:aws:s3:::${Stack}.datawarehouse.sagebase.org/warehouse/*"
},
{
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": !Sub "arn:aws:s3:::${Stack}.datawarehouse.sagebase.org",
"Condition": {
"StringLike": {
"s3:prefix": [ "warehouse/*" ]
}
}
}
]
}
PolicyDocument:
Version: 2012-10-17
Statement:
-
Effect: Allow
Action:
- s3:GetObject
- s3:GetObjectVersion
Resource: !Sub "arn:aws:s3:::${Stack}.datawarehouse.sagebase.org/warehouse/*"
-
Effect: Allow
Action:
- s3:ListBucket
- s3:GetBucketLocation
Resource: !Sub "arn:aws:s3:::${Stack}.datawarehouse.sagebase.org"
Condition:
StringLike":
"s3:prefix":
- "warehouse/*"
SnowflakeServiceRole:
Type: "AWS::IAM::Role"
Properties:
Expand Down

0 comments on commit 0a51a25

Please sign in to comment.