Library name
Azure.Provisioning
Please describe the feature.
When in prompt mode we need the CDK to prepend the following parameter to the construct:
param location string = resourceGroup().location
This parameter would then be used whenever a resource is added to the construct. The following Aspire code:
var construct1 = builder.AddAzureConstruct("construct1", (construct) =>
{
var account = construct.AddStorageAccount(
name: "bob",
kind: StorageKind.BlobStorage,
sku: StorageSkuName.StandardLrs
);
account.AddOutput(data => data.PrimaryEndpoints.TableUri, "tableUri", isSecure: true);
});
... would result in the following Bicep:
targetScope = 'resourceGroup'
param location string = resourceGroup().location
resource storageAccount_SOTvKjFQy 'Microsoft.Storage/storageAccounts@2022-09-01' = {
name: toLower(take(concat('bob', uniqueString(resourceGroup().id)), 24))
location: location
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
properties: {
}
}
output tableUri string = storageAccount_SOTvKjFQy.properties.primaryEndpoints.table