Skip to content

Commit

Permalink
- shorten bicepparam names
Browse files Browse the repository at this point in the history
- still testing bicepparam features
  • Loading branch information
brwilkinson committed Jul 21, 2023
1 parent f520823 commit ba3d96e
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .ado/ado-pipelines-STAGETEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ jobs:
# pwsh: true

- task: AzurePowerShell@5
displayName: Test Bicep in PowerShell + Azure Context
inputs:
${{ if and(eq(parameters.STAGE, '00-ALL-SUB'), eq(parameters.UAI, 1)) }}:
azureSubscription: ${{ parameters.SPG0 }}-G0_UAI
Expand All @@ -138,6 +139,7 @@ jobs:
azureSubscription: ${{ parameters.SP }}-${{ parameters.ENV }}
ScriptType: InlineScript
FailOnStandardError: true

azurePowerShellVersion: "LatestVersion"
Inline: |
Get-AzContext
Expand Down
3 changes: 3 additions & 0 deletions ADF/1-prereqs/07-ListAPIVersions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ $ResourceTypeName = 'VirtualMachines'
$ResourceTypeName = 'storageAccounts'
$ResourceTypeName = 'machines'
$ResourceTypeName = 'service'

$ProviderNamespace = 'Microsoft.Compute'
$ResourceTypeName = 'diskEncryptionSets'
((Get-AzResourceProvider -ProviderNamespace $ProviderNamespace).ResourceTypes | Where-Object ResourceTypeName -eq $ResourceTypeName).ApiVersions

<#
Expand Down
4 changes: 2 additions & 2 deletions ADF/bicep/bicepconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"experimentalFeaturesEnabled": {
// "paramsFiles": false,
// "paramsFiles": false, // now GA
// "extensibility": true,
// "resourceTypedParamsAndOutputs": false,
// "userDefinedTypes": false
// "userDefinedTypes": false,
// "symbolicNameCodegen": true
},
"analyzers": {
Expand Down
4 changes: 2 additions & 2 deletions ADF/release-az/Start-AzDeploy.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ Function global:Start-AzDeploy
$OptionalParameters['Environment'] = $Deployment.substring(0, 1)
$OptionalParameters['DeploymentID'] = $Deployment.substring(1)

$BaseParam = "$Artifacts/tenants/$App/$Prefix.$Deployment.parameters"
$TemplateParametersFile = (Test-Path -Path "${BaseParam}.bicepparam") ? "${BaseParam}.bicepparam" : "${BaseParam}.json"
$BaseParam = "$Artifacts/tenants/$App/$Prefix.$Deployment"
$TemplateParametersFile = (Test-Path -Path "${BaseParam}.bicepparam") ? "${BaseParam}.bicepparam" : "${BaseParam}.parameters.json"
Write-Warning -Message "Using parameter file: [$TemplateParametersFile]"
$TemplateArgs.Add('TemplateParameterFile', $TemplateParametersFile)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using '../../bicep/00-ALL-SUB.bicep'

param Global = {}
param Global = union(
loadJsonContent('Global-${Prefix}.json'),
loadJsonContent('Global-Global.json'),
loadJsonContent('Global-Config.json')
)

param Prefix = 'AWU3'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using '../../bicep/00-ALL-SUB.bicep'

param Global = {}
param Global = union(
loadJsonContent('Global-${Prefix}.json'),
loadJsonContent('Global-Global.json'),
loadJsonContent('Global-Config.json')
)

param Prefix = 'AWU3'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
using '../../bicep/00-ALL-MG.bicep'

param Global = {}
param Global = union(
loadJsonContent('Global-${Prefix}.json'),
loadJsonContent('Global-Global.json'),
loadJsonContent('Global-Config.json')
)

param Prefix = 'ACU1'
param Prefix = 'AWU3'

param Environment = 'M'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using '../../bicep/00-ALL-SUB.bicep'

param Global = {}
param Global = union(
loadJsonContent('Global-${Prefix}.json'),
loadJsonContent('Global-Global.json'),
loadJsonContent('Global-Config.json')
)

param Prefix = 'AWU3'

Expand Down

0 comments on commit ba3d96e

Please sign in to comment.