What's New

Terraform, the Oracle Cloud Infrastructure (OCI) Terraform provider, and Terraform modules all have the ability to introduce changes or add new functionality.

Terraform Updates

Major Terraform releases might include changes in behavior you should consider when upgrading.

Terraform v0.14

The Oracle Cloud Infrastructure (OCI) Terraform provider now supports Terraform v0.14.

Terraform v0.14 changes the output of the terraform plan command and introduces a dependency lock file you can use to track the version of the (OCI) Terraform provider used to interact with your OCI resources.

Refer to the official Terraform v0.14 upgrade guide for more information.

Concise Terraform plan output

To reduce the verbosity of terraform plan output, Terraform output now omits any attribute that has not changed, except for some attributes whose values often contain human-recognizable identifying information.

You can temporarily re-enable verbose output by setting the environment variable TF_X_CONCISE_DIFF=0 when you run Terraform.

Sensitive values in Terraform plan output

Because Terraform v0.14 tracks expressions whose result is derived from a sensitive input variable or sensitive output value, you might find that more values are obscured in the terraform plan output than would have been in earlier versions.

If a different module uses a value in its output that was derived from a sensitive variable or value, you must set sensitive = true in the output of the second module.

Provider dependency lock file

In Terraform v0.13 and earlier, the terraform init command would always install the newest version of any provider in the configuration that would meet the configured version constraints. To keep the behavior of an already tested configuration as stable as possible unless intentionally changed by the user, Terraform v0.14 introduces a new dependency lock file.

Terraform generates this file automatically after running terraform init in the same directory as the configuration's root module. The dependency lock file includes the specific version numbers selected for each provider, including the OCI Terraform provider. After running terraform init for the first time after upgrading to Terraform v0.14, you will find a new file .terraform.lock.hcl in your root module directory. Future initializations of Terraform automatically read and respect the entries in that file.

Because of this new feature, manually placing extra plugins into the local cache directory .terraform/plugins is no longer effective.

Terraform v0.12

If upgrading to Terraform v0.12, the Oracle Cloud Infrastructure (OCI) Terraform provider and some existing configurations might need to be updated as well.

See Upgrading Configurations to Terraform v0.12 for detailed information.

Provider Updates

Terraform provider releases might include changes in behavior you should consider when upgrading.

Registry and Namespace Change

The Oracle Cloud Infrastructure (OCI) Terraform provider is moving.

The Terraform provider has moved from the shared https://github.com/terraform-providers repository and is now published on the public Oracle repository: https://github.com/oracle/terraform-provider-oci.

If the provider returns the following warning, update your configuration and state files to reflect the accompanying namespace change:

The remote registry returned warnings for registry.terraform.io/hashicorp/oci:
- For users on Terraform 0.13 or greater, this provider has moved to
oracle/oci. Please update your source in required_providers.

Update provider blocks

If you are using Terraform v0.13, you can update your required_providers block to include a source value of oracle/oci instead of the legacy hashicorp/oci value. For example:

terraform {
    required_providers {
        oci = {
            source  = "oracle/oci"
            version = ">= 4.0.0"
        }
    }
    ...
}

Update state files

To replace the provider in existing Terraform state files, you must use the terraform state replace-provider command. Refer to the official Terraform documentation for more information.