Skip to content

Support deployment with Bicep files - az bicep build does not output build warnings #17083

@StefanIvemo

Description

@StefanIvemo

Describe the bug

I've been testing the features implemented by #16857, and have noticed that az bicep build does not output any build warnings.

Command Name
az bicep build

Errors:
Running az bicep build successfully compiles the bicep file to an ARM template but it does not output any build warnings, only errors.

To Reproduce:

You have a bicep file using an API version where types are not available named nsg-1.bicep, this should generate a warning.

nsg-1.bicep

param name string
param securityRules array = []
param location string = resourceGroup().location

resource nsg  'Microsoft.Network/networkSecurityGroups@2020-08-01' = {
    name: name
    location: location
    properties: {
        securityRules: securityRules
    }    
}

output resourceId string = nsg.id
  • az bicep build -f .\nsg-1.bicep
    If I run az bicep build -f .\nsg-1.bicep the command will run without any warnings or errors.

  • bicep build .\ngs-1.bicep
    If perform a build using Bicep CLI it outputs build warnings.

image

Expected Behavior

I expect that az bicep build should output build warnings just like Bicep CLI.

Environment Summary

Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.19.1

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupService AttentionThis issue is responsible by Azure service team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions