Skip to content

Commit fad5b32

Browse files
author
Nikita Dugar
committed
change output syntax
1 parent 5eaa98f commit fad5b32

File tree

1 file changed

+9
-27
lines changed

1 file changed

+9
-27
lines changed

outputs.tf

+9-27
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,42 @@
11
#Module : VPC
22
#Description : Terraform module to create VPC resource on AWS.
33
output "vpc_id" {
4-
value = concat(
5-
aws_vpc.default.*.id
6-
)[0]
4+
value = join("", aws_vpc.default.*.id)
75
description = "The ID of the VPC."
86
}
97

108
output "vpc_cidr_block" {
11-
value = concat(
12-
aws_vpc.default.*.cidr_block
13-
)[0]
9+
value = join("", aws_vpc.default.*.cidr_block)
1410
description = "The CIDR block of the VPC."
1511
}
1612

1713
output "vpc_main_route_table_id" {
18-
value = concat(
19-
aws_vpc.default.*.main_route_table_id
20-
)[0]
14+
value = join("", aws_vpc.default.*.main_route_table_id)
2115
description = "The ID of the main route table associated with this VPC."
2216
}
2317

2418
output "vpc_default_network_acl_id" {
25-
value = concat(
26-
aws_vpc.default.*.default_network_acl_id
27-
)[0]
19+
value = join("", aws_vpc.default.*.default_network_acl_id)
2820
description = "The ID of the network ACL created by default on VPC creation."
2921
}
3022

3123
output "vpc_default_security_group_id" {
32-
value = concat(
33-
aws_vpc.default.*.default_security_group_id
34-
)[0]
24+
value = join("", aws_vpc.default.*.default_security_group_id)
3525
description = "The ID of the security group created by default on VPC creation."
3626
}
3727

3828
output "vpc_default_route_table_id" {
39-
value = concat(
40-
aws_vpc.default.*.default_route_table_id
41-
)[0]
29+
value = join("", aws_vpc.default.*.default_route_table_id)
4230
description = "The ID of the route table created by default on VPC creation."
4331
}
4432

4533
output "vpc_ipv6_association_id" {
46-
value = concat(
47-
aws_vpc.default.*.ipv6_association_id
48-
)[0]
34+
value = join("", aws_vpc.default.*.ipv6_association_id)
4935
description = "The association ID for the IPv6 CIDR block."
5036
}
5137

5238
output "ipv6_cidr_block" {
53-
value = concat(
54-
aws_vpc.default.*.ipv6_cidr_block
55-
)[0]
39+
value = join("", aws_vpc.default.*.ipv6_cidr_block)
5640
description = "The IPv6 CIDR block."
5741
}
5842

@@ -64,8 +48,6 @@ output "tags" {
6448
#Module : INTERNET GATEWAY
6549
#Description : Terraform internet gateway module output variables.
6650
output "igw_id" {
67-
value = concat(
68-
aws_internet_gateway.default.*.id
69-
)[0]
51+
value = join("", aws_internet_gateway.default.*.id)
7052
description = "The ID of the Internet Gateway."
7153
}

0 commit comments

Comments
 (0)