Add variables in a more dynamic way
Some reformatting on some of the files
This commit is contained in:
parent
828d4a6ff4
commit
e54d63390c
@ -9,10 +9,15 @@ terraform {
|
||||
}
|
||||
|
||||
provider "openstack" {
|
||||
cloud = "arif-home"
|
||||
cloud = var.cloud
|
||||
}
|
||||
|
||||
variable "domain_id" {
|
||||
type = string
|
||||
default = "3fd5a53e08e243b49ac3b171d57b4e4a"
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "cloud" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
2
openstack/arif-home.tfvars
Normal file
2
openstack/arif-home.tfvars
Normal file
@ -0,0 +1,2 @@
|
||||
cloud = "arif-home"
|
||||
domain_id = "3fd5a53e08e243b49ac3b171d57b4e4a"
|
1
openstack/init/terraform.tfvars
Symbolic link
1
openstack/init/terraform.tfvars
Symbolic link
@ -0,0 +1 @@
|
||||
../arif-home.tfvars
|
1
openstack/multi-instances/terraform.tfvars
Symbolic link
1
openstack/multi-instances/terraform.tfvars
Symbolic link
@ -0,0 +1 @@
|
||||
../arif-home.tfvars
|
@ -1,29 +1,33 @@
|
||||
resource "openstack_networking_network_v2" "ext_net" {
|
||||
name = "ext_net"
|
||||
admin_state_up = "true"
|
||||
admin_state_up = true
|
||||
shared = true
|
||||
external = true
|
||||
|
||||
segments {
|
||||
|
||||
physical_network = "physnet1"
|
||||
network_type = "flat"
|
||||
network_type = "flat"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
resource "openstack_networking_subnet_v2" "ext_net_subnet" {
|
||||
name = "ext_net_subnet"
|
||||
network_id = openstack_networking_network_v2.ext_net.id
|
||||
cidr = "192.168.1.0/24"
|
||||
gateway_ip = "192.168.1.254"
|
||||
name = "ext_net_subnet"
|
||||
network_id = openstack_networking_network_v2.ext_net.id
|
||||
cidr = "192.168.1.0/24"
|
||||
gateway_ip = "192.168.1.254"
|
||||
enable_dhcp = false
|
||||
ip_version = 4
|
||||
dns_nameservers = ["192.168.1.9","192.168.1.13"]
|
||||
ip_version = 4
|
||||
|
||||
dns_nameservers = [
|
||||
"192.168.1.9",
|
||||
"192.168.1.13"
|
||||
]
|
||||
|
||||
allocation_pool {
|
||||
start = "192.168.1.42"
|
||||
end = "192.168.1.79"
|
||||
end = "192.168.1.79"
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +50,7 @@ resource "openstack_networking_subnet_v2" "private_subnet" {
|
||||
|
||||
allocation_pool {
|
||||
start = "192.168.21.2"
|
||||
end = "192.168.21.254"
|
||||
end = "192.168.21.254"
|
||||
}
|
||||
|
||||
}
|
||||
|
1
openstack/stsstack_init/terraform.tfvars
Symbolic link
1
openstack/stsstack_init/terraform.tfvars
Symbolic link
@ -0,0 +1 @@
|
||||
../arif-home.tfvars
|
Loading…
Reference in New Issue
Block a user