diff --git a/kube.tf b/kube.tf index b42f59d..7054f49 100644 --- a/kube.tf +++ b/kube.tf @@ -5,7 +5,7 @@ resource "openstack_networking_port_v2" "kubeport" { count = var.kubesize # size of cluster network_id = data.openstack_networking_network_v2.public.id # A list of security group ID - security_group_ids = [ data.openstack_networking_secgroup_v2.sshfromjumphosts.id ] + security_group_ids = [ data.openstack_networking_secgroup_v2.sshfromjumphosts.id, data.openstack_networking_secgroup_v2.allegress.id ] admin_state_up = "true" } @@ -32,7 +32,7 @@ resource "openstack_compute_instance_v2" "kube" { count = var.kubesize flavor_id = data.openstack_compute_flavor_v2.b2c4r16.id key_pair = data.openstack_compute_keypair_v2.manderssonpub.id - security_groups = ["ssh-from-jumphost"] + security_groups = [ data.openstack_networking_secgroup_v2.sshfromjumphosts.name, data.openstack_networking_secgroup_v2.allegress.name ] network { port = resource.openstack_networking_port_v2.kubeport[count.index].id diff --git a/securitygroups.tf b/securitygroups.tf index e6dc624..c1131be 100644 --- a/securitygroups.tf +++ b/securitygroups.tf @@ -2,3 +2,7 @@ data "openstack_networking_secgroup_v2" "sshfromjumphosts" { name = "ssh-from-jumphost" } + +data "openstack_networking_secgroup_v2" "allegress" { + name = "allegress" +}