From f8115c53966d2812a26a403c5f0da53669c6de1e Mon Sep 17 00:00:00 2001 From: Don Heerschap Date: Fri, 11 Oct 2024 21:55:37 +0200 Subject: [PATCH 1/5] admin members optional --- avm/res/fabric/capacity/main.bicep | 2 +- avm/res/fabric/capacity/tests/e2e/defaults/main.test.bicep | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/avm/res/fabric/capacity/main.bicep b/avm/res/fabric/capacity/main.bicep index 3e855ad580..c20051c179 100644 --- a/avm/res/fabric/capacity/main.bicep +++ b/avm/res/fabric/capacity/main.bicep @@ -32,7 +32,7 @@ param skuName string = 'F2' param skuTier string = 'Fabric' @description('Required. List of admin members. Format: ["something@domain.com"].') -param adminMembers array +param adminMembers array = [] @description('Optional. Enable/Disable usage telemetry for module.') param enableTelemetry bool = true diff --git a/avm/res/fabric/capacity/tests/e2e/defaults/main.test.bicep b/avm/res/fabric/capacity/tests/e2e/defaults/main.test.bicep index a0057419f4..c7a258f084 100644 --- a/avm/res/fabric/capacity/tests/e2e/defaults/main.test.bicep +++ b/avm/res/fabric/capacity/tests/e2e/defaults/main.test.bicep @@ -43,9 +43,6 @@ module testDeployment '../../../main.bicep' = [ params: { name: '${namePrefix}${serviceShort}001' location: resourceLocation - adminMembers: [ - 'mattschmitt@microsoft.com' - ] } } ] From 58503332c9c5feb678441cb555576438222e98c0 Mon Sep 17 00:00:00 2001 From: Don Heerschap Date: Fri, 11 Oct 2024 22:00:07 +0200 Subject: [PATCH 2/5] set-avmmodule --- avm/res/fabric/capacity/README.md | 44 ++++++++++++------------------ avm/res/fabric/capacity/main.bicep | 2 +- avm/res/fabric/capacity/main.json | 7 +++-- 3 files changed, 22 insertions(+), 31 deletions(-) diff --git a/avm/res/fabric/capacity/README.md b/avm/res/fabric/capacity/README.md index 8cec8824cb..d2a6813170 100644 --- a/avm/res/fabric/capacity/README.md +++ b/avm/res/fabric/capacity/README.md @@ -41,9 +41,6 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { name: 'capacityDeployment' params: { // Required parameters - adminMembers: [ - 'mattschmitt@microsoft.com' - ] name: 'fcmin001' // Non-required parameters location: '' @@ -64,11 +61,6 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { "contentVersion": "1.0.0.0", "parameters": { // Required parameters - "adminMembers": { - "value": [ - "mattschmitt@microsoft.com" - ] - }, "name": { "value": "fcmin001" }, @@ -91,9 +83,6 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { using 'br/public:avm/res/fabric/capacity:' // Required parameters -param adminMembers = [ - 'mattschmitt@microsoft.com' -] param name = 'fcmin001' // Non-required parameters param location = '' @@ -116,11 +105,11 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { name: 'capacityDeployment' params: { // Required parameters + name: 'fcwaf001' + // Non-required parameters adminMembers: [ 'mattschmitt@microsoft.com' ] - name: 'fcwaf001' - // Non-required parameters location: '' skuName: 'F64' } @@ -140,15 +129,15 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { "contentVersion": "1.0.0.0", "parameters": { // Required parameters + "name": { + "value": "fcwaf001" + }, + // Non-required parameters "adminMembers": { "value": [ "mattschmitt@microsoft.com" ] }, - "name": { - "value": "fcwaf001" - }, - // Non-required parameters "location": { "value": "" }, @@ -170,11 +159,11 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { using 'br/public:avm/res/fabric/capacity:' // Required parameters +param name = 'fcwaf001' +// Non-required parameters param adminMembers = [ 'mattschmitt@microsoft.com' ] -param name = 'fcwaf001' -// Non-required parameters param location = '' param skuName = 'F64' ``` @@ -188,26 +177,19 @@ param skuName = 'F64' | Parameter | Type | Description | | :-- | :-- | :-- | -| [`adminMembers`](#parameter-adminmembers) | array | List of admin members. Format: ["something@domain.com"]. | | [`name`](#parameter-name) | string | Name of the resource to create. | **Optional parameters** | Parameter | Type | Description | | :-- | :-- | :-- | +| [`adminMembers`](#parameter-adminmembers) | array | List of admin members. Format: ["something@domain.com"]. | | [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable/Disable usage telemetry for module. | | [`location`](#parameter-location) | string | Location for all Resources. | | [`skuName`](#parameter-skuname) | string | SKU tier of the Fabric resource. | | [`skuTier`](#parameter-skutier) | string | SKU name of the Fabric resource. | | [`tags`](#parameter-tags) | object | Tags of the resource. | -### Parameter: `adminMembers` - -List of admin members. Format: ["something@domain.com"]. - -- Required: Yes -- Type: array - ### Parameter: `name` Name of the resource to create. @@ -215,6 +197,14 @@ Name of the resource to create. - Required: Yes - Type: string +### Parameter: `adminMembers` + +List of admin members. Format: ["something@domain.com"]. + +- Required: No +- Type: array +- Default: `[]` + ### Parameter: `enableTelemetry` Enable/Disable usage telemetry for module. diff --git a/avm/res/fabric/capacity/main.bicep b/avm/res/fabric/capacity/main.bicep index c20051c179..8272d7e7bf 100644 --- a/avm/res/fabric/capacity/main.bicep +++ b/avm/res/fabric/capacity/main.bicep @@ -31,7 +31,7 @@ param skuName string = 'F2' @description('Optional. SKU name of the Fabric resource.') param skuTier string = 'Fabric' -@description('Required. List of admin members. Format: ["something@domain.com"].') +@description('Optional. List of admin members. Format: ["something@domain.com"].') param adminMembers array = [] @description('Optional. Enable/Disable usage telemetry for module.') diff --git a/avm/res/fabric/capacity/main.json b/avm/res/fabric/capacity/main.json index c6d0daee58..a0e013615e 100644 --- a/avm/res/fabric/capacity/main.json +++ b/avm/res/fabric/capacity/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.3.12046", - "templateHash": "11718641793898572278" + "version": "0.28.1.47646", + "templateHash": "5720576912207868580" }, "name": "Fabric Capacities", "description": "This module deploys Fabric capacities, which provide the compute resources for all the experiences in Fabric.", @@ -65,8 +65,9 @@ }, "adminMembers": { "type": "array", + "defaultValue": [], "metadata": { - "description": "Required. List of admin members. Format: [\"something@domain.com\"]." + "description": "Optional. List of admin members. Format: [\"something@domain.com\"]." } }, "enableTelemetry": { From fe4f1caf88f918193d3ff0acb1b70349c0b20954 Mon Sep 17 00:00:00 2001 From: Don Heerschap Date: Fri, 11 Oct 2024 22:38:22 +0200 Subject: [PATCH 3/5] optional adminmembers and CI specific config --- .../fabric/capacity/tests/e2e/waf-aligned/main.test.bicep | 6 +++++- avm/res/fabric/capacity/version.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/avm/res/fabric/capacity/tests/e2e/waf-aligned/main.test.bicep b/avm/res/fabric/capacity/tests/e2e/waf-aligned/main.test.bicep index 903ccd6b35..f9f35e27d3 100644 --- a/avm/res/fabric/capacity/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/fabric/capacity/tests/e2e/waf-aligned/main.test.bicep @@ -20,6 +20,10 @@ param serviceShort string = 'fcwaf' @description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.') param namePrefix string = '#_namePrefix_#' +@description('Required. The admin e-mail for the fabric capacity. This value is tenant-specific and must be stored in the CI Key Vault in a secret named \'CI-adminEmail\'.') +@secure() +param adminEmail string = '' + // ============ // // Dependencies // // ============ // @@ -45,7 +49,7 @@ module testDeployment '../../../main.bicep' = [ location: resourceLocation skuName: 'F64' adminMembers: [ - 'mattschmitt@microsoft.com' + adminEmail ] } } diff --git a/avm/res/fabric/capacity/version.json b/avm/res/fabric/capacity/version.json index 8def869ede..1c884ecaa9 100644 --- a/avm/res/fabric/capacity/version.json +++ b/avm/res/fabric/capacity/version.json @@ -4,4 +4,4 @@ "pathFilters": [ "./main.json" ] -} +} \ No newline at end of file From eb1ef8b126c43c840ce6a6c2448d0ded7401520f Mon Sep 17 00:00:00 2001 From: Don Heerschap Date: Fri, 11 Oct 2024 22:44:04 +0200 Subject: [PATCH 4/5] set-avmmodule --- avm/res/fabric/capacity/README.md | 6 +++--- avm/res/fabric/capacity/version.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/avm/res/fabric/capacity/README.md b/avm/res/fabric/capacity/README.md index d2a6813170..ffef5b288c 100644 --- a/avm/res/fabric/capacity/README.md +++ b/avm/res/fabric/capacity/README.md @@ -108,7 +108,7 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { name: 'fcwaf001' // Non-required parameters adminMembers: [ - 'mattschmitt@microsoft.com' + '' ] location: '' skuName: 'F64' @@ -135,7 +135,7 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { // Non-required parameters "adminMembers": { "value": [ - "mattschmitt@microsoft.com" + "" ] }, "location": { @@ -162,7 +162,7 @@ using 'br/public:avm/res/fabric/capacity:' param name = 'fcwaf001' // Non-required parameters param adminMembers = [ - 'mattschmitt@microsoft.com' + '' ] param location = '' param skuName = 'F64' diff --git a/avm/res/fabric/capacity/version.json b/avm/res/fabric/capacity/version.json index 1c884ecaa9..729ac87673 100644 --- a/avm/res/fabric/capacity/version.json +++ b/avm/res/fabric/capacity/version.json @@ -1,6 +1,6 @@ { "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.1", + "version": "0.2", "pathFilters": [ "./main.json" ] From acc8d8bbc55d56e62b4b21adf423a302e211adb5 Mon Sep 17 00:00:00 2001 From: Don Heerschap Date: Fri, 11 Oct 2024 23:03:52 +0200 Subject: [PATCH 5/5] finishing up --- avm/res/fabric/capacity/README.md | 55 ++++++++++++------- avm/res/fabric/capacity/main.bicep | 4 +- avm/res/fabric/capacity/main.json | 5 +- .../tests/e2e/defaults/main.test.bicep | 7 +++ .../tests/e2e/waf-aligned/main.test.bicep | 6 +- 5 files changed, 49 insertions(+), 28 deletions(-) diff --git a/avm/res/fabric/capacity/README.md b/avm/res/fabric/capacity/README.md index ffef5b288c..fe004ee863 100644 --- a/avm/res/fabric/capacity/README.md +++ b/avm/res/fabric/capacity/README.md @@ -41,6 +41,9 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { name: 'capacityDeployment' params: { // Required parameters + adminMembers: [ + '' + ] name: 'fcmin001' // Non-required parameters location: '' @@ -61,6 +64,11 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { "contentVersion": "1.0.0.0", "parameters": { // Required parameters + "adminMembers": { + "value": [ + "" + ] + }, "name": { "value": "fcmin001" }, @@ -83,6 +91,9 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { using 'br/public:avm/res/fabric/capacity:' // Required parameters +param adminMembers = [ + '' +] param name = 'fcmin001' // Non-required parameters param location = '' @@ -105,11 +116,11 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { name: 'capacityDeployment' params: { // Required parameters - name: 'fcwaf001' - // Non-required parameters adminMembers: [ - '' + '' ] + name: 'fcwaf001' + // Non-required parameters location: '' skuName: 'F64' } @@ -129,15 +140,15 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { "contentVersion": "1.0.0.0", "parameters": { // Required parameters - "name": { - "value": "fcwaf001" - }, - // Non-required parameters "adminMembers": { "value": [ - "" + "" ] }, + "name": { + "value": "fcwaf001" + }, + // Non-required parameters "location": { "value": "" }, @@ -159,11 +170,11 @@ module capacity 'br/public:avm/res/fabric/capacity:' = { using 'br/public:avm/res/fabric/capacity:' // Required parameters -param name = 'fcwaf001' -// Non-required parameters param adminMembers = [ - '' + '' ] +param name = 'fcwaf001' +// Non-required parameters param location = '' param skuName = 'F64' ``` @@ -183,13 +194,18 @@ param skuName = 'F64' | Parameter | Type | Description | | :-- | :-- | :-- | -| [`adminMembers`](#parameter-adminmembers) | array | List of admin members. Format: ["something@domain.com"]. | | [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable/Disable usage telemetry for module. | | [`location`](#parameter-location) | string | Location for all Resources. | | [`skuName`](#parameter-skuname) | string | SKU tier of the Fabric resource. | | [`skuTier`](#parameter-skutier) | string | SKU name of the Fabric resource. | | [`tags`](#parameter-tags) | object | Tags of the resource. | +**Rquired parameters** + +| Parameter | Type | Description | +| :-- | :-- | :-- | +| [`adminMembers`](#parameter-adminmembers) | array | List of admin members. Format: ["something@domain.com"]. | + ### Parameter: `name` Name of the resource to create. @@ -197,14 +213,6 @@ Name of the resource to create. - Required: Yes - Type: string -### Parameter: `adminMembers` - -List of admin members. Format: ["something@domain.com"]. - -- Required: No -- Type: array -- Default: `[]` - ### Parameter: `enableTelemetry` Enable/Disable usage telemetry for module. @@ -266,6 +274,13 @@ Tags of the resource. - Required: No - Type: object +### Parameter: `adminMembers` + +List of admin members. Format: ["something@domain.com"]. + +- Required: Yes +- Type: array + ## Outputs | Output | Type | Description | diff --git a/avm/res/fabric/capacity/main.bicep b/avm/res/fabric/capacity/main.bicep index 8272d7e7bf..b3b275e374 100644 --- a/avm/res/fabric/capacity/main.bicep +++ b/avm/res/fabric/capacity/main.bicep @@ -31,8 +31,8 @@ param skuName string = 'F2' @description('Optional. SKU name of the Fabric resource.') param skuTier string = 'Fabric' -@description('Optional. List of admin members. Format: ["something@domain.com"].') -param adminMembers array = [] +@description('Rquired. List of admin members. Format: ["something@domain.com"].') +param adminMembers array @description('Optional. Enable/Disable usage telemetry for module.') param enableTelemetry bool = true diff --git a/avm/res/fabric/capacity/main.json b/avm/res/fabric/capacity/main.json index a0e013615e..9f51831ded 100644 --- a/avm/res/fabric/capacity/main.json +++ b/avm/res/fabric/capacity/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.28.1.47646", - "templateHash": "5720576912207868580" + "templateHash": "14524923207315988774" }, "name": "Fabric Capacities", "description": "This module deploys Fabric capacities, which provide the compute resources for all the experiences in Fabric.", @@ -65,9 +65,8 @@ }, "adminMembers": { "type": "array", - "defaultValue": [], "metadata": { - "description": "Optional. List of admin members. Format: [\"something@domain.com\"]." + "description": "Rquired. List of admin members. Format: [\"something@domain.com\"]." } }, "enableTelemetry": { diff --git a/avm/res/fabric/capacity/tests/e2e/defaults/main.test.bicep b/avm/res/fabric/capacity/tests/e2e/defaults/main.test.bicep index c7a258f084..48768e3cba 100644 --- a/avm/res/fabric/capacity/tests/e2e/defaults/main.test.bicep +++ b/avm/res/fabric/capacity/tests/e2e/defaults/main.test.bicep @@ -20,6 +20,10 @@ param serviceShort string = 'fcmin' @description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.') param namePrefix string = '#_namePrefix_#' +@description('Required. The admin e-mail for the fabric capacity. This value is tenant-specific and must be stored in the CI Key Vault in a secret named \'CI-fabricCapacityAdminEmail\'.') +@secure() +param fabricCapacityAdminEmail string = '' + // ============ // // Dependencies // // ============ // @@ -43,6 +47,9 @@ module testDeployment '../../../main.bicep' = [ params: { name: '${namePrefix}${serviceShort}001' location: resourceLocation + adminMembers: [ + fabricCapacityAdminEmail + ] } } ] diff --git a/avm/res/fabric/capacity/tests/e2e/waf-aligned/main.test.bicep b/avm/res/fabric/capacity/tests/e2e/waf-aligned/main.test.bicep index f9f35e27d3..cb64a6e15d 100644 --- a/avm/res/fabric/capacity/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/fabric/capacity/tests/e2e/waf-aligned/main.test.bicep @@ -20,9 +20,9 @@ param serviceShort string = 'fcwaf' @description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.') param namePrefix string = '#_namePrefix_#' -@description('Required. The admin e-mail for the fabric capacity. This value is tenant-specific and must be stored in the CI Key Vault in a secret named \'CI-adminEmail\'.') +@description('Required. The admin e-mail for the fabric capacity. This value is tenant-specific and must be stored in the CI Key Vault in a secret named \'CI-fabricCapacityAdminEmail\'.') @secure() -param adminEmail string = '' +param fabricCapacityAdminEmail string = '' // ============ // // Dependencies // @@ -49,7 +49,7 @@ module testDeployment '../../../main.bicep' = [ location: resourceLocation skuName: 'F64' adminMembers: [ - adminEmail + fabricCapacityAdminEmail ] } }