-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added user defined type for Key Vault Access Policies (#622)
## Description This pull request introduces the type `accessPoliciesType` so the author experience is enhanced when using this parameter to set access policies. I have added the `accessPoliciesType` to `key-vault/vault/main.bicep` and `key-vault/vault/access-policy`. Besides the addition of the type I have removed `formattedAccessPolicies` because the user-defined type has taken over the task to enforce required properties. This makes it simpler for the user to read and use the key vault main.bicep. I have tested the modules by deploying to my Azure environment: 1. **With** access policies configured in bicepparam: ```bicepparam using './main.bicep' param name = 'br-kv-john-test-no-ap' param enableRbacAuthorization = false param accessPolicies = [ { objectId: '<object-id-here>' permissions: { certificates: [ 'all' ] keys: [ 'all' ] secrets: [ 'all' ] storage: [ 'all' ] } tenantId: '<tenant-id-here>' } ] ``` **Succesful deployment** <img width="1772" alt="image" src="https://github.com/Azure/bicep-registry-modules/assets/3514513/ec7d782c-3310-42b7-bb77-f99dac993d90"> 2. **Without** access policies configured in bicepparam to showcase it is optional: ```bicepparam using './main.bicep' param name = 'br-kv-john-test-no-ap' ``` **Succesful deployment** <img width="1447" alt="image" src="https://github.com/Azure/bicep-registry-modules/assets/3514513/d1a605e2-bf8d-4d2a-9da6-aa532be71ce1"> ## Updating an existing module - [ ] I have run `brm validate` locally to verify the module files. - [x] I have run deployment tests locally to ensure the module is deployable. - [x] I have read the [Updating an existing module](https://github.com/Azure/bicep-registry-modules/blob/main/CONTRIBUTING.md#updating-an-existing-module) section in the contributing guide and updated the `version.json` file properly: - [ ] The PR contains backwards compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`. - [x] The PR contains backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] The PR contains breaking changes, and I have bumped the MAJOR version in `version.json`. - [ ] I have updated the examples in README with the latest module version number.
- Loading branch information
1 parent
68f7e41
commit 0e61a5c
Showing
10 changed files
with
640 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.