mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-28 01:01:12 +00:00
💻️ Add image setting for OpenStack TF infra template
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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" {}
|
||||
|
||||
@@ -5,4 +5,3 @@ variable "prefix" {
|
||||
variable "count" {
|
||||
type = "string"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user