From 9722efb4e73780693949ef56d0a2aaa54725f9ca Mon Sep 17 00:00:00 2001 From: Nathan Rodet <nrodet@grandlyon.com> Date: Fri, 23 Dec 2022 09:41:29 +0100 Subject: [PATCH] simplified name --- instance-scripts/cloud-init.yml | 2 +- terraform/main.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instance-scripts/cloud-init.yml b/instance-scripts/cloud-init.yml index 3ed0a8a..03ead7b 100644 --- a/instance-scripts/cloud-init.yml +++ b/instance-scripts/cloud-init.yml @@ -62,9 +62,9 @@ runcmd: # Install Atrium # - "mkdir -p /root/atrium/data && mkdir -p /root/atrium/letsencrypt_cache" + - 'sed -i "s/%atrium_hostname%/$(scw-userdata atrium_hostname)/g" /root/atrium.yaml' - 'sed -i "s/%atrium_letsencrypt_email%/$(scw-userdata atrium_letsencrypt_email)/g" /root/atrium.yaml' - 'sed -i "s/%atrium_count_index%/$(scw-userdata atrium_count_index)/g" /root/atrium.yaml' - - 'sed -i "s/%atrium_private_ip%/$(scw-userdata atrium_private_ip)/g" /root/atrium.yaml' - "mv /root/atrium.yaml /root/atrium/atrium.yaml" - "chown -Rf 1000:1000 /root/atrium" # diff --git a/terraform/main.tf b/terraform/main.tf index faac9c2..8e447ec 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -14,7 +14,7 @@ resource "scaleway_instance_ip" "public_ip" { resource "scaleway_domain_record" "subdomain_record" { count = var.INSTANCES_COUNT dns_zone = "daag.alpha.grandlyon.com" - name = "${count.index}-${var.ENVIRONMENT}" + name = "${var.ENVIRONMENT}${count.index}" type = "A" data = scaleway_instance_ip.public_ip[count.index].address ttl = 3600 @@ -23,7 +23,7 @@ resource "scaleway_domain_record" "subdomain_record" { resource "scaleway_domain_record" "host_subdomain_record" { count = var.INSTANCES_COUNT dns_zone = "daag.alpha.grandlyon.com" - name = "*.${count.index}-${var.ENVIRONMENT}" + name = "*.${var.ENVIRONMENT}${count.index}" type = "A" data = scaleway_instance_ip.public_ip[count.index].address ttl = 3600 -- GitLab