Added plan for authorization in preprod
This commit is contained in:
parent
67b9720579
commit
e90ac474f3
|
@ -53,7 +53,7 @@ module "dns_records_create" {
|
|||
source = "../../modules/dns_resources"
|
||||
|
||||
dns_resources_map = {
|
||||
thredds1 = {
|
||||
auth-d = {
|
||||
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
|
||||
name = join(".", ["auth-d", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
|
||||
description = "Authorization auth-d"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.6.4",
|
||||
"serial": 3,
|
||||
"serial": 8,
|
||||
"lineage": "5c181534-e215-5b78-32e5-7901710ee61a",
|
||||
"outputs": {},
|
||||
"resources": [
|
||||
|
@ -401,12 +401,12 @@
|
|||
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
|
||||
"instances": [
|
||||
{
|
||||
"index_key": "thredds1",
|
||||
"index_key": "auth-d",
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"description": "Authorization auth-d",
|
||||
"disable_status_check": false,
|
||||
"id": "cbae638a-9d99-44aa-946c-0f5ffb7fc488/b65eb6fe-5b98-4248-be68-d7c4be992b21",
|
||||
"id": "cbae638a-9d99-44aa-946c-0f5ffb7fc488/a597f62b-bceb-4e26-917d-dc685743e84e",
|
||||
"name": "auth-d.cloud-dev.d4science.org.",
|
||||
"project_id": "e8f8ca72f30648a8b389b4e745ac83a9",
|
||||
"records": [
|
||||
|
@ -504,7 +504,7 @@
|
|||
"traffic_from_the_main_load_balancers"
|
||||
],
|
||||
"stop_before_destroy": false,
|
||||
"tags": null,
|
||||
"tags": [],
|
||||
"timeouts": null,
|
||||
"updated": "2024-02-15 17:30:07 +0000 UTC",
|
||||
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
# 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"
|
||||
}
|
||||
|
||||
module "instance_without_data_volume" {
|
||||
source = "../../modules/instance_without_data_volume"
|
||||
|
||||
instances_without_data_volume_map = {
|
||||
auth = {
|
||||
name = "auth",
|
||||
description = "This instance is a Authorization service",
|
||||
flavor = module.common_variables.flavor_list.m1_medium,
|
||||
networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql],
|
||||
security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers],
|
||||
server_groups_ids = [],
|
||||
image_ref = module.common_variables.ubuntu_1804
|
||||
image_volume_size = 20
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
locals {
|
||||
cname_target = "main-lb.${data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name}"
|
||||
}
|
||||
|
||||
#
|
||||
# Add DNS record/s
|
||||
#
|
||||
module "dns_records_create" {
|
||||
source = "../../modules/dns_resources"
|
||||
|
||||
dns_resources_map = {
|
||||
auth = {
|
||||
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
|
||||
name = join(".", ["auth", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
|
||||
description = "Authorization auth"
|
||||
ttl = 8600
|
||||
type = "CNAME"
|
||||
records = [local.cname_target]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
provider "openstack" {
|
||||
cloud = "d4s-pre"
|
||||
}
|
Loading…
Reference in New Issue