abundant-lock-75924
11/13/2023, 10:02 PMmelodic-tomato-39005
11/14/2023, 9:05 AMlittle-library-54601
11/14/2023, 2:36 PMpublic static Output<string> GetStorageAccountConnectionString(Output<string> rgName, Output<string> storageAccountName)
{
var key = Output.Tuple(rgName, storageAccountName).Apply(names =>
Output.CreateSecret(GetStorageAccountPrimaryKey(names.Item1, names.Item2)));
return Output.Tuple(storageAccountName, key).Apply(values => $"DefaultEndpointsProtocol=https;AccountName={values.Item1};AccountKey={values.Item2};EndpointSuffix=<http://core.windows.net|core.windows.net>");
}
public static Output<string> GetStorageAccountPrimaryKey(string rgName, string storageAccountName)
{
var accountKeys = ListStorageAccountKeys.Invoke(new ListStorageAccountKeysInvokeArgs
{
ResourceGroupName = rgName,
AccountName = storageAccountName
});
return accountKeys.Apply(k => k.Keys[0].Value);
}
abundant-lock-75924
11/14/2023, 6:30 PMmillions-journalist-34868
11/14/2023, 9:21 PMabundant-lock-75924
11/15/2023, 2:20 AM