https://pulumi.com logo
Title
a

ancient-megabyte-79588

03/29/2021, 11:32 PM
This is the details output when I do not try to import the existing ResourceGroup:
b

billowy-army-68599

03/30/2021, 12:07 AM
i'm not super familiar with Azure, but it looks like just the tags are diff?
a

ancient-megabyte-79588

03/30/2021, 12:41 AM
there are no tags on any of the resources in azure and the pulumi app doesn't want to put any on either.
Also, might you know what the little 🔒 character in the details means? I'm not sure if that is because I have
protected
on the resource of if pulumi has detected the resource is locked in Azure.
b

brave-planet-10645

03/30/2021, 8:49 AM
That's because you've flagged the resource as protected in Pulumi
a

ancient-megabyte-79588

03/30/2021, 2:19 PM
const resourceGroup = new azure.core.ResourceGroup("rg-kubernetes",{
        name: "rg-kubernetes",
    },{
        //import: "/subscriptions/ad73ec2e-0337-4de5-983c-3944fcb68be8/resourceGroups/rg-kubernetes",
        protect: true, ignoreChanges: ["tags", "id"]
    }
);
is producing this
replacement
action...
@gorgeous-egg-16927 Do you have any ideas? Is this
replacement
probably safe and not going to delete my control planes in the rg?
g

gorgeous-egg-16927

03/30/2021, 2:28 PM
Was the resource group previously created with Pulumi? AFAICT, it looks like it wasn’t, so Pulumi is planning to replace the existing one with one of the same name that it manages.
a

ancient-megabyte-79588

03/30/2021, 3:34 PM
@gorgeous-egg-16927 This behaviour happens if I try to do include or exclude the
import
statement.
You are right in that it was originally imported. But once it was imported, we removed the
'import
directive
Here is a run with the import directive
g

gorgeous-egg-16927

03/30/2021, 9:11 PM
Hmm, I’m not really sure what’s going on. Any ideas @sparse-park-68967 ?
s

sparse-park-68967

03/30/2021, 9:21 PM
so the RG is currently imported in pulumi state along with the cluster? (sorry catching up here)
a

ancient-megabyte-79588

03/30/2021, 9:46 PM
I guess I'm wondering why an
import
directive wants to replace the RG? Replacing an RG is a delete/recreate action afaik and deleting an RG will cause everything inside of it to get deleted too. Our control planes are in that RG, so if they get deleted, then all the clusters and everything in them gets deleted, I think.