Commit def18c31 authored by Lee Brown's avatar Lee Brown

Fix IAM policy access to s3 bucket

parent 36630cad
......@@ -96,6 +96,9 @@ func NewConfig(log *log.Logger, targetEnv Env, awsCredentials devdeploy.AwsCrede
return cfg, err
}
// Set the Aws Secret Prefix to the Go module name to prevent possible namespace conflict.
cfg.AwsSecretPrefix = modDetails.GoModName
// ProjectRoot should be the root directory for the project.
cfg.ProjectRoot = modDetails.ProjectRoot
......@@ -489,8 +492,8 @@ func NewConfig(log *log.Logger, targetEnv Env, awsCredentials devdeploy.AwsCrede
"s3:GetObject",
},
Resource: []string{
"arn:aws:::" + cfg.AwsS3BucketPublic.BucketName + "/*",
"arn:aws:::" + cfg.AwsS3BucketPrivate.BucketName + "/*",
"arn:aws:s3:::" + cfg.AwsS3BucketPublic.BucketName + "/*",
"arn:aws:s3:::" + cfg.AwsS3BucketPrivate.BucketName + "/*",
},
},
{
......
......@@ -41,7 +41,7 @@ require (
github.com/tinylib/msgp v1.1.0 // indirect
github.com/urfave/cli v1.22.2
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2
gitlab.com/geeks-accelerator/oss/devops v1.0.54
gitlab.com/geeks-accelerator/oss/devops v1.0.57
golang.org/x/crypto v0.0.0-20200109152110-61a87790db17
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1 // indirect
......
......@@ -236,6 +236,8 @@ github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 h1:zzrxE1FKn5ryB
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2/go.mod h1:hzfGeIUDq/j97IG+FhNqkowIyEcD88LrW6fyU3K3WqY=
gitlab.com/geeks-accelerator/oss/devops v1.0.54 h1:hFK1y/9iJXQ94ZTpZ81xxwiY9R9IDk/RSTeDT7zOTK8=
gitlab.com/geeks-accelerator/oss/devops v1.0.54/go.mod h1:ajkklam2ApSGo60sQ8P7UwPPwfz/jp3GotnMJkEPxIM=
gitlab.com/geeks-accelerator/oss/devops v1.0.57 h1:op/nxw6cJ/9GqnwS4DYMlGxCjddAjoPFOzwYxgup7sI=
gitlab.com/geeks-accelerator/oss/devops v1.0.57/go.mod h1:ajkklam2ApSGo60sQ8P7UwPPwfz/jp3GotnMJkEPxIM=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment