Bug: Having multiple external networks in a project does not work
Created by: Nils98Ar
Part 1: Terraform does not allow multiple external networks (make create
)
╷
│ Error: Your query returned no results. Please change your search criteria and try again.
│
│ with data.openstack_networking_network_v2.external,
│ on neutron.tf line 68, in data "openstack_networking_network_v2" "external":
│ 68: data "openstack_networking_network_v2" "external" {
│
╵
make: *** [Makefile:87: create] Error 1
Part 2: CAPO does not support name in OPENSTACK_EXTERNAL_NETWORK_ID
Currently k8s-cluster-api-provider allows both (id/name) for external
according to the docs: https://github.com/SovereignCloudStack/k8s-cluster-api-provider/blob/353c15c64118e15197a9367e6913e3c14196d078/doc/configuration.md?plain=1#L35C120-L35C120
(in the past an ID didn't even work but I have not tried again)
That results in the OPENSTACK_EXTERNAL_NETWORK_ID being an name which is not supported by CAPO
- https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/docs/book/src/development/development.md#support-for-clouds-with-multiple-external-networks
- https://github.com/SovereignCloudStack/k8s-cluster-api-provider/blob/353c15c64118e15197a9367e6913e3c14196d078/terraform/files/template/clusterctl.yaml.tmpl#L69
So CAPO does external network auto detection everytime and multiple external networks are not supported.