Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (49 sloc) 2.37 KB
component:
name: landing_zone_vpc
template:
locals:
elements_landing_zone_vpc_map: >-
var.${tfvar.terrahub["landing_zone_providers"]["0"]}_provider["landing_zone_vpc_resource"]
elements_landing_zone_vpc_tags_map: >-
var.${tfvar.terrahub["landing_zone_providers"]["0"]}_provider["landing_zone_vpc_tags"]
resource:
aws_vpc:
landing_zone_vpc:
provider: 'aws.${tfvar.terrahub["landing_zone_providers"]["0"]}'
count: >-
length(var.${tfvar.terrahub["landing_zone_providers"]["0"]}_provider["landing_zone_vpc_resource"])
cidr_block: >-
local.elements_landing_zone_vpc_map["config_${count.index}"]["cidr_block"]
instance_tenancy: >-
local.elements_landing_zone_vpc_map["config_${count.index}"]["instance_tenancy"]
enable_dns_support: >-
local.elements_landing_zone_vpc_map["config_${count.index}"]["enable_dns_support"]
assign_generated_ipv6_cidr_block: >-
local.elements_landing_zone_vpc_map["config_${count.index}"]["assign_generated_ipv6_cidr_block"]
enable_classiclink: >-
local.elements_landing_zone_vpc_map["config_${count.index}"]["enable_classiclink"]
enable_dns_hostnames: >-
local.elements_landing_zone_vpc_map["config_${count.index}"]["enable_dns_hostnames"]
enable_classiclink_dns_support: >-
local.elements_landing_zone_vpc_map["config_${count.index}"]["enable_classiclink_dns_support"]
tags: >-
merge(local.elements_landing_zone_vpc_tags_map["config_${count.index}"],
map("LzHash", sha1("${tfvar.terrahub["project"]["code"]}
${tfvar.terrahub["component"]["name"]}
${tfvar.terrahub["landing_zone_providers"]["0"]}
${local.elements_landing_zone_vpc_map["config_${count.index}"]["cidr_block"]}")))
output:
ids:
value: aws_vpc.landing_zone_vpc.*.id
thub_ids:
value: aws_vpc.landing_zone_vpc.*.id
arns:
value: aws_vpc.landing_zone_vpc.*.arn
landing_zone_vpc_ids:
value: >-
{ for vpc in aws_vpc.landing_zone_vpc.*: lookup(vpc.tags, "LzHash",
vpc.cidr_block) => vpc.id }
landing_zone_vpc_arns:
value: >-
{ for vpc in aws_vpc.landing_zone_vpc.*: lookup(vpc.tags, "LzHash",
vpc.cidr_block) => vpc.arn }
You can’t perform that action at this time.