oci_cloud_migrations_target_asset

This resource provides the Target Asset resource in Oracle Cloud Infrastructure Cloud Migrations service.

Creates a target asset.

Example Usage

resource "oci_cloud_migrations_target_asset" "test_target_asset" {
	#Required
	is_excluded_from_execution = var.target_asset_is_excluded_from_execution
	migration_plan_id = oci_cloud_migrations_migration_plan.test_migration_plan.id
	preferred_shape_type = var.target_asset_preferred_shape_type
	type = var.target_asset_type
	user_spec {

		#Optional
		agent_config {

			#Optional
			are_all_plugins_disabled = var.target_asset_user_spec_agent_config_are_all_plugins_disabled
			is_management_disabled = var.target_asset_user_spec_agent_config_is_management_disabled
			is_monitoring_disabled = var.target_asset_user_spec_agent_config_is_monitoring_disabled
			plugins_config {
				#Required
				desired_state = var.target_asset_user_spec_agent_config_plugins_config_desired_state
				name = var.target_asset_user_spec_agent_config_plugins_config_name
			}
		}
		availability_domain = var.target_asset_user_spec_availability_domain
		capacity_reservation_id = oci_cloud_migrations_capacity_reservation.test_capacity_reservation.id
		compartment_id = var.compartment_id
		create_vnic_details {

			#Optional
			assign_private_dns_record = var.target_asset_user_spec_create_vnic_details_assign_private_dns_record
			assign_public_ip = var.target_asset_user_spec_create_vnic_details_assign_public_ip
			defined_tags = {"foo-namespace.bar-key"= "value"}
			display_name = var.target_asset_user_spec_create_vnic_details_display_name
			freeform_tags = {"bar-key"= "value"}
			hostname_label = var.target_asset_user_spec_create_vnic_details_hostname_label
			nsg_ids = var.target_asset_user_spec_create_vnic_details_nsg_ids
			private_ip = var.target_asset_user_spec_create_vnic_details_private_ip
			skip_source_dest_check = var.target_asset_user_spec_create_vnic_details_skip_source_dest_check
			subnet_id = oci_core_subnet.test_subnet.id
			vlan_id = oci_core_vlan.test_vlan.id
		}
		dedicated_vm_host_id = oci_core_dedicated_vm_host.test_dedicated_vm_host.id
		defined_tags = {"foo-namespace.bar-key"= "value"}
		display_name = var.target_asset_user_spec_display_name
		fault_domain = var.target_asset_user_spec_fault_domain
		freeform_tags = {"bar-key"= "value"}
		hostname_label = var.target_asset_user_spec_hostname_label
		instance_options {

			#Optional
			are_legacy_imds_endpoints_disabled = var.target_asset_user_spec_instance_options_are_legacy_imds_endpoints_disabled
		}
		ipxe_script = var.target_asset_user_spec_ipxe_script
		is_pv_encryption_in_transit_enabled = var.target_asset_user_spec_is_pv_encryption_in_transit_enabled
		preemptible_instance_config {
			#Required
			preemption_action {
				#Required
				type = var.target_asset_user_spec_preemptible_instance_config_preemption_action_type

				#Optional
				preserve_boot_volume = var.target_asset_user_spec_preemptible_instance_config_preemption_action_preserve_boot_volume
			}
		}
		shape = var.target_asset_user_spec_shape
		shape_config {

			#Optional
			baseline_ocpu_utilization = var.target_asset_user_spec_shape_config_baseline_ocpu_utilization
			memory_in_gbs = var.target_asset_user_spec_shape_config_memory_in_gbs
			ocpus = var.target_asset_user_spec_shape_config_ocpus
		}
		source_details {
			#Required
			source_type = var.target_asset_user_spec_source_details_source_type

			#Optional
			boot_volume_id = oci_core_boot_volume.test_boot_volume.id
			boot_volume_size_in_gbs = var.target_asset_user_spec_source_details_boot_volume_size_in_gbs
			boot_volume_vpus_per_gb = var.target_asset_user_spec_source_details_boot_volume_vpus_per_gb
			image_id = oci_core_image.test_image.id
			kms_key_id = oci_kms_key.test_key.id
		}
	}

	#Optional
	block_volumes_performance = var.target_asset_block_volumes_performance
	ms_license = var.target_asset_ms_license
}

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 Target Asset * update - (Defaults to 20 minutes), when updating the Target Asset * delete - (Defaults to 20 minutes), when destroying the Target Asset

Import

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

$ terraform import oci_cloud_migrations_target_asset.test_target_asset "id"