Use the subnet_id to place the octavia interfaces.
This commit is contained in:
parent
b9a47e1d9d
commit
0124413fc1
|
@ -59,6 +59,11 @@ output "main_private_network_id" {
|
||||||
value = openstack_networking_network_v2.main-private-network.id
|
value = openstack_networking_network_v2.main-private-network.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output "main_subnet_network_id" {
|
||||||
|
description = "Main subnet network id"
|
||||||
|
value = openstack_networking_subnet_v2.main-private-subnet.id
|
||||||
|
}
|
||||||
|
|
||||||
output "dns_zone_id" {
|
output "dns_zone_id" {
|
||||||
description = "Id of the new DNS zone"
|
description = "Id of the new DNS zone"
|
||||||
value = openstack_dns_zone_v2.primary_project_dns_zone.id
|
value = openstack_dns_zone_v2.primary_project_dns_zone.id
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Main load balancer. L4, backed by Octavia
|
# Main load balancer. L4, backed by Octavia
|
||||||
resource "openstack_lb_loadbalancer_v2" "main_lb" {
|
resource "openstack_lb_loadbalancer_v2" "main_lb" {
|
||||||
vip_network_id = var.main_private_network_id
|
vip_subnet_id = var.main_private_subnet_id
|
||||||
name = var.octavia_information.main_lb_name
|
name = var.octavia_information.main_lb_name
|
||||||
description = var.octavia_information.main_lb_description
|
description = var.octavia_information.main_lb_description
|
||||||
flavor_id = var.octavia_information.octavia_flavor_id
|
flavor_id = var.octavia_information.octavia_flavor_id
|
||||||
|
|
|
@ -18,4 +18,19 @@ shared_postgresql_server_data = {
|
||||||
|
|
||||||
# Provided in the output of the project setup
|
# Provided in the output of the project setup
|
||||||
main_private_network_id = "020df98d-ae72-452a-b376-3b6dc289acac"
|
main_private_network_id = "020df98d-ae72-452a-b376-3b6dc289acac"
|
||||||
|
main_private_subnet_id = "5d7b83ad-e058-4a3a-bfd8-d20ba6d42e1a"
|
||||||
dns_zone_id = "74135b34-1a9c-4c01-8cf0-22450a5660c4"
|
dns_zone_id = "74135b34-1a9c-4c01-8cf0-22450a5660c4"
|
||||||
|
|
||||||
|
octavia_information = {
|
||||||
|
main_lb_name = "d4s-production-cloud-l4-load-balancer"
|
||||||
|
main_lb_description = "Main L4 load balancer for the D4Science production"
|
||||||
|
swarm_lb_name = "d4s-production-cloud-l4-swarm-load-balancer"
|
||||||
|
octavia_flavor = "octavia_amphora-mvcpu-ha"
|
||||||
|
octavia_flavor_id = "394988b5-6603-4a1e-a939-8e177c6681c7"
|
||||||
|
main_lb_hostname = "main-lb"
|
||||||
|
# The following aren't available when the module runs so we have to get them with the command
|
||||||
|
# openstack --os-cloud d4s-pre port list -f value | grep octavia-lb-vrrp
|
||||||
|
# This means that the execution will fail
|
||||||
|
octavia_vrrp_ip_1 = "10.1.42.119/32"
|
||||||
|
octavia_vrrp_ip_2 = "10.1.42.188/32"
|
||||||
|
}
|
||||||
|
|
|
@ -46,6 +46,11 @@ variable "main_private_subnet" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "main_private_subnet_id" {
|
||||||
|
# Set with the correct value after the setup is complete
|
||||||
|
default = ""
|
||||||
|
}
|
||||||
|
|
||||||
variable "external_router" {
|
variable "external_router" {
|
||||||
type = map(string)
|
type = map(string)
|
||||||
default = {
|
default = {
|
||||||
|
@ -88,10 +93,5 @@ variable "octavia_information" {
|
||||||
octavia_flavor = "octavia_amphora-mvcpu-ha"
|
octavia_flavor = "octavia_amphora-mvcpu-ha"
|
||||||
octavia_flavor_id = "394988b5-6603-4a1e-a939-8e177c6681c7"
|
octavia_flavor_id = "394988b5-6603-4a1e-a939-8e177c6681c7"
|
||||||
main_lb_hostname = "main-lb"
|
main_lb_hostname = "main-lb"
|
||||||
# The following aren't available when the module runs so we have to get them with the command
|
}
|
||||||
# openstack --os-cloud d4s-pre port list -f value | grep octavia-lb-vrrp
|
|
||||||
# This means that the execution will fail
|
|
||||||
octavia_vrrp_ip_1 = "10.1.42.83/32"
|
|
||||||
octavia_vrrp_ip_2 = "10.1.44.249/32"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue