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

[AzureResourceManagerTemplateDeployment@3] - support bicep deployment #15337

Closed
ozbillwang opened this issue Sep 26, 2021 · 19 comments
Closed

[AzureResourceManagerTemplateDeployment@3] - support bicep deployment #15337

ozbillwang opened this issue Sep 26, 2021 · 19 comments

Comments

@ozbillwang
Copy link

ozbillwang commented Sep 26, 2021

Note

Azure Bicep can be deployed via az deployment group create -f ./main.bicep -g my-rg now.

Required Information

When feed bicep files, the task marks it invalid

Question, Bug, or Feature?

Feature

Enter Task Name: here

  • AzureResourceManagerTemplateDeployment@3

Environment

az version{
  "azure-cli": "2.27.1",
  "azure-cli-core": "2.27.1",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
  }
}

Issue Description

[error]Error: Ensure the Template file ( '/agent/_work/1/s/vm/main.bicep' ) is valid. Task failed while parsing with following error: Unexpected token p in JSON at position 0

@anthony-c-martin
Copy link
Member

Looks like we'll need to:

Happy to help with questions or to review a change if someone else feels like attempting it. Otherwise, I'll try to implement this myself if I get some free time.

@anthony-c-martin
Copy link
Member

Looks like we'll need to:

@bishal-pdMSFT - would you be willing to accept a contribution following this design? Is there anything missing/needing to be changed?

@johndowns
Copy link
Contributor

This would be extremely helpful. @bishal-pdMSFT Any update on whether this might be accepted?

@bishal-pdMSFT
Copy link
Contributor

Adding @NAGA-BANDI and @v-abajaj who own the ARM deploy task now

@marvinbuss
Copy link

Agreed. The GH Action also supports this and it would be great to get a consistent experience in ADO and GH.

@johndowns
Copy link
Contributor

@NAGA-BANDI and @v-abajaj - any thoughts on @anthony-c-martin's proposal?

@johndowns
Copy link
Contributor

@bishal-pdMSFT @NAGA-BANDI and @v-abajaj are you able to look at this please?

@t-dedah
Copy link
Contributor

t-dedah commented Jan 17, 2022

@marvinbuss @johndowns Raised a PR for mitigation. #15788

For first iteration, we are only supporting bicep if azure cli installed >= 2.20.0. we are still looking into installation script for bicep cli.

Also we are only adding this support for "Linked Artifact" case as for the other case url for the template and parameters are directly passed to armclient. We will need to see if support for bicep can be added directly to armclient for second case as downloading the file and then converting it to json and then treating it as "Linked Artifact" case doesnt seem efficient.

Please review the PR and let us know if anything else is needed.

@johndowns
Copy link
Contributor

Thanks @t-dedah. Great to see this progressing!

@anthony-c-martin is probably best to review this from a code perspective. I've made a few minor suggestions around wording of messages and Markdown files.

cc @alex-frankel

@marvinbuss
Copy link

marvinbuss commented Feb 2, 2022

@t-dedah I think this can be closed, since #15788 was merged?
Thanks for fixing this!

@anthony-c-martin
Copy link
Member

@t-dedah thanks for adding this feature! Would you mind confirming when the next release will occur so that customers can start using this functionality?

@marvinbuss
Copy link

I also just tried to test this feature and I can confirm that the feature was not released yet.

@alex-frankel
Copy link
Member

@mumian -- can we keep an eye on this thread? Once this change is released, we will need to update our DevOps CI/CD quickstart

@mumian
Copy link

mumian commented Feb 2, 2022

@alex-frankel - I have created a content task to track the issue.

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

@github-actions github-actions bot added the stale label Aug 1, 2022
@johndowns
Copy link
Contributor

@mumian This change seems to have been released.

@mumian
Copy link

mumian commented Aug 1, 2022

@johndowns - I will take a look this week.

@github-actions github-actions bot removed the stale label Aug 1, 2022
@mumian
Copy link

mumian commented Aug 5, 2022

@johnnyreilly
Copy link

Probably should be a separate issue, but I think that the bicep deployment doesn't support authenticating for private Bicep registries. We see:

/home/vsts/work/1/s/infra/database/cosmos.bicep(57,17) : Error BCP192: Unable to restore the module with reference "br:icebox.azurecr.io/bicep/ice/providers/document-db/database-accounts:v1.3": Service request failed.
Status: 401 (Unauthorized)

Content:
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, visit https://aka.ms/acr/authorization for more information."}]}

Headers:
Server: openresty
Date: Fri, 02 Jun 2023 13:11:24 GMT
Connection: keep-alive
X-Ms-Correlation-Request-Id: b1ac068c-f69d-4495-90c3-302ff1c93ff6
x-ms-ratelimit-remaining-calls-per-second: 333.066667
Strict-Transport-Security: REDACTED
Content-Type: text/plain; charset=utf-8
Content-Length: 134

/home/vsts/work/1/s/infra/database/cosmos.bicep(72,25) : Error BCP192: Unable to restore the module with reference "br:icebox.azurecr.io/bicep/ice/providers/document-db/sql-databases:v1.2": Service request failed.
Status: 401 (Unauthorized)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants