Generated banner for Azure Upgrade
Generated logo for Azure Upgrade

Azure Upgrade

MicrosoftOfficialCreated by Microsoft

  • Skill
  • Workflow
  • Cloud and DevOps
  • MIT
  • Low risk
  • Has scripts

From the author

Assess and upgrade Azure workloads between plans, tiers, or SKUs, or modernize Azure SDK dependencies in source code. WHEN: upgrade Consumption to Flex Consumption, upgrade Azure Functions plan, change hosting plan, function app SKU, migrate App Service to Container Apps, modernize legacy Azure Java SDKs (com.microsoft.azure to com.azure), migrate Azure Cache for Redis (ACR/ACRE) to Azure Managed Redis (AMR).
— the description by Microsoft

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

Azure Upgrade provides a structured, automated approach to upgrading Azure resources and modernizing source code dependencies. It supports complex transitions such as moving Azure Functions from Consumption to Flex Consumption, migrating various Redis cache tiers to Azure Managed Redis, and refactoring legacy Java applications from the deprecated com.microsoft.azure SDKs to the modern com.azure ecosystem. The skill enforces safety through pre-migration assessments, explicit user confirmation for destructive actions, and idempotent automation scripts, ensuring that original workloads remain intact until the new configuration is fully validated.

What it does

  • Assesses Azure workloads for upgrade readiness across plans, tiers, and SKUs.
  • Automates the migration of Azure Functions from Consumption to Flex Consumption.
  • Modernizes legacy Java applications by replacing deprecated com.microsoft.azure SDKs with modern com.azure equivalents.
  • Facilitates the migration of Azure Cache for Redis (ACR/ACRE) to Azure Managed Redis (AMR).
  • Generates detailed migration status reports and maintains artifact isolation.
  • Provides a safe, gated workflow requiring user approval for all resource creation and configuration changes.

When to use it

  • When you need to upgrade your Azure Functions hosting plan to a more performant or cost-effective tier.
  • When your Java project relies on deprecated Azure SDKs and requires modernization to supported libraries.
  • When migrating existing Redis cache instances to the newer Azure Managed Redis service.
  • When you need a repeatable, documented process for changing Azure resource SKUs or hosting plans.

Advantages

  • Reduces manual effort and risk during complex infrastructure and code migrations.
  • Ensures safety by requiring explicit user approval for all destructive or state-changing operations.
  • Maintains high availability by keeping original resources running until the new ones are validated.
  • Promotes security best practices by encouraging the use of managed identities over connection strings.
  • Provides clear, step-by-step guidance for both infrastructure upgrades and source-code refactoring.

Usage examples

“Upgrade my function app from Consumption to Flex Consumption”
The agent will identify the current plan, assess compatibility, and guide you through the migration steps to the Flex Consumption plan.
“Migrate my Java project from com.microsoft.azure to com.azure”
The agent will inventory legacy dependencies, provide a migration plan, and assist in updating your build files and source code imports.
“Migrate my Redis cache to AMR”
The agent will assess your current Redis configuration and execute the migration path to Azure Managed Redis.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/microsoft/azure-upgrade/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip azure-upgrade.zip -d .agents/skills

Documentation by Microsoft

Azure Upgrade

This skill handles assessment and automated upgrades of existing Azure workloads from one Azure service, hosting plan, or SKU to another — all within Azure. This includes plan/tier upgrades (e.g. Consumption → Flex Consumption), cross-service migrations (e.g. App Service → Container Apps), and SKU changes. It also covers Azure SDK for Java source-code modernization (e.g. legacy Java com.microsoft.azure.* → modern com.azure.*). This is NOT for cross-cloud migration — use azure-cloud-migrate for that.

Triggers

