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 Bytes
Binary file not shown.

examples/zips/api_gateway.zip

0 Bytes
Binary file not shown.

examples/zips/apm.zip

0 Bytes
Binary file not shown.

examples/zips/appmgmt_control.zip

0 Bytes
Binary file not shown.

examples/zips/artifacts.zip

0 Bytes
Binary file not shown.

examples/zips/audit.zip

0 Bytes
Binary file not shown.

examples/zips/autoscaling.zip

0 Bytes
Binary file not shown.

examples/zips/bastion.zip

0 Bytes
Binary file not shown.

examples/zips/big_data_service.zip

0 Bytes
Binary file not shown.

examples/zips/blockchain.zip

0 Bytes
Binary file not shown.

examples/zips/budget.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

examples/zips/cloudBridge.zip

0 Bytes
Binary file not shown.

examples/zips/cloudMigrations.zip

0 Bytes
Binary file not shown.

examples/zips/cloudguard.zip

0 Bytes
Binary file not shown.

examples/zips/compute.zip

1.32 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

examples/zips/concepts.zip

0 Bytes
Binary file not shown.

examples/zips/container_engine.zip

0 Bytes
Binary file not shown.

examples/zips/container_instances.zip

44 Bytes
Binary file not shown.

examples/zips/database.zip

0 Bytes
Binary file not shown.

examples/zips/databaseTools.zip

0 Bytes
Binary file not shown.

examples/zips/databasemanagement.zip

0 Bytes
Binary file not shown.

examples/zips/databasemigration.zip

0 Bytes
Binary file not shown.

examples/zips/datacatalog.zip

0 Bytes
Binary file not shown.

examples/zips/dataflow.zip

0 Bytes
Binary file not shown.

examples/zips/dataintegration.zip

0 Bytes
Binary file not shown.

examples/zips/datalabeling.zip

0 Bytes
Binary file not shown.

examples/zips/datasafe.zip

0 Bytes
Binary file not shown.

examples/zips/datascience.zip

0 Bytes
Binary file not shown.

examples/zips/devops.zip

0 Bytes
Binary file not shown.

examples/zips/disaster_recovery.zip

0 Bytes
Binary file not shown.

examples/zips/dns.zip

0 Bytes
Binary file not shown.

examples/zips/em_warehouse.zip

0 Bytes
Binary file not shown.

examples/zips/email.zip

0 Bytes
Binary file not shown.

examples/zips/events.zip

0 Bytes
Binary file not shown.

examples/zips/fast_connect.zip

0 Bytes
Binary file not shown.

examples/zips/functions.zip

0 Bytes
Binary file not shown.

examples/zips/fusionapps.zip

0 Bytes
Binary file not shown.

examples/zips/generative_ai.zip

0 Bytes
Binary file not shown.

examples/zips/goldengate.zip

0 Bytes
Binary file not shown.

examples/zips/health_checks.zip

0 Bytes
Binary file not shown.

examples/zips/id6.zip

0 Bytes
Binary file not shown.

examples/zips/identity.zip

0 Bytes
Binary file not shown.

examples/zips/identity_data_plane.zip

0 Bytes
Binary file not shown.

examples/zips/identity_domains.zip

0 Bytes
Binary file not shown.

examples/zips/integration.zip

0 Bytes
Binary file not shown.

examples/zips/jms.zip

0 Bytes
Binary file not shown.

examples/zips/jms_java_downloads.zip

0 Bytes
Binary file not shown.

examples/zips/kms.zip

0 Bytes
Binary file not shown.

examples/zips/license_manager.zip

0 Bytes
Binary file not shown.

examples/zips/limits.zip

0 Bytes
Binary file not shown.

examples/zips/load_balancer.zip

0 Bytes
Binary file not shown.

examples/zips/log_analytics.zip

0 Bytes
Binary file not shown.

examples/zips/logging.zip

0 Bytes
Binary file not shown.

examples/zips/management_agent.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

examples/zips/marketplace.zip

0 Bytes
Binary file not shown.

examples/zips/media_services.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

examples/zips/monitoring.zip

0 Bytes
Binary file not shown.

examples/zips/mysql.zip

0 Bytes
Binary file not shown.

examples/zips/network_firewall.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

examples/zips/networking.zip

0 Bytes
Binary file not shown.

examples/zips/nosql.zip

0 Bytes
Binary file not shown.

examples/zips/notifications.zip

0 Bytes
Binary file not shown.

examples/zips/object_storage.zip

0 Bytes
Binary file not shown.

examples/zips/ocvp.zip

0 Bytes
Binary file not shown.

examples/zips/onesubscription.zip

0 Bytes
Binary file not shown.

examples/zips/opa.zip

0 Bytes
Binary file not shown.

examples/zips/opensearch.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

examples/zips/opsi.zip

0 Bytes
Binary file not shown.

examples/zips/optimizer.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

examples/zips/os_management_hub.zip

0 Bytes
Binary file not shown.

examples/zips/osmanagement.zip

0 Bytes
Binary file not shown.

examples/zips/osp_gateway.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

examples/zips/osub_subscription.zip

0 Bytes
Binary file not shown.

examples/zips/osub_usage.zip

0 Bytes
Binary file not shown.

examples/zips/pic.zip

0 Bytes
Binary file not shown.

examples/zips/psql.zip

0 Bytes
Binary file not shown.

examples/zips/queue.zip

0 Bytes
Binary file not shown.

examples/zips/recovery.zip

0 Bytes
Binary file not shown.

examples/zips/redis.zip

0 Bytes
Binary file not shown.

examples/zips/resourcemanager.zip

0 Bytes
Binary file not shown.

examples/zips/serviceManagerProxy.zip

0 Bytes
Binary file not shown.

examples/zips/service_catalog.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

examples/zips/service_mesh.zip

0 Bytes
Binary file not shown.

examples/zips/stack_monitoring.zip

0 Bytes
Binary file not shown.

examples/zips/storage.zip

0 Bytes
Binary file not shown.

examples/zips/streaming.zip

0 Bytes
Binary file not shown.

examples/zips/usage_proxy.zip

0 Bytes
Binary file not shown.

examples/zips/vault_secret.zip

0 Bytes
Binary file not shown.

examples/zips/vbs_inst.zip

0 Bytes
Binary file not shown.

examples/zips/visual_builder.zip

0 Bytes
Binary file not shown.

examples/zips/vn_monitoring.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

examples/zips/web_app_firewall.zip

0 Bytes
Binary file not shown.
Binary file not shown.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ require (
6565
github.com/mitchellh/mapstructure v1.1.2 // indirect
6666
github.com/mitchellh/reflectwalk v1.0.2 // indirect
6767
github.com/oklog/run v1.0.0 // indirect
68-
github.com/oracle/oci-go-sdk/v65 v65.60.0
68+
github.com/oracle/oci-go-sdk/v65 v65.61.0
6969
github.com/pmezard/go-difflib v1.0.0 // indirect
7070
github.com/sony/gobreaker v0.5.0 // indirect
7171
github.com/ulikunitz/xz v0.5.10 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ
509509
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
510510
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
511511
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
512-
github.com/oracle/oci-go-sdk/v65 v65.60.0 h1:r0fFFGc7PFbj9MAAJkUY/SU+IWS7HVx7NiiPj9gKzCU=
513-
github.com/oracle/oci-go-sdk/v65 v65.60.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
512+
github.com/oracle/oci-go-sdk/v65 v65.61.0 h1:zASJu3G3PVTAqOkHyVoSU3Sfeoir4M0WCLr12+rtCkg=
513+
github.com/oracle/oci-go-sdk/v65 v65.61.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
514514
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
515515
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
516516
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

internal/globalvar/version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"log"
88
)
99

10-
const Version = "5.31.0"
11-
const ReleaseDate = "2024-02-29"
10+
const Version = "5.32.0"
11+
const ReleaseDate = "2024-03-06"
1212

1313
func PrintVersion() {
1414
log.Printf("[INFO] terraform-provider-oci %s\n", Version)

internal/integrationtest/container_instances_container_instance_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ var (
155155
"vcpus_limit": acctest.Representation{RepType: acctest.Optional, Create: `1`},
156156
}
157157
ContainerInstancesContainerInstanceContainersSecurityContextRepresentation = map[string]interface{}{
158+
"capabilities": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ContainerInstancesContainerInstanceContainersSecurityContextCapabilitiesRepresentation},
158159
"is_non_root_user_check_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`},
159160
"is_root_file_system_readonly": acctest.Representation{RepType: acctest.Optional, Create: `false`},
160161
"run_as_group": acctest.Representation{RepType: acctest.Optional, Create: `10`},
@@ -205,6 +206,10 @@ var (
205206
"name": acctest.Representation{RepType: acctest.Optional, Create: `name`},
206207
"value": acctest.Representation{RepType: acctest.Optional, Create: `value`},
207208
}
209+
ContainerInstancesContainerInstanceContainersSecurityContextCapabilitiesRepresentation = map[string]interface{}{
210+
"add_capabilities": acctest.Representation{RepType: acctest.Optional, Create: []oci_container_instances.ContainerCapabilityTypeEnum{`addCapabilities`}},
211+
"drop_capabilities": acctest.Representation{RepType: acctest.Optional, Create: []oci_container_instances.ContainerCapabilityTypeEnum{`dropCapabilities`}},
212+
}
208213

209214
CISecurityListTCPEgressSecurityRulesRepresentation = map[string]interface{}{
210215
"destination": acctest.Representation{RepType: acctest.Required, Create: `0.0.0.0/0`},
@@ -437,6 +442,9 @@ func TestContainerInstancesContainerInstanceResource_basic(t *testing.T) {
437442
resource.TestCheckResourceAttr(resourceName, "containers.0.resource_config.0.memory_limit_in_gbs", "1"),
438443
resource.TestCheckResourceAttr(resourceName, "containers.0.resource_config.0.vcpus_limit", "1"),
439444
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.#", "1"),
445+
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.capabilities.#", "1"),
446+
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.capabilities.0.add_capabilities.#", "0"),
447+
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.capabilities.0.drop_capabilities.#", "0"),
440448
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.is_non_root_user_check_enabled", "false"),
441449
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.is_root_file_system_readonly", "false"),
442450
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.run_as_group", "10"),
@@ -514,6 +522,9 @@ func TestContainerInstancesContainerInstanceResource_basic(t *testing.T) {
514522
resource.TestCheckResourceAttr(resourceName, "containers.0.resource_config.0.memory_limit_in_gbs", "1"),
515523
resource.TestCheckResourceAttr(resourceName, "containers.0.resource_config.0.vcpus_limit", "1"),
516524
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.#", "1"),
525+
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.capabilities.#", "1"),
526+
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.capabilities.0.add_capabilities.#", "0"),
527+
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.capabilities.0.drop_capabilities.#", "0"),
517528
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.is_non_root_user_check_enabled", "false"),
518529
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.is_root_file_system_readonly", "false"),
519530
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.run_as_group", "10"),
@@ -586,6 +597,9 @@ func TestContainerInstancesContainerInstanceResource_basic(t *testing.T) {
586597
resource.TestCheckResourceAttr(resourceName, "containers.0.resource_config.0.memory_limit_in_gbs", "1"),
587598
resource.TestCheckResourceAttr(resourceName, "containers.0.resource_config.0.vcpus_limit", "1"),
588599
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.#", "1"),
600+
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.capabilities.#", "1"),
601+
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.capabilities.0.add_capabilities.#", "0"),
602+
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.capabilities.0.drop_capabilities.#", "0"),
589603
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.is_non_root_user_check_enabled", "false"),
590604
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.is_root_file_system_readonly", "false"),
591605
resource.TestCheckResourceAttr(resourceName, "containers.0.security_context.0.run_as_group", "10"),

0 commit comments

Comments
 (0)