Skip to content

Commit 6e4c19e

Browse files
Merge pull request #2059 from oracle/release_gh
Releasing version 5.32.0
2 parents 93d8fb3 + 5a5a926 commit 6e4c19e

File tree

163 files changed

+2123
-87
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+2123
-87
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "vm_multi_attach_instance_shape" {
5+
default = "VM.Standard2.1"
6+
}
7+
8+
resource "oci_core_volume" "test_block_volume_multi_attach" {
9+
availability_domain = data.oci_identity_availability_domain.ad.name
10+
compartment_id = var.compartment_ocid
11+
display_name = "test_attach_existing_volume_on_instance_launch_1"
12+
size_in_gbs = var.db_size
13+
}
14+
15+
resource "oci_core_instance" "test_vm_multi_attach_instance_launch" {
16+
availability_domain = data.oci_identity_availability_domain.ad.name
17+
compartment_id = var.compartment_ocid
18+
display_name = "test_vm_multi_attach_instance"
19+
shape = var.vm_multi_attach_instance_shape
20+
21+
create_vnic_details {
22+
subnet_id = oci_core_subnet.test_subnet.id
23+
display_name = "primary_vnic"
24+
assign_public_ip = true
25+
hostname_label = "tfexampleshinstance"
26+
}
27+
28+
source_details {
29+
source_type = "image"
30+
source_id = var.instance_image_ocid[var.region]
31+
# Apply this to set the size of the boot volume that is created for this instance.
32+
# Otherwise, the default boot volume size of the image is used.
33+
# This should only be specified when source_type is set to "image".
34+
#boot_volume_size_in_gbs = "60"
35+
kms_key_id = var.kms_key_ocid
36+
}
37+
38+
// Create and attach a volume
39+
launch_volume_attachments {
40+
type = "iscsi"
41+
display_name = "test_create_and_attach_volume_on_launch_1"
42+
launch_create_volume_details {
43+
volume_creation_type = "ATTRIBUTES"
44+
compartment_id = var.compartment_ocid
45+
display_name = "test_create_and_attach_volume_on_launch_1"
46+
size_in_gbs = var.db_size
47+
}
48+
}
49+
50+
// Create and attach a volume
51+
launch_volume_attachments {
52+
type = "iscsi"
53+
display_name = "test_create_and_attach_volume_on_launch_2"
54+
launch_create_volume_details {
55+
volume_creation_type = "ATTRIBUTES"
56+
compartment_id = var.compartment_ocid
57+
display_name = "test_create_and_attach_volume_on_launch_2"
58+
size_in_gbs = var.db_size
59+
}
60+
}
61+
62+
// Attach an existing volume
63+
launch_volume_attachments {
64+
type = "iscsi"
65+
display_name = "test_attach_existing_volume_on_launch"
66+
volume_id = oci_core_volume.test_block_volume_multi_attach.id
67+
}
68+
69+
# Apply the following flag only if you wish to preserve the attached boot volume upon destroying this instance
70+
# Setting this and destroying the instance will result in a boot volume that should be managed outside of this config.
71+
# When changing this value, make sure to run 'terraform apply' so that it takes effect before the resource is destroyed.
72+
#preserve_boot_volume = true
73+
74+
// Since preserve_data_volumes_created_at_launch is a required parameter for instances launched with volumes,
75+
// defaulting it to false.
76+
preserve_data_volumes_created_at_launch = false
77+
78+
metadata = {
79+
ssh_authorized_keys = var.ssh_public_key
80+
user_data = base64encode(file("./userdata/bootstrap"))
81+
}
82+
defined_tags = {
83+
"${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag2.name}" = "awesome-app-server"
84+
}
85+
86+
freeform_tags = {
87+
"freeformkey" = "freeformvalue"
88+
}
89+
timeouts {
90+
create = "60m"
91+
}
92+
}

examples/container_instances/main.tf

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ resource "oci_core_network_security_group" "test_network_security_group" {
2626
vcn_id = oci_core_vcn.test_vcn.id
2727
lifecycle {
2828
ignore_changes = [
29-
"defined_tags"]
29+
"defined_tags"]
3030
}
3131
}
3232

@@ -36,7 +36,7 @@ resource "oci_core_vcn" "test_vcn" {
3636
dns_label = "testvcn"
3737
lifecycle {
3838
ignore_changes = [
39-
"defined_tags"]
39+
"defined_tags"]
4040
}
4141
}
4242

@@ -46,11 +46,11 @@ resource "oci_core_subnet" "test_subnet" {
4646
dns_label = "testsubnet"
4747
route_table_id = oci_core_route_table.test_route_table.id
4848
security_list_ids = [
49-
"${oci_core_security_list.test_sec_list.id}"]
49+
"${oci_core_security_list.test_sec_list.id}"]
5050
vcn_id = oci_core_vcn.test_vcn.id
5151
lifecycle {
5252
ignore_changes = [
53-
"defined_tags"]
53+
"defined_tags"]
5454
}
5555
}
5656

@@ -137,9 +137,9 @@ resource "oci_container_instances_container_instance" "test_container_instance"
137137
#Optional
138138
arguments = [
139139
"-c",
140-
"cat /mnt/my_file"]
140+
"cat /mnt/my_file"]
141141
command = [
142-
"/bin/sh"]
142+
"/bin/sh"]
143143
display_name = "displayName"
144144
environment_variables = {
145145
"environment" = "variable"
@@ -194,6 +194,10 @@ resource "oci_container_instances_container_instance" "test_container_instance"
194194
is_root_file_system_readonly = true
195195
run_as_group = 10
196196
run_as_user = 10
197+
capabilities {
198+
add_capabilities = ["CAP_CHOWN", "CAP_KILL"]
199+
drop_capabilities = ["ALL"]
200+
}
197201
}
198202
}
199203
shape = "CI.Standard.E4.Flex"
@@ -226,11 +230,11 @@ resource "oci_container_instances_container_instance" "test_container_instance"
226230

227231
#Optional
228232
nameservers = [
229-
"8.8.8.8"]
233+
"8.8.8.8"]
230234
options = [
231-
"options"]
235+
"options"]
232236
searches = [
233-
"search domain"]
237+
"search domain"]
234238
}
235239
freeform_tags = {
236240
"bar-key" = "foo-value"

examples/zips/adm.zip

0 Bytes
Binary file not shown.

examples/zips/aiAnomalyDetection.zip

0 Bytes
Binary file not shown.

examples/zips/aiDocument.zip

0 Bytes
Binary file not shown.

examples/zips/aiLanguage.zip

0 Bytes
Binary file not shown.

examples/zips/aiVision.zip

0 Bytes
Binary file not shown.

examples/zips/always_free.zip

0 Bytes
Binary file not shown.

examples/zips/analytics.zip

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)