This message was deleted.
# azure
s
This message was deleted.
t
PodIdentityProfile
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?
g
Hi @tall-librarian-49374. If I define my
PodIdentityProfile
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.
The problem is that the
PodIdentityProfile
isn't editable after creation (which makes sense).
t
This doesn’t answer your question but I opened https://github.com/Azure/azure-rest-api-specs/issues/13417 to track a potential fix upstream
g
Thanks @tall-librarian-49374. I'll keep an eye on it. And just for my knowledge, since I'm new to Pulumi, what is the recommended approach if you need to update an existing resource in Pulumi? For example, if I decide to enable the cluster autoscaler after the cluster has been created? Thank you!
t
You change your program and run
pulumi up
again. Or did I misunderstand the question?
g
Thanks again @tall-librarian-49374 ... yes, that helps. Really appreciate the help here. Thank you!
a
did u solve the problem?
g
Yes, that did solve my problem. I ended up using some configuration to run my Stack, but only performing certain actions if it's a
create
versus an
update
.
a
aha ok! thnx!