Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement expression functions #57

Open
16 of 93 tasks
SteveL-MSFT opened this issue Apr 5, 2023 · 3 comments
Open
16 of 93 tasks

Implement expression functions #57

SteveL-MSFT opened this issue Apr 5, 2023 · 3 comments
Labels
Issue-Enhancement The issue is a feature or idea
Milestone

Comments

@SteveL-MSFT
Copy link
Member

SteveL-MSFT commented Apr 5, 2023

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
  • concat
  • contains
  • 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*
  • parameters*
  • variables*

Logical

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

Numeric

  • add
  • copyIndex
  • div
  • float
  • int
  • min
  • max
  • mod
  • mul
  • sub

Object

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

Resource

Subset needed for DSC

  • reference*
  • references
  • resourceId

Scope

Not applicable to DSC

String

  • base64
  • base64ToJson
  • base64ToString
  • 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 SteveL-MSFT added the Issue-Enhancement The issue is a feature or idea label Apr 5, 2023
@SteveL-MSFT SteveL-MSFT self-assigned this Sep 12, 2023
@anmenaga
Copy link
Collaborator

anmenaga commented Nov 2, 2023

There is a lot of functions in that link. Is the plan for DSC v3 to implement all of them? Or maybe some have higher priority than others?

@SteveL-MSFT
Copy link
Member Author

I updated the description to a checklist. I don't think we need all of them or can implement them as needed. The current code assumes return value is always a string, so looking at the functions, we need to generalize it as it appears it can return an array, boolean, or number.

@SteveL-MSFT SteveL-MSFT changed the title Implement embedded functions Implement expression functions Nov 8, 2023
@SteveL-MSFT SteveL-MSFT removed their assignment Feb 23, 2024
@tgauth
Copy link
Collaborator

tgauth commented Mar 5, 2024

  • working on functions in Numeric category

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement The issue is a feature or idea
Projects
None yet
Development

No branches or pull requests

4 participants