-
Notifications
You must be signed in to change notification settings - Fork 362
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
feat: avm/res/compute/gallery
: Added UDT applicationsType
#3817
base: main
Are you sure you want to change the base?
feat: avm/res/compute/gallery
: Added UDT applicationsType
#3817
Conversation
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. |
Important If this is a module-related PR, being submitted by the sole owner of the module, the AVM core team must review and approve it (as module owners can't approve their own PRs). To indicate this PR needs the core team''s attention, apply the "Needs: Core Team 🧞" label! The core team will only review and approve PRs that have this label applied! |
avm/res/compute/gallery
: Added UDT applicationsTypeavm/res/compute/gallery
: Added UDT applicationsType
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.
Thank you for your contribution. I added some small comments.
type roleAssignmentType = { | ||
@sys.description('Optional. The name (as GUID) of the role assignment. If not provided, a GUID will be generated.') | ||
name: string? | ||
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.3.0' |
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.
While this is a valid place to import external UDTs, we agreed to import them at the location where they are used. This way it is clear where they come from.
I'd put the import roleAssignmentType right before the param roleAssignments.
This applies to all imports and references of imported types (AVM common or your own).
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.
💡 Thanks for the feedback! Is the single line import required for this type as well?
import { identifierType, purchasePlanType, resourceRangeType } from './image/main.bicep'
Or is this fine as it is?
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.
Nevermind, these are used within a UDT so must be in the one-liner :)
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.
One point may have gotten lost a bit.
Hey @johnlokerse, long time no see. 😄 To build on top of what @ReneHezser said: Just for the types that you import from other templates, please import them on top of where they are used. For example:
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.3.0'
@sys.description('Optional. The lock settings of the service.')
param lock lockType?
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.
Just makes it a bit easier to find - especially if the module would happen to not have any other types :) (in know that's not the case for you, but I wanted to mention it)
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.
Thanks! Implemented the comments. Could you re-check it to see if it's as expected? |
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.
Thanks again for your contribution.
For next time, please do not solve conversations. Usually, the reviewer does that after checking again. This makes it easier for us to do the reviews on many modules at the same time.
Description
This PR adds the
applicationsType
UDT and updates existing UDTs to follow AVM standards.Tagging owner: @ReneHezser
Pipeline Reference
Type of Change
version.json
:version.json
.version.json
.Checklist
Set-AVMModule
locally to generate the supporting module files.