Azure / Azure/bicep

Feature Request: Generate Shareable Links from the Bicep Playground for Code Snippets Including Configuration

Open
#13,232 0 comments 0 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

Summary

I am proposing an enhancement to the Bicep Playground that would allow users to generate shareable links that point back to specific Bicep code snippets, including any `bicepconfig.json` configurations. This feature would enable users to share their Bicep configurations and examples easily, facilitating collaboration, and significantly enhance the official Bicep documentation by allowing for interactive examples.

### Background

The Bicep Playground is an invaluable tool for visualizing and experimenting with Bicep code and its JSON equivalent. Currently, users can experiment with code in the playground but lack a straightforward way to share their work or embed these examples in documentation or forums. The ability to generate a URL that encapsulates both the Bicep code and its associated configuration settings would be a powerful addition, promoting Bicep's adoption and easing the learning curve for new users.

### Rationale

The introduction of shareable links for Bicep code snippets directly from the Playground would offer several advantages:

- **Improved Collaboration**: Developers can share code snippets with corresponding `bicepconfig.json` settings for example specifying experimental feature flags more efficiently, enhancing collaborative efforts and community support.
- **Enhanced Documentation**: The official Bicep documentation could embed interactive examples. Users can click a link to view and interact with the code in the Playground, making the documentation more engaging and helpful and driving usage of the playground.
- **Ease of Use**: Simplifies the process of demonstrating best practices, sharing templates, and discussing Bicep code, thereby reducing barriers to adoption and fostering a more vibrant community.

### Technical Considerations

- The feature should ensure that the generated links are concise enough to be easily shared via social media, forums, and documentation.
- Implement security measures to prevent the execution of malicious code.
- Consider versioning for shared links to ensure compatibility with the Playground's future updates.

### Similar Solutions out there
See Go Playground
![image](https://github.com/Azure/bicep/assets/9611108/79bb57ab-ecb0-4e99-a12a-c5f46e990a46)
See .NET Fiddle
![image](https://github.com/Azure/bicep/assets/9611108/20e7ce32-90e1-4dc9-a648-4a435c38965c)

### Conclusion

Enabling the Bicep Playground to generate shareable links for code snippets, including their configurations, would significantly enhance the user experience. It would facilitate knowledge sharing within the community and make the official documentation a more dynamic and interactive resource. This feature aligns with the goals of reducing barriers to adoption and fostering a collaborative environment for infrastructure as code development.

Thank you for considering this feature request. I believe it will make a substantial positive impact on the Bicep community and contribute to the broader adoption and understanding of Bicep.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.