Skip to content
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

Export suggest Policy Document for Mobius3 to work #5

Open
sodre opened this issue Feb 18, 2022 · 0 comments
Open

Export suggest Policy Document for Mobius3 to work #5

sodre opened this issue Feb 18, 2022 · 0 comments

Comments

@sodre
Copy link
Member

sodre commented Feb 18, 2022

Have a question? Please checkout our Slack Community or visit our Slack Archive.

Slack Community

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}*"
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant