forked from devops0014/devops18
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paths3.tf
More file actions
31 lines (27 loc) · 623 Bytes
/
s3.tf
File metadata and controls
31 lines (27 loc) · 623 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
resource "aws_s3_bucket" "one" {
bucket = "kittu7.devops.project.bucket"
}
resource "aws_s3_bucket_ownership_controls" "two" {
bucket = aws_s3_bucket.one.id
rule {
object_ownership = "BucketOwnerPreferred"
}
}
resource "aws_s3_bucket_acl" "three" {
depends_on = [aws_s3_bucket_ownership_controls.two]
bucket = aws_s3_bucket.one.id
acl = "private"
}
resource "aws_s3_bucket_versioning" "three" {
bucket = aws_s3_bucket.one.id
versioning_configuration {
status = "Enabled"
}
}
terraform {
backend "s3" {
region = "us-east-1"
bucket = "kittu7.devops.project.bucket"
key = "prod/terraform.tfstate"
}
}