File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
networking/route_table_attachment
storage/block/volume_group Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,17 @@ resource "oci_core_instance" "example_instance" {
101101 availability_domain = " ${ data . oci_identity_availability_domain . ad . name } "
102102 compartment_id = " ${ var . compartment_ocid } "
103103 display_name = " testInstance"
104- hostname_label = " instance"
105- image = " ${ var . instance_image_ocid [var . region ]} "
106104 shape = " ${ var . instance_shape } "
107105
108106 create_vnic_details {
107+ hostname_label = " instance"
109108 subnet_id = " ${ oci_core_subnet . example_subnet . id } "
110109 skip_source_dest_check = true
111110 assign_public_ip = true
112111 }
112+
113+ source_details {
114+ source_type = " image"
115+ source_id = " ${ var . instance_image_ocid [var . region ]} "
116+ }
113117}
Original file line number Diff line number Diff line change @@ -42,7 +42,11 @@ resource "oci_core_volume" "t2" {
4242 compartment_id = " ${ var . compartment_ocid } "
4343 display_name = " -tf-volume-with-backup-policy"
4444 size_in_gbs = " ${ var . DBSize } "
45- backup_policy_id = " ${ data . oci_core_volume_backup_policies . test_boot_volume_backup_policies . volume_backup_policies . 0 . id } "
45+ }
46+
47+ resource "oci_core_volume_backup_policy_assignment" "policy" {
48+ asset_id = " ${ oci_core_volume . t2 . id } "
49+ policy_id = " ${ data . oci_core_volume_backup_policies . test_boot_volume_backup_policies . volume_backup_policies . 0 . id } "
4650}
4751
4852data "oci_core_volume_backup_policies" "test_boot_volume_backup_policies" {
You can’t perform that action at this time.
0 commit comments