terraform-provider-postgresql icon indicating copy to clipboard operation
terraform-provider-postgresql copied to clipboard

Cannot perform plan in read-only mode (read-replica) - AWS RDS Global Cluster - non-writer

Open gdowmont-gss opened this issue 1 year ago • 1 comments

Hi,

I am using this provider in terraform configuration that uses RDS Global Cluster to failover between prod and prod-dr.

Each configuration is a separate component per env, so trying to perform even a basic plan is not possible on the non-writer cluster due to:

Error: could not start transaction: pq: cannot set transaction read-write mode during recovery

  with postgresql_extension.pgaudit_configuration,
  on pgsql_extensions.tf line 1, in resource "postgresql_extension" "pgaudit":
   1: resource "postgresql_extension" "pgaudit" {

Same happens to roles, schema, etc

Is there some configuration I missing that would allow performing plans in read-only configuration without setting read-write mode?

Tried with 1.17.1 and 1.22.0

gdowmont-gss avatar Apr 24 '24 10:04 gdowmont-gss