Azure / Azure/bicep

Multipule parameters per annotation

Open
#4,184 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

I'm always frustrated when...
...my parameters take up 3/4ths of my file length.

**Describe the solution you'd like**
Having lists of allowed values quickly increases line count. Other annotations, like "@secure()" result in +3 lines to a param. If single annotations could be stacked, there would be a great improvement in readability.

Before
```
@secure()
param _artifactsLocationSasToken string = ''

@secure()
param servicePrincipalClientID string = ''

@secure()
param servicePrincipalSecret string = ''
```
After
```
@secure()
param _artifactsLocationSasToken string = ''
param servicePrincipalClientID string = ''
param servicePrincipalSecret string = ''

```

Before
```
@allowed([
'S1'
'S2'
'S3'
'P1'
'P2'
'P3'
'P1V2'
'P2V2'
'P3V2'
])
param nonAISkillSku string = 'P3V2'

@allowed([
'S1'
'S2'
'S3'
'P1'
'P2'
'P3'
'P1V2'
'P2V2'
'P3V2'
])
param AISkillSku string = 'P3V2'

@allowed([
'S1'
'S2'
'S3'
'P1'
'P2'
'P3'
'P1V2'
'P2V2'
'P3V2'
])
param APIServerSku string = 'P3V2'
```

After

```
@allowed([
'S1'
'S2'
'S3'
'P1'
'P2'
'P3'
'P1V2'
'P2V2'
'P3V2'
])
param nonAISkillSku string = 'P3V2'
param AISkillSku string = 'P3V2'
param APIServerSku string = 'P3V2'
```

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how Bicep handles @secure and @allowed annotations alongside parameter declarations. Clarify the syntax and scope for applying one annotation to consecutive parameters, using both examples as acceptance cases. Done means the behavior is specified and validated for the shown annotation patterns.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.