20482: Extracts the private IP addr map as configurable variables.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Wed, 10 May 2023 19:51:55 +0000 (16:51 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Wed, 10 May 2023 19:51:55 +0000 (16:51 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

tools/salt-install/terraform/aws/vpc/locals.tf
tools/salt-install/terraform/aws/vpc/terraform.tfvars
tools/salt-install/terraform/aws/vpc/variables.tf

index 017e5d4b8f13494aeaae111aa1cc38de86821f77..83929c14f91dc6ad7c507df2c598bfd4deca3f57 100644 (file)
@@ -29,12 +29,7 @@ locals {
   public_ip = {
     for k, v in aws_eip.arvados_eip: k => v.public_ip
   }
-  private_ip = {
-    "controller": "10.1.1.11",
-    "workbench": "10.1.1.15",
-    "shell": "10.1.2.17",
-    "keep0": "10.1.2.13",
-  }
+  private_ip = var.private_ip
   aliases = {
     controller: ["ws"]
     workbench: ["workbench2", "webshell", "keep", "download", "prometheus", "grafana", "*.collections"]
index 573825696a9d8f28b8885774fcafa1830307ea74..61e1a37bba456d198e7843e0bd7f10785c7537a0 100644 (file)
@@ -22,4 +22,13 @@ region_name = "us-east-1"
 #   environment = "production"
 #   project = "Phoenix"
 #   owner = "jdoe"
-# }
\ No newline at end of file
+# }
+
+# Optional cluster service nodes configuration:
+#
+# List of node names which either will be hosting user-facing or internal services
+# user_facing_hosts = [...]
+# internal_service_hosts = [...]
+#
+# Map assigning each node name an internal IP address
+# private_ip = {...}
\ No newline at end of file
index ec6f5711b7d3943ac0e8dfae3afa2fbc64e84373..020c697ab037cb07ff8cc2782a953e958d02c694 100644 (file)
@@ -39,6 +39,17 @@ variable "internal_service_hosts" {
   default = [ "keep0", "shell" ]
 }
 
+variable "private_ip" {
+  description = "Map with every node's private IP address"
+  type = map(string)
+  default = {
+    controller: "10.1.1.11",
+    workbench: "10.1.1.15",
+    shell: "10.1.2.17",
+    keep0: "10.1.2.13",
+  }
+}
+
 variable "vpc_id" {
   description = "Use existing VPC instead of creating one for the cluster"
   type = string