💻️ Add image setting for OpenStack TF infra template

This commit is contained in:
Jerome Petazzoni
2021-07-19 14:55:32 +02:00
parent b91ed846a0
commit 3e29881ece
3 changed files with 4 additions and 2 deletions

View File

@@ -8,3 +8,4 @@ export TF_VAR_domain="Default"
export TF_VAR_password="..."
export TF_VAR_auth_url="https://api.r1.nxs.enix.io/v3"
export TF_VAR_flavor="GP1.S"
export TF_VAR_image="Ubuntu 20.04.1"

View File

@@ -1,7 +1,7 @@
resource "openstack_compute_instance_v2" "machine" {
count = "${var.count}"
name = "${format("%s-%04d", "${var.prefix}", count.index+1)}"
image_name = "Ubuntu 18.04.4 20200324"
image_name = "${var.image}"
flavor_name = "${var.flavor}"
security_groups = ["${openstack_networking_secgroup_v2.full_access.name}"]
key_pair = "${openstack_compute_keypair_v2.ssh_deploy_key.name}"
@@ -30,3 +30,5 @@ output "ip_addresses" {
}
variable "flavor" {}
variable "image" {}

View File

@@ -5,4 +5,3 @@ variable "prefix" {
variable "count" {
type = "string"
}