From 48f227f0c8434ae753a7542dbba982cac1ea2bb4 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 4 Dec 2023 16:00:02 +0100 Subject: [PATCH] created resource-registry terraform plan --- .../d4s-dev/resource-registry/main.tf | 44 +++++++++++++++++++ .../d4s-dev/resource-registry/provider.tf | 3 ++ .../ssh-key-ref-outputs.tf.example | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 openstack-tf/d4s-dev/resource-registry/main.tf create mode 100644 openstack-tf/d4s-dev/resource-registry/provider.tf diff --git a/openstack-tf/d4s-dev/resource-registry/main.tf b/openstack-tf/d4s-dev/resource-registry/main.tf new file mode 100644 index 00000000..ef203ac5 --- /dev/null +++ b/openstack-tf/d4s-dev/resource-registry/main.tf @@ -0,0 +1,44 @@ +# 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" + } +} + + +module "smartgears_service_generic" { + source = "../../modules/generic_smartgears_service" + + smartgears_service_instances_map = { + resource_registry_1 = { + name = "resource-registry-1", + description = "This instance serves resource-registry service", + flavor = "m1.medium", + networks = ["d4s-dev-cloud-main", "orientdb-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 + }, + resource_registry_2 = { + name = "resource-registry-1", + description = "This instance serves resource-registry service", + flavor = "m1.medium", + networks = ["d4s-dev-cloud-main", "orientdb-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 + } + } +} + + diff --git a/openstack-tf/d4s-dev/resource-registry/provider.tf b/openstack-tf/d4s-dev/resource-registry/provider.tf new file mode 100644 index 00000000..fa7a121a --- /dev/null +++ b/openstack-tf/d4s-dev/resource-registry/provider.tf @@ -0,0 +1,3 @@ +provider "openstack" { + cloud = "d4s-dev" +} diff --git a/openstack-tf/modules/ssh-key-ref/ssh-key-ref-outputs.tf.example b/openstack-tf/modules/ssh-key-ref/ssh-key-ref-outputs.tf.example index f8210f84..e92be166 100644 --- a/openstack-tf/modules/ssh-key-ref/ssh-key-ref-outputs.tf.example +++ b/openstack-tf/modules/ssh-key-ref/ssh-key-ref-outputs.tf.example @@ -1,5 +1,5 @@ #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 +#replace the placeholders {YOUR_PRIVATE_KEYNAME} (without .pub) and {YOUR_KEYNAME} with proper values output "ssh_key_file" { value = "~/.ssh/{YOUR_PRIVATE_KEYNAME}"