gray-nail-14734
03/14/2021, 5:37 PMAzure-Native
and trying to create an AKS cluster. All is good, until I try to set up my PodIdentityProfile
. In the AZ CLI, PodIdentity is set up in a separate step, and the Pulumi Azure-Native resource seems to follow the same paradigm. However, I can't seem to figure out how to set up my UserAssignedIdentity
after my ManagedCluster
is created. I've tried GetManagedCluster
, but the profile is an ImmutableArray
. I've tried creating a new resource (using the same name and resource group) but get a conflict.
Is there a recommended way to perform updates on existing resources? I'm looking through the Pulumi docs and don't really see this. I see how to create and destroy, but update isn't called out in many places.
BTW, I'm using C# in my scripts.
Thank you in advance for any guidance here!tall-librarian-49374
03/14/2021, 7:17 PMPodIdentityProfile
seems to be a property of ManagedCluster
. Why don’t you define it as part of the cluster definitions, similar to https://www.pulumi.com/docs/reference/pkg/azure-native/containerservice/managedcluster/#create-managed-cluster-with-podidentity-enabled ?Is there a recommended way to perform updates on existing resources?We recommend you avoid the need for this, if possible. Aren’t you defining the cluster in your program?
gray-nail-14734
03/14/2021, 10:29 PMPodIdentityProfile
as part of my ManagedCluster
definition as such:
PodIdentityProfile = new ManagedClusterPodIdentityProfileArgs
{
Enabled = true,
UserAssignedIdentities = new ManagedClusterPodIdentityArgs
{
Identity = new UserAssignedIdentityArgs
{
ClientId = pod_identity.ClientId.Apply(id => id),
ObjectId = pod_identity.PrincipalId.Apply(id => id),
ResourceId = pod_identity.Id.Apply(id => id)
},
Name = "pod-id-tag",
Namespace = "pod-id"
}
},
I get the following error:
azure-native:containerservice:ManagedCluster (auto-aks):
error: Code="PodIdentityAddonUserAssignedIdentitiesNotAllowedInCreation" Message="PodIdentity addon does not support assigning pod identities on creation."
This lines up with the AZ CLI which first has me create the aks cluster with the --enable-pod-identity
flag, and then use az aks update
to actually set the pod identity info.
I'm trying to figure out how to set my user identity for my pod identity, but can't seem to figure it out.PodIdentityProfile
isn't editable after creation (which makes sense).tall-librarian-49374
03/15/2021, 7:21 AMgray-nail-14734
03/15/2021, 10:51 AMtall-librarian-49374
03/15/2021, 1:05 PMpulumi up
again. Or did I misunderstand the question?gray-nail-14734
03/15/2021, 4:47 PMaverage-spoon-16995
03/18/2021, 9:50 AMgray-nail-14734
03/19/2021, 9:59 PMcreate
versus an update
.average-spoon-16995
03/22/2021, 11:32 AM