How to fetch Azure AD group and use its object ID as SQL Server admin SID?TypeScript
In order to fetch Azure AD group and use its object ID as SQL Server admin SID, below is a Pulumi program in TypeScript:
This program first creates an Azure AD group. Then an Azure SQL Server is created. Finally, the created AD group is assigned as Azure AD admin for the SQL Server.
azuread.Groupresource is used to create an Azure AD group. The
displayNameproperty is the display name for the group.
azure.native.sql.Serverresource is used to create an Azure SQL Server. It requires details like the resource group it needs to be created on, the server name, location and version of the server.
azure-native.sql.ServerAzureADAdministratoris used to assign the Azure AD group as Azure AD admin to the SQL Server. It uses properties like
sid(which is the AD group Object ID),