Commit debfa07a authored by Ryan Randles Jones's avatar Ryan Randles Jones
Browse files

changed cluster and dmz to internal and external as defined in vars file

parent bda7bab3
......@@ -13,14 +13,14 @@ resource "openstack_compute_keypair_v2" "keypair" {
#}
# creates dmznet
resource "openstack_networking_network_v2" "dmznet" {
name = "dmznet"
resource "openstack_networking_network_v2" "external_net" {
name = "${var.external-net}"
admin_state_up = "true"
}
resource "openstack_networking_subnet_v2" "dmzsubnet" {
name = "dmzsubnet"
network_id = "${openstack_networking_network_v2.dmznet.id}"
resource "openstack_networking_subnet_v2" "external_subnet" {
name = "${var.external-subnet}"
network_id = "${openstack_networking_network_v2.external_net.id}"
cidr = "192.168.100.0/24"
ip_version = 4
dns_nameservers = ["8.8.8.8"]
......@@ -36,7 +36,7 @@ resource "openstack_networking_router_v2" "router" {
resource "openstack_networking_router_interface_v2" "router" {
router_id = "${openstack_networking_router_v2.router.id}"
subnet_id = "${openstack_networking_subnet_v2.dmzsubnet.id}"
subnet_id = "${openstack_networking_subnet_v2.external_subnet.id}"
}
......@@ -63,7 +63,7 @@ resource "openstack_networking_floatingip_v2" "ip_pool" {
# creates details for the OHPC instance using variables defined in vars.tf
resource "openstack_compute_instance_v2" "ohpc" {
depends_on = ["openstack_networking_subnet_v2.dmzsubnet"]
depends_on = ["openstack_networking_subnet_v2.external_net"]
name = "ohpc"
image_name = "${var.image}"
flavor_name = "${var.flavor}"
......@@ -72,10 +72,10 @@ depends_on = ["openstack_networking_subnet_v2.dmzsubnet"]
# defines the networks of the instance
network {
name = "dmznet"
name = "${var.external-net}"
}
network {
name = "clusternet"
name = "${var.internal-net}"
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment