GRSF DNS recordset in preprod.

This commit is contained in:
Andrea Dell'Amico 2024-03-20 17:29:59 +01:00
parent 02d65992cd
commit 8b71341eef
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 63 additions and 5 deletions

View File

@ -47,3 +47,25 @@ module "instance_without_data_volume" {
}
}
}
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 = {
grsf_publisher = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["grsf-publisher", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "GRSF publisher"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
}
}
}

View File

@ -1,7 +1,7 @@
{
"version": 4,
"terraform_version": "1.6.4",
"serial": 3,
"terraform_version": "1.6.6",
"serial": 5,
"lineage": "826c8593-6c3d-8568-c9e1-1a57900d69b3",
"outputs": {},
"resources": [
@ -407,7 +407,9 @@
"schema_version": 0,
"attributes": {
"id": "8daab67e-ccab-40f7-bc76-84371a663dbf",
"members": [],
"members": [
"ee92a9cd-abb4-47a0-bee9-c9ffd9f22e1d"
],
"name": "grsf-publisher",
"policies": [
"soft-anti-affinity"
@ -425,6 +427,40 @@
}
]
},
{
"module": "module.dns_records_create",
"mode": "managed",
"type": "openstack_dns_recordset_v2",
"name": "add_dns_recordset",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"index_key": "grsf_publisher",
"schema_version": 0,
"attributes": {
"description": "GRSF publisher",
"disable_status_check": false,
"id": "c1a4b4bc-f167-4387-855d-38f0f99ca05c/e9feade0-2d01-4b25-b215-daa6dda849f7",
"name": "grsf-publisher.cloud-pre.d4science.org.",
"project_id": "6fdc02e2827b405dad99f34698659742",
"records": [
"main-lb.cloud-pre.d4science.org."
],
"region": "isti_area_pi_1",
"timeouts": null,
"ttl": 8600,
"type": "CNAME",
"value_specs": null,
"zone_id": "c1a4b4bc-f167-4387-855d-38f0f99ca05c"
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwLCJ1cGRhdGUiOjYwMDAwMDAwMDAwMH19",
"dependencies": [
"data.terraform_remote_state.privnet_dns_router"
]
}
]
},
{
"module": "module.instance_without_data_volume",
"mode": "managed",
@ -488,7 +524,7 @@
"region": "isti_area_pi_1",
"scheduler_hints": [
{
"additional_properties": null,
"additional_properties": {},
"build_near_host_ip": "",
"different_cell": [],
"different_host": [],
@ -504,7 +540,7 @@
"traffic_from_the_main_load_balancers"
],
"stop_before_destroy": false,
"tags": null,
"tags": [],
"timeouts": null,
"updated": "2024-03-12 16:36:57 +0000 UTC",
"user_data": "ef3d6e5deb29bd1e5de5a76ae6860f3ee872738c",