Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
StefanIvemo opened this issue Feb 24, 2021 · 4 comments · Fixed by #17180
Closed
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Service Attention This issue is responsible by Azure service team.

Comments

@StefanIvemo
Copy link

StefanIvemo commented Feb 24, 2021

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

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 24, 2021
@yonzhan yonzhan added the ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group label Feb 24, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Feb 24, 2021
@yonzhan yonzhan added Service Attention This issue is responsible by Azure service team. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 24, 2021
@ghost
Copy link

ghost commented Feb 24, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.

Issue Details

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

Author: StefanIvemo
Assignees: -
Labels:

ARM, Service Attention

Milestone: -

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 24, 2021

bicep

@zhoxing-ms
Copy link
Contributor

@shenglol Could you please take a look at this issue~

@shenglol
Copy link
Contributor

Thanks for reporting this. Will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants