Skip to content

Conversation

jtracey93
Copy link
Collaborator

@jtracey93 jtracey93 commented Sep 26, 2025

Description

Add serviceGroupTargetResourceIds to utl common types module as per discussion Azure/Azure-Verified-Modules#2324

Pipeline Reference

Pipeline
https://github.com/jtracey93/bicep-registry-modules/actions/runs/18043889300

Type of Change

  • Azure Verified Module updates:
    • Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in version.json:
    • Feature update backwards compatible feature updates, and I have bumped the MINOR version in version.json.
    • Breaking changes and I have bumped the MAJOR version in version.json.
    • Update to documentation
  • Update to CI Environment or utilities (Non-module affecting changes)

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • I have run Set-AVMModule locally to generate the supporting module files.
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • I have updated the module's CHANGELOG.md file with an entry for the next version

Developed in Lanzarote 🚢

@jtracey93 jtracey93 requested review from a team as code owners September 26, 2025 16:43
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 Maintainers need to triage still label Sep 26, 2025
@avm-team-linter avm-team-linter bot added the Needs: Core Team 🧞 This item needs the AVM Core Team to review it label Sep 26, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue label Sep 26, 2025
@jtracey93
Copy link
Collaborator Author

@AlexanderSehr would appreciate your 👀 on this one

// ================== //
@export()
@description('An AVM-aligned type for the target resource IDs to associate resource to service groups.')
type serviceGroupTargetResourceIdsType = resourceInput<'Microsoft.Relationships/serviceGroupMember@2023-09-01-preview'>.properties.targetId
Copy link
Collaborator

@AlexanderSehr AlexanderSehr Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jtracey93, thanks fir the PR(s) 🚀
Regarding this one: I wonder - what 's the point of the type if it's effectively a string? In other words, what's the type's added value compared to a module's individual implementation via a string parameter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking similar, however I thought I’d raise the PR for us to discuss.

I think centralising it here in the UTL module with an RDT ensures that valid resource IDs are provided for they’d import as its not the typical resource ID, e.g. /subscriptions/xxxxx/resourceGroups/xxxx/RP/type/xxx as its a tenant level input /providers/Microsoft.Management/serviceGroups/xxx

Thoguhts?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would only be possible in Terraform as Bicep does not have a feature like regex validation and the like. In other words, the resourceInput in this case would only check that it's a string - that 'should' be it.
I'd suggest an alternative which is to enforce string as a param type via our Pester tests if anybody defines a serviceGroupTargetResourceId parameter.
I'll bring this topic up in our next team call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Core Team 🧞 This item needs the AVM Core Team to review it Needs: Triage 🔍 Maintainers need to triage still Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants