Skip to content

vnet cannot be re-deployed when connected to by other resource in the same script #1166

@Larocceau

Description

@Larocceau

I have an arm template that has a vnet + webApp connected to it:

    let vn = vnet {
        name "my-vnet"
        add_address_spaces [ "10.30.0.0/16" ]
    }
    let app= webApp {
        name "my-web-app"
        operating_system Linux
        runtime_stack Runtime.DotNet80
        link_to_vnet sn
        sku  WebApp.Sku.P0V3
  
    }

    let rg = arm {
        location Location.WestEurope
        add_resources [
            vn
            app
            ]
}


Initial deployment goes OK, but any further deployments fail, because they try to delete the vnet, but that is not possible as long as the webApp is connected to it

Workaround
remove the vnet integration from the webApp before running the deployment

az webapp vnet-integration remove -g {rgName} -n {webAppName}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions