Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform CLI and Terraform AWS Provider Version
Terraform v0.12.23
+ provider registry.terraform.io/hashicorp/aws v3.3.0
Affected Resource(s)
Terraform Configuration Files
resource "aws_subnet" "public" {
count = length(var.public_cidrs)
vpc_id = aws_vpc.vpc.id
availability_zone = element(data.aws_availability_zones.available.names, count.index)
cidr_block = var.public_cidrs[count.index]
ipv6_cidr_block = aws_vpc.vpc.assign_generated_ipv6_cidr_block ? cidrsubnet(aws_vpc.vpc.ipv6_cidr_block, 8, count.index) : ""
map_public_ip_on_launch = true
assign_ipv6_address_on_creation = aws_vpc.vpc.assign_generated_ipv6_cidr_block
tags = merge(
map("Name", format("%s-public", aws_vpc.vpc.tags["Name"])),
map("network", "public", "availability-zone", element(data.aws_availability_zones.available.names, count.index)),
var.tags
)
}
Expected Behavior
Terraform runs with no plan changes
Actual Behavior
Terraform errored out with
Error: "" is not a valid CIDR block: invalid CIDR address:
Basically this line
ipv6_cidr_block = aws_vpc.vpc.assign_generated_ipv6_cidr_block ? cidrsubnet(aws_vpc.vpc.ipv6_cidr_block, 8, count.index) : ""
Steps to Reproduce
terraform plan
Important Factoids
Note: Terraform plan runs fine on 3.2.0 AWS provider version, Something broke on 3.3.0 version
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Terraform runs with no plan changes
Actual Behavior
Terraform errored out with
Basically this line
Steps to Reproduce
terraform planImportant Factoids
Note: Terraform plan runs fine on 3.2.0 AWS provider version, Something broke on 3.3.0 version