https://pulumi.com logo
#dotnet
Title
# dotnet
a

average-nightfall-8153

02/23/2024, 11:21 AM
Hi, is there a way to get a list of Azure SQL database resources that are in a SQL server or Elastic Pool?
Could that be done with AzureCliScript?
b

brash-solstice-49151

02/26/2024, 10:40 AM
I don't see anything natively in Pulumi to achieve this. There are resources for GetServer, GetElasticPool and GetDatabase, but these are for individual resources and specifically for server/elastic pool, don't return databases. The CLI would be the way I'd about things, using the Pulumi Command Provider with the az sql db list command. Note that the
az sql db list
command returns the
master
database as well, so you may want to filter that out depending on what you need to do with the list.