Getting a Job's Terraform Configuration
Download the Terraform configuration (.zip
file) for a job in Resource Manager.
Note
To prevent errors caused by unavailable files, wait a second after the job finishes to download the job information. An error appears if the job information doesn't exist yet. For example, a
To prevent errors caused by unavailable files, wait a second after the job finishes to download the job information. An error appears if the job information doesn't exist yet. For example, a
409
error appears if you attempt to download the Terraform configuration immediately after running a job. In this case, the Terraform configuration is still being copied to a location using a background process. The Terraform configuration is available about a second after the job finishes.These steps show how to get the Terraform configuration for a job in a compartment. You can also get the Terraform configuration for a job in a stack. Tip
As an alternative to these steps, edit 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 Jobs.
- On the Jobs page, select the compartment that contains the job that you want.
- Click the name of the job that you want.
- On the Job details page, click Download Terraform configuration.
Use the
oci resource-manager job get-job-tf-config
command and required parameters to get a job's Terraform configuration file.oci resource-manager stack get-job-tf-config [OPTIONS]
For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.
Use the GetJobTfConfig operation to get a job's Terraform configuration file.