diff --git a/README.md b/README.md index 92fef8f338de900bd96eee347a6eb33e03f05a79..359eb49a95fdfec1f739ce772a3c245001f8c4c9 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Configuration: * public part of ssh key uploaded to OpenStack * ssh-agent with ssh key * configured access to OpenStack (for example downloaded *cloud.yaml* file or the environment set) +* floating IP created # Hadoop image diff --git a/deploy.tf b/deploy.tf index 2f7c8eb843a3b9c2f32e6a5068dda6775c7982dd..be680d580e30d1f6fb8094b0d64f92fe4414066d 100644 --- a/deploy.tf +++ b/deploy.tf @@ -189,12 +189,8 @@ resource "openstack_compute_instance_v2" "server" { } } -resource "openstack_networking_floatingip_v2" "floatip_1" { - pool = var.public_network -} - resource "openstack_compute_floatingip_associate_v2" "server-fip-1" { - floating_ip = openstack_networking_floatingip_v2.floatip_1.address + floating_ip = var.floating_ip instance_id = openstack_compute_instance_v2.server[0].id provisioner "local-exec" { command = <<EOF diff --git a/variables.tf b/variables.tf index 9938e72dd6e9500a2697f90555caa246aacd350f..2b21b98d340fda018f206063e0a71eb5ec796a12 100644 --- a/variables.tf +++ b/variables.tf @@ -28,6 +28,10 @@ variable "flavor" { default = "standard.medium" } +variable "floating_ip" { + type = string +} + variable "image_id" { description = "Image id (override other image search values)" default = null @@ -63,12 +67,6 @@ variable "local_network_id" { default = null } -variable "public_network" { - description = "Public network name" - default = "public-muni-147-251-124-GROUP" - # default = "public-cesnet-78-128-250-PERSONAL" -} - variable "security_admin_cidr" { description = "Admin networks (ssh only)" type = set(string)