millions-journalist-34868
02/15/2022, 11:44 PMvar sqlServer = new Server($"sql-sqlDbWithAzureAd-{Deployment.Instance.StackName}", new ServerArgs
{
ResourceGroupName = resourceGroup.Name,
Administrators = new ServerExternalAdministratorArgs
{
Login = sqlAdAdmin.UserPrincipalName,
Sid = sqlAdAdmin.Id,
AzureADOnlyAuthentication = true,
AdministratorType = AdministratorType.ActiveDirectory,
PrincipalType = PrincipalType.User,
},
});
var database = new Database("sqldb-sqlDbWithAzureAd-Main", new DatabaseArgs
{
ResourceGroupName = resourceGroup.Name,
ServerName = sqlServer.Name,
Sku = new SkuArgs
{
Name = "Basic"
}
});
var authorizeAdGroup = new Command("AuthorizeAdGroup", new CommandArgs
{
Create = $"sqlcmd -S {sqlServer.Name} -?",
Interpreter = new InputList<string>
{
"pwsh",
"-c"
}
}, new CustomResourceOptions
{
DependsOn = new InputList<Pulumi.Resource> { enableLocalMachine, database, sqlServer }
});
little-cartoon-10569
02/16/2022, 1:07 AMsqlServer.Name
isn't a string, it's a string output, so you need handle it as such. I presume that Pulumi golang has an equivalent of the typescript pulumi.interpolate? It takes interpolates a string output into a string and returns a string output that can be used in most Pulumi resource constructors.