Azure / Azure/bicep

Decorator formater

Open
#12,261 3 comments 3 reactions 0 assignees View on GitHub
enhancement Needs: Upvote
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

I would like a format decorator that takes a function so that you can format input to a standard

**Is your feature request related to a problem? Please describe.**
Network security rules accept per spec only Captital case protocol, ie '*' | 'Ah' | 'Esp' | 'Icmp' | 'Tcp' | 'Udp'.
Why can't i just add a `@format(x) => '${toUpper(substring(nsg.name, 0, 1))}${toLower(substring(nsg.name, 1, length(nsg.name) - 1))}')` to format the protocol from 'tcp' or 'TCP' to 'Tpc' etc.
This should also work on ints `@format(x => min(max(x, 20), 3)` eg **set** min 3 vmss instances but max 20 without error

**Describe the solution you'd like**
Please support 😄

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by turning the decorator examples into an agreed specification for string and integer formatting, including syntax, validation, and evaluation behavior; done means the scope and acceptance criteria are clear enough to implement and test.

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
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.