Difference between revisions of "Terraform resource: aws s3 bucket versioning"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
* https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket
 
* https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket
 +
 +
<pre>
 +
resource "aws_s3_bucket" "example" {
 +
  bucket = "example-bucket"
 +
}
 +
 +
resource "aws_s3_bucket_acl" "example" {
 +
  bucket = aws_s3_bucket.example.id
 +
  acl    = "private"
 +
}
 +
 +
resource "aws_s3_bucket_versioning" "versioning_example" {
 +
  bucket = aws_s3_bucket.example.id
 +
  versioning_configuration {
 +
    status = "Enabled"
 +
  }
 +
}
 +
</pre>
  
  
Line 7: Line 25:
 
== See also ==
 
== See also ==
 
* {{Terraform}}
 
* {{Terraform}}
 +
 +
[[Category:Terraform]]

Revision as of 15:32, 11 February 2022

Advertising: