generated from cloudposse/terraform-example-module
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Describe the Feature
In order for Mobius3 to work, the task needs a policy attached for it to work. I would like to have that value as an output.
Expected Behavior
output "policy" {
value = data.aws_iam_policy_document.task_policy
}
data "aws_iam_policy_document" "task_policy" {
statement {
sid = "ListAndGetBucketLocations"
actions = [
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
]
resources = ["*"]
}
statement {
sid = "AllowListBucketAndGetBucketLocation"
actions = [
"s3:ListBucket",
"s3:ListBucketMultipartUploads"
]
resources = [
var.bucket_arn
]
}
statement {
sid = "AllowAllS3OnMobius3Path"
actions = [
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:GetObject",
"s3:ListMultipartUploadParts",
"s3:PutObject",
"s3:ListObjectsV2"
]
resources = [
var.bucket_arn,
"${var.bucket_arn}/${var.bucket_key_prefix}*"
]
}
}
Metadata
Metadata
Assignees
Labels
No labels