Skip to content

Add support for raw bicep strings #56322

@eerhardt

Description

@eerhardt

We'd like to be able to generate bicep that looks like this:

https://github.com/Azure/karpenter-provider-azure/blob/2eee84b6583ec486bf13ace5c4ba49cefec941b0/hack/infra/ksnap-acr.bicep#L19-L39

var purgeOldArtifacts = '''
version: v1.1.0
steps:
- cmd: acr purge --filter 'karpenter/snapshot/.*:.*' --ago 30d
  disableWorkingDirectoryOverride: true
  timeout: 3600
'''


@description('purge old artifacts from the registry periodically')
resource acrPurgeTask 'Microsoft.ContainerRegistry/registries/tasks@2019-06-01-preview' = {
  name: 'purge-old-artifacts'
  location: location
  parent: acr
  properties: {
    platform: {
      os: 'Linux'
      architecture: 'amd64'
    }
    step: {
      type: 'EncodedTask'
      encodedTaskContent: base64(purgeOldArtifacts)

In order to make the bicep readable. But Azure.Provisioning doesn't support having multi-line string variable like this.

cc @ArcturusZhang

Metadata

Metadata

Assignees

Labels

ClientThis issue is related to a non-management packageProvisioningfeature-requestThis issue requires a new behavior in the product in order be resolved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions