Loading...
Loading...
### Terraform Version ```shell Terraform v1.9.2 on darwin_arm64 + provider registry.terraform.io/hashicorp/aws v5.93.0 ``` ### Terraform Configuration Files ```terraform import { to = aws_network_acl.acl_0128427005ff54a53 id = "acl-0128427005ff54a21" } ``` ### Debug Output ``` Error: "" is not a valid CIDR block: invalid CIDR address:. ``` ### Expected Behavior Terraform should generate empty cidr blocks as null, or omit them. ```hcl resource "aws_network_acl" "acl_0adfdfbf60d3f9a21" { egress = [{ action = "allow" cidr_block = "0.0.0.0/0" from_port = 0 icmp_code = 0 icmp_type = 0 ipv6_cidr_block = null # or emitted protocol = "-1" rule_no = 50 to_port = 0 }, ... ``` ### Actual Behavior Terraform generate cidr_blocks as "" if unused causing validation to fail on plan as "" is not a valid format for ipv6_cidr_blocks ```hcl resource "aws_network_acl" "acl_0adfdfbf60d3f9a21" { egress = [{ action = "allow" cidr_block = "0.0.0.0/0" from_port = 0 icmp_code = 0 icmp_type = 0 ipv6_cidr_block = "" protocol = "-1" rule_no = 50 to_port = 0 }, ... ``` ### Steps to Reproduce ```hcl import { to = aws_network_acl.acl_0128427005ff54a53 id = "acl-0128427005ff54a21" } ``` ```bash terraform plan -generate-config-out=generated.tf ``` ### Additional Context `Optional: true` should represent `Null`, instead of `Default Zero Type` of `""` ### References - https://github.com/hashicorp/terraform-provider-aws/issues/42087 ### Generative AI / LLM assisted development? N/A
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.