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

Add digitalocean_database_pool as data source #1059

Closed
gvangool opened this issue Oct 27, 2023 · 2 comments
Closed

Add digitalocean_database_pool as data source #1059

gvangool opened this issue Oct 27, 2023 · 2 comments

Comments

@gvangool
Copy link

Is your feature request related to a problem? Please describe.

I was looking for a way to get a database pool URL from a terraform resource.

Describe the solution you'd like

I'd want to be able to define:

data "digitalocean_database_pool" "example" {
  cluster_name = "example-cluster"
  pool_name = "pool1"
}

So I can do:

locals {
  conn_str = "postgresql://${data.digitalocean_database_pool.example.username}@${data.digitalocean_database_pool.example.host}:${data.digitalocean_database_pool.example.port}/${data.digitalocean_database_pool.example.database}"
}

Describe alternatives you've considered

I've added the information from the connection pool hardcoded, but it's "one more thing" that needs to be manually updated.

@T-jegou
Copy link
Contributor

T-jegou commented Nov 9, 2023

Hello @andrewsomething , I tried to fix this issue, can you take a look? Thanks

@gvangool
Copy link
Author

gvangool commented Jan 4, 2024

Thanks @T-jegou and @danaelhe!

#1073 fixed my use case 👍

@gvangool gvangool closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants