-
Notifications
You must be signed in to change notification settings - Fork 0
/
s3.tf
32 lines (27 loc) · 786 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
module "service_quotas_manager_bucket" {
source = "schubergphilis/mcaf-s3/aws"
version = "~> 0.12.1"
name = var.bucket_name
name_prefix = var.bucket_name == null ? var.bucket_prefix : null
force_destroy = true
kms_key_arn = var.kms_key_arn
versioning = true
tags = var.tags
lifecycle_rule = [
{
id = "default"
status = "Enabled"
abort_incomplete_multipart_upload = {
days_after_initiation = 7
}
noncurrent_version_expiration = {
noncurrent_days = 14
}
}
]
}
resource "aws_s3_object" "service_quotas_manager_config" {
bucket = module.service_quotas_manager_bucket.name
key = "quotas_manager_config.json"
content = jsonencode(var.quotas_manager_configuration)
}