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 (
executionPlanRollbackStrategy
).The execution plan is handed off to the apply rollback job, which then executes the instructions.
The plan rollback job is created. The new job is listed under Jobs.
Use the
oci resource-manager job create-plan-rollback-job
command and required parameters to run a plan rollback job.oci resource-manager job create-plan-rollback-job --stack-id <stack_OCID> --target-rollback-job-id <job_OCID>
For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.
Use the CreateJob operation to create a plan rollback job.
For examples of details for a plan rollback job, see PlanRollbackJobOperationDetails.
What's Next
Monitor the job status (lifecycle state) by getting the job's details. Succeeded (SUCCEEDED
) indicates that the job has completed. Depending on the complexity of the job, the operation can take some time. While the job runs, or after it finishes, you can get the job logs content.