Skip to content

Commit

Permalink
fix: Add support for CI secret (#3507)
Browse files Browse the repository at this point in the history
## Description

Added CI secret and updated tests.

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.fabric.capacity](https://github.com/hundredacres/bicep-registry-modules/actions/workflows/avm.res.fabric.capacity.yml/badge.svg?branch=fix%2Fissues%2Ffabric_admin)](https://github.com/hundredacres/bicep-registry-modules/actions/workflows/avm.res.fabric.capacity.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [X] Update to CI Environment or utilities (Non-module affecting
changes)
- [ ] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [X] I'm sure there are no other open Pull Requests for the same
update/change
- [X] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [X] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

---------

Co-authored-by: Máté Barabás <[email protected]>
Co-authored-by: Rainer Halanek <[email protected]>
Co-authored-by: JFolberth <[email protected]>
  • Loading branch information
4 people authored Oct 14, 2024
1 parent 11fce93 commit cab8eda
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
16 changes: 8 additions & 8 deletions avm/res/fabric/capacity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module capacity 'br/public:avm/res/fabric/capacity:<version>' = {
params: {
// Required parameters
adminMembers: [
'[email protected]'
'<adminMembersSecret>'
]
name: 'fcmin001'
// Non-required parameters
Expand All @@ -66,7 +66,7 @@ module capacity 'br/public:avm/res/fabric/capacity:<version>' = {
// Required parameters
"adminMembers": {
"value": [
"[email protected]"
"<adminMembersSecret>"
]
},
"name": {
Expand All @@ -92,7 +92,7 @@ using 'br/public:avm/res/fabric/capacity:<version>'
// Required parameters
param adminMembers = [
'[email protected]'
'<adminMembersSecret>'
]
param name = 'fcmin001'
// Non-required parameters
Expand All @@ -117,7 +117,7 @@ module capacity 'br/public:avm/res/fabric/capacity:<version>' = {
params: {
// Required parameters
adminMembers: [
'[email protected]'
'<adminMembersSecret>'
]
name: 'fcwaf001'
// Non-required parameters
Expand All @@ -142,7 +142,7 @@ module capacity 'br/public:avm/res/fabric/capacity:<version>' = {
// Required parameters
"adminMembers": {
"value": [
"[email protected]"
"<adminMembersSecret>"
]
},
"name": {
Expand Down Expand Up @@ -171,7 +171,7 @@ using 'br/public:avm/res/fabric/capacity:<version>'
// Required parameters
param adminMembers = [
'[email protected]'
'<adminMembersSecret>'
]
param name = 'fcwaf001'
// Non-required parameters
Expand All @@ -196,7 +196,7 @@ param skuName = 'F64'
| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable/Disable usage telemetry for module. |
| [`location`](#parameter-location) | string | Location for all Resources. |
| [`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. |
Expand Down Expand Up @@ -225,7 +225,7 @@ Enable/Disable usage telemetry for module.

### Parameter: `location`

Location for all Resources.
Location for all resources.

- Required: No
- Type: string
Expand Down
2 changes: 1 addition & 1 deletion avm/res/fabric/capacity/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata owner = 'Azure/module-maintainers'
@description('Required. Name of the resource to create.')
param name string

@description('Optional. Location for all Resources.')
@description('Optional. Location for all resources.')
param location string = resourceGroup().location

@description('Optional. Tags of the resource.')
Expand Down
2 changes: 1 addition & 1 deletion avm/res/fabric/capacity/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Optional. Location for all Resources."
"description": "Optional. Location for all resources."
}
},
"tags": {
Expand Down
7 changes: 6 additions & 1 deletion avm/res/fabric/capacity/tests/e2e/defaults/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ 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. Email address used by resource. This value is tenant-specific and must be stored in the CI Key Vault in a secret named \'CI-adminMembersSecret\'.')
@secure()
param adminMembersSecret string = ''


// ============ //
// Dependencies //
// ============ //
Expand All @@ -44,7 +49,7 @@ module testDeployment '../../../main.bicep' = [
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
adminMembers: [
'[email protected]'
adminMembersSecret
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. Email address used by resource. This value is tenant-specific and must be stored in the CI Key Vault in a secret named \'CI-adminMembersSecret\'.')
@secure()
param adminMembersSecret string = ''

// ============ //
// Dependencies //
// ============ //
Expand All @@ -45,7 +49,7 @@ module testDeployment '../../../main.bicep' = [
location: resourceLocation
skuName: 'F64'
adminMembers: [
'[email protected]'
adminMembersSecret
]
}
}
Expand Down

0 comments on commit cab8eda

Please sign in to comment.