From ff088e3a20e308400b8bab5439581396e69a8931 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 6 Apr 2022 17:53:46 +0200 Subject: [PATCH] Added Resource Group output (#200) * Added outputs * Updated readme * Updated version --- infra-as-code/bicep/modules/resourceGroup/README.md | 2 ++ .../bicep/modules/resourceGroup/resourceGroup.bicep | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/infra-as-code/bicep/modules/resourceGroup/README.md b/infra-as-code/bicep/modules/resourceGroup/README.md index faa481922..fe208054d 100644 --- a/infra-as-code/bicep/modules/resourceGroup/README.md +++ b/infra-as-code/bicep/modules/resourceGroup/README.md @@ -23,6 +23,8 @@ The module will generate the following outputs: | Output | Type | Example | | ------ | ---- | ------- | +| outResourceGroupName | string | `Hub` | +| outResourceGroupId | string | `/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/Hub` | ## Deployment diff --git a/infra-as-code/bicep/modules/resourceGroup/resourceGroup.bicep b/infra-as-code/bicep/modules/resourceGroup/resourceGroup.bicep index ee6887c66..f63562796 100644 --- a/infra-as-code/bicep/modules/resourceGroup/resourceGroup.bicep +++ b/infra-as-code/bicep/modules/resourceGroup/resourceGroup.bicep @@ -3,8 +3,9 @@ SUMMARY: Module to deploy a resource group to the subscription specified. DESCRIPTION: The following components will be required parameters in this deployment parLocation parResourceGroupName -AUTHOR/S: aultt -VERSION: 1.0.0 +AUTHOR/S: aultt, johnlokerse +VERSION: 1.1.0 + - Added outputs for resource group name and resource group id */ targetScope = 'subscription' @@ -34,3 +35,6 @@ module modCustomerUsageAttribution '../../CRML/customerUsageAttribution/cuaIdSub name: 'pid-${varCuaid}-${uniqueString(subscription().subscriptionId, parResourceGroupName)}' params: {} } + +output outResourceGroupName string = resResourceGroup.name +output outResourceGroupId string = resResourceGroup.id