Azure / Azure/bicep

Support for Double Quotes / Speech Marks

Open
#922 9 comments 1 reaction 0 assignees View on GitHub
Needs: Upvote
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

A common programming language tradition is to support both double quotes ```"``` and single quotes ```'``` for text input. While I appreciate there is a lot of strong feelings (and possibly some very good technical reasons) about the differences I believe that supporting both would enable greater familiarity for those who are used to using double quotes in other languages.

Ideally what I'd like to see is functional equivalence between double and single quotes for defining strings within bicep. This should then automatically resolve into the correct ARM Template formatting. For example, the following should produce identical json.

```
resource backupVault 'Microsoft.RecoveryServices/vaults@2020-07-01' = {
name: '${CompanyPrefix}-BackupVault'
location: resourceGroup().location
properties: {
}
sku: {
name: 'RS0'
tier: 'Standard'
}
}
```

```
resource backupVault "Microsoft.RecoveryServices/vaults@2020-07-01" = {
name: "${CompanyPrefix}-BackupVault"
location: resourceGroup().location
properties: {
}
sku: {
name: "RS0"
tier: "Standard"
}
}
```

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests; start by locating Bicep's string parsing entry point and the ARM template JSON emission path. Compare the single- and double-quoted examples, then verify that equivalent inputs produce identical JSON while preserving interpolation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.