Can using 'br:…' reference a published targetScope = 'local' artifact for bicep local-deploy? #19559
-
|
I'm trying to use bicep local-deploy against a .bicepparam file whose using clause points at a Bicep artifact published to ACR with targetScope = 'local'. It fails with The referenced .bicep file must have targetScope set to 'local'. I'd like to confirm whether this pattern is supported, or whether the supported pattern is to use a local wrapper .bicep (with targetScope = 'local') that consumes the published artifact via module 'br:…'. Bicep CLI version: 0.42.1.51946 (per the embedded _generator metadata in the published artifact) I recieve the following error: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Based on the current local-deploy code and tests, the safe supported shape looks like: local
So for your case, I would treat the local wrapper pattern as the supported one today: keep a local |
Beta Was this translation helpful? Give feedback.
Based on the current local-deploy code and tests, the safe supported shape looks like: local
.bicepparam-> local entrypoint.bicepwithtargetScope = 'local', and then that entrypoint can consume modules/extensions.LocalDeployCommand.csloads the semantic model from the.bicepparamusingtarget and rejects the run unless that directly referenced.bicephastargetScope == local. The local-deploy docs and integration tests I found are all in that form (main.bicepparamusingmain.bicep).So for your case, I would treat the local wrapper pattern as the supported one today: keep a local
targetScope = 'local'entrypoint.bicep, and have that file reference the published artifact/module. I don…