Closed pierskarsenbarg closed 1 week ago
Yes, it's not currently supported. The documentation of the inline property includes:
Do not mix inline and standalone resource as they will conflict with each other, leading to resources deletion.
The issue tracking this is:
I'll close this as a duplicate of https://github.com/pulumi/pulumi-azure-native/issues/2794 and add a reference back from that issue.
What happened?
When creating a NetworkSecurityGroup there are two options on how to define the security rules:
It looks like you can use the two options side by side (so create a NSG resource with inline rules and then add on other rules later. But if you do then the standalone gets deleted and added repeatedly.
Example
Example repo here: https://github.com/pierskarsenbarg/azure-nsg-sec-rules
Steps:
pulumi up
pulumi refresh
and view details. You'll see that the security group rule has been added inline to the NSGpulumi up
again and the inline security group that was moved from the standalone is deletedpulumi stack
and see that both the nSG and the standalone rule exist in the statepulumi refresh
and see that the standalone security rule is deleted from the statepulumi up
and the standalone rule is created and the cycle starts againYou can also just run
pulumi up -r
instead of alternating between up and refresh for it to be deleted and re-created again.Output of
pulumi about
Additional context
This seems similar to #1087 but the difference here is that in this issue the standalone rule keeps getting deleted and recreated whereas in #1087 the inline rule was being deleted and recreated. Also, it only happens when you have at least one inline security rule.
The workaround for now is to choose to use either standalone security rules or inline ones.
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).