20270: Refactors the VPC code so that private nodes can access the Internet.
[arvados.git] / tools / salt-install / terraform / aws / vpc / locals.tf
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: CC-BY-SA-3.0
4
5 locals {
6   allowed_ports = {
7     http: "80",
8     https: "443",
9     ssh: "22",
10   }
11   availability_zone = data.aws_availability_zones.available.names[0]
12   public_hosts = [ "controller", "workbench" ]
13   private_hosts = [ "keep0", "shell" ]
14   arvados_dns_zone = "${var.cluster_name}.${var.domain_name}"
15   public_ip = { for k, v in aws_eip.arvados_eip: k => v.public_ip }
16   private_ip = {
17     "controller": "10.1.1.11",
18     "workbench": "10.1.1.15",
19     "shell": "10.1.2.17",
20     "keep0": "10.1.2.13",
21   }
22   aliases = {
23     controller: ["ws"]
24     workbench: ["workbench2", "webshell", "keep", "download", "*.collections"]
25   }
26   cname_by_host = flatten([
27     for host, aliases in local.aliases : [
28       for alias in aliases : {
29         record = alias
30         cname = host
31       }
32     ]
33   ])
34 }
35