Skip to content

Prefix in Bicep starter module should have a different default value #126

Closed
@juyamagu

Description

@juyamagu

As the default value of Prefix in Bicep starter module (described in [User Guide] Starter Module Bicep Complete) is problematic, deploying starter modules with Bicep failed.

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce

Try to deploy a starter module with Bicep just by following the step 1 to 3, using the default setting (i.e. landing-zone for Prefix) showed in the doc and examples.

Context (Environment)

  • Operating System and version as reported by $PSVersionTable.OS: Microsoft Windows 10.0.22631
  • PowerShell versions as reported by $PSVersionTable.PSEdition: Core

Detailed Description

This parameter in Bicep starter module will eventually be passed into parTopLevelManagementGroupPrefix in managementGroupsScopeEscape.bicep, which requires its length to be up to 10. However, its current default value is landing-zone and doesn't comply with the limit, resulting in an error when deploying the starter module.

Here's an example in case of using GitHub Action, showing the action stuck in the step What If: Management Groups Deployment keep outputting the following error:

/actions-runner/_work/alz-mgmt/alz-mgmt/infra-as-code/bicep/CRML/customerUsageAttribution/cuaIdManagementGroup.bicep(1,1) : Info Bicep Linter Configuration: Custom bicepconfig.json file found (/actions-runner/_work/alz-mgmt/alz-mgmt/infra-as-code/bicep/bicepconfig.json).


Getting the latest status of all resources...
                                             
InvalidTemplate - Long running operation failed with status 'Failed'. Additional Info:'Deployment template validation failed: 'The provided value for the template parameter 'parTopLevelManagementGroupPrefix' is not valid. Length of the value should be less than or equal to '10'. Please see https://aka.ms/arm-syntax-parameters for usage details.'.'
Deployment failed with exception, this is likely an intermittent failure so entering retry loop...
Retrying deployment with attempt number 15 after 160 seconds...

Metadata

Metadata

Assignees

Labels

Area: Bicep Accelerator ⚡Issues / PR's related to Bicep AcceleratorbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions