From dc47cddc4fa8fa1a60590569cde818d89b31d808 Mon Sep 17 00:00:00 2001 From: Novikov Sergey Date: Fri, 10 Jul 2020 13:50:20 +0200 Subject: [PATCH] Fix terraform 0.12 deprecations (#3) * Fix terraform 0.12 deprecations * Fix Makefile --- Makefile | 4 ++-- main.tf | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 631520d..fa512b9 100644 --- a/Makefile +++ b/Makefile @@ -106,7 +106,7 @@ _gen-examples: -e DELIM_START='$(DELIM_START)' \ -e DELIM_CLOSE='$(DELIM_CLOSE)' \ cytopia/terraform-docs:$(TF_DOCS_VERSION) \ - terraform-docs-replace-012 --sort-inputs-by-required --with-aggregate-type-defaults md $${DOCKER_PATH}/README.md; then \ + terraform-docs-replace-012 --sort-inputs-by-required --with-aggregate-type-defaults md README.md; then \ echo "OK"; \ else \ echo "Failed"; \ @@ -126,7 +126,7 @@ _gen-modules: -e DELIM_START='$(DELIM_START)' \ -e DELIM_CLOSE='$(DELIM_CLOSE)' \ cytopia/terraform-docs:$(TF_DOCS_VERSION) \ - terraform-docs-replace-012 --sort-inputs-by-required --with-aggregate-type-defaults md $${DOCKER_PATH}/README.md; then \ + terraform-docs-replace-012 --sort-inputs-by-required --with-aggregate-type-defaults md README.md; then \ echo "OK"; \ else \ echo "Failed"; \ diff --git a/main.tf b/main.tf index 494347d..3030818 100644 --- a/main.tf +++ b/main.tf @@ -39,7 +39,7 @@ resource "aws_subnet" "public" { # If AWS adds another availability zone, this will not have effect on the already picked subnets. lifecycle { - ignore_changes = ["availability_zone"] + ignore_changes = [availability_zone] } tags = merge( @@ -56,8 +56,8 @@ resource "aws_subnet" "public" { resource "aws_route_table_association" "this" { count = 2 - subnet_id = "${aws_subnet.public[count.index].id}" - route_table_id = "${aws_route_table.public.id}" + subnet_id = aws_subnet.public[count.index].id + route_table_id = aws_route_table.public.id } resource "aws_route" "public_internet_gateway" { @@ -84,7 +84,7 @@ resource "aws_internet_gateway" "this" { resource "aws_security_group" "this" { name = "${var.name}-albredirect" description = "Allow inbound 80/443 traffic alb redirect" - vpc_id = "${aws_vpc.this.id}" + vpc_id = aws_vpc.this.id ingress { # TLS (change to whatever ports you need)