FEATURES PRICING ABOUT DOCS LOGIN

aws_s3_bucket_policy

Attaches a policy to an S3 bucket resource.

Example Usage

Using versioning

resource "aws_s3_bucket" "b" {
  # Arguments
}

data "aws_iam_policy_document" "b" {
  # Policy statements
}

resource "aws_s3_bucket_policy" "b" {
  bucket = "${aws_s3_bucket.b.bucket}"
  policy = "${data.aws_iam_policy_document.b.json}"
}

Argument Reference

The following arguments are supported:


See the source of this document at Terraform.io

REQUEST A DEMO