Getting a Stack Terraform Configuration

Download the Terraform configuration used by a stack in Resource Manager. The Terraform configuration file for a stack is the one associated with the most recent successful job.


For stacks created from Terraform configurations in Git, configuration files are not available for download until a job is successfully run on the stack.

Alternatively, you can view the generated Terraform configuration file in Code Editor. For more information, see Editing Configurations Using Code Editor.

    1. Open the navigation menu and click Developer Services. Under Resource Manager, click Stacks.
    2. Choose a compartment that you have permission to work in (on the left side of the page).
    3. Click the name of the stack that you want.
      The Stack details page opens.
    4. In the Stack information tab, to the right of Terraform configuration, click Download.
  • Use the oci resource-manager stack get-stack-tf-config command and required parameters to get a stack's Terraform configuration file.

    oci resource-manager stack get-stack-tf-config [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the Command Line Reference for Resource Manager.

  • Use the GetStackTfConfig operation to get a stack's Terraform configuration file.