Skip to content

Commit 24313bb

Browse files
authored
Candidate for release_v3.44.0
Candidate for release_v3.44.0
2 parents 5022069 + f8fa891 commit 24313bb

File tree

147 files changed

+14880
-524
lines changed

Some content is hidden

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

147 files changed

+14880
-524
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
## 3.44.0 (Unreleased)
2+
3+
### Added
4+
5+
- Support for `oci_database_exadata_infrastructure`, `oci_database_vm_cluster_network`, `oci_database_vm_cluster` resources for Exadata Cloud at Customer
6+
- Support for backups in Exadata Cloud at Customer
7+
28
## 3.43.0 (September 11, 2019)
39

410
### Added

examples/database/db_systems/resources.tf

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ resource "oci_database_db_system" "test_db_system" {
1818
db_backup_config {
1919
auto_backup_enabled = true
2020
recovery_window_in_days = 10
21+
22+
backup_destination_details {
23+
id = "${oci_database_backup_destination.test_backup_destination_nfs1.id}"
24+
type = "NFS"
25+
}
2126
}
2227

2328
freeform_tags = {
@@ -50,6 +55,22 @@ resource "oci_database_db_system" "test_db_system" {
5055
}
5156
}
5257

58+
resource "oci_database_backup_destination" "test_backup_destination_nfs1" {
59+
#Required
60+
compartment_id = "${var.compartment_ocid}"
61+
display_name = "testBackupDestinationRecovery Appliance"
62+
type = "NFS"
63+
64+
#Optional
65+
connection_string = "connectionString"
66+
67+
freeform_tags = {
68+
"Department" = "Finance"
69+
}
70+
71+
vpc_users = ["bkupUser1", "bkupUser2"]
72+
}
73+
5374
// The creation of an oci_database_db_system requires that it be created with exactly one oci_database_db_home. Therefore the first db home will have to be a property of the db system resource and any further db homes to be added to the db system will have to be added as first class resources using "oci_database_db_home".
5475
resource "oci_database_db_home" "test_db_home" {
5576
db_system_id = "${oci_database_db_system.test_db_system.id}"
@@ -67,15 +88,35 @@ resource "oci_database_db_home" "test_db_home" {
6788
}
6889

6990
db_backup_config {
70-
auto_backup_enabled = true
71-
recovery_window_in_days = 10
91+
auto_backup_enabled = true
92+
93+
backup_destination_details {
94+
id = "${oci_database_backup_destination.test_backup_destination_nfs2.id}"
95+
type = "NFS"
96+
}
7297
}
7398
}
7499

75100
db_version = "${var.db_version}"
76101
display_name = "${var.db_home_display_name}"
77102
}
78103

