mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-17 03:49:17 +00:00
🔧 OpenStack pool and external_network_id are now variables
This commit is contained in:
committed by
Jérôme Petazzoni
parent
e78e0de377
commit
fa0a894ebc
@@ -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" {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user