oci_database_autonomous_database

This resource provides the Autonomous Database resource in Oracle Cloud Infrastructure Database service.

Creates a new Autonomous Database.

Example Usage

resource "oci_database_autonomous_database" "test_autonomous_database" {
	#Required
	compartment_id = var.compartment_id
	db_name = var.autonomous_database_db_name

	#Optional
	admin_password = var.autonomous_database_admin_password
	are_primary_whitelisted_ips_used = var.autonomous_database_are_primary_whitelisted_ips_used
	autonomous_container_database_id = oci_database_autonomous_container_database.test_autonomous_container_database.id
	autonomous_database_backup_id = oci_database_autonomous_database_backup.test_autonomous_database_backup.id
	autonomous_database_id = oci_database_autonomous_database.test_autonomous_database.id
	autonomous_maintenance_schedule_type = var.autonomous_database_autonomous_maintenance_schedule_type
	character_set = var.autonomous_database_character_set
	clone_type = var.autonomous_database_clone_type
	cpu_core_count = var.autonomous_database_cpu_core_count
	customer_contacts {

		#Optional
		email = var.autonomous_database_customer_contacts_email
	}
	data_safe_status = var.autonomous_database_data_safe_status
	data_storage_size_in_gb = var.autonomous_database_data_storage_size_in_gb
	data_storage_size_in_tbs = var.autonomous_database_data_storage_size_in_tbs
	database_edition = var.autonomous_database_database_edition
	db_version = var.autonomous_database_db_version
	db_workload = var.autonomous_database_db_workload
	defined_tags = var.autonomous_database_defined_tags
	display_name = var.autonomous_database_display_name
	freeform_tags = {"Department"= "Finance"}
	is_access_control_enabled = var.autonomous_database_is_access_control_enabled
	is_auto_scaling_enabled = var.autonomous_database_is_auto_scaling_enabled
	is_auto_scaling_for_storage_enabled = var.autonomous_database_is_auto_scaling_for_storage_enabled
	is_data_guard_enabled = var.autonomous_database_is_data_guard_enabled
	is_dedicated = var.autonomous_database_is_dedicated
	is_free_tier = var.autonomous_database_is_free_tier
	is_local_data_guard_enabled = var.autonomous_database_is_local_data_guard_enabled
	is_mtls_connection_required = var.autonomous_database_is_mtls_connection_required
	is_preview_version_with_service_terms_accepted = var.autonomous_database_is_preview_version_with_service_terms_accepted
	kms_key_id = oci_kms_key.test_key.id
	license_model = var.autonomous_database_license_model
	max_cpu_core_count = var.autonomous_database_max_cpu_core_count
	ncharacter_set = var.autonomous_database_ncharacter_set
	nsg_ids = var.autonomous_database_nsg_ids
	ocpu_count = var.autonomous_database_ocpu_count
	private_endpoint_label = var.autonomous_database_private_endpoint_label
	refreshable_mode = var.autonomous_database_refreshable_mode
	scheduled_operations {
		#Required
		day_of_week {
			#Required
			name = var.autonomous_database_scheduled_operations_day_of_week_name
		}

		#Optional
		scheduled_start_time = var.autonomous_database_scheduled_operations_scheduled_start_time
		scheduled_stop_time = var.autonomous_database_scheduled_operations_scheduled_stop_time
	}
	source = var.autonomous_database_source
	source_id = oci_database_source.test_source.id
	standby_whitelisted_ips = var.autonomous_database_standby_whitelisted_ips
	subnet_id = oci_core_subnet.test_subnet.id
	timestamp = var.autonomous_database_timestamp
	vault_id = oci_kms_vault.test_vault.id
	whitelisted_ips = var.autonomous_database_whitelisted_ips
}

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 12 hours), when creating the Autonomous Database * update - (Defaults to 12 hours), when updating the Autonomous Database * delete - (Defaults to 12 hours), when destroying the Autonomous Database

Import

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

$ terraform import oci_database_autonomous_database.test_autonomous_database "id"