Skip to content

Azure - Create script to safely remove all resources and policies created by onboarding script #2

@adilio

Description

@adilio

We need a way to cleanly remove all resources from the onboarding script and ARM template. If users have issues and need to redeploy the Cortex Cloud onboarding, this script could help them start from scratch.

This is particularly useful if onboarding presents the error:

ERROR: The content for this response was already consumed

A note form a colleague:

Delete the managed identity, any resources in the resource group, the deployments and policies in the resource group, delete the role assignments for the management group (3 start with ADS and 2 with cortex), delete the managed identity from the management group, and delete the roles themselves after you remove the assignments.
Once that is all done, try the .sh script again.
Also, you may need to wait 10-15 minutes for the event hub resources to completely get removed.

We want to ensure that the script is non-desctructive of resources that are NOT deployed within the ARM template or resource group. As well, we should build a wait into the script to confirm once the EventHub resources are completely removed.

This script can be used as a start: https://github.com/adilio/az-nuke

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