Getting a Stack's State File
Download the Terraform state file used by a stack in Resource Manager. The Terraform state file for a stack is the one associated with the most recent successful job.
The Terraform state file listed on the stack details page is the same as the Terraform state file listed on the job details page for the most recent successful job. - On the Stacks list page, select the stack that you want to work with. If you need help finding the list page or the stack, see Listing Stacks.
- On the stack's details page, select View state.
- To download the stack's state file, go to More actions and select Download Terraform state.
Use the
oci resource-manager stack get-stack-tf-state
command and required parameters to get the Terraform state file for a stack.oci resource-manager stack get-stack-tf-state --stack-id <stack_OCID> --file <file_name>
For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.
Use the GetStackTfState operation to get the Terraform state file for a stack.