I'm creating a managed cluster with a keyvault in Pulumi C# and struggling to retrieve the clientID from the ManagedCluster AddonProfile.
Here's my AddonProfile creation:
AddonProfiles =
{
{ "azureKeyvaultSecretsProvider", new Pulumi.AzureNative.ContainerService.V20220902Preview.Inputs.ManagedClusterAddonProfileArgs
{
Config =
{
{ "enableSecretRotation", "true" },
},
Enabled = true,
} },
},
Originally I had
AzureKVObjectId = cluster.AddonProfiles
.Apply(x => x["azureKeyvaultSecretsProvider"].Identity.ClientId);
which worked but has since stopped working with a NullReferenceException
.
Any idea on the correct way to retrieve the ObjectID of the identity that this creates?
Thanks!