File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -154,3 +154,29 @@ output "supported_shape_images" {
154154 value = data. oci_core_images . supported_shape_images . images
155155}
156156
157+ resource "oci_core_instance" "test_instance_from_image" {
158+ availability_domain = data. oci_identity_availability_domain . ad . name
159+ compartment_id = var. compartment_ocid
160+ display_name = " TestInstanceImage"
161+ shape = " VM.Standard2.1"
162+
163+ create_vnic_details {
164+ subnet_id = oci_core_subnet. test_subnet . id
165+ display_name = " Primaryvnic"
166+ assign_public_ip = true
167+ hostname_label = " testimage"
168+ }
169+
170+ source_details {
171+ source_type = " image"
172+ source_id = oci_core_image. custom_image . id
173+ }
174+
175+ metadata = {
176+ ssh_authorized_keys = var.ssh_public_key
177+ }
178+
179+ timeouts {
180+ create = " 60m"
181+ }
182+ }
You can’t perform that action at this time.
0 commit comments