external help file | Module Name | online version | schema |
---|---|---|---|
Bicep-help.xml |
Bicep |
2.0.0 |
Builds one or more .bicepparam files.
Build-BicepParam [[-Path] <String>] [[-OutputDirectory] <String>] [-ExcludeFile <String[]>] [-Compress]
[-WhatIf] [-Confirm] [<CommonParameters>]
Build-BicepParam [[-Path] <String>] [[-OutputPath] <String>] [-ExcludeFile <String[]>] [-Compress]
[-WhatIf] [-Confirm] [<CommonParameters>]
Build-BicepParam [[-Path] <String>] [-ExcludeFile <String[]>] [-AsHashtable]
[-WhatIf] [-Confirm] [<CommonParameters>]
Build-BicepParam [[-Path] <String>] [-ExcludeFile <String[]>] [-AsString]
[-WhatIf] [-Confirm] [<CommonParameters>]
Build-BicepParam is equivalent to the Bicep CLI command 'bicep build-params' but with some additional features.
- Compile all bicepparam files in a directory
- Output ARM Template parameters directly as string or hashtable without writing to file
Any error or warning from bicep will be written to the information stream. To save output in a variable, use stream redirection. See example below.
Build-BicepParam -Path vnet.bicep
Build-BicepParam -Path 'c:\bicep\modules\vnet.bicepparam' -OutputDirectory 'c:\armtemplates\vnet.parameters.json'
Build-BicepParam -Path 'c:\bicep\modules\'
Build-BicepParam -Path 'c:\bicep\modules\' -ExcludeFile vnet.bicepparam
Build-BicepParam -Path '.\vnet.bicep' -AsString
$ParameterObject = Build-BicepParam -Path '.\vnet.bicepparam' -AsHashtable
New-AzResourceGroupDeployment -ResourceGroupName vnet-rg -TemplateObject $Template -TemplateParameterObject $ParameterObject
Build-BicepParam -Path 'c:\bicep\modules\vnet.bicepparam' -OutputPath 'c:\armtemplates\newvnet.parameters.json'
Build-BicepParam -Path '.\main.bicep' -Compress
The -AsHashtable prints all output as a hashtable instead of corresponding files.
Type: SwitchParameter
Parameter Sets: AsHashtable
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The -AsString prints all output as a string instead of corresponding files.
Type: SwitchParameter
Parameter Sets: AsString
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Compress the built ARM Template to reduce file size
Type: SwitchParameter
Parameter Sets: Default, OutputPath
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a .bicepparam file to exclude from compilation
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the target directory where the compiled files should be created
Type: String
Parameter Sets: Default
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the filename of the compiled file.
Type: String
Parameter Sets: OutputPath
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specfies the path to the directory or file that should be compiled
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.