Azure / Azure/bicep

Addition of @Latest for Version and general change of APIVersion to Semantic Versioning

Open
#516 1 comment 2 reactions 0 assignees View on GitHub
revisit
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

Version management in Azure and general programming has always been a problem. Bicep's use of `@APIVersion` is obviously tied to the Azure Resource APIVersion field. Maintaining older templates' APIVerison is time-consuming and error-prone.

Bicep currently uses `@APIVersion` as a required component within the [Resource Type](https://github.com/Azure/bicep/blob/master/docs/spec/resources.md#resource-type) field. While versioning the resource type is important in its own right, it would also be nice to use `@Latest` to ensure that your resource is using a resource type that is not out of date. (I have encountered issues with deploying older APIVersion resources to Azure resulting in unexpected behavior (specifically VM extensions on Linux.)

Unfortunately, the best approach to this would be to convert APIVersion into [Semantic Versioning](https://semver.org/) like the AZ CLI and the AZ Powershell Module. This way we could tag a resource type to a major/minor version and seamlessly allow for bug fixes.
- Microsoft.Storage/storageAccounts@Latest <- Latest
- Microsoft.Storage/storageAccounts@2.3.1 <- Full reference to major.minor.patch
- Microsoft.Storage/storageAccounts@2.3 <- Use latest patch of 2.3 release
- Microsoft.Storage/storageAccounts@2 <- Use latest minor release of 2.3

I would suspect there's no easy way to reference non-breaking changes with the current APIVersion format.

Unfortunately, this would require re-working all of Azure Resources to support this, along with all API's and SDKs and would break tons of 3rd party products.

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.