Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Unable to delete AppMesh resource #913

Closed
roseo1 opened this issue Jan 9, 2023 · 1 comment · Fixed by #912
Closed

Unable to delete AppMesh resource #913

roseo1 opened this issue Jan 9, 2023 · 1 comment · Fixed by #912

Comments

@roseo1
Copy link
Contributor

roseo1 commented Jan 9, 2023

Hello,

I recently started deploying app mesh resources into an account that gets nuked.
However the app mesh resources are unable to be deleted as they reference eachother, and there seems to be no way to delete the required resource first that would break the chain.

I can't see any other open/closed appmesh issues, but AFAICS seems a pretty standard app mesh setup (same setup as diagram from walkthrough or AWS blog post).

Can't delete the AppMeshVirtualRouter because it is the provider for the AppMeshVirtualService.
Can't delete the AppMeshVirtualService because it is referenced in the gateway route.
Can't delete the AppMeshVirtualGateway because it has active routes.
Can't delete the AppMeshMesh because it has active virtual services.
Can delete the AppMeshVirtualNode and the AppMeshRoute on the virtual router.

level=error msg="There are resources in failed state, but none are ready for deletion, anymore."
level=error msg="ResourceInUseException: VirtualService <virtual_service_name> is being referenced in the following: GATEWAY_ROUTE: [<gateway_route_id>]"
level=error msg="ResourceInUseException: Mesh example for account <account_id> has active VirtualServices, please delete VirtualServices before deleting the Mesh"
level=error msg="ResourceInUseException: VirtualRouter with name example cannot be deleted because it is a VirtualService provider"
level=error msg="ResourceInUseException: VirtualGateway you're trying to delete example has active gatewayRoutes"
Error: failed

Minimum example of appmesh setup: https://github.com/roseo1/aws-nuke-appmesh
aws-nuke: v2.19.0

If the virtual gateway route that referenced the virtual service could be deleted, then thinking it would then be unblock deleting the virtual gateway, service and router. So opened this PR to add the resource to find, filter and be able to delete virtual gateway routes.

#912

Planning to test these changes against an account with the example setup deployed this evening.

@roseo1
Copy link
Contributor Author

roseo1 commented Jan 9, 2023

update: just testing the changes in linked PR #912 against an account with the same app mesh structure as above deployed. Has successfully deleted all appmesh resources.

dry run logs

eu-west-2 - AppMeshGatewayRoute - [MeshName: "example", Name: "example", VirtualGatewayName: "example"] - would remove

Can upload logs from real mode if that is required.

(Haven't done an explicit test filtering out a gateway route, but can kick that off after if desired)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant