Hi,
I cannot attach block storage resources to the nodepool of a kube cluster
Please, find below an extract of my terraform code:
resource "ovh_cloud_project_kube" "my_kube_cluster" {
service_name = "${var.service_name}"
name = "${format("%s-kube", var.environment)}"
region = "${var.region_one}"
version = "${var.kube_version}"
}
resource "ovh_cloud_project_kube_nodepool" "node_pool" {
service_name = "${var.service_name}"
kube_id = ovh_cloud_project_kube.my_kube_cluster.id
name = "${format("my-pool-%s", var.environment)}"
flavor_name = "b2-30"
desired_nodes = 2
max_nodes = 2
min_nodes = 2
anti_affinity = "true"
}
resource "openstack_blockstorage_volume_v2" "volumes" {
region = "GRA7"
count = 2
name = "${format("%s-longhorn_DataDisk-%02d", var.environment, count.index + 1)}"
size = 1
}
resource "openstack_compute_volume_attach_v2" "attachments" {
count = 2
instance_id = "${ovh_cloud_project_kube_nodepool.node_pool.id}"
volume_id = "${openstack_blockstorage_volume_v2.volumes.*.id[count.index]}"
}
Here is the error message:
Error: Error creating openstack_compute_volume_attach_v2 8406879d-6268-4bd0-898e-3421e1da5403: Resource not found
│
│ with openstack_compute_volume_attach_v2.attachments[0],
│ on blockstorage.tf line 8, in resource "openstack_compute_volume_attach_v2" "attachments":
│ 8: resource "openstack_compute_volume_attach_v2" "attachments" {
│
╵
╷
│ Error: Error creating openstack_compute_volume_attach_v2 8406879d-6268-4bd0-898e-3421e1da5403: Resource not found
│
│ with openstack_compute_volume_attach_v2.attachments[1],
│ on blockstorage.tf line 8, in resource "openstack_compute_volume_attach_v2" "attachments":
│ 8: resource "openstack_compute_volume_attach_v2" "attachments" {
Anyone encountered this issue?
François.