-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Resource Removal: Add resource Group support for mg level deployments #1043
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Log EvidenceVERBOSE: Invoke task with
VERBOSE: {
"ManagementGroupId": "***",
"DeploymentName": "roleDefinitions-20220225T0502569172Z",
"ResourceGroupName": "validation-rg",
"Verbose": true,
"TemplateFilePath": "/home/runner/work/ResourceModules/ResourceModules/arm/Microsoft.Authorization/roleDefinitions/deploy.bicep"
}
VERBOSE: Template file path: [/home/runner/work/ResourceModules/ResourceModules/arm/Microsoft.Authorization/roleDefinitions/deploy.bicep]
VERBOSE: Module name: [roleDefinitions]
VERBOSE: Handling resource removal with deployment name [roleDefinitions-20220225T0502569172Z]
VERBOSE: Determined deployment scope [managementgroup]
VERBOSE: Found deployed resource [/subscriptions/***/resourceGroups/validation-rg/providers/Microsoft.Authorization/roleDefinitions/2abcf71f-a840-5ac1-bac2-9d12[546](https://github.com/Azure/ResourceModules/runs/5329519376?check_suite_focus=true#step:4:546)e0ba9]
VERBOSE: Total number of deployment target resources after fetching deployments [1]
VERBOSE: Total number of deployment target resources after pre-filtering (duplicates) & ordering items [1]
VERBOSE: Total number of deployment target resources after formatting items [1]
VERBOSE: Using local tokens [namePrefix]
VERBOSE: Total number of deployments after filtering all dependency resources [1]
VERBOSE: Total number of deployments after final ordering of resources [1]
VERBOSE: Performing the operation "Remove" on target "[1] resources".
VERBOSE: Performing the operation "Remove" on target "[1] Resource(s) with a maximum of [3] attempts.".
VERBOSE: - Remove [/subscriptions/***/resourceGroups/validation-rg/providers/Microsoft.Authorization/roleDefinitions/2abcf71f-a840-5ac1-bac2-9d12546e0ba9]
VERBOSE: ----------------------------------
VERBOSE: Removing resource [2abcf71f-a840-5ac1-bac2-9d12546e0ba9] of type [Microsoft.Authorization/roleDefinitions]
VERBOSE: Performing the operation "Remove" on target "Resource [/subscriptions/***/resourceGroups/validation-rg/providers/Microsoft.Authorization/roleDefinitions/2abcf71f-a840-5ac1-bac2-9d12546e0ba9]".
VERBOSE: Resource ID [/subscriptions/***/resourceGroups/validation-rg/providers/Microsoft.Authorization/roleDefinitions/2abcf71f-a840-5ac1-bac2-9d12546e0ba9]
VERBOSE: Resource Type [Microsoft.Authorization/roleDefinitions]
VERBOSE: Performing the operation "Execute" on target "Post-resource-removal for [/subscriptions/***/resourceGroups/validation-rg/providers/Microsoft.Authorization/roleDefinitions/2abcf71f-a840-5ac1-bac2-9d12546e0ba9]".
VERBOSE: ----------------------------------
VERBOSE: The removal completed successfully Pipeline testedTested on the Role Definition Pipeline by adding a new parameter that targets Resource Group. Switched the workflow to use the root deploy.bicep and then reverted the configuration |
utilities/pipelines/resourceRemoval/helper/Get-DeploymentTargetResourceList.ps1
Show resolved
Hide resolved
AlexanderSehr
approved these changes
Feb 28, 2022
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1042
Change
Without this, removal stage for deployments that happen at the management group scope and target resource group as child will not be able to find the right deployment as the original one only supports subscription as a child
Type of Change
Please delete options that are not relevant.