-
Notifications
You must be signed in to change notification settings - Fork 378
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: Added UDT for Managed identity and Deployment Scripts #1224
feat: Added UDT for Managed identity and Deployment Scripts #1224
Conversation
@AlexanderSehr FYI - had some issues with the randomised resource location selector on the deployment of the user-assigned managed identity. It deployed in |
Hey @johnlokerse, cc: @eriqua, @ChrisSidebotham fyi |
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.
LGTM :)
## Description This pull request introduces two user-defined types for the following modules: * Deployment scripts -> (secure) environment variables (tagging module owner: @sebassem) * User Assigned Managed Identity -> federated identity credentials (tagging module owner: @elanzel) * Removed an unused line of code in `.github/actions/templates/avm-validateModuleDeployment/action.yml` Extra context regarding `@secure()` decorator on user-defined type. When the Bicep template is built the type is referred as a secureString so the parameter inherits the secureString type and the parameter is secure during deployment: <img width="815" alt="Untitled" src="https://github.com/Azure/bicep-registry-modules/assets/3514513/d2b8972f-6b34-46ed-b3d4-5c68437b263d"> Also double checked if the outputs were working and tested it via this Bicep template: ```bicep /* Bicepparam using './testsecureoutput.bicep' param parTestingParameter = { secureList: [ { name: 'test' secureValue: 'test123' } ] } */ param parTestingParameter environmentVariableType output outTestBool bool = parTestingParameter != null output outTestArray array = parTestingParameter != null ? parTestingParameter!.secureList : [] output outTestArrayV2 array = parTestingParameter!.secureList ?? [] output outTestString string = first(parTestingParameter.secureList)!.secureValue! @secure() type environmentVariableType = { secureList: { name: string secureValue: string? value: string? }[] }? ``` ## Pipeline Reference [![avm.res.managed-identity.user-assigned-identity](https://github.com/johnlokerse/bicep-registry-modules/actions/workflows/avm.res.managed-identity.user-assigned-identity.yml/badge.svg?branch=johnlokerse%2Fadd-udt-ds-uami)](https://github.com/johnlokerse/bicep-registry-modules/actions/workflows/avm.res.managed-identity.user-assigned-identity.yml) [![avm.res.resources.deployment-script](https://github.com/johnlokerse/bicep-registry-modules/actions/workflows/avm.res.resources.deployment-script.yml/badge.svg?branch=johnlokerse%2Fadd-udt-ds-uami)](https://github.com/johnlokerse/bicep-registry-modules/actions/workflows/avm.res.resources.deployment-script.yml) ## Type of Change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] Update to CI Environment or utlities (Non-module effecting changes) - [ ] Azure Verified Module updates: - [ ] Bugfix containing backwards compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description. - [ ] The bug was found by the module author, and no one has opened an issue to report it yet. - [x] 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`. - [x] Update to documentation ## Checklist - [x] I'm sure there are no other open Pull Requests for the same update/change - [x] I have run `Set-AVMModule` locally to generate the supporting module files. - [x] My corresponding pipelines / checks run clean and green without any errors or warnings
Description
This pull request introduces two user-defined types for the following modules:
.github/actions/templates/avm-validateModuleDeployment/action.yml
Extra context regarding
@secure()
decorator on user-defined type. When the Bicep template is built the type is referred as a secureString so the parameter inherits the secureString type and the parameter is secure during deployment:Also double checked if the outputs were working and tested it via this Bicep template:
Pipeline Reference
Type of Change
version.json
:version.json
.version.json
.Checklist
Set-AVMModule
locally to generate the supporting module files.