Skip to content

[CI environment] Extend and optimize resource removal of nested deployments with higher scope than the parent#2148

Merged
eriqua merged 3 commits intomainfrom
users/erikag/update-removal
Sep 29, 2022
Merged

[CI environment] Extend and optimize resource removal of nested deployments with higher scope than the parent#2148
eriqua merged 3 commits intomainfrom
users/erikag/update-removal

Conversation

@eriqua
Copy link
Copy Markdown
Contributor

@eriqua eriqua commented Sep 29, 2022

Description

Prerequisite for PR #2136 and #2019.
In the new dependencies approach for compute images, a deployment at subscription scope (roleAssignment) is nested in a deployment at resource group scope (rg dependencies). The current removal logic does not cover this scenario and the nested deployment is not fetched when having a higher scope than the parent. Hence the roleAssignment is not removed, and a subsequent validation of the module fails.

  • Improving fetching of deployments and resources to delete to support the above scenario.
  • Adding roleAssignment removal priority

Pipeline references

For module/pipeline changes, please create and attach the status badge of your successful run.

Pipeline
Consumption: Budgets
Insights: ActionGroups
Compute: VirtualMachines -> old approach
Authorization: PolicyAssignments
Authorization: RoleAssignments

Type of Change

Please delete options that are not relevant.

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Update to documentation

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

@eriqua eriqua added enhancement New feature or request [cat] pipelines category: pipelines [cat] testing category: testing labels Sep 29, 2022
@eriqua eriqua marked this pull request as ready for review September 29, 2022 16:48
@eriqua eriqua requested a review from a team as a code owner September 29, 2022 16:48
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 29, 2022

Unit Test Results

    1 files      1 suites   1m 1s ⏱️
167 tests 159 ✔️ 8 💤 0
172 runs  164 ✔️ 8 💤 0

Results for commit 1e72b33.

♻️ This comment has been updated with latest results.

@eriqua eriqua merged commit 2b0b607 into main Sep 29, 2022
@eriqua eriqua deleted the users/erikag/update-removal branch September 29, 2022 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[cat] pipelines category: pipelines [cat] testing category: testing enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants