-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provider/aws: Add aws_s3_bucket_policy docs
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
website/source/docs/providers/aws/r/s3_bucket_policy.html.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
layout: "aws" | ||
page_title: "AWS: aws_s3_bucket_policy" | ||
sidebar_current: "docs-aws-resource-s3-bucket-policy" | ||
description: |- | ||
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.bucket}" | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters