Skip to content

Commit aac77a4

Browse files
author
jslopes
committed
fix output para o subnet id
1 parent ac5ecd8 commit aac77a4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ resource "aws_route_table" "private" {
160160
},
161161
var.default_tags
162162
)
163+
lifecycle {
164+
ignore_changes = [ "route" ]
165+
}
163166
}
164167
resource "aws_route_table_association" "private" {
165168
count = var.create ? length(var.subnet_private) : 0

outputs.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ output "id" {
44
output "subnet_private" {
55
value = length(aws_subnet.private) > 1 ? aws_subnet.private.*.cidr_block : null
66
}
7+
output "subnet_private_id" {
8+
value = length(aws_subnet.private) > 1 ? aws_subnet.private.*.id : null
9+
}
10+
output "subnet_public_id" {
11+
value = length(aws_subnet.private) > 1 ? aws_subnet.public.*.id : null
12+
}
713
output "subnet_public" {
814
value = length(aws_subnet.public) > 1 ? aws_subnet.public.*.cidr_block : null
915
}

0 commit comments

Comments
 (0)