Skip to content

Commit f43048c

Browse files
authored
Release v3.48.0
Release v3.48.0
2 parents 643bf9c + fa43f28 commit f43048c

File tree

172 files changed

+7303
-788
lines changed

Some content is hidden

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

172 files changed

+7303
-788
lines changed

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1-
## 3.46.1 (Unreleased)
1+
## 3.48.0 (Unreleased)
2+
3+
### Added
4+
- Support for Oracle Digital Assistant
5+
6+
### Deprecated
7+
- Instances: The `hostname_label` and `subnet_id` attributes are now deprecated. Please use the `hostname_label` and `subnet_id` attributes under `create_vnic_details`.
8+
9+
### Fixed
10+
- Update for whitelisted ips in `oci_autonomous_database`
11+
12+
## 3.47.0 (October 09, 2019)
13+
14+
### Added
15+
- Support for Audit v2 enhancements. Note: `oci_audit_events` data source schema is updated
16+
- Support for specifying network_type in `launch_options` for the `core_instance` resource
17+
- Support for `home_region` and `time_created` attributes in health_checks resources and datasources
18+
- Support for custom scheduled backup policies in Block Storage
19+
- Support for importing `oci_load_balancer_certificate` resource
20+
21+
### Notes
22+
Starting with this version, newly created load balancer certificates will have an `id` in the form of `loadBalancers/{loadBalancerId}/certificates/{certificateName}`.
23+
Load balancer certificates created with previous versions and upgrading to this version will continue to store `id` in the form of `{certificateName}`.
24+
225
## 3.46.0 (October 02, 2019)
326

427
### Added

examples/compute/extended_metadata/extended_metadata.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,12 @@ resource "oci_core_instance" "test_instance" {
9191
availability_domain = "${data.oci_identity_availability_domain.ad.name}"
9292
compartment_id = "${var.compartment_ocid}"
9393
display_name = "TestInstance"
94-
hostname_label = "testinstance"
9594
shape = "VM.Standard2.1"
96-
subnet_id = "${oci_core_subnet.test_subnet.id}"
95+
96+
create_vnic_details {
97+
subnet_id = "${oci_core_subnet.test_subnet.id}"
98+
hostname_label = "testinstance"
99+
}
97100

98101
source_details {
99102
source_type = "image"

examples/compute/vnic/vnic.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ resource "oci_core_instance" "test_instance" {
7272
compartment_id = "${var.compartment_ocid}"
7373
display_name = "TestInstance"
7474
shape = "VM.Standard2.1"
75-
subnet_id = "${oci_core_subnet.test_subnet.id}"
7675

7776
source_details {
7877
source_type = "image"

examples/compute/windows/windows.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,18 @@ resource "oci_core_instance" "test_instance" {
183183
compartment_id = "${var.compartment_ocid}"
184184
display_name = "${var.instance_name}"
185185
shape = "VM.Standard2.1"
186-
subnet_id = "${oci_core_subnet.test_subnet.id}"
187-
hostname_label = "winmachine"
188186

189187
# Refer cloud-init in https://docs.cloud.oracle.com/iaas/api/#/en/iaas/20160918/datatypes/LaunchInstanceDetails
190188
metadata = {
191189
# Base64 encoded YAML based user_data to be passed to cloud-init
192190
user_data = "${data.template_cloudinit_config.cloudinit_config.rendered}"
193191
}
194192

193+
create_vnic_details {
194+
subnet_id = "${oci_core_subnet.test_subnet.id}"
195+
hostname_label = "winmachine"
196+
}
197+
195198
source_details {
196199
boot_volume_size_in_gbs = "${var.size_in_gbs}"
197200
source_id = "${var.instance_image_ocid[var.region]}"

examples/kms/instance.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ resource "oci_core_instance" "my_instance" {
44
availability_domain = "${data.oci_identity_availability_domain.ad.name}"
55
compartment_id = "${var.compartment_id}"
66
display_name = "my instance with FSS access"
7-
hostname_label = "myinstance"
87
shape = "${var.instance_shape}"
9-
subnet_id = "${oci_core_subnet.my_subnet.id}"
108

119
metadata = {
1210
ssh_authorized_keys = "${var.ssh_public_key}"
1311
}
1412

13+
create_vnic_details {
14+
subnet_id = "${oci_core_subnet.my_subnet.id}"
15+
hostname_label = "myinstance"
16+
}
17+
1518
source_details {
1619
source_type = "image"
1720
source_id = "${var.instance_image_ocid[var.region]}"

examples/load_balancer/lb_full/lb_full.tf

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,16 @@ resource "oci_core_instance" "instance1" {
153153
compartment_id = "${var.compartment_ocid}"
154154
display_name = "be-instance1"
155155
shape = "${var.instance_shape}"
156-
subnet_id = "${oci_core_subnet.subnet1.id}"
157-
hostname_label = "be-instance1"
158156

159157
metadata = {
160158
user_data = "${base64encode(var.user-data)}"
161159
}
162160

161+
create_vnic_details {
162+
subnet_id = "${oci_core_subnet.subnet1.id}"
163+
hostname_label = "be-instance1"
164+
}
165+
163166
source_details {
164167
source_type = "image"
165168
source_id = "${var.instance_image_ocid[var.region]}"
@@ -171,13 +174,16 @@ resource "oci_core_instance" "instance2" {
171174
compartment_id = "${var.compartment_ocid}"
172175
display_name = "be-instance2"
173176
shape = "${var.instance_shape}"
174-
subnet_id = "${oci_core_subnet.subnet2.id}"
175-
hostname_label = "be-instance2"
176177

177178
metadata = {
178179
user_data = "${base64encode(var.user-data)}"
179180
}
180181

182+
create_vnic_details {
183+
subnet_id = "${oci_core_subnet.subnet2.id}"
184+
hostname_label = "be-instance2"
185+
}
186+
181187
source_details {
182188
source_type = "image"
183189
source_id = "${var.instance_image_ocid[var.region]}"
@@ -349,7 +355,7 @@ resource "oci_load_balancer_rule_set" "test_rule_set" {
349355

350356
conditions {
351357
attribute_name = "SOURCE_VCN_ID"
352-
attribute_value = "${oci_core_virtual_network.vcn1.id}"
358+
attribute_value = "${oci_core_vcn.vcn1.id}"
353359
}
354360

355361
conditions {

examples/networking/private_ip/private_ip.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ resource "oci_core_instance" "test_instance1" {
6565
availability_domain = "${data.oci_identity_availability_domain.ad.name}"
6666
compartment_id = "${var.compartment_ocid}"
6767
display_name = "testInstance"
68-
hostname_label = "instance"
6968
shape = "${var.instance_shape}"
7069

7170
create_vnic_details {
72-
subnet_id = "${oci_core_subnet.example_subnet.id}"
71+
subnet_id = "${oci_core_subnet.example_subnet.id}"
72+
hostname_label = "instance"
7373
}
7474

7575
source_details {

examples/networking/public_ip/public_ip.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ resource "oci_core_instance" "test_instance" {
6666
availability_domain = "${data.oci_identity_availability_domain.ad.name}"
6767
compartment_id = "${var.compartment_ocid}"
6868
display_name = "testInstance"
69-
hostname_label = "instance"
7069
shape = "${var.instance_shape}"
7170

7271
source_details {
@@ -78,6 +77,7 @@ resource "oci_core_instance" "test_instance" {
7877
assign_public_ip = false
7978
display_name = "primaryVnic"
8079
subnet_id = "${oci_core_subnet.test_subnet.id}"
80+
hostname_label = "instance"
8181
}
8282
}
8383

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
2+
3+
variable "tenancy_ocid" {}
4+
variable "user_ocid" {}
5+
variable "fingerprint" {}
6+
variable "private_key_path" {}
7+
variable "region" {}
8+
9+
variable "compartment_ocid" {}
10+
11+
provider "oci" {
12+
tenancy_ocid = "${var.tenancy_ocid}"
13+
user_ocid = "${var.user_ocid}"
14+
fingerprint = "${var.fingerprint}"
15+
private_key_path = "${var.private_key_path}"
16+
region = "${var.region}"
17+
}
18+
19+
resource "oci_oda_oda_instance" "TFOdaInstance" {
20+
compartment_id = "${var.compartment_ocid}"
21+
shape_name = "DEVELOPMENT"
22+
description = "test instance"
23+
display_name = "TestInstance"
24+
}
25+
26+
data "oci_oda_oda_instances" "TFOdaInstances" {
27+
#Required
28+
compartment_id = "${var.compartment_ocid}"
29+
30+
#Optional
31+
display_name = "${oci_oda_oda_instance.TFOdaInstance.display_name}"
32+
33+
#state = "${var.oda_instance_state}"
34+
}
35+
36+
data "oci_oda_oda_instance" "TFOdaInstance" {
37+
#Required
38+
oda_instance_id = "${oci_oda_oda_instance.TFOdaInstance.id}"
39+
}

examples/storage/block/volume/volume_backup_policy.tf

Lines changed: 69 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,38 @@ provider "oci" {
1515
region = "${var.region}"
1616
}
1717

18-
variable "DBSize" {
19-
default = "50" // size in GBs, min: 50, max 16384
20-
}
21-
2218
data "oci_identity_availability_domain" "ad" {
2319
compartment_id = "${var.tenancy_ocid}"
2420
ad_number = 1
2521
}
2622

27-
resource "oci_core_volume" "t" {
28-
availability_domain = "${data.oci_identity_availability_domain.ad.name}"
29-
compartment_id = "${var.compartment_ocid}"
30-
display_name = "-tf-volume"
31-
size_in_gbs = "${var.DBSize}"
32-
}
23+
// Example 1: Using predefined policy
3324

34-
data "oci_core_volume_backup_policies" "test_volume_backup_policies" {}
35-
36-
output "policies" {
37-
value = "${data.oci_core_volume_backup_policies.test_volume_backup_policies.volume_backup_policies}"
38-
}
39-
40-
data "oci_core_volume_backup_policies" "test_volume_backup_policies_silver" {
25+
data "oci_core_volume_backup_policies" "test_predefined_volume_backup_policies" {
4126
filter {
4227
name = "display_name"
4328
values = ["silver"]
4429
}
4530
}
4631

4732
output "silver_policy_id" {
48-
value = "${data.oci_core_volume_backup_policies.test_volume_backup_policies_silver.volume_backup_policies.0.id}"
33+
value = "${data.oci_core_volume_backup_policies.test_predefined_volume_backup_policies.volume_backup_policies.0.id}"
34+
}
35+
36+
resource "oci_core_volume" "test_volume_1" {
37+
availability_domain = "${data.oci_identity_availability_domain.ad.name}"
38+
compartment_id = "${var.compartment_ocid}"
39+
display_name = "-tf-volume-1"
40+
size_in_gbs = "50"
4941
}
5042

5143
resource "oci_core_volume_backup_policy_assignment" "test_backup_policy_assignment" {
52-
asset_id = "${oci_core_volume.t.id}"
53-
policy_id = "${data.oci_core_volume_backup_policies.test_volume_backup_policies_silver.volume_backup_policies.0.id}"
44+
asset_id = "${oci_core_volume.test_volume_1.id}"
45+
policy_id = "${data.oci_core_volume_backup_policies.test_predefined_volume_backup_policies.volume_backup_policies.0.id}"
5446
}
5547

5648
data "oci_core_volume_backup_policy_assignments" "test_backup_policy_assignments" {
57-
asset_id = "${oci_core_volume.t.id}"
49+
asset_id = "${oci_core_volume.test_volume_1.id}"
5850

5951
filter {
6052
name = "id"
@@ -65,3 +57,59 @@ data "oci_core_volume_backup_policy_assignments" "test_backup_policy_assignments
6557
output "test_backup_policy_assignments" {
6658
value = "${data.oci_core_volume_backup_policy_assignments.test_backup_policy_assignments.volume_backup_policy_assignments}"
6759
}
60+
61+
// Example 2: Using custom scheduled policy
62+
63+
resource "oci_core_volume_backup_policy" "test_volume_backup_policy_custom" {
64+
#Required
65+
compartment_id = "${var.compartment_ocid}"
66+
67+
#Optional
68+
defined_tags = "${map("example-tag-namespace-all.example-tag", "originalValue")}"
69+
display_name = "BackupPolicy1"
70+
71+
freeform_tags = {
72+
"Department" = "Finance"
73+
}
74+
75+
schedules {
76+
#Required
77+
backup_type = "INCREMENTAL"
78+
period = "ONE_YEAR"
79+
retention_seconds = "604800"
80+
81+
#Optional
82+
day_of_month = "10"
83+
day_of_week = "TUESDAY"
84+
hour_of_day = "10"
85+
month = "FEBRUARY"
86+
offset_seconds = "0"
87+
offset_type = "STRUCTURED"
88+
time_zone = "UTC"
89+
}
90+
}
91+
92+
resource "oci_core_volume" "test_volume_2" {
93+
availability_domain = "${data.oci_identity_availability_domain.ad.name}"
94+
compartment_id = "${var.compartment_ocid}"
95+
display_name = "-tf-volume-2"
96+
size_in_gbs = "50"
97+
}
98+
99+
resource "oci_core_volume_backup_policy_assignment" "test_backup_policy_assignment_custom" {
100+
asset_id = "${oci_core_volume.test_volume_2.id}"
101+
policy_id = "${oci_core_volume_backup_policy.test_volume_backup_policy_custom.id}"
102+
}
103+
104+
data "oci_core_volume_backup_policy_assignments" "test_backup_policy_assignments_custom" {
105+
asset_id = "${oci_core_volume.test_volume_2.id}"
106+
107+
filter {
108+
name = "id"
109+
values = ["${oci_core_volume_backup_policy_assignment.test_backup_policy_assignment_custom.id}"]
110+
}
111+
}
112+
113+
output "test_backup_policy_assignments_custom" {
114+
value = "${data.oci_core_volume_backup_policy_assignments.test_backup_policy_assignments_custom.volume_backup_policy_assignments}"
115+
}

0 commit comments

Comments
 (0)