Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set specific database to postgresql_server #319

Open
damour opened this issue Jul 5, 2023 · 4 comments
Open

Can't set specific database to postgresql_server #319

damour opened this issue Jul 5, 2023 · 4 comments

Comments

@damour
Copy link

damour commented Jul 5, 2023

Affected Resource(s)

  • postgresql_server
resource "postgresql_server" "myserver_postgres" {
  server_name = "myserver_postgres"
  fdw_name    = "postgres_fdw"
  options = {
    host   = "foo"
    dbname = "foodb"
    port   = "5432"
  }

  depends_on = [postgresql_extension.ext_postgres_fdw]
}

Expected Behavior

I can set database in postgresql_server:

resource "postgresql_server" "myserver_postgres_selected_db" {
  server_name = "myserver_postgres"
  database    = "my_db"
  fdw_name    = "postgres_fdw"
  options = {
    host   = "foo"
    dbname = "foodb"
    port   = "5432"
  }

  depends_on = [postgresql_extension.ext_postgres_fdw]
}

Like in extension:

resource "postgresql_extension" "ext_postgres_fdw" {
  name = "postgres_fdw"
  database = "my_db"
}

Actual Behavior

What actually happened?

Error:

pq: foreign-data wrapper "postgres_fdw" does not exist

Steps to Reproduce

  1. terraform apply

Important Factoids

I'm using pulumi wrapper github.com/pulumi/pulumi-postgresql

@mwthink
Copy link

mwthink commented Sep 5, 2023

I am experiencing this as a problem, and also experiencing the same thing on the postgresql_user_mapping resource.

@jmacnett
Copy link

Also having this experience with postgresql_server and postgresql_user_mapping. Has anyone found a workaround?

@henworth
Copy link

henworth commented Jun 7, 2024

I am encountering this same issue with the latest provider version.

@tetesh
Copy link

tetesh commented Dec 12, 2024

UP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants