Terraform: Document the IAM permissions necessary to access the S3 backend

Created on 30 Oct 2017  ยท  3Comments  ยท  Source: hashicorp/terraform

I'm creating an AWS user to automatically plan/apply from a remote environment. It would be nice to know which AWS permissions are necessary to use the S3 Backend, preferably on this page: https://www.terraform.io/docs/backends/types/s3.html

backens3 documentation

Most helpful comment

For my fellow googling people, this set of permissions seems to work:

statement {
  actions   = ["s3:*"]
  resources = ["arn:aws:s3:::<mybucket>"]
}

statement {
  actions = ["s3:GetObject", "s3:PutObject"]

  resources = [
    "arn:aws:s3:::<mybucket>/<mystatekey>",
  ]
}

More documentation would be welcome to further refine the "s3:*" rigths on the bucket though.

All 3 comments

I'm in the midst of trying to guess this now and it's taking quite some time. So any info or docs on this would help.

For my fellow googling people, this set of permissions seems to work:

statement {
  actions   = ["s3:*"]
  resources = ["arn:aws:s3:::<mybucket>"]
}

statement {
  actions = ["s3:GetObject", "s3:PutObject"]

  resources = [
    "arn:aws:s3:::<mybucket>/<mystatekey>",
  ]
}

More documentation would be welcome to further refine the "s3:*" rigths on the bucket though.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings