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

Intent for this implementation - will it only be an Intermediate language? #406

Open
brwilkinson opened this issue Apr 13, 2024 · 3 comments

Comments

@brwilkinson
Copy link

Summary of the new feature / enhancement

Shifting this to a new topic, since I originally put the below idea/comments in a different issue which was related to parallel execution only because I was tagged in that specific issue.

I had seen some examples where multiple levels of nesting (of languages) e.g. functions are embedded in yaml or json and this was concerning for me, since it's not inviting for me to write/author and maintain. I can understand that if the intent was for this to be an intermediate language, then that would perhaps be required, however I wanted to get an idea on this up front.

Can we please plan now to have an authoring experience based on Bicep Language? People can still use yaml or json, however I feel like the advantages of Bicep is extremely compelling.

More on why I think this is important.

  • Bicep utilizes "symbolic-name" for cross referencing resources
  • Bicep has a rich set of functions, many most of which are implemented within Bicep itself and doesn't rely on the ARM engine
  • Bicep is designed to build to json
  • Bicep has custom types and an extensibility model
  • simple/clean Bicep language for Configurations
    • avoids embedding other languages in json/yaml Etc.
  • simple/clean Bicepparam files for ConfigurationData

Some examples

  1. Radius have taken to extend Bicep in a way that would exactly meet the need that I am interested in this core tool of DSC to be extended.
  2. More specifically, here is a prototype for the extension of Bicep in a way that does not reply on ARM (Resource Manager) at all.

example 2 above is the main reason for writing this thread/idea/feature request and I really hope this could get some traction

  1. tagging @anthony-c-martin in case you can get the opportunity to chat with @SteveL-MSFT or @mgreenegit if you haven't had the chance to share each sides of your visions on Configuration Management.
  2. I hope that it's possible for this to be more of a case of not if but when.
  3. I know resources are limited, so perhaps this just becomes a community project up front?

Proposed technical implementation details (optional)

for simplicity I will link to the above utils sample in the:

using 'script.bicep'

// This sample only works on an OS with bash installed
param name = 'Anthony'
param platform = 'bash'
provider utils

param name string
param platform 'bash' | 'powershell'

resource sayHelloWithBash 'Script' = if (platform == 'bash') {
  type: 'bash'
  script: replace(loadTextContent('./script.sh'), '$INPUT_NAME', name)
}

resource sayHelloWithPowerShell 'Script' = if (platform == 'powershell') {
  type: 'powershell'
  script: replace(loadTextContent('./script.ps1'), '$INPUT_NAME', name)
}

output stdout string = (platform == 'bash') ? sayHelloWithBash.stdout : sayHelloWithPowerShell.stdout
@SteveL-MSFT
Copy link
Member

SteveL-MSFT commented Apr 23, 2024

Bicep has always been in our roadmap, but with limited resources won't on that won't happen til later unfortunately. One of the primary reasons we adopted ARM template syntax for the configuration doc is to eventually get to Bicep.

@mgreenegit
Copy link
Member

@brwilkinson would you mind if we scheduled time for deeper discussion?

@brwilkinson
Copy link
Author

@mgreenegit did you have a chance to talk with @anthony-c-martin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants