61 lines
1.5 KiB
HCL
61 lines
1.5 KiB
HCL
# Define required providers
|
|
terraform {
|
|
required_version = ">= 0.14.0"
|
|
required_providers {
|
|
openstack = {
|
|
source = "terraform-provider-openstack/openstack"
|
|
version = "~> 1.53.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
data "terraform_remote_state" "privnet_dns_router" {
|
|
backend = "local"
|
|
|
|
config = {
|
|
path = "../project-setup/terraform.tfstate"
|
|
}
|
|
}
|
|
|
|
|
|
#
|
|
# Uses common_variables as module
|
|
#
|
|
module "common_variables" {
|
|
source = "../../modules/common_variables"
|
|
}
|
|
|
|
|
|
#
|
|
# Creates the server group "geoportal"
|
|
#
|
|
resource "openstack_compute_servergroup_v2" "geoportal" {
|
|
name = "geoportal"
|
|
policies = [module.common_variables.policy_list.soft_anti_affinity]
|
|
}
|
|
|
|
|
|
#
|
|
# Uses the "generic_smartgears_service" as module
|
|
#
|
|
module "smartgears_service_generic" {
|
|
source = "../../modules/generic_smartgears_service"
|
|
|
|
# Here, you can overwrite the openstack_vm_data_scripts to run for ubuntuXYZ.sh
|
|
# user_data_var_file = {
|
|
# user_data_file = "../../openstack_vm_data_scripts/ubuntu2204.sh"
|
|
# }
|
|
|
|
smartgears_service_instances_map = {
|
|
geoportal_service = {
|
|
name = "geoportal-cms",
|
|
description = "The Geoportal instance",
|
|
flavor = "m1.medium",
|
|
networks = ["d4s-dev-cloud-main", "postgresql-srv-net"],
|
|
security_groups = ["default", "http and https from the load balancers"],
|
|
server_groups_ids = [openstack_compute_servergroup_v2.geoportal.id],
|
|
image_uuid = "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" #ubuntu_18_04.uuid of DEV
|
|
}
|
|
}
|
|
}
|