b
message has been deleted
m
are you planing to use the azure-native provider or classic?
b
azure-native provider
m
Should be a system assigned identity or user assigned?
b
an existing user assigned identity
m
I did not find an example for the azure-native provider and Scaleset, so I could create one! In the mean time, did you checked the docs for the provider https://www.pulumi.com/registry/packages/azure-native/api-docs/compute/virtualmachinescaleset/#virtualmachinescalesetidentity Maybe it helps you already?
Let me know if you need example code
b
var existingScaleSet = VirtualMachineScaleSet.Get("nameofthescaleset", "/subscriptions/aaa/resourceGroups/aaa/providers/Microsoft.Compute/virtualMachineScaleSets/nameofthescaleset");
existingScaleSet.Identity.Apply(x => x.UserAssignedIdentities.Add("identity-gguid", ??? ));
something like this? can you correct it for me please
m
add should have the type and another map of the ids in it
b
Can you please retype that or provide me an example.
m
ok, give some mins to come up with an example code
b
Many thanks 🙂
m
I am going to use go, but I think it should not make a difference
b
ok Im using c#
m
I am so out on c# 😞
b
ok no worries. example on any language is fine
m
https://github.com/dirien/azure-scaleset Hope this helps, I did not do a getXX, I just created the identity and the scaleset
b
ok many thanks for your time
m
Happy to help! Let me know how it ends 🙂
b
sure thanks :)
Got another question:
VirtualMachineScaleSetIdentityResponseUserAssignedIdentities
is sealed class with a private constructor which does not allow me to create an object and add it into the
UserAssignedIdentities
message has been deleted
m
wait I try it
I think a
get
call will never update the resource:
A resource read with the
get
function will never be updated or deleted by Pulumi during an update.
https://www.pulumi.com/docs/intro/concepts/resources/get/
You could import the resource into your Pulumi program though
b
ok thanks