Creating a Plan Job

Create a plan job in Resource Manager.

Creating (running) a plan job parses your Terraform configuration and converts it into an execution plan for the associated stack. The execution plan lists the sequence of specific actions planned to provision your Oracle Cloud Infrastructure resources, including actions that are expected after running an apply job. We recommend running a plan job (generating an execution plan) before running an apply job. The execution plan is handed off to the apply job, which then executes the instructions.

For configurations stored in a source code control system, such as GitHub or GitLab, the job uses the most recent commit.

Tip

Monitor the job status (lifecycle state) by getting the job: Succeeded (SUCCEEDED) indicates that the job has completed. Depending on the complexity the job, the operation can take some time. While the job runs, or after it completes, you can get the job logs content.

Using the Console

  1. Open the navigation menu and click Developer Services. Under Resource Manager, click Stacks.
  2. Choose a compartment that you have permission to work in (on the left side of the page).
  3. Click the name of the stack that you want.
    The Stack details page opens.
  4. Click Plan.
  5. In the Plan panel, fill in the fields.
    FieldDescription
    Name Name of job. A default name is provided.
  6. To configure advanced options, click Show advanced options and fill in the fields.
    FieldDescription
    Upgrade provider versions

    Upgrade provider versions (stack must be Terraform 0.14 and later; older stacks must be upgraded to use Terraform Registry): Retrieves the latest versions available from the configured source of Terraform providers.

    Required if provider versions in the Terraform configuration changed since the last time a job was run on the stack. Dependency lock files are automatically managed for new and updated stacks. Providers are updated within the version constraints of your Terraform configuration.

    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: 10.

    Use this option to speed up the job.

    Note

    A high value might cause resources to be throttled. 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 100 might 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 to be run on existing infrastructure that was manually updated.

    Note

    Refreshing the state can affect performance. Consider disabling if the configuration includes several resources.

    Tags Optionally apply tags to the job.
  7. Click Plan.

The plan job is created. The new job is listed under Jobs.

Using the API

Use the CreateJob operation to create a plan job.