timescale / terraform-provider-timescale

Timescale Cloud Terraform Provider
Apache License 2.0
18 stars 2 forks source link

Bug: `timescale_vpcs` data source does not return peered connections #110

Closed asibs closed 5 months ago

asibs commented 8 months ago

Steps to recreate

Minimal main.tf terraform file:

terraform {
  required_version = ">= 0.15"

  required_providers {
    timescale = {
      source  = "timescale/timescale"
      version = ">= 1.0.0, < 2.0.0"
    }
  }
}

provider "timescale" {
  project_id = "REDACTED"
  access_key = "REDACTED"
  secret_key = "REDACTED"
}

data "timescale_vpcs" "all_ts_vpcs" {
}

output "all_vpcs" {
  value = data.timescale_vpcs.all_ts_vpcs
}
  1. Create a VPC in Timescale as per Timescale docs here.
  2. Create a Peering Connection as per Timescale docs here
  3. Complete the peering process in AWS as per Timescale docs here
  4. Confirm the Peering Connection is showing as 'Connected' (green) in the Timescale VPC UI
  5. Run terraform init and terraform plan with the main.tf above.

Output

Changes to Outputs:
  + all_vpcs     = {
      + id   = "placeholder 1"
      + vpcs = [
          + {
              + cidr                = "10.0.0/24"
              + created             = "2023-10-23T15:48:28.876258Z"
              + error_message       = ""
              + id                  = 1234
              + name                = "my-test-vpc"
              + peering_connections = null
              + project_id          = "REDACTED"
              + provisioned_id      = ""
              + region_code         = "eu-west-1"
              + status              = "CREATED"
              + updated             = ""
            },
        ]
    }

Note that the peering_connections attribute is null, where I would expect it to be a object containing information on the peering connections, as per the documentation here.

Khyme commented 5 months ago

Available in v1.3.0