https://pulumi.com logo
#azure
Title
# azure
r

rough-tomato-98795

03/25/2020, 8:01 AM
Hello, i am creating aks cluster with typescript without specifying windowsProfile property. pulumi up works fine. But another pulumi up says that value windowsProfile was changed and it wants to replace all the resources which are related to k8s cluster. Is this a bug/feature?
a

adamant-intern-63433

03/25/2020, 8:36 AM
We have a cluster with it and never had that problem. Could you share how do you set
windowsProfile
property?
r

rough-tomato-98795

03/25/2020, 8:37 AM
we do not set it
a

adamant-intern-63433

03/25/2020, 8:38 AM
ah sorry, I misread that.
r

rough-tomato-98795

03/25/2020, 8:38 AM
np 🙂
a

adamant-intern-63433

03/25/2020, 8:45 AM
If you’ve registered preview feature on your subscription you might need to set it. There is a warning about this and I suppose that forces you to have a windows profile.
<https://docs.microsoft.com/en-us/azure/aks/windows-container-cli>
Copy code
Any AKS cluster you create after you've successfully registered the WindowsPreview feature flag use this preview cluster experience
It might be set automatically when it hasn’t been set manually and get saved into the state. Pulumi could handle this better.
r

rough-tomato-98795

03/25/2020, 8:58 AM
yikes didn't know about that behaviour. Some of my collegues had to turn it on i guess. but still i am not sure if pulumi should be trying to replace all the stuffs when desired state didnt change.
And also azure portal is saying that feature WindowsPreview is not registred in our subsciption
b

better-rainbow-14549

03/25/2020, 9:07 AM
have you tried doing a
pulumi refresh
?
r

rough-tomato-98795

03/25/2020, 9:08 AM
there should be no need for that
b

better-rainbow-14549

03/25/2020, 9:08 AM
i agree but life is often imperfect
if that doesnt work you should be able to preview --diff and then manually edit your state file so they match
pulumi often conservatively guesses that it will replace a resource but ultimately the provider does nothing and it just updates the state - but yeah its really worrying and annoying on things like a cluster
its very likely that doing an update wouldn't actually change anything but the state
r

rough-tomato-98795

03/25/2020, 9:09 AM
well and what about the pipelines 😄
b

better-rainbow-14549

03/25/2020, 9:10 AM
the approach i always go for is manually editing state file until it says no changes needed
r

rough-tomato-98795

03/25/2020, 9:11 AM
uhh sounds like too much work which can not be automate => long term overhead
b

better-rainbow-14549

03/25/2020, 9:12 AM
IME its always one offs either related to the terraform provider changing or something about the azure api changing
once it's fixed it's fixed
supporting pre and post vmss clusters was a nightmare
t
r

rough-tomato-98795

03/25/2020, 10:08 AM
yeah, seems like thats it.
3 Views