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
|
# Outputs ======================================================================
output "id" {
description = "S3 bucket name"
value = aws_s3_bucket.this.id
}
output "arn" {
description = "S3 bucket ARN"
value = aws_s3_bucket.this.arn
}
output "bucket_domain_name" {
description = "Bucket-style domain name"
value = aws_s3_bucket.this.bucket_domain_name
}
output "bucket_regional_domain_name" {
description = "Regional domain name (for CloudFront origins)"
value = aws_s3_bucket.this.bucket_regional_domain_name
}
output "hosted_zone_id" {
description = "Route 53 hosted zone ID for the bucket's region"
value = aws_s3_bucket.this.hosted_zone_id
}
output "versioning_status" {
description = "Effective versioning status of the bucket"
value = aws_s3_bucket_versioning.this.versioning_configuration[0].status
}
output "kms_key_id" {
description = "KMS key ARN actually applied for SSE-KMS encryption"
value = one([for r in aws_s3_bucket_server_side_encryption_configuration.this.rule : r.apply_server_side_encryption_by_default[0].kms_master_key_id])
}
output "object_lock_enabled" {
description = "Whether S3 Object Lock is enabled on the bucket"
value = aws_s3_bucket.this.object_lock_enabled
}
output "replication_configuration_id" {
description = "Replication configuration ID, if replication is configured"
value = length(var.replication_rules) > 0 ? aws_s3_bucket_replication_configuration.this["replication"].id : null
}
|