|
1 | 1 | locals { |
2 | | - tags = "${map("Environment", "test", "GithubRepo", "tf-aws-alb", "GithubOrg", "terraform-aws-modules", "Workspace", "${terraform.workspace}")}" |
3 | | - log_bucket_name = "${var.log_bucket_name}-${data.aws_caller_identity.current.account_id}-${data.aws_region.current.name}" |
| 2 | + tags = "${map("Environment", "test", |
| 3 | + "GithubRepo", "tf-aws-alb", |
| 4 | + "GithubOrg", "terraform-aws-modules", |
| 5 | + "Workspace", "${terraform.workspace}", |
| 6 | + )}" |
| 7 | + |
| 8 | + log_bucket_name = "${var.log_bucket_name}-${data.aws_caller_identity.current.account_id}-${data.aws_region.current.name}" |
| 9 | + |
4 | 10 | https_listeners_count = 2 |
5 | 11 |
|
6 | 12 | https_listeners = "${list( |
7 | | - map( |
8 | | - "certificate_arn", aws_iam_server_certificate.fixture_cert.arn, |
9 | | - "port", 443 |
10 | | - ), |
11 | | - map( |
12 | | - "certificate_arn", aws_iam_server_certificate.fixture_cert.arn, |
13 | | - "port", 8443, |
14 | | - "ssl_policy", "ELBSecurityPolicy-TLS-1-2-2017-01", |
15 | | - "target_group_index", 1 |
16 | | - ) |
| 13 | + map( |
| 14 | + "certificate_arn", aws_iam_server_certificate.fixture_cert.0.arn, |
| 15 | + "port", 443, |
| 16 | + ), |
| 17 | + map( |
| 18 | + "certificate_arn", aws_iam_server_certificate.fixture_cert.1.arn, |
| 19 | + "port", 8443, |
| 20 | + "ssl_policy", "ELBSecurityPolicy-TLS-1-2-2017-01", |
| 21 | + "target_group_index", 1, |
| 22 | + ), |
17 | 23 | )}" |
18 | 24 |
|
19 | 25 | http_tcp_listeners_count = 3 |
20 | 26 |
|
21 | 27 | http_tcp_listeners = "${list( |
22 | 28 | map( |
23 | 29 | "port", 80, |
24 | | - "protocol", "HTTP" |
| 30 | + "protocol", "HTTP", |
25 | 31 | ), |
26 | 32 | map( |
27 | 33 | "port", 8080, |
28 | 34 | "protocol", "HTTP", |
29 | | - "target_group_index", 0 |
| 35 | + "target_group_index", 0, |
30 | 36 | ), |
31 | 37 | map( |
32 | 38 | "port", 8081, |
33 | 39 | "protocol", "HTTP", |
34 | | - "target_group_index", 1 |
35 | | - ) |
36 | | - )}" |
| 40 | + "target_group_index", 1, |
| 41 | + ), |
| 42 | + )}" |
37 | 43 |
|
38 | 44 | target_groups_count = 2 |
39 | 45 |
|
40 | 46 | target_groups = "${list( |
41 | 47 | map("name", "foo", |
42 | 48 | "backend_protocol", "HTTP", |
43 | | - "backend_port", 80 |
| 49 | + "backend_port", 80, |
44 | 50 | ), |
45 | 51 | map("name", "bar", |
46 | 52 | "backend_protocol", "HTTP", |
47 | | - "backend_port", 8080 |
48 | | - ) |
| 53 | + "backend_port", 8080, |
| 54 | + ), |
| 55 | + )}" |
| 56 | + |
| 57 | + extra_ssl_certs_count = 4 |
| 58 | + |
| 59 | + extra_ssl_certs = "${list( |
| 60 | + map("certificate_arn", aws_iam_server_certificate.fixture_cert.0.arn, |
| 61 | + "https_listener_index","1", |
| 62 | + ), |
| 63 | + map("certificate_arn", aws_iam_server_certificate.fixture_cert.1.arn, |
| 64 | + "https_listener_index","0", |
| 65 | + ), |
| 66 | + map("certificate_arn", aws_iam_server_certificate.fixture_cert.2.arn, |
| 67 | + "https_listener_index","0", |
| 68 | + ), |
| 69 | + map("certificate_arn", aws_iam_server_certificate.fixture_cert.3.arn, |
| 70 | + "https_listener_index","0", |
| 71 | + ), |
49 | 72 | )}" |
| 73 | + |
| 74 | + # helpful for debugging |
| 75 | + # https_listeners_count = 0 |
| 76 | + # https_listeners = "${list()}" |
| 77 | + # http_tcp_listeners_count = 0 |
| 78 | + # http_tcp_listeners = "${list()}" |
| 79 | + # target_groups_count = 0 |
| 80 | + # target_groups = "${list()}" |
| 81 | + # extra_ssl_certs_count = 0 |
| 82 | + # extra_ssl_certs = "${list()}" |
50 | 83 | } |
0 commit comments