Getting a Deployment's Log Details

Get the deployment logs and details of resources for a Terraform job in Fleet Application Management.

Deployment log details for a Terraform are essential for understanding the behavior of infrastructure deployments, ensuring the correctness of resource provisioning, and helping efficient troubleshooting. For understanding Terraform logs, see Terraform Provider.
    1. On the Deployments list page, select the deployment you want to work with. If you need help finding the list page or the deployment, see Listing Deployments.
    2. To view deployment logs, on the details page, select View Deployment log.
      The deployment log details panel opens that provide essential information and insights into the process of provisioning OCI resources. The deployment logs can offer the following information:
      • Activity records: Terraform logs capture the commands executed by you, such as terraform init, terraform plan, terraform apply, or terraform destroy. Each activity's output is logged, showing the progress and results of the operation.
      • State changes: Terraform uses a "state" file to track the current status of managed resources. Log details include information about changes to this state file, indicating the creation, modification, or destruction of resources. It helps in understanding the required infrastructure state and any deviations.
      • Resource provisioning: Terraform logs provide insights into the provisioning of cloud resources. This information includes details about the resources being created, updated, or deleted, their configurations, and any associated metadata.

      • Provider interactions: Terraform interacts with cloud providers' APIs to manage resources. The logs show the API calls made to the provider such as OCI, the endpoints contacted, and the responses received. This data is valuable for debugging and understanding the communication between Terraform and the cloud platform.
      • Error and warning messages: In case of errors or warnings during Terraform operations, the logs contain detailed messages explaining the issues. These messages can help identify misconfiguration, missing dependencies, permission problems, or other errors that might occur while provisioning or changing infrastructure.
      • Output values: Terraform allows you to define output values that represent important information about the provisioned infrastructure. The logs display these output values, making it easier to track critical data such as IP addresses, OCIDs, or connection strings.
      • Dependency resolution: Terraform has a dependency graph that manages the order in which resources are created or modified. The logs can provide insights into how Terraform resolves dependencies and the sequence of operations to ensure proper resource provisioning.
      • Plugin and module usage: Terraform supports plugins and modules for extending its functionality. Log details might include information about the plugins and modules used, their versions, and any interactions or configurations related to them.
      • Timestamps and Durations: Each log entry typically includes timestamps, allowing you to track the timing of events.
    3. Select Close to close the deployment log details panel.
  • Use the oci resource-manager job get-job-logs-content command and required parameters to get Terraform log details.

    oci resource-manager job get-job-logs-content --job-id <job_OCID> [OPTIONS]

    For a complete list of flags and variable options for Fleet Application Management CLI commands, see the CLI for Fleet Application Management.

  • Run the GetJobLogsContent operation to get Terraform log details.