mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-13 01:00:50 -04:00
728 B
728 B
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| aws | AWS: aws_s3_bucket_policy | docs-aws-resource-s3-bucket-policy | Attaches a policy to an S3 bucket resource. |
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.id}"
policy = "${data.aws_iam_policy_document.b.json}"
}
Argument Reference
The following arguments are supported:
bucket- (Required) The name of the bucket to which to apply the policy.policy- (Required) The text of the policy.