oci_core_console_history

This resource provides the Console History resource in Oracle Cloud Infrastructure Core service.

Captures the most recent serial console data (up to a megabyte) for the specified instance.

The CaptureConsoleHistory operation works with the other console history operations as described below.

  1. Use CaptureConsoleHistory to request the capture of up to a megabyte of the most recent console history. This call returns a ConsoleHistory object. The object will have a state of REQUESTED.
  2. Wait for the capture operation to succeed by polling GetConsoleHistory with the identifier of the console history metadata. The state of the ConsoleHistory object will go from REQUESTED to GETTING-HISTORY and then SUCCEEDED (or FAILED).
  3. Use GetConsoleHistoryContent to get the actual console history data (not the metadata).
  4. Optionally, use DeleteConsoleHistory to delete the console history metadata and the console history data.

Example Usage

resource "oci_core_console_history" "test_console_history" {
	#Required
	instance_id = oci_core_instance.test_instance.id

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	display_name = var.console_history_display_name
	freeform_tags = {"Department"= "Finance"}
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Console History * update - (Defaults to 20 minutes), when updating the Console History * delete - (Defaults to 20 minutes), when destroying the Console History

Import

ConsoleHistories can be imported using the id, e.g.

$ terraform import oci_core_console_history.test_console_history "id"