From b52f7b86e2f6dd5377f1ebd9e8b63a0ed15d6d0e Mon Sep 17 00:00:00 2001 From: "Steven E. Harris" Date: Sun, 3 Jan 2021 11:24:40 -0500 Subject: [PATCH] Correct integration test to reflect SG restriction --- .../update_cluster/complex/cloudformation.json | 6 ++---- .../update_cluster/complex/in-legacy-v1alpha2.yaml | 4 ++-- .../update_cluster/complex/in-v1alpha2.yaml | 4 ++-- .../integration/update_cluster/complex/kubernetes.tf | 12 ++++++------ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/tests/integration/update_cluster/complex/cloudformation.json b/tests/integration/update_cluster/complex/cloudformation.json index 64018fb69cab6..2b438f516d23d 100644 --- a/tests/integration/update_cluster/complex/cloudformation.json +++ b/tests/integration/update_cluster/complex/cloudformation.json @@ -279,8 +279,8 @@ { "Ref": "AWSEC2SecurityGroupmasterscomplexexamplecom" }, - "sg-exampleid3", - "sg-exampleid4" + "sg-exampleid5", + "sg-exampleid6" ] } ], @@ -422,8 +422,6 @@ "Ref": "AWSEC2SecurityGroupnodescomplexexamplecom" }, "sg-exampleid3", - "sg-exampleid3", - "sg-exampleid4", "sg-exampleid4" ] } diff --git a/tests/integration/update_cluster/complex/in-legacy-v1alpha2.yaml b/tests/integration/update_cluster/complex/in-legacy-v1alpha2.yaml index b8e55435f774c..ff53856422774 100644 --- a/tests/integration/update_cluster/complex/in-legacy-v1alpha2.yaml +++ b/tests/integration/update_cluster/complex/in-legacy-v1alpha2.yaml @@ -8,8 +8,8 @@ spec: loadBalancer: type: Public additionalSecurityGroups: - - sg-exampleid3 - - sg-exampleid4 + - sg-exampleid5 + - sg-exampleid6 crossZoneLoadBalancing: true class: Network sslCertificate: arn:aws:acm:us-test-1:000000000000:certificate/123456789012-1234-1234-1234-12345678 diff --git a/tests/integration/update_cluster/complex/in-v1alpha2.yaml b/tests/integration/update_cluster/complex/in-v1alpha2.yaml index e974f16b7d9b1..fd61b783a51fc 100644 --- a/tests/integration/update_cluster/complex/in-v1alpha2.yaml +++ b/tests/integration/update_cluster/complex/in-v1alpha2.yaml @@ -8,8 +8,8 @@ spec: loadBalancer: type: Public additionalSecurityGroups: - - sg-exampleid3 - - sg-exampleid4 + - sg-exampleid5 + - sg-exampleid6 crossZoneLoadBalancing: true class: Network sslCertificate: arn:aws:acm:us-test-1:000000000000:certificate/123456789012-1234-1234-1234-12345678 diff --git a/tests/integration/update_cluster/complex/kubernetes.tf b/tests/integration/update_cluster/complex/kubernetes.tf index 46798059de65f..6d56704a5d63b 100644 --- a/tests/integration/update_cluster/complex/kubernetes.tf +++ b/tests/integration/update_cluster/complex/kubernetes.tf @@ -1,11 +1,11 @@ locals { cluster_name = "complex.example.com" master_autoscaling_group_ids = [aws_autoscaling_group.master-us-test-1a-masters-complex-example-com.id] - master_security_group_ids = [aws_security_group.masters-complex-example-com.id, "sg-exampleid3", "sg-exampleid4"] + master_security_group_ids = [aws_security_group.masters-complex-example-com.id, "sg-exampleid5", "sg-exampleid6"] masters_role_arn = aws_iam_role.masters-complex-example-com.arn masters_role_name = aws_iam_role.masters-complex-example-com.name node_autoscaling_group_ids = [aws_autoscaling_group.nodes-complex-example-com.id] - node_security_group_ids = [aws_security_group.nodes-complex-example-com.id, "sg-exampleid3", "sg-exampleid3", "sg-exampleid4", "sg-exampleid4"] + node_security_group_ids = [aws_security_group.nodes-complex-example-com.id, "sg-exampleid3", "sg-exampleid4"] node_subnet_ids = [aws_subnet.us-test-1a-complex-example-com.id] nodes_role_arn = aws_iam_role.nodes-complex-example-com.arn nodes_role_name = aws_iam_role.nodes-complex-example-com.name @@ -25,7 +25,7 @@ output "master_autoscaling_group_ids" { } output "master_security_group_ids" { - value = [aws_security_group.masters-complex-example-com.id, "sg-exampleid3", "sg-exampleid4"] + value = [aws_security_group.masters-complex-example-com.id, "sg-exampleid5", "sg-exampleid6"] } output "masters_role_arn" { @@ -41,7 +41,7 @@ output "node_autoscaling_group_ids" { } output "node_security_group_ids" { - value = [aws_security_group.nodes-complex-example-com.id, "sg-exampleid3", "sg-exampleid3", "sg-exampleid4", "sg-exampleid4"] + value = [aws_security_group.nodes-complex-example-com.id, "sg-exampleid3", "sg-exampleid4"] } output "node_subnet_ids" { @@ -307,7 +307,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-complex-example-com" { network_interfaces { associate_public_ip_address = true delete_on_termination = true - security_groups = [aws_security_group.masters-complex-example-com.id, "sg-exampleid3", "sg-exampleid4"] + security_groups = [aws_security_group.masters-complex-example-com.id, "sg-exampleid5", "sg-exampleid6"] } tag_specifications { resource_type = "instance" @@ -391,7 +391,7 @@ resource "aws_launch_template" "nodes-complex-example-com" { network_interfaces { associate_public_ip_address = true delete_on_termination = true - security_groups = [aws_security_group.nodes-complex-example-com.id, "sg-exampleid3", "sg-exampleid3", "sg-exampleid4", "sg-exampleid4"] + security_groups = [aws_security_group.nodes-complex-example-com.id, "sg-exampleid3", "sg-exampleid4"] } tag_specifications { resource_type = "instance"