[英]Azure Bicep/ARM recommended API Version to use (Preview vs Stable)
I am working on Azure Bicep/ARM templates, I would like to know the Safe/recommended approach to use API versions on resource providers while creating templates in a big organization where multiple teams are going to use.我正在研究 Azure Bicep/ARM 模板,我想知道在多个团队将要使用的大型组织中创建模板时,在资源提供者上使用 API 版本的安全/推荐方法。
If we declare a resource type and use API version, we get lot of options in terms of Preview vs stable version.如果我们声明资源类型并使用 API 版本,我们会在预览版和稳定版方面获得很多选择。 As we always know that Stable version is recommended but most cases it looks way too old and previews look latest.我们一直都知道推荐使用稳定版,但大多数情况下它看起来太旧而且预览看起来是最新的。
In the below screenshot for SQL server resource, Preview version looks latest and stable heads to 2014 which may lead to compromise on latest features在下面的 SQL Server 资源屏幕截图中,预览版看起来是 2014 年最新且稳定的版本,这可能会导致对最新功能的妥协
So, how can we decide on the API version which is stable/safe but cover latest features without breaking changes那么,我们如何确定稳定/安全但涵盖最新功能而又不破坏更改的 API 版本
resource sqlServer 'Microsoft.Sql/servers@2021-11-01-preview' = {
name: serverName
location: location
tags: tags
identity: {
type: 'SystemAssigned'
}
properties: {
version: version
publicNetworkAccess: 'Enabled'
administratorLogin: adminUserName
administratorLoginPassword: administratorLoginPassword
}
}
You will quickly find that when you start working with ARM templates you will need to use a lot of different API versions, in fact finding the API combination for each resource can be like navigating a labyrinth sometimes since what works for one resource type might not work for another and you need to find the combination that works for all and believe me sometimes this is far from trivial, so do not be mistaken and simply think you can stick to the same API version for all resources.您会很快发现,当您开始使用 ARM 模板时,您将需要使用许多不同的 API 版本,实际上,为每种资源查找 API 组合有时就像在迷宫中导航,因为适用于一种资源类型的方法可能不起作用对于另一个,你需要找到对所有人都有效的组合,相信我有时这远非微不足道,所以不要误会,只是认为你可以对所有资源坚持相同的 API 版本。
One way of doing this I found helpful is to create a resource of the same time in the Azure Portal and then download the template from there and see what API version they use, this has served me well many times.我发现这样做很有帮助的一种方法是在 Azure 门户中同时创建一个资源,然后从那里下载模板并查看他们使用的 API 版本,这对我很有帮助。
Some guidance you can use...您可以使用的一些指导...
HTH高温高压
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.