Skip to content

Commit

Permalink
prototype skip (#687)
Browse files Browse the repository at this point in the history
Co-authored-by: azure-quickstart-templates pipeline <[email protected]>
  • Loading branch information
bmoore-msft and azure-quickstart-templates pipeline authored Sep 19, 2022
1 parent c580703 commit a428d2a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ foreach ($av in $allApiVersions) {
continue
}

# skip checking this resource only, if metadata array contains the disable directive
if ($av.metadata -contains 'disable-apiVersions-should-be-recent'){
Write-Warning "Skipping check on $($av.type)/$($av.name) with apiVersion: $($av.apiVersion)"
continue
}

# Then walk over each object containing an ApiVersion.
if ($av.ApiVersion -isnot [string]) {
# If the APIVersion is not a string
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"functions": [],
"variables": {},
"resources": [
{
"metadata": ["disable-apiVersions-should-be-recent"],
"name": "publicIPAddress1",
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2015-06-15",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "publicIPAddress1"
},
"properties": {
"publicIPAllocationMethod": "Dynamic"
}
}
],
"outputs": {}
}

0 comments on commit a428d2a

Please sign in to comment.