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

New-AzDeployment -What-If returns JSON error with imported User Defined Types using Azure Pipelines #14006

Closed
russellds opened this issue May 3, 2024 · 2 comments
Labels
Needs: Author Feedback Awaiting feedback from the author of the issue Status: No Recent Activity

Comments

@russellds
Copy link

Bicep version

Bicep CLI version 0.26.170 (e9abaf1)

Describe the bug

When running New-AzDeployment -What-If with an imported User Defined Type I am getting the following Json error:

##[error]Additional content found in JSON reference object. A JSON reference object should only have a $ref property. Path 'naming.metadata'.

The weird thing is that this doesn't happen when I run it locally on my computer, only when I run it via Azure Pipelines. It doesn't matter if the Microsoft Hosted Agent is either Windows or Linux.

To Reproduce

Run New-AzDeployment -What-If from an Azure Pipeline with an imported User Defined Type.

Additional context

Here is my user defined type:

@export()
type namingType = {
  environment: string
  application: string
  applicationShort: string?
  component: string
  componentShort: string?
  location: string
}
@anthony-c-martin
Copy link
Member

I suspect this may be an issue that was already fixed - is it possible Azure DevOps is running with an older version of the Az powershell modules?

Here are some changes that may be related:
Azure/azure-powershell#24140
Azure/azure-powershell#24174
Azure/azure-powershell#24282

@stephaniezyen stephaniezyen added Needs: Author Feedback Awaiting feedback from the author of the issue and removed Needs: Triage 🔍 labels May 8, 2024
Copy link
Contributor

Hi @russellds, this issue has been marked as stale because it was labeled as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 3 days of this comment. Thanks for contributing to bicep! 😄 🦾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Awaiting feedback from the author of the issue Status: No Recent Activity
Projects
Status: Done
Development

No branches or pull requests

3 participants