hundreds-gpu-71155
02/21/2024, 8:18 PMhundreds-gpu-71155
02/21/2024, 8:18 PMserver_name
but simply giving it the coordinator hostname failsclever-sunset-76585
02/23/2024, 4:23 AMhundreds-gpu-71155
02/23/2024, 3:33 PMFirewallRule
that's not true, I get the same error:
error: Code="ResourceNotFound" Message="The Resource 'Microsoft.DBforPostgreSQL/flexibleServers/agreksys' under resource group 'thomasc32e3e97' was not found. For more details please go to <https://aka.ms/ARMResourceNotFoundFix>"
hundreds-gpu-71155
02/23/2024, 3:36 PMDatabase
clever-sunset-76585
02/23/2024, 4:29 PMid
property and not just the server name or if Azure is formatting the name in the error message with the resource provider. I believe the Database
resource is looking just for the name and in your case it would be agreksys
, assuming you aren't using auto-naming for the cluster resource.hundreds-gpu-71155
02/23/2024, 4:30 PM.name
clever-sunset-76585
02/23/2024, 4:31 PMhundreds-gpu-71155
02/23/2024, 4:31 PMCluster.name
and ServerNameItemResponse.name
, and I would have used Server.name
except getServer
panickedhundreds-gpu-71155
02/23/2024, 4:53 PMhundreds-gpu-71155
02/23/2024, 4:54 PMapg.Database(
f"{name}-db",
charset="utf8",
collation="en_US.utf8",
database_name="test_db",
resource_group_name=env.resource_group.name,
server_name=cluster.name,
**OPTS
)
hundreds-gpu-71155
02/23/2024, 4:56 PMhundreds-gpu-71155
02/23/2024, 5:01 PMcluster.name
doesn't work, cluster.id
doesn't work, cname.name
doesn't workhundreds-gpu-71155
02/23/2024, 5:01 PMgetSever
can't find it, so I can't try coordinator.id
hundreds-gpu-71155
02/23/2024, 5:59 PMclever-sunset-76585
02/23/2024, 6:02 PMDatabase
resource and some of the other resources in the dbforpostgresql
module are for specifically working with the Server
resource aka Flexible Server. While you can create the DB via SQL, things like setting up the cluster for private access requires firewall rules etc. are available in the Azure Classic provider https://www.pulumi.com/registry/packages/azure/api-docs/cosmosdb/. See the Postgresql*
resources. You can even create a cluster that way if you wish to.microscopic-arm-69377
02/23/2024, 6:08 PMhundreds-gpu-71155
02/23/2024, 6:09 PMhundreds-gpu-71155
02/23/2024, 6:21 PMhundreds-gpu-71155
02/27/2024, 6:11 PMDatabase
version of thishundreds-gpu-71155
02/27/2024, 6:12 PMhundreds-gpu-71155
02/27/2024, 6:13 PMhundreds-gpu-71155
02/27/2024, 6:13 PMhundreds-gpu-71155
02/27/2024, 6:14 PMhundreds-gpu-71155
02/27/2024, 7:27 PMhundreds-gpu-71155
02/27/2024, 7:28 PMhundreds-gpu-71155
02/27/2024, 7:28 PMmicroscopic-arm-69377
02/27/2024, 7:35 PMmicroscopic-arm-69377
02/27/2024, 7:35 PMhundreds-gpu-71155
02/27/2024, 7:37 PMhundreds-gpu-71155
03/04/2024, 8:38 PMPostgresqlRole
does create a role with a password in postgres, like it says. But that role does not have permissions to the database.
You need to run a separate GRANT SELECT ON ALL TABLES IN SCHEMA public TO $(role.name)
(or whatever is appropriate for you) in SQL.hundreds-gpu-71155
03/04/2024, 8:40 PMclever-sunset-76585
03/06/2024, 5:23 PMhundreds-gpu-71155
03/06/2024, 5:24 PMclever-sunset-76585
03/06/2024, 5:25 PM