Skip to content

Instantly share code, notes, and snippets.

@zaksoup
Created August 12, 2015 23:02
Show Gist options
  • Save zaksoup/b3fcccb0a99c63ae9c34 to your computer and use it in GitHub Desktop.
Save zaksoup/b3fcccb0a99c63ae9c34 to your computer and use it in GitHub Desktop.
"EtcdReleasesBucketPolicy": {
"Type" : "AWS::S3::BucketPolicy",
"Properties" : {
"PolicyDocument" : {
"Id" : "etcd-candidate-releases-bucket-policy",
"Statement" : [ {
"Sid" : "AllowWrite",
"Action" : [
"s3:GetObject",
"s3:PutObject"
],
"Effect" : "Allow",
"Principal" : {
"AWS" : { "Fn::GetAtt" : [ "ConcourseUser", "Arn" ] }
},
"Resource" : { "Fn::Join" : [
"", [ "arn:aws:s3:::", { "Ref" : "EtcdReleasesBucket" } , "/*" ]
] }
},
{
"Sid" : "AllowList",
"Action" : [
"s3:ListBucket"
],
"Effect" : "Allow",
"Principal" : {
"AWS" : { "Fn::GetAtt" : [ "ConcourseUser", "Arn" ] }
},
"Resource" : { "Fn::Join" : [
"", [ "arn:aws:s3:::", { "Ref" : "EtcdReleasesBucket" } ]
] }
}]
},
"Bucket" : { "Ref" : "EtcdReleasesBucket" }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment