Skip to content

Commit

Permalink
Terraform fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Likkan Chung committed Oct 29, 2023
1 parent f877227 commit d236759
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,22 @@ resource "aws_s3_bucket_website_configuration" "dev-s3-static-website-config" {
}
}

resource "aws_s3_object" "dev-s3-static-website-files" {
module "dev-s3-static-website-files" {
source = "hashicorp/dir/template"

base_dir = "${path.module}/frontend"
}

resource "aws_s3_object" "dev-s3-static-website-file-upload" {
bucket = aws_s3_bucket.dev-s3-static-website.id

for_each = fileset("../frontend/", "**")
for_each = module.dev-s3-static-website-files.files

key = each.value
key = each.key
content_type = each.value.content_type

source = "../frontend/${each.value}"
etag = filemd5("../frontend/${each.value}")
source = each.value.source_path
content = each.value.content
etag = each.value.digests.md5

}

0 comments on commit d236759

Please sign in to comment.