diff --git a/cloudfront.tf b/cloudfront.tf index 76e5ca6..819bc9b 100644 --- a/cloudfront.tf +++ b/cloudfront.tf @@ -3,7 +3,7 @@ resource "aws_cloudfront_distribution" "website" { is_ipv6_enabled = true http_version = "http2" - aliases = compact(concat(list(var.hostname),var.aliases)) + aliases = compact(concat(tolist([var.hostname]), var.aliases)) viewer_certificate { acm_certificate_arn = data.aws_acm_certificate.frontend.arn @@ -62,7 +62,7 @@ resource "aws_cloudfront_distribution" "website" { prefix = "${var.hostname}/cloudfront" } - tags = merge(var.tags, map("Name", format("s3-cloudfront-%s-distribution", var.name))) + tags = merge(var.tags, tomap({ "Name" = format("s3-cloudfront-%s-distribution", var.name) })) } resource "aws_cloudfront_origin_access_identity" "website" { diff --git a/s3-content.tf b/s3-content.tf index 0ebe119..a023343 100644 --- a/s3-content.tf +++ b/s3-content.tf @@ -34,7 +34,7 @@ resource "aws_s3_bucket" "content" { target_prefix = "${var.hostname}/s3" } - tags = merge(var.tags, map("Name", format("s3-cloudfront-%s-content", var.name))) + tags = merge(var.tags, tomap({ "Name" = format("s3-cloudfront-%s-content", var.name) })) } resource "aws_s3_bucket_policy" "content" { diff --git a/s3-logs.tf b/s3-logs.tf index 41cc22c..4a0b40e 100644 --- a/s3-logs.tf +++ b/s3-logs.tf @@ -22,5 +22,5 @@ resource "aws_s3_bucket" "logs" { } } - tags = merge(var.tags, map("Name", format("s3-cloudfront-%s-logs", var.name))) + tags = merge(var.tags, tomap({ "Name" = format("s3-cloudfront-%s-logs", var.name) })) }