🔧 OpenStack pool and external_network_id are now variables

This commit is contained in:
ENIX NOC
2023-03-11 18:26:22 +00:00
committed by Jérôme Petazzoni
parent e78e0de377
commit fa0a894ebc
3 changed files with 12 additions and 3 deletions

View File

@@ -14,8 +14,7 @@ resource "openstack_compute_instance_v2" "machine" {
resource "openstack_compute_floatingip_v2" "machine" {
count = var.how_many_nodes
# This is something provided to us by Enix when our tenant was provisioned.
pool = "Public Floating"
pool = var.pool
}
resource "openstack_compute_floatingip_associate_v2" "machine" {

View File

@@ -12,7 +12,7 @@ resource "openstack_networking_subnet_v2" "internal" {
resource "openstack_networking_router_v2" "router" {
name = var.prefix
external_network_id = "15f0c299-1f50-42a6-9aff-63ea5b75f3fc"
external_network_id = var.external_network_id
}
resource "openstack_networking_router_interface_v2" "router_internal" {

View File

@@ -14,3 +14,13 @@ variable "image" {
type = string
default = "Ubuntu 22.04"
}
// For example: "Public training floating"
variable "pool" {
type = string
}
// For example: "74e32174-cf09-452f-bda0-2bdfe074e251"
variable "external_network_id" {
type = string
}