Commit f02cc123 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Specify private ip on ohpc

parent 6a0a1e36
......@@ -65,6 +65,7 @@ module "create-ohpc-instance" {
key_pair = "${module.import-keypair.keypair_name}"
external_network = var.external_network
internal_network = var.internal_network
internal_ip = var.ohpc_private_ip
floating_ip_ohpc = "${module.floating-ip-address.ohpc_address}"
host_prefix = var.host_prefix
ohpc_user = var.ohpc_user
......
......@@ -9,6 +9,7 @@ variable "flavor" {}
variable "key_pair" {type = "string"}
variable "internal_network" {}
variable "internal_ip" {}
variable "external_network" {}
# is created in floating-ip module and called in root module
......@@ -34,6 +35,7 @@ resource "openstack_compute_instance_v2" "ohpc" {
}
network {
name = var.internal_network
fixed_ip_v4 = var.internal_ip
}
}
......
......@@ -14,6 +14,7 @@ variable "ssh_public_key" {default = "~/.ssh/id_rsa.pub"}
# variables for instance modules
variable "ohpc_instance_name" {default = "ohpc"}
variable "ohpc_private_ip" {default = "10.1.1.10"}
variable "ood_instance_name" { default = "ood"}
variable "image_ohpc" {default = "CentOS-7-x86_64-GenericCloud-1905"}
variable "image_ood" {default = "CentOS-7-x86_64-GenericCloud-1905"}
......
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