User IntentExample Prompts
Upgrade Azure Functions plan"Upgrade my function app from Consumption to Flex Consumption"
Discover Functions upgrade candidates"What Consumption Function Apps do I have that can be upgraded to Flex Consumption?"
Change hosting tier"Move my function app to a better plan"
Assess upgrade readiness"Is my function app ready for Flex Consumption?"
Automate plan migration"Automate the steps to upgrade my Functions plan"
Modernize legacy Azure Java SDK"Migrate legacy Azure SDKs for Java", "Upgrade legacy Azure Java SDK", "Migrate my Java project from com.microsoft.azure to com.azure"
Migrate Azure Cache for Redis (ACR/OSS) to Azure Managed Redis (AMR)"Migrate my Redis cache to AMR", "ACR to AMR", "OSS to AMR", "Upgrade my Premium P2 cache to Managed Redis", "Pick an AMR SKU", "Convert my Redis IaC template to AMR"
Migrate Azure Cache for Redis Enterprise (ACRE) to Azure Managed Redis (AMR)"Migrate my Enterprise_E10 cache to AMR", "ACRE to AMR", "Update my ACRE IaC template for AMR", "Migrate EnterpriseFlash to AMR", "Migrate my geo-replicated Enterprise Redis"

Rules

  1. Follow phases in order. Skip or defer work only when the selected scenario explicitly permits it, and record the reason in the migration status.

  2. Generate an assessment before any upgrade operations

  3. Load the scenario reference and follow its rules

  4. Use mcp_azure_mcp_get_azure_bestpractices and mcp_azure_mcp_documentation MCP tools

  5. Destructive actions require ask_user — global-rules

  6. Always confirm the target plan/SKU with the user before proceeding

  7. Propose a name for any new resource (default: <source>-<target-suffix>, e.g. <source>-flex for Flex Consumption migrations) and announce the proposed name to the user before creating it so they can override without a blocking prompt. Same pattern applies to other newly-created resources (storage accounts, App Insights, etc.) — see the scenario reference for service-specific defaults.

  8. Windows Consumption → Flex source-change gate: treat the source app as read-only by default. Immediately before every command that would change its settings, triggers, state, deployment, bindings, or existence, use ask_user to describe the exact change and obtain explicit approval. Approval is action-specific and cannot be reused for later source changes.

  9. Never delete or stop the original app without explicit user confirmation

  10. Keep approval-gated workflows moving: after each completed step, immediately perform the next read-only preflight. If the next action requires approval, invoke ask_user in the same turn — never stop after merely announcing the next step and wait for the user to re-engage.

  11. All automation scripts must be idempotent and resumable

Upgrade Scenarios

SourceTargetReference
Azure Functions Consumption Plan (Linux)Azure Functions Flex Consumption Planworkflow.md
Azure Functions Consumption Plan (Windows)Azure Functions Flex Consumption Planworkflow.md
Legacy Azure Java SDK (com.microsoft.azure.*)Modern Azure Java SDK (com.azure.*)languages/java/README.md
Azure Cache for Redis (ACR/OSS) Basic/Standard/PremiumAzure Managed Redis (AMR)services/redis/redis-to-amr.md
Azure Cache for Redis Enterprise (ACRE) / Enterprise FlashAzure Managed Redis (AMR)services/redis/redis-to-amr.md

Functions Consumption-to-Flex routing: For a named app, inspect its Azure platform and load only the matching Linux or Windows workflow. For subscription-wide discovery, evaluate both platforms: use az functionapp flex-migration list for Linux and the Windows workflow's manual discovery and compatibility checks for Windows. Label Windows results as candidates until per-app code compatibility is assessed.

SDK upgrade scenarios (e.g. Java legacy → modern) run a source-code modernization flow that is distinct from Azure service/plan/SKU upgrades: follow the scenario reference, not the Steps below.

No matching scenario? Use mcp_azure_mcp_documentation and mcp_azure_mcp_get_azure_bestpractices tools to research the upgrade path.

MCP Tools

ToolPurpose
mcp_azure_mcp_get_azure_bestpracticesGet Azure best practices for the target service
mcp_azure_mcp_documentationLook up Azure documentation for upgrade scenarios
mcp_azure_mcp_appserviceQuery App Service and Functions plan details
mcp_azure_mcp_applicationinsightsVerify monitoring configuration

