great-sunset-355
07/23/2024, 7:36 AM"name": "AzureWebJobsStorage",
"value": "[format('DefaultEndpointsProtocol=https;AccountName={0};EndpointSuffix={1};AccountKey={2}', parameters('project'), environment().suffixes.storage, listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('project')), '2020-08-01-preview').keys[0].value)]"
pulumi AI converted it like this
// Create an Azure Storage Account
const storageAccount = new azureNative.storage.StorageAccount("storageAccount", {
resourceGroupName: resourceGroup.name,
sku: {
name: "Standard_LRS",
},
kind: "StorageV2",
});
// Get the primary connection string for the storage account
const storageAccountKeys = storageAccount.name.apply(name =>
azureNative.storage.listStorageAccountKeys({
resourceGroupName: resourceGroup.name,
accountName: name,
})
);
const primaryConnectionString = pulumi.interpolate`DefaultEndpointsProtocol=https;AccountName=${storageAccount.name};AccountKey=${storageAccountKeys.keys[0].value};EndpointSuffix=<http://core.windows.net|core.windows.net>`;
is this a common thing in Azure client to construct strings like this? Are there no relevant outputs?big-architect-71258
07/23/2024, 9:40 AMgreat-sunset-355
07/23/2024, 11:08 AMNo matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by