openstack: set region in cluster cloud client (#3375)

This commit is contained in:
3u13r 2024-09-26 11:08:06 +02:00 committed by GitHub
parent d65987cb15
commit 882d602524
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 0 deletions

View file

@ -242,6 +242,7 @@ module "instance_group" {
openstack_username = local.cloudyaml["auth"]["username"]
openstack_password = local.cloudyaml["auth"]["password"]
openstack_user_domain_name = local.cloudyaml["auth"]["user_domain_name"]
openstack_region_name = local.cloudyaml["region_name"]
openstack_load_balancer_endpoint = openstack_networking_floatingip_v2.public_ip.address
}

View file

@ -80,6 +80,7 @@ resource "openstack_compute_instance_v2" "instance_group_member" {
openstack-username = var.openstack_username
openstack-password = var.openstack_password
openstack-user-domain-name = var.openstack_user_domain_name
openstack-region-name = var.openstack_region_name
openstack-load-balancer-endpoint = var.openstack_load_balancer_endpoint
})
availability_zone_hints = length(var.availability_zone) > 0 ? var.availability_zone : null

View file

@ -97,6 +97,11 @@ variable "openstack_password" {
description = "OpenStack password."
}
variable "openstack_region_name" {
type = string
description = "OpenStack region name."
}
variable "openstack_load_balancer_endpoint" {
type = string
description = "OpenStack load balancer endpoint."