Skip to content

Commit

Permalink
provider/aws: Add aws_s3_bucket_policy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jen20 committed Sep 1, 2016
1 parent c251c5f commit ffeb930
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
37 changes: 37 additions & 0 deletions website/source/docs/providers/aws/r/s3_bucket_policy.html.markdown
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.
3 changes: 3 additions & 0 deletions website/source/layouts/aws.erb
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,9 @@
<a href="/docs/providers/aws/r/s3_bucket_object.html">aws_s3_bucket_object</a>
</li>

<li<%= sidebar_current("docs-aws-resource-s3-bucket-policy") %>>
<a href="/docs/providers/aws/r/s3_bucket_policy.html">aws_s3_bucket_policy</a>
</li>
</ul>
</li>

Expand Down

0 comments on commit ffeb930

Please sign in to comment.