Terraform - Buckets 추가

This commit is contained in:
dsk-minchulahn
2024-02-01 16:14:05 +09:00
parent f794df086e
commit bbe2b9331b
7 changed files with 165 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
resource "aws_s3_bucket" "bucket" {
for_each = var.buckets
bucket = each.key
}
resource "aws_s3_bucket_versioning" "versioning" {
for_each = var.buckets
bucket = aws_s3_bucket.bucket[each.key].id
versioning_configuration {
status = each.value.versioning
}
}