Skip to content
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: Add key uri outputs to keyvault key submodule - avm/res/key-vault/vault #3246

Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions avm/res/key-vault/vault/key/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ Resource tags.

| Output | Type | Description |
| :-- | :-- | :-- |
| `keyUriWithVersion` | string | The uri with version of the key. |
| `keyUri` | string | The uri of the key. |
| `name` | string | The name of the key. |
| `resourceGroupName` | string | The name of the resource group the key was created in. |
| `resourceId` | string | The resource ID of the key. |
6 changes: 6 additions & 0 deletions avm/res/key-vault/vault/key/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ resource key_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01
}
]

@description('The uri of the key.')
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @fblix sorry to chime in on one point, then I'll leave the PR review to you.

@Gosselin-l please also update the minor version in the version.json file, since a new output is added functionality for the module. Thanks!

output keyUri string = key.properties.keyUri

@description('The uri with version of the key.')
output keyUriWithVersion string = key.properties.keyUriWithVersion

@description('The name of the key.')
output name string = key.name

Expand Down
16 changes: 15 additions & 1 deletion avm/res/key-vault/vault/key/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "14269695922191217406"
"templateHash": "11345639823061254967"
},
"name": "Key Vault Keys",
"description": "This module deploys a Key Vault Key.",
Expand Down Expand Up @@ -273,6 +273,20 @@
}
},
"outputs": {
"keyUri": {
"type": "string",
"metadata": {
"description": "The uri of the key."
},
"value": "[reference('key').keyUri]"
},
"keyUriWithVersion": {
"type": "string",
"metadata": {
"description": "The uri with version of the key."
},
"value": "[reference('key').keyUriWithVersion]"
},
"name": {
"type": "string",
"metadata": {
Expand Down