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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
terraform {
required_version = ">= 1.15.0, < 2.0.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.0, < 7.0"
}
}
}
provider "aws" {
region = "ap-south-1"
}
module "s3_bucket" {
source = "../../modules/s3-bucket"
bucket_name = "patppuccin-test-sanity-0001"
versioning_enabled = true
sse_algorithm = "aws:kms"
bucket_key_enabled = true
# kms_key_id left null -> uses AWS managed key, same as sanity test
object_ownership = "BucketOwnerEnforced"
lifecycle_rules = {
standard_tiering = {
prefix = "logs/"
abort_incomplete_multipart_upload_days = 7
noncurrent_version_expiration_days = 90
expiration_days = 365
transitions = [
{ days = 30, storage_class = "STANDARD_IA" },
{ days = 90, storage_class = "GLACIER" },
{ days = 180, storage_class = "DEEP_ARCHIVE" }
]
}
short_lived_temp = {
prefix = "tmp/"
expiration_days = 14
transitions = []
}
}
tags = {
environment = "test"
owner = "patppuccin"
}
}
output "id" {
value = module.s3_bucket.id
}
output "arn" {
value = module.s3_bucket.arn
}
output "bucket_domain_name" {
value = module.s3_bucket.bucket_domain_name
}
output "bucket_regional_domain_name" {
value = module.s3_bucket.bucket_regional_domain_name
}
output "hosted_zone_id" {
value = module.s3_bucket.hosted_zone_id
}
output "kms_key_id" {
value = module.s3_bucket.kms_key_id
}
output "versioning_status" {
value = module.s3_bucket.versioning_status
}
output "object_lock_enabled" {
value = module.s3_bucket.object_lock_enabled
}
output "replication_configuration_id" {
value = module.s3_bucket.replication_configuration_id
}
|