diff --git a/kube.tf b/kube.tf new file mode 100644 index 0000000..cd2d128 --- /dev/null +++ b/kube.tf @@ -0,0 +1,11 @@ + +resource "openstack_networking_port_v2" "kubeport" { + name = "kube${count.index + 1}-matrix-test-sunet-se-port" + # We create as many ports as there are instances created + count = ${kubesize} # size of cluster + network_id = data.openstack_networking_network_v2.public.id + # A list of security group ID + #security_group_ids = [resource.openstack_networking_secgroup_v2.sshaccess.id, data.openstack_networking_secgroup_v2.defaultsg.id, resource.openstack_networking_secgroup_v2.pgserver.id ] + admin_state_up = "true" +} + diff --git a/network.tf b/network.tf index 6ea4eff..9d7acb2 100644 --- a/network.tf +++ b/network.tf @@ -1,4 +1,4 @@ -data "openstack_networking_subnet_v2" "public_sub" { - name = "public-v4" # Name of subnet to be used +data "openstack_networking_network_v2" "public" { + name = "public" # Name of network to use. }