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

microscopic-arm-69377

02/27/2024, 8:31 PM
Again, I'm confused on Pulumi output. I have a warning that some resources are going to change, and that their id, and type are going to be removed after I have imported the existing resources to my state. If it removed this id and type, does this do anything to my resource? Other resources appear to have these Azure paths, and they aren't calling for being deleted. I just didn't want them in my code as hard-coded values.
Copy code
~ azure-native:network:VirtualNetwork: (update) 🔓
        [id=/subscriptions/resourceGroups/rg-e1-web-apps-production/providers/Microsoft.Network/virtualNetworks/vnet-e1-web-app-services]
        [urn=urn:pulumi::azure-native:network:VirtualNetwork::vnet-e1-web-app-services]
        [provider=urn::pulumi:providers:azure-native::default_2_30_0::91acac8b-6a64-4cfc-a42b-45a2792e7e9d]
      + enableVmProtection: false
      ~ subnets           : [
          ~ [0]: {
                  ~ delegations: [
                      ~ [0]: {
                              - id  : "/subscriptions/resourceGroups/rg-e1-web-apps-production/providers/Microsoft.Network/virtualNetworks/vnet-e1-web-app-services/subnets/snet-e1-360-as-built/delegations/360-as-built-service-delegation"
                              - type: "Microsoft.Network/virtualNetworks/subnets/delegations"
                            }
                    ]
                  - id         : "/subscriptions/resourceGroups/rg-e1-web-apps-production/providers/Microsoft.Network/virtualNetworks/vnet-e1-web-app-services/subnets/snet-e1-360-as-built"
                  - type       : "Microsoft.Network/virtualNetworks/subnets"
                }
          ~ [1]: {
                  ~ delegations: [
                      ~ [0]: {
                              - id  : "/subscriptions/resourceGroups/rg-e1-web-apps-production/providers/Microsoft.Network/virtualNetworks/vnet-e1-web-app-services/subnets/snet-e1-web-application-integrations/delegations/delegation-web-applications"
                              - type: "Microsoft.Network/virtualNetworks/subnets/delegations"
                            }
                    ]
                  - id         : "/subscriptions/resourceGroups/rg-e1-web-apps-production/providers/Microsoft.Network/virtualNetworks/vnet-e1-web-app-services/subnets/snet-e1-web-application-integrations"
                  - type       : "Microsoft.Network/virtualNetworks/subnets"
                }
          ~ [2]: {
                  - id  : "/subscriptions/resourceGroups/rg-e1-web-apps-production/providers/Microsoft.Network/virtualNetworks/vnet-e1-web-app-services/subnets/snet-e1-web-app-gateway"
                  - type: "Microsoft.Network/virtualNetworks/subnets"
                }
        ]
Apparently, it does nothing...
I ran up with no adverse affects.
c

clever-sunset-76585

02/28/2024, 3:29 AM
I believe this is related to https://github.com/pulumi/pulumi-azure-native/issues/611 and https://github.com/pulumi/pulumi-azure-native/issues/2794. Since subnets belong to VNETs, an import would have brought in the subnet information into your VNET's state object. So if you don't have them defined in your code as part of the
VirtualNetwork
resource, it's going to show up as a diff. You should specify the resource option ignoreChanges and add
subnets
to it. I assume you've defined the subnet resources separately in your code using the
Subnet
resource?