diff --git a/instance-scripts/cloud-init.yml b/instance-scripts/cloud-init.yml index 3ed0a8a2519c28cfc2e11fbc598c77cc7e44d402..03ead7bb3d71e8fab2a1204a386ba08c7360c895 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 faac9c21d98679bd7c7a4e62fab78b171f14965b..8e447ec494d9a8091c0fdf2380c1fdf6347fe2a7 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