Skip to content

Postgres provider creating new connection for every state check related to database, schema, roles, grants etc.. #255

@mchhataniClearCover

Description

@mchhataniClearCover

Hi there,

Thank you for opening an issue. Please provide the following information:

Terraform Version

Terraform v1.2.8 on darwin_amd64

Affected Resource(s)

Please list the resources as a list, for example:

  • postgresql_database
  • postgresql_extension
  • postgreql_role
  • postgresql_grant
  • postgres_schema
  • postgresql_default_privileges

Terraform Configuration Files

Debug Output

Panic Output

Expected Behavior

Use the same connection.

Actual Behavior

  1. We are using TF postgres provider to manager database, extension , schema, roles, grants , replication slot.
  2. We have implemented Atlantis to automatically plan the TF changes.
  3. For connecting to database, we use AWS VPC private Link + Network Load Balancer to talk to the database.
  4. When checking the postgres logs , it seems like for every status check with TF configuration and actual values in DB, a new connection is established, this leads to slowness sometimes when we use VPC link.

Steps to Reproduce

Important Factoids

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions