diff --git a/openstack/00-init.tf b/openstack/00-init.tf index 6377790..3e82c65 100644 --- a/openstack/00-init.tf +++ b/openstack/00-init.tf @@ -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 = "" } diff --git a/openstack/arif-home.tfvars b/openstack/arif-home.tfvars new file mode 100644 index 0000000..d64fd24 --- /dev/null +++ b/openstack/arif-home.tfvars @@ -0,0 +1,2 @@ +cloud = "arif-home" +domain_id = "3fd5a53e08e243b49ac3b171d57b4e4a" diff --git a/openstack/init/terraform.tfvars b/openstack/init/terraform.tfvars new file mode 120000 index 0000000..c196d0f --- /dev/null +++ b/openstack/init/terraform.tfvars @@ -0,0 +1 @@ +../arif-home.tfvars \ No newline at end of file diff --git a/openstack/multi-instances/terraform.tfvars b/openstack/multi-instances/terraform.tfvars new file mode 120000 index 0000000..c196d0f --- /dev/null +++ b/openstack/multi-instances/terraform.tfvars @@ -0,0 +1 @@ +../arif-home.tfvars \ No newline at end of file diff --git a/openstack/stsstack_init/01-default-networks.tf b/openstack/stsstack_init/01-default-networks.tf index 603dfed..80c6b69 100644 --- a/openstack/stsstack_init/01-default-networks.tf +++ b/openstack/stsstack_init/01-default-networks.tf @@ -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" } } diff --git a/openstack/stsstack_init/terraform.tfvars b/openstack/stsstack_init/terraform.tfvars new file mode 120000 index 0000000..c196d0f --- /dev/null +++ b/openstack/stsstack_init/terraform.tfvars @@ -0,0 +1 @@ +../arif-home.tfvars \ No newline at end of file