Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report]: module pipeline removal stage attempts to remove dependency resources #1781

Closed
ahmadabdalla opened this issue Aug 13, 2022 · 0 comments · Fixed by #1780
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ahmadabdalla
Copy link
Contributor

ahmadabdalla commented Aug 13, 2022

Describe the bug

module removal stage tries to remove the dependency resource that the module uses. It relies on on the namePrefix token being local to perform token replacement for dependency files.

To reproduce

run any module in main that uses dependency resources that cannot be removed.

Code snippet

WARNING: Removal moved back for re-try. Reason: [InUseSubnetCannotBeDeleted : Subnet GatewaySubnet is in use by /subscriptions/***/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworkGateways/***-az-gw-vpn-001/ipConfigurations/vNetGatewayConfig1 and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet.
  CorrelationId: 8370cdc6-ff9d-4448-b157-ac9e483da70c]
  VERBOSE: Performing the operation "Execute" on target "Post-resource-removal for [/subscriptions/***/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-***-az-vnet-x-001]".
  VERBOSE: ----------------------------------
  VERBOSE: Re-try removal of remaining [1] resources. Waiting [15] seconds. Round [3|3]
  Exception: /home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/resourceRemoval/helper/Remove-ResourceList.ps1:124
  Line |
   124 |          throw ('The removal failed for resources [{0}]' -f ((Split-Pa …
       |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       | The removal failed for resources [adp-***-az-vnet-x-001]

Relevant log output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

1 participant