@@ -5,10 +5,17 @@ variable "vm_multi_attach_instance_shape" {
55 default = " VM.Standard2.1"
66}
77
8- resource "oci_core_volume" "test_block_volume_multi_attach " {
8+ resource "oci_core_volume" "test_block_volume_multi_attach_iscsi " {
99 availability_domain = data. oci_identity_availability_domain . ad . name
1010 compartment_id = var. compartment_ocid
11- display_name = " test_attach_existing_volume_on_instance_launch_1"
11+ display_name = " test_attach_existing_volume_on_instance_launch_iscsi"
12+ size_in_gbs = var. db_size
13+ }
14+
15+ resource "oci_core_volume" "test_block_volume_multi_attach_pv" {
16+ availability_domain = data. oci_identity_availability_domain . ad . name
17+ compartment_id = var. compartment_ocid
18+ display_name = " test_attach_existing_volume_on_instance_launch_pv"
1219 size_in_gbs = var. db_size
1320}
1421
@@ -35,7 +42,7 @@ resource "oci_core_instance" "test_vm_multi_attach_instance_launch" {
3542 kms_key_id = var. kms_key_ocid
3643 }
3744
38- // Create and attach a volume
45+ // Create and attach a volume - iscsi
3946 launch_volume_attachments {
4047 type = " iscsi"
4148 display_name = " test_create_and_attach_volume_on_launch_1"
@@ -47,9 +54,9 @@ resource "oci_core_instance" "test_vm_multi_attach_instance_launch" {
4754 }
4855 }
4956
50- // Create and attach a volume
57+ // Create and attach a volume - pv
5158 launch_volume_attachments {
52- type = " iscsi "
59+ type = " paravirtualized "
5360 display_name = " test_create_and_attach_volume_on_launch_2"
5461 launch_create_volume_details {
5562 volume_creation_type = " ATTRIBUTES"
@@ -59,11 +66,18 @@ resource "oci_core_instance" "test_vm_multi_attach_instance_launch" {
5966 }
6067 }
6168
62- // Attach an existing volume
69+ // Attach an existing volume - iscsi
6370 launch_volume_attachments {
6471 type = " iscsi"
6572 display_name = " test_attach_existing_volume_on_launch"
66- volume_id = oci_core_volume. test_block_volume_multi_attach . id
73+ volume_id = oci_core_volume. test_block_volume_multi_attach_iscsi . id
74+ }
75+
76+ // Attach an existing volume - pv
77+ launch_volume_attachments {
78+ type = " paravirtualized"
79+ display_name = " test_attach_existing_volume_on_launch"
80+ volume_id = oci_core_volume. test_block_volume_multi_attach_pv . id
6781 }
6882
6983 # Apply the following flag only if you wish to preserve the attached boot volume upon destroying this instance
0 commit comments