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

[AVM Module Issue]: resource-group omits managedBy which makes migrating to AVM impossible #2795

Closed
1 task done
snelis opened this issue Jul 23, 2024 · 19 comments
Closed
1 task done
Assignees
Labels
Class: Resource Module 📦 This is a resource module Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Bug 🐛 Something isn't working

Comments

@snelis
Copy link

snelis commented Jul 23, 2024

Check for previous/existing GitHub issues

  • I have checked for previous/existing GitHub issues

Issue Type?

Bug

Module Name

avm/res/resources/resource-group

(Optional) Module Version

0.2.4 (latest)

Description

The module identifies that the managedBy propery is immutable, yet it does not make it configurable.

// managedBy: managedBy // removed due to immutable string, only used for managed resource groups

Since CARML used to set it to an empty string by default, you end up with the property:

"managedBy": "",

AVM then tries to deploy without this property and you get this error:

The managed by property of the resource group cannot be changed from its current value ''

Can we make this configurable so i can configure it to an empty string?

(Optional) Correlation Id

No response

@snelis snelis added Needs: Triage 🔍 Maintainers need to triage still Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue labels Jul 23, 2024

Important

The "Needs: Triage 🔍" label must be removed once the triage process is complete!

Tip

For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Type: Bug 🐛 Something isn't working label Jul 23, 2024
@avm-team-linter avm-team-linter bot added the Class: Resource Module 📦 This is a resource module label Jul 23, 2024
Copy link

@snelis, thanks for submitting this issue for the avm/res/resources/resource-group module!

Important

A member of the @Azure/avm-res-resources-resourcegroup-module-owners-bicep or @Azure/avm-res-resources-resourcegroup-module-contributors-bicep team will review it soon!

@segraef
Copy link
Contributor

segraef commented Jul 24, 2024

Hi @snelis thanks for bringing this up, have you thought about raising a PR for this?
Have a think about it, otherwise I'm happy to have a closer at it to get this solved to enable you to migrate to AVM.

@snelis
Copy link
Author

snelis commented Jul 24, 2024

Yes, but have not found time to look into this further, for now i stuck with CARML to avoid being blocked.

Warning

Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

Tip

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage 🔍" label must be removed as part of the triage process (when the issue is first responded to)!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days label Jul 30, 2024
@segraef
Copy link
Contributor

segraef commented Jul 31, 2024

I'd like to understand your use case in a bit more detail. The reason we removed the managedBy parameter is because it's only used by managed resource groups. See correspondence Azure/ResourceModules#4351 (comment).

Warning

Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

Tip

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage 🔍" label must be removed as part of the triage process (when the issue is first responded to)!

Caution

**This issue requires the AVM Core Team's (@Azure/avm-core-team-technical-bicep) immediate attention as it hasn't been responded to within 6 business days. **

Tip

  • To avoid this rule being (re)triggered, the "Needs: Triage 🔍" and "Status: Response Overdue 🚩" labels must be removed when the issue is first responded to!
  • Remove the "Needs: Immediate Attention ‼️" label once the issue has been responded to.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Immediate Attention ‼️ Immediate attention of module owner / AVM team is needed label Aug 5, 2024
@snelis
Copy link
Author

snelis commented Aug 6, 2024

We come from the CARML, they transition into AVM.

The latest tag that was in use is 0.11.1 which is here
https://github.com/Azure/ResourceModules/blob/v0.11.1/modules/resources/resource-group/main.bicep

This tag deploys resource groups with the managedBy property.
It must be a string in that module, and default is ''

Therefore we now have resourcegroups with this property already in place (as an empty string).
So when i use the new AVM module that does not implement this property at all, i get this error from ARM.

The managed by property of the resource group cannot be changed from its current value ''

So this makes me unable to transition this module from CARML into AVM because they are incompatible with each other.

@snelis
Copy link
Author

snelis commented Aug 6, 2024

I also thought about a PR, but if you want this to be either a string, or omit the property we land in this issue:
Azure/bicep#387

Warning

Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

Tip

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage 🔍" label must be removed as part of the triage process (when the issue is first responded to)!

Caution

**This issue requires the AVM Core Team's (@Azure/avm-core-team-technical-bicep) immediate attention as it hasn't been responded to within 6 business days. **

Tip

  • To avoid this rule being (re)triggered, the "Needs: Triage 🔍" and "Status: Response Overdue 🚩" labels must be removed when the issue is first responded to!
  • Remove the "Needs: Immediate Attention ‼️" label once the issue has been responded to.

Warning

Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

Tip

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage 🔍" label must be removed as part of the triage process (when the issue is first responded to)!

Caution

**This issue requires the AVM Core Team's (@Azure/avm-core-team-technical-bicep) immediate attention as it hasn't been responded to within 6 business days. **

Tip

  • To avoid this rule being (re)triggered, the "Needs: Triage 🔍" and "Status: Response Overdue 🚩" labels must be removed when the issue is first responded to!
  • Remove the "Needs: Immediate Attention ‼️" label once the issue has been responded to.

@segraef segraef removed Needs: Immediate Attention ‼️ Immediate attention of module owner / AVM team is needed Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days labels Aug 19, 2024

Warning

Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

Tip

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage 🔍" label must be removed as part of the triage process (when the issue is first responded to)!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days label Aug 22, 2024
@segraef
Copy link
Contributor

segraef commented Aug 28, 2024

@snelis, just fyi I have this on my backlog.

@segraef segraef removed Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days Needs: Triage 🔍 Maintainers need to triage still labels Aug 28, 2024
@segraef
Copy link
Contributor

segraef commented Sep 1, 2024

@snelis did you try using the resource group resource and setting the managedBy parameter?

@segraef
Copy link
Contributor

segraef commented Sep 4, 2024

Since the parameter was removed due to the decision of immutable string issues in CARML and before moving into AVM, we are not going to reintroduce the parameter again. We recommend using the generic resource group resource and setting the managedBy parameter or reference an existing resource group to enable you to transition to AVM.

@segraef segraef closed this as completed Sep 4, 2024
@snelis
Copy link
Author

snelis commented Sep 5, 2024

It's immutable, so yes i can use the generic resource group to maintain it's current value, but i wont be able to transition into AVM.
I will have to keep using this generic resource group instead forever.
Not a big problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Class: Resource Module 📦 This is a resource module Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Bug 🐛 Something isn't working
Projects
Development

No branches or pull requests

2 participants