Skip to content

Commit a1a7066

Browse files
Releasing version 4.51.0
Releasing version 4.51.0
2 parents 4636c81 + 6ddb16a commit a1a7066

File tree

264 files changed

+25028
-232
lines changed

Some content is hidden

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

264 files changed

+25028
-232
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 4.51.0 (Unreleased)
2+
3+
### Added
4+
- Support for Identity domains
5+
- Support for Oracle support reward service
6+
- Database Migration data sources added
7+
- Support for ExaCS Scan listener port customization
8+
- Support for Database tool project
9+
110
## 4.50.0 (October 27, 2021)
211

312
### Added

examples/database/db_systems/db_exacs/resources.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ resource "oci_database_cloud_vm_cluster" "test_cloud_vm_cluster" {
2424
hostname = var.cloud_vm_cluster_hostname
2525
ssh_public_keys = [var.ssh_public_key]
2626
subnet_id = oci_core_subnet.subnet.id
27+
28+
#Optional
29+
scan_listener_port_tcp = var.cloud_vm_cluster_scan_listener_port_tcp
30+
scan_listener_port_tcp_ssl = var.cloud_vm_cluster_scan_listener_port_tcp_ssl
2731
}
2832

2933
resource "oci_database_db_home" "test_db_home_vm_cluster" {
@@ -51,7 +55,7 @@ resource "oci_database_db_home" "test_db_home_vm_cluster" {
5155
}
5256

5357
resource "oci_database_backup" "test_backup" {
54-
depends_on = ["oci_database_db_home.test_db_home_vm_cluster"]
58+
depends_on = [oci_database_db_home.test_db_home_vm_cluster]
5559
database_id = oci_database_db_home.test_db_home_vm_cluster.database.0.id
5660
display_name = "FirstBackup"
5761
}

examples/database/db_systems/db_exacs/variables.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ variable "cloud_vm_cluster_hostname" {
3535
default = "myoracledb"
3636
}
3737

38+
variable "cloud_vm_cluster_scan_listener_port_tcp" {
39+
default = "1521"
40+
}
41+
42+
variable "cloud_vm_cluster_scan_listener_port_tcp_ssl" {
43+
default = "2484"
44+
}
45+
3846
# DBSystem specific
3947
variable "db_system_shape" {
4048
default = "Exadata.Quarter1.84"

examples/databaseTools/main.tf

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
// Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
//
4+
// We will create a database_tools_connection.
5+
// The database_tools_connection will use a database_tools_private_endpoint.
6+
// The database_tools_private_endpoint will need to be in a subnet, so we will create a vcn and a subnet.
7+
// We will also create an oci_core_network_security_group to be used by the database_tools_private_endpoint.
8+
9+
variable "tenancy_ocid" {
10+
}
11+
12+
variable "user_ocid" {
13+
}
14+
15+
variable "fingerprint" {
16+
}
17+
18+
variable "private_key_path" {
19+
}
20+
21+
variable "compartment_ocid" {
22+
}
23+
24+
variable "region" {
25+
}
26+
27+
provider "oci" {
28+
region = var.region
29+
tenancy_ocid = var.tenancy_ocid
30+
user_ocid = var.user_ocid
31+
fingerprint = var.fingerprint
32+
private_key_path = var.private_key_path
33+
}
34+
35+
### Network resources - vcn, subnet and network security group
36+
# vcn
37+
resource "oci_core_vcn" "tf_vcn" {
38+
cidr_block = "10.0.3.0/24"
39+
compartment_id = var.compartment_ocid
40+
display_name = "test databaseTools Vcn"
41+
}
42+
43+
# subnet
44+
resource "oci_core_subnet" "tf_subnet" {
45+
compartment_id = var.compartment_ocid
46+
vcn_id = oci_core_vcn.tf_vcn.id
47+
cidr_block = "10.0.3.0/26"
48+
display_name = "test databaseTools Subnet"
49+
}
50+
51+
# network security group
52+
resource "oci_core_network_security_group" "test_network_security_group" {
53+
#Required
54+
compartment_id = var.compartment_ocid
55+
vcn_id = oci_core_vcn.tf_vcn.id
56+
57+
#Optional
58+
display_name = "nsg1"
59+
freeform_tags = {"Department"= "Finance"}
60+
}
61+
62+
### Endpoints services
63+
# Endpoints services - Data Sources
64+
data "oci_database_tools_database_tools_endpoint_services" "test_database_tools_endpoint_services" {
65+
compartment_id = var.compartment_ocid
66+
state = "ACTIVE"
67+
}
68+
69+
data "oci_database_tools_database_tools_endpoint_service" "test_database_tools_endpoint_service" {
70+
database_tools_endpoint_service_id = data.oci_database_tools_database_tools_endpoint_services.test_database_tools_endpoint_services.database_tools_endpoint_service_collection.0.items.0.id
71+
}
72+
73+
output "endpoint_service" {
74+
value = data.oci_database_tools_database_tools_endpoint_service.test_database_tools_endpoint_service
75+
}
76+
77+
### Private Endpoint
78+
# Private Endpoint - Resource
79+
resource "oci_database_tools_database_tools_private_endpoint" "test_database_tools_private_endpoint" {
80+
#Required
81+
compartment_id = var.compartment_ocid
82+
display_name = "My private endpoint"
83+
endpoint_service_id = data.oci_database_tools_database_tools_endpoint_service.test_database_tools_endpoint_service.id
84+
subnet_id = oci_core_subnet.tf_subnet.id
85+
86+
#Optional
87+
description = "Private Endpoint used by connection"
88+
nsg_ids = [oci_core_network_security_group.test_network_security_group.id]
89+
private_endpoint_ip = "10.0.3.4"
90+
}
91+
92+
# Private Endpoint - Data Sources
93+
data "oci_database_tools_database_tools_private_endpoints" "test_database_tools_private_endpoints" {
94+
compartment_id = var.compartment_ocid
95+
state = "ACTIVE"
96+
subnet_id = oci_core_subnet.tf_subnet.id
97+
display_name = oci_database_tools_database_tools_private_endpoint.test_database_tools_private_endpoint.display_name
98+
}
99+
100+
output "private_endpoints_d" {
101+
value = data.oci_database_tools_database_tools_private_endpoints.test_database_tools_private_endpoints
102+
}
103+
104+
data "oci_database_tools_database_tools_private_endpoint" "test_database_tools_private_endpoint" {
105+
database_tools_private_endpoint_id = data.oci_database_tools_database_tools_private_endpoints.test_database_tools_private_endpoints.database_tools_private_endpoint_collection.0.items.0.id
106+
}
107+
108+
output "private_endpoint_d" {
109+
value = data.oci_database_tools_database_tools_private_endpoint.test_database_tools_private_endpoint
110+
}
111+
112+
### Connection
113+
# Connection - Resource
114+
resource "oci_database_tools_database_tools_connection" "dbtools_connection" {
115+
compartment_id = var.compartment_ocid
116+
display_name = "My Connection"
117+
type = "ORACLE_DATABASE"
118+
connection_string = "tcps://adb-prod.us-phoenix-1.oraclecloud.com:1522/exampleb2baffff_db20210323ffff_low.adb.oraclecloud.com"
119+
user_name = "[email protected]"
120+
user_password {
121+
value_type = "SECRETID"
122+
123+
# Here, we assume that the user password to use exists as a secret in an OCI Vault
124+
secret_id = "ocid1.vaultsecret.oc1.phx.exampleaihuofciaiazy2u5ko3uyz3sspwd6hf7oqhqmlk5xu3xdetkpffff"
125+
}
126+
127+
# Optional
128+
freeform_tags = { my-Freeform-tag1 = "value f1", my-Freeform-tag2 = "value f2"}
129+
advanced_properties = {
130+
"oracle.jdbc.loginTimeout": "0"
131+
}
132+
related_resource {
133+
entity_type = "DATABASE"
134+
identifier = "ocid1.database.oc1.phx.exampletksujfufl4bhe5sqkfgn7t7lcrkkpy7km5iwzvg6ycls7r5dlffff"
135+
}
136+
private_endpoint_id = oci_database_tools_database_tools_private_endpoint.test_database_tools_private_endpoint.id
137+
}
138+
139+
output "connection_r" {
140+
value = oci_database_tools_database_tools_connection.dbtools_connection
141+
}
142+
143+
# Connection - Data Sources
144+
data "oci_database_tools_database_tools_connections" "test_database_tools_connections" {
145+
compartment_id = var.compartment_ocid
146+
display_name = oci_database_tools_database_tools_connection.dbtools_connection.display_name
147+
state = "ACTIVE"
148+
}
149+
150+
output "connections_d" {
151+
value = data.oci_database_tools_database_tools_connections.test_database_tools_connections
152+
}

examples/databasemigration/migration/migration.tf

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ variable "user_ocid" {
1010
variable "fingerprint" {
1111
}
1212

13-
variable "private_key_path" {
13+
variable "region" {
1414
}
1515

16-
variable "compartment_ocid" {
16+
variable "private_key_path" {
1717
}
1818

19-
variable "region" {
19+
variable "compartment_ocid" {
2020
}
2121

2222
provider "oci" {
@@ -28,7 +28,6 @@ provider "oci" {
2828

2929
}
3030

31-
3231
resource "random_string" "autonomous_database_admin_password" {
3332
length = 16
3433
min_numeric = 2
@@ -51,6 +50,9 @@ variable "ssh_public_keys" {
5150
variable "compartment_id" {
5251
}
5352

53+
variable "database_id" {
54+
}
55+
5456
resource "oci_core_subnet" "test_subnet" {
5557
cidr_block = "10.0.0.0/24"
5658
compartment_id = var.compartment_id
@@ -83,7 +85,18 @@ data "oci_database_migration_agent" "test_agent" {
8385

8486
data "oci_database_migration_migrations" "test_migrations" {
8587
#Required
86-
compartment_id = var.compartment_id
88+
compartment_id = var.compartment_id
89+
}
90+
91+
data "oci_database_migration_job_advisor_report" "test_job_advisor_report" {
92+
job_id = "jobId"
93+
}
94+
95+
data "oci_database_migration_job_output" "test_job_output" {
96+
job_id = "jobId"
97+
}
98+
99+
data "oci_database_migration_migration_object_types" "test_migration_object_types" {
87100
}
88101

89102
data "oci_database_migration_agent_images" "test_agent_images" {}
@@ -93,24 +106,24 @@ resource "oci_database_migration_connection" "test_connection_target" {
93106
password = random_string.autonomous_database_admin_password.result
94107
username = "admin"
95108
}
96-
compartment_id = "${var.compartment_id}"
97-
database_id = "database_id"
109+
compartment_id = var.compartment_id
110+
database_id = var.database_id
98111
database_type = "AUTONOMOUS"
99112
display_name = "TF_display_test_create"
100113
private_endpoint {
101114
compartment_id = var.compartment_id
102-
subnet_id = "subnet_id"
103-
vcn_id = "vcn_id"
115+
subnet_id = var.subnet_id
116+
vcn_id = var.vcn_id
104117
}
105118
vault_details {
106-
compartment_id = "${var.compartment_id}"
107-
key_id = "${var.kms_key_id}"
108-
vault_id = "${var.kms_vault_id}"
119+
compartment_id = var.compartment_id
120+
key_id = var.kms_key_id
121+
vault_id = var.kms_vault_id
109122
}
110123
}
111124

112125
data "oci_identity_availability_domains" "test_availability_domains" {
113-
compartment_id = "${var.tenancy_ocid}"
126+
compartment_id = var.tenancy_ocid
114127
}
115128

116129
resource "oci_database_migration_connection" "test_connection_source" {
@@ -126,20 +139,26 @@ resource "oci_database_migration_connection" "test_connection_source" {
126139
display_name = "TF_display_test_create_source"
127140
ssh_details {
128141
host = "10.2.2.17"
129-
sshkey = "ssh_key"
142+
sshkey = var.ssh_key
130143
sudo_location = "/usr/bin/sudo"
131144
user = "opc"
132145
}
133146
vault_details {
134-
compartment_id = "${var.compartment_id}"
135-
key_id = "${var.kms_key_id}"
136-
vault_id = "${var.kms_vault_id}"
147+
compartment_id = var.compartment_id
148+
key_id = var.kms_key_id
149+
vault_id = var.kms_vault_id
137150
}
138151
}
139152

140153

141154
resource "oci_database_migration_migration" "test_migration" {
142155
compartment_id = var.compartment_id
156+
data_transfer_medium_details {
157+
object_storage_details {
158+
bucket = "bucket"
159+
namespace = "namespace"
160+
}
161+
}
143162
datapump_settings {
144163
export_directory_object {
145164
name = "test_export_dir"
@@ -174,18 +193,17 @@ resource "oci_database_migration_migration" "test_migration" {
174193
url = "https://130.35.83.125"
175194
}
176195
}
177-
source_container_database_connection_id = "cdb_id"
178196
source_database_connection_id = "${oci_database_migration_connection.test_connection_source.id}"
179197
target_database_connection_id = "${oci_database_migration_connection.test_connection_target.id}"
180198
type = "ONLINE"
181199
vault_details {
182200
compartment_id = var.compartment_id
183-
key_id = "${var.kms_key_id}"
184-
vault_id = "${var.kms_vault_id}"
201+
key_id = var.kms_key_id
202+
vault_id = var.kms_vault_id
185203
}
186204
}
187205

188206
output "password" {
189207
sensitive = true
190208
value = random_string.autonomous_database_admin_password.result
191-
}
209+
}

0 commit comments

Comments
 (0)