mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-17 19:20:10 -03:30
Use Pre-existing Floating IP for Bastion (#8214)
* use pre-existing floating IP for bastion * document bastion_fips in readme
This commit is contained in:
@@ -28,7 +28,7 @@ resource "openstack_networking_floatingip_v2" "k8s_node" {
|
||||
}
|
||||
|
||||
resource "openstack_networking_floatingip_v2" "bastion" {
|
||||
count = var.number_of_bastions
|
||||
count = length(var.bastion_fips) > 0 ? 0 : var.number_of_bastions
|
||||
pool = var.floatingip_pool
|
||||
depends_on = [null_resource.dummy_dependency]
|
||||
}
|
||||
|
||||
@@ -17,5 +17,5 @@ output "k8s_nodes_fips" {
|
||||
}
|
||||
|
||||
output "bastion_fips" {
|
||||
value = openstack_networking_floatingip_v2.bastion[*].address
|
||||
value = length(var.bastion_fips) > 0 ? var.bastion_fips : openstack_networking_floatingip_v2.bastion[*].address
|
||||
}
|
||||
|
||||
@@ -20,4 +20,6 @@ variable "k8s_nodes" {}
|
||||
|
||||
variable "k8s_master_fips" {}
|
||||
|
||||
variable "bastion_fips" {}
|
||||
|
||||
variable "router_internal_port_id" {}
|
||||
|
||||
Reference in New Issue
Block a user