Skip to content

Commit

Permalink
Update for Terraform 1.0.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Huang committed Jun 11, 2021
1 parent e7503a0 commit c1931d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" {
Expand Down
2 changes: 1 addition & 1 deletion s3-content.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
2 changes: 1 addition & 1 deletion s3-logs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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) }))
}

0 comments on commit c1931d8

Please sign in to comment.