You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the context variable enabled and setting it to false, terraform plan produces many errors.
The outputs produce errors due to usage of coalescelist with empty tuples.
Also:-
Error: Error in function call
on ../../private.tf line 98, in resource "aws_route" "default":
98: route_table_id = zipmap(
99: var.availability_zones,
100: matchkeys(
101: aws_route_table.private.*.id,
102: aws_route_table.private.*.tags.AZ,
103: var.availability_zones,
104: ),
105: )[element(keys(var.az_ngw_ids), count.index)]
|----------------
| aws_route_table.private is empty tuple
| var.availability_zones is list of string with 3 elements
Expected Behavior
Terraform plan and terraform apply should handle the module disablement gracefully
All outputs should be empty
Steps to Reproduce
Steps to reproduce the behavior:
Go to examples/complete/main.tf
Add enabled = false to the public_subnets and private_subnets module input variables
Run terraform plan
See error
Screenshots
None necessary
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
OS: Linux
Version TF 14.7
Additional Context
None
The text was updated successfully, but these errors were encountered:
Describe the Bug
When using the context variable
enabled
and setting it tofalse
, terraform plan produces many errors.The outputs produce errors due to usage of
coalescelist
with empty tuples.Also:-
Expected Behavior
Terraform plan and terraform apply should handle the module disablement gracefully
All outputs should be empty
Steps to Reproduce
Steps to reproduce the behavior:
enabled = false
to the public_subnets and private_subnets module input variablesterraform plan
Screenshots
None necessary
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
Additional Context
None
The text was updated successfully, but these errors were encountered: