terraform-provider-upgrade

Automate Terraform provider upgrades with resource migration and state management.

19|5|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/thomast1906/github-copilot-skills-terraform --skill terraform-provider-upgrade
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-provider-upgrade
Source: https://github.com/thomast1906/github-copilot-skills-terraform/tree/main/.github/skills/terraform-provider-upgrade
Command: npx skills add https://github.com/thomast1906/github-copilot-skills-terraform --skill terraform-provider-upgrade

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates safe Terraform provider upgrades with automatic resource migration and state management.

Core Features & Use Cases

  • Automated migration planning: detects breaking changes, maps resource migrations (e.g., azurerm_sql_server → azurerm_mssql_server) and suggests moved blocks.
  • Version constraint management: updates versions.tf and ensures provider blocks align with new APIs.
  • Documentation generation: creates TERRAFORM_UPGRADE_BREAKING_CHANGES.md when necessary and references the official upgrade guides.
  • Use Case: Upgrading the AzureRM provider from 3.x to 4.x, orchestrating migrations and reducing risk.

Quick Start

To get started, review the latest provider upgrade guidance, update your provider version constraints, and validate changes through CI:

  • Get the latest provider version with MCP tools.
  • Retrieve the upgrade guide for the target major version.
  • Apply migrations (moved blocks) and update provider constraints in versions.tf.

Frequently Asked Questions about terraform-provider-upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade the AzureRM Terraform provider from 3.x to 4.x safely?

Terraform moved blocks are used during provider upgrades to safely map deprecated resources to their new equivalents without destroying and recreating infrastructure. The upgrade process automatically suggests these moved blocks to ensure your state file tracks resources correctly across major version changes.

How do I update Terraform provider version constraints for a major upgrade?

Updating Terraform provider version constraints involves modifying the versions.tf file to target the new major release and ensuring provider blocks align with updated APIs. Automation tools retrieve the target upgrade guide, apply necessary migrations, and validate these changes through your CI pipeline.

What are the breaking changes when migrating Terraform AzureRM resources?

Breaking changes during Terraform AzureRM migrations often include removed or renamed resources that fail without proper state management. The upgrade process detects these changes, maps deprecated resources to new ones, and generates a TERRAFORM_UPGRADE_BREAKING_CHANGES.md document detailing required configuration updates.

How do I manage Terraform state when upgrading provider versions?

Terraform state management during provider upgrades relies on moved blocks to remap resources to their new types automatically. This prevents state drift and resource recreation, ensuring that the existing infrastructure remains intact while the state file transitions to the new provider schema.

Do I need to manually edit provider blocks when upgrading Terraform versions?

You do not need to manually edit provider blocks when using automated upgrade tools. The process updates versions.tf and ensures provider configuration blocks align with the new APIs automatically, reducing the risk of manual configuration errors during major version migrations.