20 lines
1,008 B
HCL
20 lines
1,008 B
HCL
|
|
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 = var.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"
|
|
}
|
|
|
|
resource "openstack_blockstorage_volume_v3" "kubevolume" {
|
|
count = var.kubesize # size of cluster
|
|
name = "kube${count.index}-matrix-test-sunet-se-vol"
|
|
description = "OS volume for kubernetes node ${count.index}"
|
|
size = 30
|
|
image_id = data.openstack_images_image_v2.ubuntu2204image.id
|
|
enable_online_resize = true # Allow us to resize volume while attached.
|
|
}
|