# Install from registry
codemod run @codemod/arm-hardcoded-apiversion
# Or run locally
codemod run -w workflow.yaml
Usage
This codemod targets ARM template JSON files and rewrites resource apiVersion values when the value can be resolved to a concrete string at codemod time.
Rewrites "apiVersion": "[parameters('name')]" when the referenced parameter has a string defaultValue
Rewrites "apiVersion": "[variables('name')]" when the referenced variable resolves to a string literal
Rewrites "apiVersion": "[concat(...)]" when every concat segment resolves to a string literal
Leaves unresolved expressions unchanged, including references without a string default and expressions that depend on runtime-only ARM functions