From 8cc122d1e4d9ea1803754ef9aad6bfeb5771bd4a Mon Sep 17 00:00:00 2001 From: MrMCake Date: Wed, 18 May 2022 15:35:31 +0200 Subject: [PATCH] Updated tags output --- arm/Microsoft.Resources/tags/deploy.bicep | 3 +++ arm/Microsoft.Resources/tags/readme.md | 1 + arm/Microsoft.Resources/tags/resourceGroups/deploy.bicep | 4 ++-- arm/Microsoft.Resources/tags/resourceGroups/readme.md | 2 +- arm/Microsoft.Resources/tags/subscriptions/deploy.bicep | 3 +++ arm/Microsoft.Resources/tags/subscriptions/readme.md | 1 + 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/arm/Microsoft.Resources/tags/deploy.bicep b/arm/Microsoft.Resources/tags/deploy.bicep index 1990344ff7..8209f0c0df 100644 --- a/arm/Microsoft.Resources/tags/deploy.bicep +++ b/arm/Microsoft.Resources/tags/deploy.bicep @@ -56,3 +56,6 @@ output name string = (!empty(resourceGroupName) && !empty(subscriptionId)) ? tag @description('The applied tags.') output tags object = (!empty(resourceGroupName) && !empty(subscriptionId)) ? tags_rg.outputs.tags : tags_sub.outputs.tags + +@description('The resource ID of the applied tags.') +output resourceId string = (!empty(resourceGroupName) && !empty(subscriptionId)) ? tags_rg.outputs.resourceId : tags_sub.outputs.resourceId diff --git a/arm/Microsoft.Resources/tags/readme.md b/arm/Microsoft.Resources/tags/readme.md index bfb80ea2b1..a13fb65246 100644 --- a/arm/Microsoft.Resources/tags/readme.md +++ b/arm/Microsoft.Resources/tags/readme.md @@ -49,4 +49,5 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | | `name` | string | The name of the tags resource. | +| `resourceId` | string | The resource ID of the applied tags. | | `tags` | object | The applied tags. | diff --git a/arm/Microsoft.Resources/tags/resourceGroups/deploy.bicep b/arm/Microsoft.Resources/tags/resourceGroups/deploy.bicep index ae5646a219..d402bcfc15 100644 --- a/arm/Microsoft.Resources/tags/resourceGroups/deploy.bicep +++ b/arm/Microsoft.Resources/tags/resourceGroups/deploy.bicep @@ -38,8 +38,8 @@ resource tag 'Microsoft.Resources/tags@2019-10-01' = { @description('The name of the tags resource.') output name string = tag.name -@description('The resourceId of the resource group the tags were applied to.') -output resourceId string = resourceGroup().id +@description('The resource ID of the applied tags.') +output resourceId string = tag.id @description('The name of the resource group the tags were applied to.') output resourceGroupName string = resourceGroup().name diff --git a/arm/Microsoft.Resources/tags/resourceGroups/readme.md b/arm/Microsoft.Resources/tags/resourceGroups/readme.md index 603c87a484..637cebbce6 100644 --- a/arm/Microsoft.Resources/tags/resourceGroups/readme.md +++ b/arm/Microsoft.Resources/tags/resourceGroups/readme.md @@ -48,5 +48,5 @@ Tag names and tag values can be provided as needed. A tag can be left without a | :-- | :-- | :-- | | `name` | string | The name of the tags resource. | | `resourceGroupName` | string | The name of the resource group the tags were applied to. | -| `resourceId` | string | The resourceId of the resource group the tags were applied to. | +| `resourceId` | string | The resource ID of the applied tags. | | `tags` | object | The applied tags. | diff --git a/arm/Microsoft.Resources/tags/subscriptions/deploy.bicep b/arm/Microsoft.Resources/tags/subscriptions/deploy.bicep index 5f15ea1dd0..d72b0fbdf7 100644 --- a/arm/Microsoft.Resources/tags/subscriptions/deploy.bicep +++ b/arm/Microsoft.Resources/tags/subscriptions/deploy.bicep @@ -46,3 +46,6 @@ output name string = tag.name @description('The applied tags.') output tags object = newTags + +@description('The resource ID of the applied tags.') +output resourceId string = tag.id diff --git a/arm/Microsoft.Resources/tags/subscriptions/readme.md b/arm/Microsoft.Resources/tags/subscriptions/readme.md index cbd044f190..956a4185f9 100644 --- a/arm/Microsoft.Resources/tags/subscriptions/readme.md +++ b/arm/Microsoft.Resources/tags/subscriptions/readme.md @@ -48,4 +48,5 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | | `name` | string | The name of the tags resource. | +| `resourceId` | string | The resource ID of the applied tags. | | `tags` | object | The applied tags. |