EnterpriseDB / terraform-provider-biganimal

A terraform provider that uses the BigAnimal.com API in order to manage postgres clusters in the cloud
https://registry.terraform.io/providers/EnterpriseDB/biganimal/
Mozilla Public License 2.0
13 stars 1 forks source link

Provider produced inconsistent result after apply with `allowed_ip_ranges` #435

Closed ruimarinho closed 9 months ago

ruimarinho commented 11 months ago

Describe the bug

When creating a single node cluster with private networking on a self hosted account, the cluster creation fails to complete.

When applying changes to biganimal_cluster.single_node_cluster, provider "provider[\"registry.terraform.io/enterprisedb/biganimal\"]" produced an unexpected new value: .allowed_ip_ranges: planned set element cty.ObjectVal(map[string]cty.Value{"cidr_block":cty.StringVal("0.0.0.0/0"),  "description":cty.StringVal("")}) does not correlate with any element in actual.

The problem is that terraform validates that allowed_ip_ranges cannot be set when private_networking is enabled, but the API is returning the following:

…
            "allowedIpRanges": [
                {
                    "cidrBlock": "0.0.0.0/0",
                    "description": "To allow all access"
                }
            ],
…

To Reproduce Use the single node example provided in this repository to reproduce this issue.

Expected behavior A clear and concise description of what you expected to happen.

Terraform and Provider Version:

Terraform v1.5.7
on darwin_arm64
+ provider registry.terraform.io/enterprisedb/biganimal v0.6.1
+ provider registry.terraform.io/hashicorp/http v3.2.1
+ provider registry.terraform.io/hashicorp/random v3.6.0
+ provider registry.terraform.io/hashicorp/vault v3.12.0

Affected Resource(s):

wai-wong-edb commented 9 months ago

Fixed in v0.7.0