-
-
Notifications
You must be signed in to change notification settings - Fork 198
Aws s3 #2418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Aws s3 #2418
Conversation
Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
This should add an S3 bucket and a role that can do things with it. Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
This creates a user and the appropriate role for the user. I've used the sts AssumeRole approach here, to separate the admin role from the user Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
|
|
||
| # 1. S3 Bucket (private by default) | ||
| resource "aws_s3_bucket" "auth_bucket" { | ||
| bucket = "codebar-planner-auth-bucket" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to create buckets myself, but otherwise I'd like 2 - one prod, one staging.
| "s3:GetObject", # Read/download files | ||
| "s3:PutObject", # Upload files | ||
| "s3:DeleteObject", # Optional: allow deleting files | ||
| "s3:ListAllMyBuckets" # enable user to list all buckets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be un-scoped - per bucket, you need something like this (this is the json format):
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Action": "s3:ListAllMyBuckets",
"Resource":"*"
},
{
"Effect":"Allow",
"Action":["s3:ListBucket","s3:GetBucketLocation"],
"Resource":"arn:aws:s3:::bucket-name-etc"
},
{
"Effect":"Allow",
"Action":[
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Resource":"arn:aws:s3:::bucket-name-etc/*"
}
]
}
Outline terraform for creating an S3 bucket and IAM role for @till to try out his auth stuff