Since release 1.0.0 which added this validation, I am no longer able to successfully plan my Terraform stacks with this resource. Inside my module, I define the resource like so:
resource "cloudconnexa_dns_record" "int" {
count = var.create_cloudconnexa_dns_record ? var.instance_count : 0
domain = local.hostnames[count.index]
ip_v4_addresses = [google_compute_instance.compute_instance[count.index].network_interface[0].network_ip]
}
It appears that because ip_v4_addresses isn't known at plan time, I get the following error:
│ Error: either 'ip_v4_addresses' or 'ip_v6_addresses' must contain at least one item
│
│ with module.gcp_pipeline_instances["sts"].cloudconnexa_dns_record.int[0],
│ on .terraform/modules/gcp_pipeline_instances/dns.tf line 58, in resource "cloudconnexa_dns_record" "int":
│ 58: resource "cloudconnexa_dns_record" "int" {
│
╵
When I revert back to using version 0.5.1 of this provider, I'm able to plan and apply just fine with the exact same input.