20482: Fixes use of var domain_name, it's now used for the Route53 zone.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Mon, 8 May 2023 15:11:49 +0000 (12:11 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Tue, 9 May 2023 15:24:51 +0000 (12:24 -0300)
Also, updates documentation including the new private_only var.

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

doc/install/salt-multi-host.html.textile.liquid
tools/salt-install/terraform/aws/vpc/locals.tf
tools/salt-install/terraform/aws/vpc/main.tf
tools/salt-install/terraform/aws/vpc/terraform.tfvars

index 022ec3bb9a9f4c087a9163513d095ea25225b08d..b840b585a294677fd9ac5316c233c44cda77119d 100644 (file)
@@ -102,7 +102,10 @@ Each section described above contain a @terraform.tfvars@ file with some configu
 
 <pre><code>region_name = "us-east-1"
 # cluster_name = "xarv1"
-# domain_name = "example.com"</code></pre>
+# domain_name = "xarv1.example.com"
+
+# Uncomment this to create an non-publicly accessible Arvados cluster
+# private_only = true</code></pre>
 
 If you don't set the variables @vpc/terraform.tfvars@ file, you will be asked to re-enter these parameters every time you run Terraform.
 
index a6e56c5859f8945543de144ade36431cd3ac565e..eb0371a35b1416029a2857c0c4dec1000a407056 100644 (file)
@@ -17,7 +17,6 @@ locals {
     var.internal_service_hosts,
     var.private_only ? var.user_facing_hosts : []
   )
-  arvados_dns_zone = "${var.cluster_name}.${var.domain_name}"
   public_ip = {
     for k, v in aws_eip.arvados_eip: k => v.public_ip
   }
index 6f1fe96ecc62dee8ddadd09e891b6d64d23addb0..a5eb02049b0261a0e8692487a3488468d75cbd02 100644 (file)
@@ -136,7 +136,7 @@ resource "aws_security_group" "arvados_sg" {
 # PUBLIC DNS
 resource "aws_route53_zone" "public_zone" {
   count = var.private_only ? 0 : 1
-  name = local.arvados_dns_zone
+  name = var.domain_name
 }
 resource "aws_route53_record" "public_a_record" {
   zone_id = try(local.route53_public_zone.id, "")
@@ -158,7 +158,7 @@ resource "aws_route53_record" "public_cname_record" {
   zone_id = try(local.route53_public_zone.id, "")
   for_each = {
     for i in local.cname_by_host: i.record =>
-      "${i.cname}.${local.arvados_dns_zone}"
+      "${i.cname}.${var.domain_name}"
     if var.private_only == false
   }
   name = each.key
@@ -169,7 +169,7 @@ resource "aws_route53_record" "public_cname_record" {
 
 # PRIVATE DNS
 resource "aws_route53_zone" "private_zone" {
-  name = local.arvados_dns_zone
+  name = var.domain_name
   vpc {
     vpc_id = aws_vpc.arvados_vpc.id
   }
@@ -191,7 +191,7 @@ resource "aws_route53_record" "private_main_a_record" {
 }
 resource "aws_route53_record" "private_cname_record" {
   zone_id = aws_route53_zone.private_zone.id
-  for_each = {for i in local.cname_by_host: i.record => "${i.cname}.${local.arvados_dns_zone}" }
+  for_each = {for i in local.cname_by_host: i.record => "${i.cname}.${var.domain_name}" }
   name = each.key
   type = "CNAME"
   ttl = 300
index 296e3130c38eec202f87885b423d6fff702fe6d7..9cc96437dc898d86913d4883693d6391b242be61 100644 (file)
@@ -4,7 +4,7 @@
 
 region_name = "us-east-1"
 # cluster_name = "xarv1"
-# domain_name = "example.com"
+# domain_name = "xarv1.example.com"
 
 # Uncomment this to create an non-publicly accessible Arvados cluster
 # private_only = true
\ No newline at end of file