Using Terraform Registry with an Older Stack

Update an older stack to fetch providers from Terraform Registry.

Caution

  • To prevent incompatible provider versions, update the configuration to specify version constraints, listing versions that exist in the configured provider source (Terraform Provider or custom providers).
  • To prevent job failures from unavailable provider versions, ensure that versions listed in the version constraints of the configuration exist in the configured provider source (Terraform Provider or custom providers), or remove version constraints entirely (results in retrieval of the latest versions).

Stacks that were created before Terraform Registry sourcing was available continue to fetch providers from Resource Manager until updated. When updated, stacks fetch providers from Terraform Registry and custom providers are available.

Tip

To determine the source of providers for your stack, review the logs for a recent job. The following phrase indicates that the stack is fetching providers from Terraform Registry:

Getting providers from hashicorp registry and/or custom terraform providers
    1. Open the navigation menu and click Developer Services. Under Resource Manager, click Stacks.
    2. On the Stacks page, select the compartment that contains the stack that you want.
    3. Click the name of the stack that you want.
    4. On the Stack details page, click More actions and then select Use Terraform registry.
  • Use the oci resource-manager stack update command and required parameters to update older stacks to fetch providers from Terraform Registry.

    oci resource-manager stack update --is-third-party-provider-experience-enabled true [...]

    For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.

  • Use the UpdateStack operation to update the stack to fetch providers from Terraform Registry.

    When defining details for UpdateStackDetails, set isThirdPartyProviderExperienceEnabled to true.