Skip to content

Commit b68c7a3

Browse files
devonbleakanGie44
authored andcommitted
Add resource aws_s3_bucket_versioning
1 parent 40333d1 commit b68c7a3

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
layout: "aws"
3+
page_title: "AWS - aws_s3_bucket_versioning"
4+
sidebar_current: "docs-aws-s3-bucket-versioning"
5+
description: |-
6+
Provides a resource for controlling S3 bucket versioning
7+
---
8+
9+
# aws_s3_bucket_versioning
10+
11+
Provides a resource for controlling versioning on an [S3 bucket][1]. Note that this
12+
may conflict with the `versioning` block of an [aws_s3_bucket][1] if the settings are
13+
not the same.
14+
15+
## Example Usage
16+
17+
```hcl
18+
resource "aws_s3_bucket" "b" {
19+
bucket = "example-bucket"
20+
acl = "private"
21+
}
22+
23+
resource "aws_s3_bucket_versioning" "versioning_example" {
24+
bucket = "${aws_s3_bucket.b.id}"
25+
enabled = true
26+
}
27+
```
28+
29+
## Argument Reference
30+
31+
The following arguments are supported:
32+
33+
* `bucket` - (Required) The name of the S3 bucket
34+
* `enabled` - (Required) Whether to enable versioning on the bucket
35+
36+
## Deletion
37+
38+
Deleting this resource will disable versioning on the bucket.
39+
40+
[1]: /docs/providers/aws/r/s3_bucket.html

0 commit comments

Comments
 (0)