Debugging a Job by Generating Detailed Log Content

Debug a job by generating detailed log content. Detailed log content is generated for a job when you specify the verbosity to use, such as ERROR. By default, no detailed log content is generated (null or None).

For more information, see Debugging Terraform.

  • These steps show how to debug a job in a stack. You can also retrieve the latest providers for a job in a compartment.
    1. Open the navigation menu and click Developer Services. Under Resource Manager, click Stacks.
    2. On the Stacks page, select the compartment that contains the stack that you want.
    3. Click the name of the stack that you want.
    4. On the Stack details page, select the option for running the type of job that you want.
    5. In the panel for the job type that you selected, click Show advanced options and select a value for Detailed log level.
    6. Run the job.
  • Use the command and required parameters for the type of job you want to run, and specify verbosity in JSON input for --terraform-advanced-options to generate Terraform detailed log content for the job.

    oci resource-manager job <command> --stack-id <stack_ocid> --terraform-advanced-options <json_input>

    For example, to generate Terraform detailed log content at the debug verbosity level when running a plan job, use the oci resource-manager job create-plan-job command, with the following JSON input for --terraform-advanced-options.

    oci resource-manager job create-plan-job --stack-id <stack_ocid> --terraform-advanced-options '{"detailedLogLevel": "DEBUG", "parallelism": 20, "isRefreshRequired": true}'

    For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.

  • Use the CreateJob operation to generate Terraform detailed log content when running a job.

    When defining jobOperationDetails (CreateJobOperationDetails in CreateJobDetails, specify the detailedLogLevel attribute (severity) in TerraformAdvancedOptions.