Getting a Stack's 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.
Note
For stacks created from Terraform configurations in Git, configuration files aren't available for download until a job is successfully run on the stack.
For stacks created from Terraform configurations in Git, configuration files aren't 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 a Configuration Using Code Editor.
- Open the navigation menu and click Developer Services. Under Resource Manager, click Stacks.
- On the Stacks page, select the compartment that contains the stack that you want.
- Click the name of the stack that you want.
- On the Stack details page, next to 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 --stack-id <stack_OCID> --file-id <file_name>
For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.
Use the GetStackTfConfig operation to get a stack's Terraform configuration file.