diff --git a/sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/main.tf b/sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/main.tf index 3bccae855..e4f327ec3 100644 --- a/sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/main.tf +++ b/sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/main.tf @@ -49,7 +49,10 @@ resource "juju_application" "openstack-port-cni" { revision = var.openstack-port-cni-revision } - config = var.openstack-port-cni-config + config = merge( + { "region" = var.openstack-port-cni-region }, + var.openstack-port-cni-config + ) } resource "juju_integration" "port-cni-keystone" { diff --git a/sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/variables.tf b/sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/variables.tf index 1af2a8f28..003e43ca9 100644 --- a/sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/variables.tf +++ b/sunbeam-python/sunbeam/features/loadbalancer/etc/deploy-cni/variables.tf @@ -47,3 +47,9 @@ variable "openstack-port-cni-config" { type = map(string) default = {} } + +variable "openstack-port-cni-region" { + description = "OpenStack region name passed to openstack-port-cni-k8s as the 'region' config option" + type = string + default = "RegionOne" +} diff --git a/sunbeam-python/sunbeam/features/loadbalancer/feature.py b/sunbeam-python/sunbeam/features/loadbalancer/feature.py index f97cb88c3..d387278c0 100644 --- a/sunbeam-python/sunbeam/features/loadbalancer/feature.py +++ b/sunbeam-python/sunbeam/features/loadbalancer/feature.py @@ -934,6 +934,7 @@ def run(self, context: StepContext) -> Result: override_tfvars={ "model_uuid": self.jhelper.get_model_uuid(self.model), "multus-network-attachment-definitions": nad_yaml, + "openstack-port-cni-region": self.deployment.get_region_name(), }, ) except (TerraformException, TerraformStateLockedException) as e: