Updated some comments

This commit is contained in:
Francesco Mangiacrapa 2023-12-01 17:49:38 +01:00
parent d9f15e68e6
commit 13a1c58534
4 changed files with 82 additions and 32 deletions

View File

@ -20,6 +20,43 @@
# }
# locals {
# smartgears_service_instances_map = {
# geoportal_service = {
# name = "geoportal-cms",
# description = "The Geoportal instance",
# flavor = "${var.flavor_list.m1_large}",
# networks = ["d4s-dev-cloud-main", "postgresql-srv-net"],
# security_groups = ["default", "http and https from the load balancers"]
# block_device_uuid = "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" #ubuntu_18_04.uuid of DEV
# },
# # URI-Resolver instance 1
# uri_resolver_service_i1 = {
# name = "data",
# description = "The data instance",
# flavor = "m1.medium",
# networks = ["d4s-dev-cloud-main"],
# security_groups = ["default", "http and https from the load balancers"]
# block_device_uuid = "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" #ubuntu_18_04.uuid of DEV
# }
# }
# }
# variable "smartgears_service_instances_map" {
# type = map(object({
# name = string
# description = string
# flavor = string
# networks = list(string)
# security_groups = list(string)
# block_device_uuid = string
# }))
# default = local.smartgears_service_instances_map
# }
variable "smartgears_service_instances_map" {
type = map(object({
name = string

View File

@ -1,4 +1,4 @@
# Generic martgears_service instance
# Generic smartgears_service instance
resource "openstack_compute_instance_v2" "smartgears_service" {
for_each = var.smartgears_service_instances_map
name = each.value.name
@ -24,3 +24,4 @@ resource "openstack_compute_instance_v2" "smartgears_service" {
user_data = file("${var.ubuntu1804_data_file}")
}

View File

@ -0,0 +1,12 @@
#This file must be renamed as 'ssh-key-ref-outputs.tf'
#replace the placeholders {YOUR_PRIVATE_KEYNAME} (without .pb) and {YOUR_KEYNAME} with proper values
output "ssh_key_file" {
value = "~/.ssh/{YOUR_PRIVATE_KEYNAME}"
sensitive = true
}
output "ssh_key_name" {
value = "{YOUR_KEYNAME}"
sensitive = false
}

View File

@ -87,7 +87,7 @@ resource "openstack_compute_instance_v2" "timescaledb_server" {
fixed_ip_v4 = var.timescaledb_ip.* [count.index]
}
user_data = "${file("${var.ubuntu2204_data_file}")}"
user_data = file("${var.ubuntu2204_data_file}")
depends_on = [openstack_networking_subnet_v2.timescaledb_subnet]
}