Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support terraform 0.12 hcl syntax #6329

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions tests/integration/update_cluster/additional_cidr/kubernetes.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
locals = {
locals {
cluster_name = "additionalcidr.example.com"
master_autoscaling_group_ids = ["${aws_autoscaling_group.master-us-test-1a-masters-additionalcidr-example-com.id}", "${aws_autoscaling_group.master-us-test-1b-masters-additionalcidr-example-com.id}", "${aws_autoscaling_group.master-us-test-1c-masters-additionalcidr-example-com.id}"]
master_security_group_ids = ["${aws_security_group.masters-additionalcidr-example-com.id}"]
Expand Down Expand Up @@ -97,19 +97,19 @@ resource "aws_autoscaling_group" "master-us-test-1a-masters-additionalcidr-examp
min_size = 1
vpc_zone_identifier = ["${aws_subnet.us-test-1a-additionalcidr-example-com.id}"]

tag = {
tag {
key = "KubernetesCluster"
value = "additionalcidr.example.com"
propagate_at_launch = true
}

tag = {
tag {
key = "Name"
value = "master-us-test-1a.masters.additionalcidr.example.com"
propagate_at_launch = true
}

tag = {
tag {
key = "k8s.io/role/master"
value = "1"
propagate_at_launch = true
Expand All @@ -126,19 +126,19 @@ resource "aws_autoscaling_group" "master-us-test-1b-masters-additionalcidr-examp
min_size = 1
vpc_zone_identifier = ["${aws_subnet.us-test-1b-additionalcidr-example-com.id}"]

tag = {
tag {
key = "KubernetesCluster"
value = "additionalcidr.example.com"
propagate_at_launch = true
}

tag = {
tag {
key = "Name"
value = "master-us-test-1b.masters.additionalcidr.example.com"
propagate_at_launch = true
}

tag = {
tag {
key = "k8s.io/role/master"
value = "1"
propagate_at_launch = true
Expand All @@ -155,19 +155,19 @@ resource "aws_autoscaling_group" "master-us-test-1c-masters-additionalcidr-examp
min_size = 1
vpc_zone_identifier = ["${aws_subnet.us-test-1c-additionalcidr-example-com.id}"]

tag = {
tag {
key = "KubernetesCluster"
value = "additionalcidr.example.com"
propagate_at_launch = true
}

tag = {
tag {
key = "Name"
value = "master-us-test-1c.masters.additionalcidr.example.com"
propagate_at_launch = true
}

tag = {
tag {
key = "k8s.io/role/master"
value = "1"
propagate_at_launch = true
Expand All @@ -184,19 +184,19 @@ resource "aws_autoscaling_group" "nodes-additionalcidr-example-com" {
min_size = 2
vpc_zone_identifier = ["${aws_subnet.us-test-1b-additionalcidr-example-com.id}"]

tag = {
tag {
key = "KubernetesCluster"
value = "additionalcidr.example.com"
propagate_at_launch = true
}

tag = {
tag {
key = "Name"
value = "nodes.additionalcidr.example.com"
propagate_at_launch = true
}

tag = {
tag {
key = "k8s.io/role/node"
value = "1"
propagate_at_launch = true
Expand All @@ -212,7 +212,7 @@ resource "aws_ebs_volume" "us-test-1a-etcd-events-additionalcidr-example-com" {
type = "gp2"
encrypted = false

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "us-test-1a.etcd-events.additionalcidr.example.com"
"k8s.io/etcd/events" = "us-test-1a/us-test-1a,us-test-1b,us-test-1c"
Expand All @@ -227,7 +227,7 @@ resource "aws_ebs_volume" "us-test-1a-etcd-main-additionalcidr-example-com" {
type = "gp2"
encrypted = false

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "us-test-1a.etcd-main.additionalcidr.example.com"
"k8s.io/etcd/main" = "us-test-1a/us-test-1a,us-test-1b,us-test-1c"
Expand All @@ -242,7 +242,7 @@ resource "aws_ebs_volume" "us-test-1b-etcd-events-additionalcidr-example-com" {
type = "gp2"
encrypted = false

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "us-test-1b.etcd-events.additionalcidr.example.com"
"k8s.io/etcd/events" = "us-test-1b/us-test-1a,us-test-1b,us-test-1c"
Expand All @@ -257,7 +257,7 @@ resource "aws_ebs_volume" "us-test-1b-etcd-main-additionalcidr-example-com" {
type = "gp2"
encrypted = false

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "us-test-1b.etcd-main.additionalcidr.example.com"
"k8s.io/etcd/main" = "us-test-1b/us-test-1a,us-test-1b,us-test-1c"
Expand All @@ -272,7 +272,7 @@ resource "aws_ebs_volume" "us-test-1c-etcd-events-additionalcidr-example-com" {
type = "gp2"
encrypted = false

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "us-test-1c.etcd-events.additionalcidr.example.com"
"k8s.io/etcd/events" = "us-test-1c/us-test-1a,us-test-1b,us-test-1c"
Expand All @@ -287,7 +287,7 @@ resource "aws_ebs_volume" "us-test-1c-etcd-main-additionalcidr-example-com" {
type = "gp2"
encrypted = false

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "us-test-1c.etcd-main.additionalcidr.example.com"
"k8s.io/etcd/main" = "us-test-1c/us-test-1a,us-test-1b,us-test-1c"
Expand Down Expand Up @@ -331,7 +331,7 @@ resource "aws_iam_role_policy" "nodes-additionalcidr-example-com" {
resource "aws_internet_gateway" "additionalcidr-example-com" {
vpc_id = "${aws_vpc.additionalcidr-example-com.id}"

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "additionalcidr.example.com"
"kubernetes.io/cluster/additionalcidr.example.com" = "owned"
Expand All @@ -353,18 +353,18 @@ resource "aws_launch_configuration" "master-us-test-1a-masters-additionalcidr-ex
associate_public_ip_address = true
user_data = "${file("${path.module}/data/aws_launch_configuration_master-us-test-1a.masters.additionalcidr.example.com_user_data")}"

root_block_device = {
root_block_device {
volume_type = "gp2"
volume_size = 64
delete_on_termination = true
}

ephemeral_block_device = {
ephemeral_block_device {
device_name = "/dev/sdc"
virtual_name = "ephemeral0"
}

lifecycle = {
lifecycle {
create_before_destroy = true
}

Expand All @@ -381,18 +381,18 @@ resource "aws_launch_configuration" "master-us-test-1b-masters-additionalcidr-ex
associate_public_ip_address = true
user_data = "${file("${path.module}/data/aws_launch_configuration_master-us-test-1b.masters.additionalcidr.example.com_user_data")}"

root_block_device = {
root_block_device {
volume_type = "gp2"
volume_size = 64
delete_on_termination = true
}

ephemeral_block_device = {
ephemeral_block_device {
device_name = "/dev/sdc"
virtual_name = "ephemeral0"
}

lifecycle = {
lifecycle {
create_before_destroy = true
}

Expand All @@ -409,18 +409,18 @@ resource "aws_launch_configuration" "master-us-test-1c-masters-additionalcidr-ex
associate_public_ip_address = true
user_data = "${file("${path.module}/data/aws_launch_configuration_master-us-test-1c.masters.additionalcidr.example.com_user_data")}"

root_block_device = {
root_block_device {
volume_type = "gp2"
volume_size = 64
delete_on_termination = true
}

ephemeral_block_device = {
ephemeral_block_device {
device_name = "/dev/sdc"
virtual_name = "ephemeral0"
}

lifecycle = {
lifecycle {
create_before_destroy = true
}

Expand All @@ -437,13 +437,13 @@ resource "aws_launch_configuration" "nodes-additionalcidr-example-com" {
associate_public_ip_address = true
user_data = "${file("${path.module}/data/aws_launch_configuration_nodes.additionalcidr.example.com_user_data")}"

root_block_device = {
root_block_device {
volume_type = "gp2"
volume_size = 128
delete_on_termination = true
}

lifecycle = {
lifecycle {
create_before_destroy = true
}

Expand All @@ -459,7 +459,7 @@ resource "aws_route" "0-0-0-0--0" {
resource "aws_route_table" "additionalcidr-example-com" {
vpc_id = "${aws_vpc.additionalcidr-example-com.id}"

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "additionalcidr.example.com"
"kubernetes.io/cluster/additionalcidr.example.com" = "owned"
Expand Down Expand Up @@ -487,7 +487,7 @@ resource "aws_security_group" "masters-additionalcidr-example-com" {
vpc_id = "${aws_vpc.additionalcidr-example-com.id}"
description = "Security group for masters"

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "masters.additionalcidr.example.com"
"kubernetes.io/cluster/additionalcidr.example.com" = "owned"
Expand All @@ -499,7 +499,7 @@ resource "aws_security_group" "nodes-additionalcidr-example-com" {
vpc_id = "${aws_vpc.additionalcidr-example-com.id}"
description = "Security group for nodes"

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "nodes.additionalcidr.example.com"
"kubernetes.io/cluster/additionalcidr.example.com" = "owned"
Expand Down Expand Up @@ -619,7 +619,7 @@ resource "aws_subnet" "us-test-1a-additionalcidr-example-com" {
cidr_block = "10.0.1.0/24"
availability_zone = "us-test-1a"

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "us-test-1a.additionalcidr.example.com"
SubnetType = "Public"
Expand All @@ -633,7 +633,7 @@ resource "aws_subnet" "us-test-1b-additionalcidr-example-com" {
cidr_block = "10.1.1.0/24"
availability_zone = "us-test-1b"

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "us-test-1b.additionalcidr.example.com"
SubnetType = "Public"
Expand All @@ -647,7 +647,7 @@ resource "aws_subnet" "us-test-1c-additionalcidr-example-com" {
cidr_block = "10.1.2.0/24"
availability_zone = "us-test-1c"

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "us-test-1c.additionalcidr.example.com"
SubnetType = "Public"
Expand All @@ -661,7 +661,7 @@ resource "aws_vpc" "additionalcidr-example-com" {
enable_dns_hostnames = true
enable_dns_support = true

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "additionalcidr.example.com"
"kubernetes.io/cluster/additionalcidr.example.com" = "owned"
Expand All @@ -672,7 +672,7 @@ resource "aws_vpc_dhcp_options" "additionalcidr-example-com" {
domain_name = "us-test-1.compute.internal"
domain_name_servers = ["AmazonProvidedDNS"]

tags = {
tags {
KubernetesCluster = "additionalcidr.example.com"
Name = "additionalcidr.example.com"
"kubernetes.io/cluster/additionalcidr.example.com" = "owned"
Expand All @@ -689,6 +689,6 @@ resource "aws_vpc_ipv4_cidr_block_association" "10-1-0-0--16" {
cidr_block = "10.1.0.0/16"
}

terraform = {
terraform {
required_version = ">= 0.9.3"
}
Loading