IBM Support

Error: provider.external: Incompatible API version with plugin. Plugin version: 5, Core version: 4

Troubleshooting


Problem

When running terraform init, you may encounter the following error, indicating a mismatch between the provider plugin's API version and the Terraform CLI's supported version.

Error: provider.external: Incompatible API version with plugin. Plugin version: 5, Core version: 4

Cause

This error occurs because the version of the provider plugin being installed requires a newer Terraform Protocol version than the installed Terraform CLI version supports. Provider plugins released after a specific Terraform CLI version may not be compatible with older Terraform CLI binaries.

Solutions

There are two primary solutions to resolve this incompatibility. The recommended approach is to upgrade the Terraform CLI, but constraining the provider version is also a viable temporary alternative.

Solution 1: Upgrade the Terraform CLI

The recommended solution is to upgrade your Terraform CLI to a more recent version that is compatible with the newer provider plugin. This ensures you have the latest features and security updates.

For detailed instructions, refer to the official Terraform documentation on upgrading the Terraform CLI.

Solution 2: Constrain the Provider Version

As a temporary alternative, you can constrain the provider version in your configuration to use an older version that is compatible with your current Terraform CLI.

  1. Add a version constraint for the provider in your Terraform configuration file, for example main.tf.

    terraform {
      required_providers {
        external = {
          source  = "hashicorp/external"
          version = "< 2.1.0"
        }
      }
    }

    Note: The example uses the external provider. Adjust the provider name and version constraint to match your specific needs. The < 2.1.0 constraint ensures Terraform selects a version of the external provider older than 2.1.0, which is compatible with Terraform Protocol version 4.

  2. Run the terraform init command to re-initialize your working directory with the specified provider version.

    $ terraform init

Additional Information

  • For more details on provider version constraints, please see the provider requirements documentation.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGH5YK","label":"IBM Terraform Self-Managed"},"ARM Category":[{"code":"","label":""}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Historical Number

7123050475155

Document Information

Modified date:
16 March 2026

UID

ibm17266098