104+
resource "oci_database_backup_destination" "test_backup_destination_nfs2" {
105+
#Required
106+
compartment_id = "${var.compartment_ocid}"
107+
display_name = "testBackupDestinationRecovery Appliance"
108+
type = "NFS"
109+
110+
#Optional
111+
connection_string = "connectionString"
112+
113+
freeform_tags = {
114+
"Department" = "Finance"
115+
}
116+
117+
vpc_users = ["bkupUser1", "bkupUser2"]
118+
}
119+
79120
resource "oci_database_backup" "test_backup" {
80121
depends_on = ["oci_database_db_system.test_db_system"]
81122
database_id = "${oci_database_db_system.test_db_system.db_home.0.database.0.id}"
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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+
variable "compartment_id" {}
9+
variable "ssh_public_key" {}
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_database_exadata_infrastructure" "test_exadata_infrastructure" {
20+
#Required
21+
admin_network_cidr = "192.168.19.2/16"
22+
cloud_control_plane_server1 = "192.168.19.1"
23+
cloud_control_plane_server2 = "192.168.19.2"
24+
compartment_id = "${var.compartment_id}"
25+
corporate_proxy = "http://192.168.19.1:80"
26+
display_name = "tstExaInfra"
27+
dns_server = ["192.168.10.10"]
28+
gateway = "192.168.20.1"
29+
infini_band_network_cidr = "10.172.19.1/22"
30+
netmask = "255.255.0.0"
31+
ntp_server = ["192.168.10.20"]
32+
shape = "ExadataCC.Quarter3.100"
33+
time_zone = "US/Pacific"
34+
activation_file = "activation.zip"
35+
36+
#Optional
37+
defined_tags = "${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedvalue")}"
38+
39+
freeform_tags = {
40+
"Department" = "Accounting"
41+
}
42+
}
43+
44+
data "oci_database_exadata_infrastructure_download_config_file" "test_exadata_infrastructure_download_config_file" {
45+
#Required
46+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.test_exadata_infrastructure.id}"
47+
48+
#Optional
49+
base64_encode_content = true
50+
}
51+
52+
data "oci_database_exadata_infrastructures" "test_exadata_infrastructures" {
53+
#Required
54+
compartment_id = "${var.compartment_id}"
55+
}
56+
57+
resource "oci_identity_tag_namespace" "tag-namespace1" {
58+
#Required
59+
compartment_id = "${var.tenancy_ocid}"
60+
description = "tagNamespace1"
61+
name = "testexamples-tag-namespace1"
62+
}
63+
64+
resource "oci_identity_tag" "tag1" {
65+
#Required
66+
description = "tf example tag"
67+
name = "tf-example-tag"
68+
tag_namespace_id = "${oci_identity_tag_namespace.tag-namespace1.id}"
69+
}
70+
71+
data "oci_identity_availability_domain" "ad" {
72+
compartment_id = "${var.tenancy_ocid}"
73+
ad_number = 1
74+
}
75+
76+
resource "local_file" "test_exadata_infrastructure_downloaded_config_file" {
77+
content = "${data.oci_database_exadata_infrastructure_download_config_file.test_exadata_infrastructure_download_config_file.content}"
78+
filename = "${path.module}/exadata_infrastructure_config.zip"
79+
}
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
// Copyright (c) 2017 2019 Oracle and/or its affiliates. All rights reserved.
2+
3+
resource "oci_database_vm_cluster_network" "test_vm_cluster_network" {
4+
compartment_id = "${var.compartment_id}"
5+
display_name = "testVmClusterRecommendedNetwork"
6+
dns = ["192.168.10.10"]
7+
ntp = ["192.168.10.20"]
8+
9+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.test_exadata_infrastructure.id}"
10+
11+
scans {
12+
hostname = "myprefix1-nsubz-scan"
13+
14+
ips = [
15+
"192.168.19.7",
16+
"192.168.19.6",
17+
"192.168.19.8",
18+
]
19+
20+
port = 1521
21+
}
22+
23+
vm_networks {
24+
domain_name = "oracle.com"
25+
gateway = "192.169.20.1"
26+
netmask = "255.255.0.0"
27+
network_type = "BACKUP"
28+
29+
nodes {
30+
hostname = "myprefix2-cghdm1"
31+
ip = "192.169.19.1"
32+
}
33+
34+
nodes {
35+
hostname = "myprefix2-cghdm2"
36+
ip = "192.169.19.2"
37+
}
38+
39+
vlan_id = "11"
40+
}
41+
42+
vm_networks {
43+
domain_name = "oracle.com"
44+
gateway = "192.168.20.1"
45+
netmask = "255.255.0.0"
46+
network_type = "CLIENT"
47+
48+
nodes {
49+
hostname = "myprefix1-r64zc1"
50+
ip = "192.168.19.2"
51+
vip = "192.168.19.3"
52+
vip_hostname = "myprefix1-r64zc1-vip"
53+
}
54+
55+
nodes {
56+
hostname = "myprefix1-r64zc2"
57+
ip = "192.168.19.4"
58+
vip = "192.168.19.5"
59+
vip_hostname = "myprefix1-r64zc2-vip"
60+
}
61+
62+
vlan_id = "10"
63+
}
64+
65+
#Optional
66+
defined_tags = "${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedvalue")}"
67+
68+
freeform_tags = {
69+
"Department" = "Accounting"
70+
}
71+
72+
validate_vm_cluster_network = true
73+
}
74+
75+
resource "oci_database_vm_cluster" "test_vm_cluster" {
76+
#Required
77+
compartment_id = "${var.compartment_id}"
78+
cpu_core_count = "2"
79+
display_name = "testVmCluster"
80+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.test_exadata_infrastructure.id}"
81+
gi_version = "19.1.0.0"
82+
ssh_public_keys = ["${var.ssh_public_key}"]
83+
vm_cluster_network_id = "${oci_database_vm_cluster_network.test_vm_cluster_network.id}"
84+
85+
#Optional
86+
defined_tags = "${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedvalue")}"
87+
88+
freeform_tags = {
89+
"Department" = "Accounting"
90+
}
91+
92+
is_local_backup_enabled = "false"
93+
is_sparse_diskgroup_enabled = "false"
94+
license_model = "LICENSE_INCLUDED"
95+
}
96+
97+
data "oci_database_vm_cluster_recommended_network" "test_vm_cluster_recommended_network" {
98+
#Required
99+
compartment_id = "${var.compartment_id}"
100+
display_name = "testVmClusterRecommendedNetwork"
101+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.test_exadata_infrastructure.id}"
102+
103+
networks {
104+
#Required
105+
cidr = "192.168.19.2/16"
106+
domain = "oracle.com"
107+
gateway = "192.168.20.1"
108+
netmask = "255.255.0.0"
109+
network_type = "CLIENT"
110+
prefix = "myprefix1"
111+
vlan_id = "10"
112+
domain = "oracle.com"
113+
}
114+
115+
networks {
116+
#Required
117+
cidr = "192.169.19.1/16"
118+
domain = "oracle.com"
119+
gateway = "192.169.20.1"
120+
netmask = "255.255.0.0"
121+
network_type = "BACKUP"
122+
prefix = "myprefix2"
123+
vlan_id = "11"
124+
domain = "oracle.com"
125+
}
126+
127+
defined_tags = "${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedvalue")}"
128+
129+
freeform_tags = {
130+
"Department" = "Accounting"
131+
}
132+
}
133+
134+
resource "oci_database_db_home" "test_db_home_vm_cluster" {
135+
vm_cluster_id = "${oci_database_vm_cluster.test_vm_cluster.id}"
136+
137+
database {
138+
admin_password = "BEstrO0ng_#11"
139+
db_name = "dbVMClus"
140+
character_set = "AL32UTF8"
141+
ncharacter_set = "AL16UTF16"
142+
db_workload = "OLTP"
143+
pdb_name = "pdbName"
144+
145+
freeform_tags = {
146+
"Department" = "Finance"
147+
}
148+
149+
db_backup_config {
150+
auto_backup_enabled = true
151+
auto_backup_window = "SLOT_TWO"
152+
153+
backup_destination_details {
154+
id = "${oci_database_backup_destination.test_backup_destination_recovery_appliance.id}"
155+
type = "NFS"
156+
}
157+
}
158+
}
159+
160+
source = "VM_CLUSTER_NEW"
161+
db_version = "12.1.0.2"
162+
display_name = "createdDbHome"
163+
}
164+
165+
resource "oci_database_backup_destination" "test_backup_destination_recovery_appliance" {
166+
#Required
167+
compartment_id = "${var.compartment_id}"
168+
display_name = "testBackupDestinationRecovery Appliance"
169+
type = "RECOVERY_APPLIANCE"
170+
171+
#Optional
172+
connection_string = "connectionString"
173+
174+
freeform_tags = {
175+
"Department" = "Finance"
176+
}
177+
178+
vpc_users = ["bkupUser1", "bkupUser2"]
179+
}
180+
181+
data "oci_database_vm_cluster_network_download_config_file" "test_vm_cluster_network_download_config_file" {
182+
#Required
183+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.test_exadata_infrastructure.id}"
184+
vm_cluster_network_id = "${oci_database_vm_cluster_network.test_vm_cluster_network.id}"
185+
186+
#Optional
187+
base64_encode_content = true
188+
}
189+
190+
data "oci_database_vm_cluster_networks" "test_vm_cluster_networks" {
191+
#Required
192+
compartment_id = "${var.compartment_id}"
193+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.test_exadata_infrastructure.id}"
194+
}
195+
196+
data "oci_database_vm_clusters" "test_vm_clusters" {
197+
#Required
198+
compartment_id = "${var.compartment_id}"
199+
200+
#Optional
201+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.test_exadata_infrastructure.id}"
202+
}
203+
204+
resource "local_file" "test_vm_cluster_network_downloaded_config_file" {
205+
content = "${data.oci_database_vm_cluster_network_download_config_file.test_vm_cluster_network_download_config_file.content}"
206+
filename = "${path.module}/vm_cluster_config.txt"
207+
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/terraform-providers/terraform-provider-oci
33
require (
44
github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce // indirect
55
github.com/hashicorp/terraform v0.12.4-0.20190628193153-a74738cd35fc
6-
github.com/oracle/oci-go-sdk v9.0.0+incompatible
6+
github.com/oracle/oci-go-sdk v10.0.0+incompatible
77
github.com/stretchr/objx v0.1.1 // indirect
88
github.com/stretchr/testify v1.3.0
99
gopkg.in/yaml.v2 v2.2.2

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ github.com/oracle/oci-go-sdk v8.1.0+incompatible h1:4xcTgxetS9E7P7LHh9tUsmqqqJE/
293293
github.com/oracle/oci-go-sdk v8.1.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
294294
github.com/oracle/oci-go-sdk v9.0.0+incompatible h1:jwsYSb5ba62q5vrCVmieBDPbvgROLTlOCtlLUJIZPrM=
295295
github.com/oracle/oci-go-sdk v9.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
296+
github.com/oracle/oci-go-sdk v10.0.0+incompatible h1:uyjSzndqMFExbMf1Y+NaMJ6q6XMrQkjW5YjThSJQaeM=
297+
github.com/oracle/oci-go-sdk v10.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
296298
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
297299
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
298300
github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

0 commit comments

Comments
 (0)