I am trying to switch from "classic" Azure to Azure Native in Pulumi. One of my requirements is to retrieve the Connectionstring and AccessKey to my newly created StorageAccount.
On classic Azure I received those fields by
var connectionString=ClassicStorageAccount.PrimaryConnectionString;
var accessKey=ClassicStorageAccount.PrimaryAccessKey;
where ClassicStorageAccount
is of type Pulumi.Azure.Storage.Account
Now after creating a storage account with Azure Native:
var account=new Pulumi.AzureNative.Storage.StorageAccount("myMagicAccount", new StorageAccountArgs{...});
I am struggling to retrieve the AccessKey.
I am able to retrieve the connectionstring using
var connectionstring=account.StorageAccount.PrimaryEndpoints.Apply(q=>q.Web);
but none of the properties from PrimaryEndpoints
or PrivateEndpointConnections
seem to contain my required AccessKey.
The docs for StorageAccount on Azure Native did not help me on this approach