Creating a Plan Rollback Job
Create a plan rollback job in Resource Manager.
Creating (running) a plan rollback job parses the Terraform configuration in the target job and converts it into an execution plan for the associated stack. The execution plan lists the sequence of specific actions planned to rollback your Oracle Cloud Infrastructure resources, including actions that are expected after running an apply rollback job.
We recommend running a plan rollback job (generating an execution plan) before running an apply rollback job, using the following flow.
Identify the successful apply job that you want to roll back to.
The job you want to roll back to is also known as the "target job."
Create a plan rollback job for the target job.
Instructions are on this page.
Confirm that the plan rollback job succeeded.
Confirm that the generated execution plan meets expectations.
Create an apply rollback job using the generated execution plan (
The execution plan is handed off to the apply rollback job, which then executes the instructions.
- Open the navigation menu and click Developer Services. Under Resource Manager, click Stacks.
- Choose a compartment that you have permission to work in (on the left side of the page).
Click the name of the stack that you want.
The Stack details page opens.
In the Jobs list, click the Actions menu for the apply job you want to roll back to and then select Rollback.
The Rollback panel opens, showing the OCID and name of the selected apply job (OCID of target rollback job and Name of target rollback job).
In the Rollback panel, fill in the fields.
Field Description Rollback job type Type of rollback job. Select Plan to create a plan rollback job. Name of this rollback job Name of job. A default name is provided.
To configure advanced options, click Show advanced options and fill in the fields.
Field Description Detailed log level
Detailed log level: Verbosity to use for Terraform detailed log content for this job. Default: None (no detailed log content is generated).
For more information, see Debugging Terraform.
Maximum number of parallel operations
Maximum number of parallel operations: Concurrent operations as Terraform walks the graph. Default:
Use this option to speed up the job.Note
A high value might cause throttling of resources. For example, consider a Terraform configuration that defines hundreds of compute instances. An Apply job attempts to create as many instances as possible at the same time. In this example, a value of
100might cause throttling by the Compute service.
Refresh resource states before checking for differences
Refresh resource states before checking for differences: Fetch the latest state of stack infrastructure before running the job. Default: Enabled.
Use this option to refresh the state first. For example, consider using this option with an Apply job that you intend to run on manually updated (existing) infrastructure.Note
Refreshing the state can affect performance. Consider disabling if the configuration includes several resources.
Tags Optionally apply tags to the job.
- Click OK.
The plan rollback job is created. The new job is listed under Jobs.