Terraform Resource Discovery

You can use the Oracle Cloud Infrastructure Terraform provider's resource discovery feature to search for deployed resources in your compartment and export them to Terraform configuration and state files.

Resource discovery simplifies the move from manually managed infrastructure to Terraform-managed infrastructure. With a single command, you can generate a file that captures your existing compartment's baseline configuration and state.

Common uses cases for your new Terraform configuration and state files include:

  • Duplication or rebuild of your existing infrastructure architecture in a new tenancy or region.
  • Detection of state drift. Run reports to see if the state of your Terraform-managed resources has changed and differs from your base configuration.

Documentation: Available on docs.cloud.oracle.com or terraform.io.


Terraform resource discovery may not be available for all services that the Oracle Cloud Infrastructure Terraform provider supports. Refer to the list of supported resources for more information.

For More Information