# python


03/19/2024, 3:37 AM
Hello! I was following the docs to create a dynamic resource provider for querying Postgresql resources. I realize there is already a pulumi_postgresql provider but it doesn't support connecting to GCP Cloud SQL via IAM. So I figured I could write a dynamic resource provider to connect to Cloud SQL. However, I keep getting this error:
Copy code
Exception: invoke of postgresql:index/getTables:getTables failed: Invoke: getProviderFromSource: could not parse provider reference: urn:funsies::postgres_provider is not a valid URN
The documentation does not say anything about the provider having a URN or an ID, but it seems the code requires these fields a
. As you can see from my class, I tried to hack my way around the issue but I think I have reached the limits of my knowledge. I am hoping someone here could steer me in the right direction as the docs and Pulumi AI seem to not have any answers for me. Thank you!!
I realize that the path above might not be helpful so here is a screenshot which I am hoping is better.
So I figured out that Pulumi Postgresql plugin can actually connect to GCP using IAM by following the Terraform code. It is not documented at all. Here is one solution.


03/19/2024, 10:18 PM
Curious about your use-case for this? Is it not enough to simply query the table?, why does the DB state need to be pulumi managed?