From f0f8379e1b7fc86f76b86ce9cd7c13a12525867b Mon Sep 17 00:00:00 2001 From: bfraz <38927982+bfraz@users.noreply.github.com> Date: Thu, 12 Dec 2019 05:42:33 -0600 Subject: [PATCH] Update aws tf (#5435) * update aws tf to function as expected * update tf version * update syntax for tf v0.12 * update tf version in readme * update per tf for v0.12 --- contrib/terraform/aws/README.md | 2 +- contrib/terraform/aws/create-infrastructure.tf | 2 +- contrib/terraform/aws/modules/elb/main.tf | 2 +- contrib/terraform/aws/modules/vpc/outputs.tf | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/terraform/aws/README.md b/contrib/terraform/aws/README.md index 39a47ef14..3feb03e98 100644 --- a/contrib/terraform/aws/README.md +++ b/contrib/terraform/aws/README.md @@ -10,7 +10,7 @@ This project will create: * AWS ELB in the Public Subnet for accessing the Kubernetes API from the internet **Requirements** -- Terraform 0.8.7 or newer +- Terraform 0.12.0 or newer **How to Use:** diff --git a/contrib/terraform/aws/create-infrastructure.tf b/contrib/terraform/aws/create-infrastructure.tf index 60befe8e2..10ff2b57d 100644 --- a/contrib/terraform/aws/create-infrastructure.tf +++ b/contrib/terraform/aws/create-infrastructure.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.8.7" + required_version = ">= 0.12.0" } provider "aws" { diff --git a/contrib/terraform/aws/modules/elb/main.tf b/contrib/terraform/aws/modules/elb/main.tf index 213987632..032e668ba 100644 --- a/contrib/terraform/aws/modules/elb/main.tf +++ b/contrib/terraform/aws/modules/elb/main.tf @@ -28,7 +28,7 @@ resource "aws_security_group_rule" "aws-allow-api-egress" { # Create a new AWS ELB for K8S API resource "aws_elb" "aws-elb-api" { name = "kubernetes-elb-${var.aws_cluster_name}" - subnets = "${var.aws_subnet_ids_public}" + subnets = var.aws_subnet_ids_public security_groups = ["${aws_security_group.aws-elb.id}"] listener { diff --git a/contrib/terraform/aws/modules/vpc/outputs.tf b/contrib/terraform/aws/modules/vpc/outputs.tf index fa00f525e..ab4d80059 100644 --- a/contrib/terraform/aws/modules/vpc/outputs.tf +++ b/contrib/terraform/aws/modules/vpc/outputs.tf @@ -3,15 +3,15 @@ output "aws_vpc_id" { } output "aws_subnet_ids_private" { - value = ["${aws_subnet.cluster-vpc-subnets-private.*.id}"] + value = aws_subnet.cluster-vpc-subnets-private.*.id } output "aws_subnet_ids_public" { - value = ["${aws_subnet.cluster-vpc-subnets-public.*.id}"] + value = aws_subnet.cluster-vpc-subnets-public.*.id } output "aws_security_group" { - value = ["${aws_security_group.kubernetes.*.id}"] + value = aws_security_group.kubernetes.*.id } output "default_tags" {