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

Update Snippets to use the latest version #5307

Open
ucheNkadiCode opened this issue Dec 1, 2021 · 2 comments
Open

Update Snippets to use the latest version #5307

ucheNkadiCode opened this issue Dec 1, 2021 · 2 comments
Labels
devdiv Related to Bicep tooling efforts in DevDiv story: linter

Comments

@ucheNkadiCode
Copy link
Contributor

It would be great if we could create some sort of function call that adds in the latest date of a specific resource. The user should of course have the flexibility to change it to whatever they want afterwards.

Example:
VS Code gives us

resource virtualNetwork 'Microsoft.Network/virtualNetworks@2019-11-01'

but the latest version should be

resource virtualNetwork 'Microsoft.Network/virtualNetworks@2021-03-01'

It would be awesome of we have make this automatic for our resources to have something like resource virtualNetwork 'Microsoft.Network/virtualNetworks@`LatestVersionOfThisResource()' <-- func

I'm assuming that our latest has the most up to date best practices

@ghost ghost added the Needs: Triage 🔍 label Dec 1, 2021
@stan-sz
Copy link
Contributor

stan-sz commented Dec 2, 2021

This seems to be heavily related to #622

@alex-frankel
Copy link
Collaborator

Snippets are hand-authored and there is no guarantee that the same snippet code will work with a new API version. The only way to update a snippet to the latest version would be to edit the snippet source code in this repo.

It would also be interesting if we could have a code/action refactoring that could "upgrade" an API version and account for any schema changes between versions. I suspect this would be tricky in practice and there would be a lot of edge cases.

@ucheNkadiCode ucheNkadiCode added story: linter devdiv Related to Bicep tooling efforts in DevDiv labels Dec 2, 2021
@alex-frankel alex-frankel changed the title Snippets don't default to the latest version Update Snippets to use the latest version Dec 8, 2021
@alex-frankel alex-frankel added this to the Committed Backlog milestone Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devdiv Related to Bicep tooling efforts in DevDiv story: linter
Projects
None yet
Development

No branches or pull requests

3 participants