Steps

  1. Identify — Determine the source and target Azure plans/SKUs. Ask user to confirm.

  2. Assess — Analyze existing app for upgrade readiness → load scenario reference (e.g., workflow.md)

  3. Pre-migrate — Collect settings, identities, configs from the existing app

  4. Upgrade — Execute the automated upgrade steps (create new resources, migrate settings, deploy code)

  5. Validate — Use the checks defined by the selected scenario: verify target resource state, applicable HTTP endpoints and non-HTTP triggers, and monitoring. If access restrictions or unavailable test resources prevent execution, record validation as deferred — never relax security automatically or report functional success.

  6. Ask User — Offer performance validation and IaC updates. Offer source cleanup only when the selected scenario confirms production cutover and all cleanup prerequisites are complete.

  7. Hand off to azure-validate for deep validation or azure-deploy for CI/CD setup

Track progress in <UPGRADE_DIR>/upgrade-status.md — see Artifact Output Policy for path resolution.

References

Next

After upgrade is validated, hand off to:

  • azure-validate — for thorough post-upgrade validation

  • azure-deploy — if the user wants to set up CI/CD for the new app

Files

references/services/functions/consumption-to-flex/windows/automation/app-creation.md

App Creation

Step 4: Create the Flex Consumption App

Since az functionapp flex-migration does not support Windows, each migration step is performed explicitly.

Resume guard: If the user supplies an existing target resource ID after a provisioning handoff, follow Adopt a User-Provisioned Target before naming or storage-selection defaults. Do not run resource creation or post-create storage conversion against that target.

New app naming (read before running 4b)

The new app's name is bound to <NEW_APP_NAME> for use in 4b and every subsequent step (4b.opt, 4c–4k, Step 5 deploy, Step 6 cutover, Step 7 cleanup).

Default: <source>-flex — e.g. test-app → test-app-flex.

⚠️ Skill instruction: Before running 4b, look at the user's original migration request. If they said "as <name>" or "named <name>" — follow that. Otherwise, default to <source>-flex and announce the choice to the user before executing, e.g.:

I'll create the new Flex app as <source>-flex in resource group <RESOURCE_GROUP> (region <REGION>). Say so if you'd prefer a different name.

Then bind <NEW_APP_NAME> to the chosen name and proceed.

