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

pe_allowed_principal_ids should not be included for BYOA private clusters #599

Closed sszhao1020 closed 1 month ago

sszhao1020 commented 1 month ago

Describe the bug pe_allowed_principal_ids is added wrongly which causes the error│ Principal IDs for private networking are supported for BigAnimal Deployment only.

To Reproduce Steps to reproduce the behavior:

  1. Get the tf example from https://github.com/EnterpriseDB/terraform-provider-biganimal/tree/main/examples/resources/biganimal_cluster/single_node/azure
  2. set the
    cloud_provider         = "azure" // "bah:aws" uses BigAnimal's cloud account AWS, use "aws" for your cloud account
    private_networking     = true
  3. run terrafrom plan and terraform apply
  4. it will return
    │ Error: status: 400 - Bad Request
    │ 
    │   with biganimal_cluster.single_node_cluster,
    │   on test.tf line 34, in resource "biganimal_cluster" "single_node_cluster":
    │   34: resource "biganimal_cluster" "single_node_cluster" {
    │ 
    │ Principal IDs for private networking are supported for BigAnimal Deployment only.
    │ 
    ╵

Expected behavior pe_allowed_principal_ids is only required from BAH private clusters.

Screenshots

Terraform and Provider Version: Please share the terraform version output

❯ terraform version
Terraform v1.9.3
on darwin_amd64

    biganimal = {
      source  = "EnterpriseDB/biganimal"
      version = "1.1.0"
    }

Affected Resource(s): Please list the resources as a list, for example:

wai-wong-edb commented 1 month ago

fixed in 1.1.1