Create port for kubernetes nodes.

This commit is contained in:
Magnus Andersson 2024-01-11 15:34:07 +01:00
parent 7a1bb687ed
commit a7394b524a
Signed by: mandersson
GPG key ID: 19CB2C58E1F19B16
2 changed files with 13 additions and 2 deletions

11
kube.tf Normal file
View file

@ -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"
}

View file

@ -1,4 +1,4 @@
data "openstack_networking_subnet_v2" "public_sub" { data "openstack_networking_network_v2" "public" {
name = "public-v4" # Name of subnet to be used name = "public" # Name of network to use.
} }