Skip to content

Commit

Permalink
Correct integration test to reflect SG restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
seh authored and rifelpet committed Jan 4, 2021
1 parent 4111905 commit b52f7b8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
6 changes: 2 additions & 4 deletions tests/integration/update_cluster/complex/cloudformation.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@
{
"Ref": "AWSEC2SecurityGroupmasterscomplexexamplecom"
},
"sg-exampleid3",
"sg-exampleid4"
"sg-exampleid5",
"sg-exampleid6"
]
}
],
Expand Down Expand Up @@ -422,8 +422,6 @@
"Ref": "AWSEC2SecurityGroupnodescomplexexamplecom"
},
"sg-exampleid3",
"sg-exampleid3",
"sg-exampleid4",
"sg-exampleid4"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/update_cluster/complex/in-v1alpha2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/update_cluster/complex/kubernetes.tf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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" {
Expand All @@ -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" {
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit b52f7b8

Please sign in to comment.