💡 Constraints: 2–60 chars, alphanumerics + hyphens, must start with a letter, no consecutive hyphens, globally unique in Azure (becomes <APP_NAME>.azurewebsites.net). If the default would exceed 60 chars or collides with an existing app, fall back to a shortened suffix (e.g. <source>-fc) and announce the fallback. Verify global uniqueness with az functionapp show --name <NEW_APP_NAME> --resource-group <RESOURCE_GROUP> (a ResourceNotFound error confirms the name is available in your RG; for cross-tenant collisions you'll only find out when 4b fails with a name-conflict error).

Storage account binding (read before running 4a/4b)

The new Flex app needs a storage account bound at creation time. Track both <STORAGE_NAME> and <STORAGE_RESOURCE_ID> for the selected account:

ModeWhen to useStorage metadata
Reuse sourceMost migrations. Matches az functionapp flex-migration behavior on Linux. No extra resources.Use the source runtime storage metadata from Step 3a
Create newYou want isolated storage for blast-radius, compliance, or test/prod separationUse the metadata returned by 4a
Use existing differentYou already have a target storage account provisioned (e.g. via IaC)Resolve and verify its name and resource ID before proceeding

For an existing different account supplied by name, resolve its metadata before continuing:

az graph query -q "resources | where type =~ 'microsoft.storage/storageaccounts' | where name =~ '<STORAGE_NAME>' | project name, resourceGroup, subscriptionId, id" --query "data[0]" -o json

If the query returns no account, stop and ask the user for the resource ID. Never guess the account's resource group.

⚠️ Skill instruction: Storage selection is always an explicit user decision. Before running 4a or 4b, use ask_user to choose reuse source, create new, or use existing different, even when the original request did not mention storage. Explain that reusing storage avoids another resource but shares runtime/deployment dependencies, while new storage provides isolation. Do not announce a default and proceed without a response.

Bind <STORAGE_NAME> and <STORAGE_RESOURCE_ID> only after the user selects a mode. If the account is outside <RESOURCE_GROUP>, use its resource ID as the --storage-account argument in 4b.

💡 When reusing the source storage account, keep the deployment storage configuration created for the target Flex app. Do not copy the source app's Windows content-share or run-from-package settings.

4a. Create a Storage Account (only if user chose "create new")

Skip this entire sub-step if reusing the source account or pointing at an existing different one.

az storage account create --name <NEW_STORAGE_NAME> --resource-group <RESOURCE_GROUP> --location <REGION> --sku Standard_LRS --allow-blob-public-access false --query "{name:name,id:id}" -o json

Then bind <STORAGE_NAME> and <STORAGE_RESOURCE_ID> from the output for use in 4b.

4b. Create the Flex Consumption App

Storage authentication preflight (before creating the app):

Read the selected account's configuration without retrieving storage keys:

az storage account show --ids <STORAGE_RESOURCE_ID> --query "{id:id,allowSharedKeyAccess:allowSharedKeyAccess}" -o json

Require a successful command and the expected account ID. In PowerShell, check $LASTEXITCODE immediately. A failed read or missing account is a blocker, not evidence that Shared Key access is allowed. On a successful read, false prohibits Shared Key authentication; true or an unset (null) property permits it at the account level. Also confirm any policy requirements with the user. Repeat this check for deployment storage if it uses a different account.

If either account prohibits Shared Key access, or policy requires identity-based storage, do not run the az functionapp create command below. Its basic flow configures host storage with a connection string; deployment-storage identity flags alone don't make host storage identity-based. Record Step 4b as blocked in <UPGRADE_DIR>/upgrade-status.md, explain the limitation, and direct the user to identity-first ARM/Bicep provisioning using the Flex Consumption IaC samples. Do not enable Shared Key access, retrieve keys, or attempt connection-string creation followed by conversion.

When blocked on keyless provisioning, provide this handoff: Show the user the assessed target name, region, runtime/version, selected storage resource IDs, and progress-file path. Explain that they must provision an empty target dedicated to this migration, with managed identity authentication and roles for both storage connections and the agreed monitoring configuration. Do not deploy function code yet: built-in authentication and non-HTTP trigger safety still need migration checks. Leave the source unchanged. Ask them to return with the target's full Azure resource ID, not credentials, using:

Resume the Flex Consumption migration for <SOURCE_APP_NAME> using progress at <UPGRADE_DIR>/upgrade-status.md.
I provisioned a keyless target at <TARGET_RESOURCE_ID>. Use that existing target; do not create another app.
Adopt a User-Provisioned Target
  1. Load and reconcile the saved progress using Migration Progress. Keep Step 4b blocked while checking the target. If the progress file is missing, stop and ask for its location rather than guessing prior work. If it already identifies a different adopted target, stop and ask; never carry completed target work across different apps.

  2. Require a full Microsoft.Web/sites resource ID, not a slot, and reject the source app itself. Resolve the target read-only. Require the source and target to be in the active subscription because subsequent migration commands assume that scope; don't silently switch subscriptions. Verify its name, resource group, region, Flex plan, runtime/version, and storage accounts against the saved decisions. Report mismatches and ask the user to resolve them or approve a revised plan before adopting the target.

  3. Verify managed identity configuration and effective role assignments for both host storage and deployment storage, and the monitoring configuration expected by Step 4k. Resolve the target's configured Application Insights component read-only; bind <TARGET_AI_NAME>, <TARGET_AI_RESOURCE_ID>, and <TARGET_AI_RESOURCE_GROUP> from the verified component and its resource ID. Do not assume it is in the function app's resource group. Missing or ambiguous component metadata is a blocker; ask the user to identify the configured component rather than guessing. Host storage needs Storage Blob Data Owner plus permissions required by its triggers, bindings, and diagnostics. Deployment storage needs blob read/write access, normally Storage Blob Data Contributor; an existing Storage Blob Data Owner assignment covers this for the same identity and scope. Confirm permission to create missing role assignments; Contributor alone doesn't grant it. Read failures, missing permissions, incomplete configuration, and failed access validation remain blockers. Don't display secrets or automatically repair the target.

  4. Check the target's deployed-function inventory and use ask_user to confirm it is an empty app dedicated to this migration and approve adopting it for the remaining configuration and deployment steps. A failed inventory isn't proof the target is empty. If code is already deployed or the app serves another workload, keep the migration blocked and request an empty target.

  5. After verification and approval, bind <NEW_APP_NAME> and <RESOURCE_GROUP> from the resolved target, and <STORAGE_NAME> and <STORAGE_RESOURCE_ID> from its verified host storage. Preserve all source identifiers. Record the target resource ID, deployment storage resource ID, storage identity IDs, and all three monitoring placeholders above in progress Notes; never record keys or connection strings. Mark Step 4b complete with note externally provisioned and verified; mark pending 4a skipped — storage provisioned externally and 4b.opt skipped — target storage identities verified; no conversion required. Preserve already completed work. Resume at the first unfinished step at or after 4c, retaining all app-setting, authentication, trigger-safety, deployment, and source-change approval gates.

After adoption, do not fall through to the basic creation flow below or rerun storage conversion.

Continue with the basic creation flow only when Shared Key authentication is permitted for both storage connections.

Use <RUNTIME> and <TARGET_RUNTIME_VERSION> resolved and recorded in Step 2c. Do not derive the target version from FUNCTIONS_WORKER_RUNTIME_VERSION at creation time; that setting is not guaranteed to be present or authoritative, and Windows Consumption leaves siteConfig.windowsFxVersion empty.

az functionapp list-flexconsumption-runtimes --location <REGION> --runtime <RUNTIME> --query "[?version=='<TARGET_RUNTIME_VERSION>'].version | [0]" -o tsv

Require the command to return <TARGET_RUNTIME_VERSION>. If it returns empty, stop and reassess the target version rather than creating the app with a guessed or unsupported value.

Create the new app. Set <STORAGE_CREATE_REFERENCE> to <STORAGE_NAME> when the account is in <RESOURCE_GROUP>; otherwise set it to <STORAGE_RESOURCE_ID>:

az functionapp create --name <NEW_APP_NAME> --resource-group <RESOURCE_GROUP> --storage-account <STORAGE_CREATE_REFERENCE> --flexconsumption-location <REGION> --runtime <RUNTIME> --runtime-version <TARGET_RUNTIME_VERSION>

💡 This command matches the basic Flex Consumption create flow documented in Create a Flex Consumption app (MS Learn). The platform sets AzureWebJobsStorage to a fresh connection string for <STORAGE_NAME> and uses the same value for the One Deploy package container (DEPLOYMENT_STORAGE_CONNECTION_STRING). Identity-based runtime storage is not the default — see 4b.opt for conversion only where Shared Key authentication is permitted during creation.

💡 Unless Application Insights creation is explicitly disabled or blocked by policy, az functionapp create also creates a target Application Insights component and sets APPLICATIONINSIGHTS_CONNECTION_STRING. Resolve the configured component read-only and bind <TARGET_AI_NAME>, <TARGET_AI_RESOURCE_ID>, and <TARGET_AI_RESOURCE_GROUP> from its verified metadata, not the function app's resource group. Record all three in progress Notes for 4k; missing, unreadable, or ambiguous component metadata remains a blocker.

4b.opt. Identity-Based Storage

For an app created through the permitted connection-string flow, run this sub-step if the user requested identity-based storage or Step 3a reported identity-based source storage; otherwise skip it. This post-create conversion isn't a workaround for the blocked preflight above. When Shared Key authentication is prohibited, identity-based host and deployment storage are functional requirements that must be satisfied through identity-first provisioning before resuming.

This is a post-create hardening pass that mirrors the optional pattern documented in Configure deployment settings (MS Learn) but extended to also cover the runtime AzureWebJobsStorage binding (not just the deployment container).

Ensure the system identity is enabled (4e covers this — run that first if you skipped):

az functionapp identity assign --name <NEW_APP_NAME> --resource-group <RESOURCE_GROUP>

Grant the system identity the three storage data-plane roles on <STORAGE_RESOURCE_ID>:

💡 Why --assignee-object-id ... --assignee-principal-type ServicePrincipal? The bare --assignee <pid> form makes the CLI do a Microsoft Graph lookup to determine the principal type, which (a) prints a deprecation warning on every call and (b) intermittently fails with Cannot find user or service principal in graph database for managed identities created seconds earlier (Graph propagation race). Specifying --assignee-object-id plus --assignee-principal-type ServicePrincipal skips the lookup entirely.

az role assignment create --assignee-object-id $(az functionapp identity show --name <NEW_APP_NAME> --resource-group <RESOURCE_GROUP> --query principalId -o tsv) --assignee-principal-type ServicePrincipal --role "Storage Blob Data Owner" --scope <STORAGE_RESOURCE_ID>
az role assignment create --assignee-object-id $(az functionapp identity show --name <NEW_APP_NAME> --resource-group <RESOURCE_GROUP> --query principalId -o tsv) --assignee-principal-type ServicePrincipal --role "Storage Queue Data Contributor" --scope <STORAGE_RESOURCE_ID>
az role assignment create --assignee-object-id $(az functionapp identity show --name <NEW_APP_NAME> --resource-group <RESOURCE_GROUP> --query principalId -o tsv) --assignee-principal-type ServicePrincipal --role "Storage Table Data Contributor" --scope <STORAGE_RESOURCE_ID>

Add the identity-based AzureWebJobsStorage__* settings pointing at <STORAGE_NAME>:

az functionapp config appsettings set --name <NEW_APP_NAME> --resource-group <RESOURCE_GROUP> --settings "AzureWebJobsStorage__accountName=<STORAGE_NAME>" "AzureWebJobsStorage__credential=managedidentity" "AzureWebJobsStorage__blobServiceUri=https://<STORAGE_NAME>.blob.core.windows.net" "AzureWebJobsStorage__queueServiceUri=https://<STORAGE_NAME>.queue.core.windows.net" "AzureWebJobsStorage__tableServiceUri=https://<STORAGE_NAME>.table.core.windows.net"

Remove the platform-set connection-string binding so the runtime uses identity exclusively:

az functionapp config appsettings delete --name <NEW_APP_NAME> --resource-group <RESOURCE_GROUP> --setting-names AzureWebJobsStorage

⚠️ User-assigned identity variant: If you want a UMI instead of the system identity, replace the role-assignment --assignee with the UMI principal ID, attach the UMI via az functionapp identity assign --identities <UMI_RESOURCE_ID> in 4f, and add AzureWebJobsStorage__clientId=<UMI_CLIENT_ID> to the appsettings set call above.

💡 Deployment storage is separate: The commands above configure only runtime AzureWebJobsStorage. To also move the One Deploy package container off the connection string, follow Configure deployment settings with --deployment-storage-auth-type SystemAssignedIdentity (or UserAssignedIdentity) and verify the deployment identity's blob permissions. Do not report deployment storage as identity-based just because runtime storage was converted.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

The author says: python3.10+

Security

What our scanner noticed· Low risk

  • Instructions that use the network
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Microsoft
Publisher
Microsoft (Official)
Source
microsoft/skills · .github/plugins/azure-skills/skills/azure-upgrade · commit 0696600
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from .github/plugins/azure-skills/LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Also distributed in
microsoft/azure-skills

AutoGineer is not affiliated with or endorsed by Microsoft.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download azure-upgrade.zip