-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paths3.tf
41 lines (32 loc) · 837 Bytes
/
s3.tf
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
32
33
34
35
36
37
38
39
40
41
module "backend_s3_bucket" {
source = "terraform-aws-modules/s3-bucket/aws"
bucket = local.bucket
acl = "private"
control_object_ownership = true
object_ownership = "ObjectWriter"
attach_policy = true
policy = data.aws_iam_policy_document.terraform_backend.json
versioning = {
enabled = true
}
}
import {
to = module.backend_s3_bucket.aws_s3_bucket.this[0]
id = local.bucket
}
import {
to = module.backend_s3_bucket.aws_s3_bucket_acl.this[0]
id = "${local.bucket},private"
}
import {
to = module.backend_s3_bucket.aws_s3_bucket_ownership_controls.this[0]
id = local.bucket
}
import {
to = module.backend_s3_bucket.aws_s3_bucket_public_access_block.this[0]
id = local.bucket
}
import {
to = module.backend_s3_bucket.aws_s3_bucket_versioning.this[0]
id = local.bucket
}