generated from cloudposse/terraform-example-module
-
Notifications
You must be signed in to change notification settings - Fork 10
/
outputs.tf
57 lines (49 loc) · 2.16 KB
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
output "region_az_alt_code_maps" {
description = <<-EOT
Collection of maps converting between official AWS Region, Availability Zone, and Local Zone codes and shorter unofficial codes using only lower case letters and digits. Inspired for use in naming and tagging so that region or AZ code will be 1 semantic unit.
- `to_fixed` = Map of regions to 3-character codes and Availability Zones to 4-character codes
- `to_short` = Map of regions and Availability Zones to compact (usually 4-6 characters) codes
- `from_fixed` = Map of `fixed` codes back to full region or Availability Zone codes
- `from_short` = Map of `short` codes back to full region or Availability Zone codes
- `identity` = Identity map of full region and Availability Zone codes back to themselves
EOT
value = {
to_fixed = local.to_fixed
to_short = local.to_short
from_fixed = local.from_fixed
from_short = local.from_short
identity = local.identity
}
}
output "region_display_name_map" {
description = <<-EOT
Map of full region names to user-friendly display names (e.g. "eu-west-3" = "Europe (Paris)").
EOT
value = local.to_display_name
}
output "elb_logging_account" {
description = "Map of full region to ELB logging account"
value = local.elb_logging_account
}
output "elb_logging_s3_bucket_policy_json" {
description = <<-EOT
The S3 bucket policy (in JSON) to attach to the S3 bucket to allow Load Balancer logs to be added.
Requires `elb_logging_bucket_resource_arn` and `elb_logging_region` inputs.
EOT
value = join("",
data.aws_iam_policy_document.by_account.*.json,
data.aws_iam_policy_document.by_region.*.json,
)
}
output "enabled_regions" {
description = "A list of regions that are enabled in the account"
value = setunion(data.aws_regions.default.names, data.aws_regions.opted_in.names)
}
output "disabled_regions" {
description = "A list of regions that are disabled in the account"
value = data.aws_regions.not_opted_in.names
}
output "all_regions" {
description = "A list of all regions regardless of availability to the account"
value = data.aws_regions.complete.names
}