Your company deploys the same ARM template to both Azure Stack and global Azure. The template currently sets a specific apiVersion on each resource. Some of those versions are not supported in both environments. You want resources to use a compatible set of API versions without maintaining a version on every resource. As part of the change, you will remove the resource-level apiVersion properties.
Which template element should you add?
The optional apiProfile element supplies a collection of API versions for resource types. Select a profile supported by both target environments. Resource Manager uses a profile's version for a resource only when that resource does not specify its own apiVersion.
- Not correct:
definitions. definitions hold schemas that validate array and object values, and only with languageVersion 2.0. They do not control API versions. - Not correct:
contentVersion. contentVersion records the version of the template itself for change tracking. It has no effect on resource API versions. - Correct:
apiProfile. Select an API profile supported by both environments. Resources without their own apiVersion use the versions defined by that profile. - Not correct:
functions. User-defined functions simplify expressions that are used many times. They do not select API versions for resource types.