From 8868a8ab20f9b4e1e1187b129c6aad25b33e1949 Mon Sep 17 00:00:00 2001 From: Andrei Ozerov Date: Mon, 22 Oct 2018 13:16:13 +0300 Subject: [PATCH] Modules: create private flavors by default Add "flavor_is_public" variable to the "flavor" module with "false" value by default. --- modules/flavor/main.tf | 9 +++++---- modules/flavor/vars.tf | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/flavor/main.tf b/modules/flavor/main.tf index 7d037d7..a2fc66d 100644 --- a/modules/flavor/main.tf +++ b/modules/flavor/main.tf @@ -1,6 +1,7 @@ resource "openstack_compute_flavor_v2" "flavor_1" { - name = "${var.flavor_name}" - ram = "${var.flavor_ram_mb}" - vcpus = "${var.flavor_vcpus}" - disk = "${var.flavor_local_disk_gb}" + name = "${var.flavor_name}" + ram = "${var.flavor_ram_mb}" + vcpus = "${var.flavor_vcpus}" + disk = "${var.flavor_local_disk_gb}" + is_public = "${var.flavor_is_public}" } diff --git a/modules/flavor/vars.tf b/modules/flavor/vars.tf index fdabb02..5c9e09b 100644 --- a/modules/flavor/vars.tf +++ b/modules/flavor/vars.tf @@ -17,3 +17,8 @@ variable "flavor_local_disk_gb" { description = "Amount of GB for local storage of the OpenStack Compute Flavor" default = 0 } + +variable "flavor_is_public" { + description = "Flavor visibility" + default = false +} \ No newline at end of file