Last active
April 2, 2021 21:29
-
-
Save kunduso/bf94f1aa5e683ed66539458a9a44138d to your computer and use it in GitHub Desktop.
This is an AWS IAM policy to provide restricted access to Terraform to communicate with the backend resources -AWS S3 bucket and dynamoDB table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"dynamodb:PutItem", | |
"dynamodb:DeleteItem", | |
"dynamodb:GetItem" | |
], | |
"Resource": "arn:aws:dynamodb:$(Region):$(AWSAccountNumber):table/$(BackendLockTableName)" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": "s3:ListBucket", | |
"Resource": "arn:aws:s3:::$(BackendBucketName)" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetObject", | |
"s3:PutObject" | |
], | |
"Resource": "arn:aws:s3:::$(BackendBucketName)/$(PathToTFStateFile)" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment