DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Implement expression functions

Open SteveL-MSFT opened this issue 1 year ago • 3 comments

Summary of the new feature / enhancement

ARM has a specific set of functions that can be used within a configuration: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions

Proposed technical implementation details (optional)

Array

  • [ ] array
  • [x] concat
  • [ ] contains
  • [x] createArray
  • [ ] empty
  • [ ] first
  • [ ] indexOf
  • [ ] intersection
  • [ ] last
  • [ ] lastIndexOf
  • [ ] length
  • [ ] min
  • [ ] max
  • [ ] range
  • [ ] skip
  • [ ] take
  • [ ] union

CIDR

These aren't relevant to DSC

Comparison

  • [ ] coalesce
  • [ ] equals
  • [ ] less
  • [ ] lessOrEquals
  • [ ] greater
  • [ ] greaterOrEquals

Date

  • [ ] dateTimeAdd
  • [ ] dateTimeFromEpoch
  • [ ] dateTimeToEpoch
  • [ ] utcNow

Deployment

  • [ ] deployment?
  • [ ] environment*
  • [x] parameters*
  • [x] variables*

Logical

  • [ ] and
  • [ ] bool
  • [ ] false
  • [ ] if
  • [ ] not
  • [ ] or
  • [ ] true

Numeric

  • [x] add
  • [ ] copyIndex
  • [x] div
  • [ ] float
  • [x] int
  • [x] min
  • [x] max
  • [x] mod
  • [x] mul
  • [x] sub

Object

  • [ ] contains
  • [ ] createObject
  • [ ] empty
  • [ ] intersection
  • [ ] items
  • [ ] json
  • [ ] length
  • [ ] null
  • [ ] union

Resource

Subset needed for DSC

  • [x] reference*
  • [ ] references
  • [x] resourceId

Scope

Not applicable to DSC

String

  • [x] base64
  • [ ] base64ToJson
  • [ ] base64ToString
  • [x] concat
  • [ ] contains
  • [ ] dataUri
  • [ ] dataUriToString
  • [ ] empty
  • [ ] endsWith
  • [ ] first
  • [ ] format
  • [ ] guid
  • [ ] indexOf
  • [ ] join
  • [ ] last
  • [ ] lastIndexOf
  • [ ] length
  • [ ] newGuid
  • [ ] padLeft
  • [ ] replace
  • [ ] skip
  • [ ] split
  • [ ] startsWith
  • [ ] string
  • [ ] substring
  • [ ] take
  • [ ] toLower
  • [ ] toUpper
  • [ ] trim
  • [ ] uniqueString
  • [ ] uri
  • [ ] uriComponent
  • [ ] uriComponentToString

SteveL-MSFT avatar Apr 05 '23 15:04 SteveL-MSFT