Commit 4ec5e6a5 authored by Ryan Randles Jones's avatar Ryan Randles Jones
Browse files

Update main.tf

parent 50c3e9e6
......@@ -5,14 +5,14 @@ resource "openstack_compute_keypair_v2" "test-keypair" {
# creates dmznet
resource "openstack_networking_network_v2" "terraform" {
name = "dmxnet"
name = "dmznet"
admin_state_up = "true"
}
# creates dmzsubnet using the floating ip defined in datasources.tf to get the network id
# cidr is the subnet range (that subnet range and dns nameservers from the network create file in feat-openstack)
resource "openstack_networking_subnet_v2" "terraform" {
name = "dmxsubnet"
name = "dmzsubnet"
network_id = "${openstack_networking_network_v2.terraform.id}"
cidr = "192.168.100.0/24"
ip_version = 4
......@@ -21,7 +21,7 @@ resource "openstack_networking_subnet_v2" "terraform" {
# defines the router borderrouter using floating ip defined in datasources.tf to create the external network id
resource "openstack_networking_router_v2" "terraform" {
name = "router"
name = "borderrouter"
admin_state_up = "true"
external_network_id = "${data.openstack_networking_network_v2.terraform.id}"
}
......@@ -76,7 +76,7 @@ resource "openstack_networking_floatingip_v2" "terraform" {
# creates details for the instance using variables defined in vars.tf and resource for security groups
resource "openstack_compute_instance_v2" "terraform" {
name = "terraform"
name = "ohpc"
image_name = "${var.image}"
flavor_name = "${var.flavor}"
key_pair = "${openstack_compute_keypair_v2.test-keypair.name}"
......@@ -102,14 +102,14 @@ resource "openstack_networking_port_v2" "port_1" {
# creates clusternet
resource "openstack_networking_network_v2" "terraform2" {
name = "cluster"
name = "clusternet"
admin_state_up = "true"
}
# creates clustersubnet using the instance id
# cidr is the subnet range (that subnet range and dns nameservers from the network create file in feat-openstack)
resource "openstack_networking_subnet_v2" "terraform2" {
name = "clustersub"
name = "clustersubnet"
network_id = "${openstack_networking_port_v2.port_1.id}"
cidr = "10.1.1.0/24"
ip_version = 4
......
Supports Markdown
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