-
Notifications
You must be signed in to change notification settings - Fork 491
feat: add serviceGroupTargetResourceIds
to utl common types module
#6013
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
base: main
Are you sure you want to change the base?
Conversation
@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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Description
Add
serviceGroupTargetResourceIds
to utl common types module as per discussion Azure/Azure-Verified-Modules#2324Pipeline Reference
Type of Change
version.json
:version.json
.version.json
.Checklist
Set-AVMModule
locally to generate the supporting module files.