Skip to content

[Bug]: linode_database_postgresql_v2 not returning host_secondary #2057

@Aransh

Description

@Aransh

Terraform Version

Terraform v1.11.1 on darwin_arm64

Linode Provider Version

3.1.1

Effected Terraform Resources

linode_database_postgresql_v2

Terraform Config Files

resource "linode_database_postgresql_v2" "db_cluster" {
  label     = "test"
  engine_id = "postgresql/15"
  region    = "us-iad"

  type         = "g6-dedicated-8"
  cluster_size = 2

  updates = {
    day_of_week = 7
    duration    = 4
    frequency   = "weekly"
    hour_of_day = 0
  }

  lifecycle {
    ignore_changes = [
      allow_list # Ignore changes to the allow_list, as it is managed by Linode - https://techdocs.akamai.com/cloud-computing/docs/create-and-manage-database-clusters-copy-1#lke-and-database-clusters-connectivity
    ]
  }
}

Debug Output

No response

Panic Output

No response

Expected Behavior

Resource "linode_database_postgresql_v2" "db_cluster" has an attribute "host_secondary" (as described in docs and visible in Linode console)

Actual Behavior

Resource "linode_database_postgresql_v2" "db_cluster" has an empty attribute, as seen in tf state:

terraform state show "linode_database_postgresql_v2.db_cluster" | grep host_secondary
    host_secondary                                            = ""

Important to state again, this cluster has a secondary host, it is visible from linode console.
Also this same issue is happening on all 11 of my clusters

Steps to Reproduce

terraform apply
terraform state show "linode_database_postgresql_v2.db_cluster" | grep host_secondary

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugissues that report a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions