Skip to content

Commit a636376

Browse files
authored
Releasing version 4.3.0
Releasing version 4.3.0
2 parents c233d54 + dcfc705 commit a636376

File tree

6,139 files changed

+68794
-51735
lines changed

Some content is hidden

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

6,139 files changed

+68794
-51735
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## 4.3.0 (Unreleased)
2+
3+
### Added
4+
- Support for ADBS free DB version details
5+
- Support for MySQL Analytics added
6+
- Support for Private DNS Names added
7+
- Support for feature of expanding and shrinking of Subnet and VCN
8+
- Support for Network ACLs for ExaCC ADB
9+
- Support for `reserved_ips` in `oci_load_balancer`
10+
- Support for `Resource Discovery` added for `management_agent` service
11+
- Support for ExaCS - DB Software Images
12+
- Support for `TDE Wallet Password management` added for `database` service
13+
- Support `Resource Discovery` for `apigateway certificate` resource added
14+
15+
### Fixed
16+
- Fix ExaCS cloud VM cluster as source of `oci_database_db_home` resource creation. ExaCS cloud VM clusters can be specified
17+
as source using `vm_cluster_id` and `SOURCE=VM_CLUSTER_NEW`.
18+
[Github issue 1218](https://github.com/terraform-providers/terraform-provider-oci/issues/1218)
19+
120
## 4.2.0 (November 04, 2020)
221

322
### Added

examples/database/adb/autonomous_data_warehouse.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ resource "oci_database_autonomous_database" "autonomous_data_warehouse" {
2626
db_name = "adbdw1"
2727

2828
#Optional
29-
db_version = data.oci_database_autonomous_db_versions.test_autonomous_dw_versions.autonomous_db_versions[0].version
29+
//If a db version is passed, it must be valid
30+
//db_version = data.oci_database_autonomous_db_versions.test_autonomous_dw_versions.autonomous_db_versions[0].version
3031
db_workload = var.autonomous_data_warehouse_db_workload
3132
display_name = "example_autonomous_data_warehouse"
3233
freeform_tags = var.autonomous_database_freeform_tags

examples/database/adb/autonomous_database.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ resource "oci_database_autonomous_database" "test_autonomous_database_actions" {
5858
compartment_id = var.compartment_ocid
5959
cpu_core_count = "1"
6060
data_storage_size_in_tbs = "1"
61-
db_name = "adbdb11"
61+
db_name = "adbdb111"
6262
db_version = "19c"
6363
db_workload = "AJD"
6464
license_model = "LICENSE_INCLUDED"
@@ -72,6 +72,8 @@ resource "oci_database_autonomous_database_backup" "autonomous_database_backup"
7272
display_name = var.autonomous_database_backup_display_name
7373
}
7474

75+
// Per service, we need to pass in a back up that is at least 2 hours old
76+
/*
7577
resource "oci_database_autonomous_database" "autonomous_database_from_backup_id" {
7678
#Required
7779
admin_password = random_string.autonomous_database_admin_password.result
@@ -98,6 +100,7 @@ resource "oci_database_autonomous_database" "autonomous_database_from_backup_tim
98100
autonomous_database_id = oci_database_autonomous_database_backup.autonomous_database_backup.autonomous_database_id
99101
timestamp = oci_database_autonomous_database_backup.autonomous_database_backup.time_ended
100102
}
103+
*/
101104

102105
data "oci_database_autonomous_databases" "autonomous_databases" {
103106
#Required
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
data "oci_identity_availability_domain" "ad" {
5+
compartment_id = var.tenancy_ocid
6+
ad_number = 1
7+
}
8+
9+
data "oci_database_db_system_shapes" "test_db_system_shapes" {
10+
availability_domain = data.oci_identity_availability_domain.ad.name
11+
compartment_id = var.compartment_ocid
12+
13+
filter {
14+
name = "shape"
15+
values = [var.db_system_shape]
16+
}
17+
}
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
// Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
provider "oci" {
5+
tenancy_ocid = var.tenancy_ocid
6+
user_ocid = var.user_ocid
7+
fingerprint = var.fingerprint
8+
private_key_path = var.private_key_path
9+
region = var.region
10+
}
11+
12+
resource "oci_database_db_system" "test_db_system" {
13+
availability_domain = data.oci_identity_availability_domain.ad.name
14+
compartment_id = var.compartment_ocid
15+
cpu_core_count = var.cpu_core_count
16+
database_edition = var.db_edition
17+
time_zone = var.time_zone
18+
19+
db_home {
20+
database {
21+
admin_password = var.db_admin_password
22+
db_name = "TFdb1Exa"
23+
character_set = var.character_set
24+
ncharacter_set = var.n_character_set
25+
db_workload = var.db_workload
26+
pdb_name = var.pdb_name
27+
28+
db_backup_config {
29+
auto_backup_enabled = false
30+
}
31+
}
32+
33+
db_version = var.db_version
34+
display_name = "MyTFDBHome1Exa"
35+
}
36+
37+
maintenance_window_details {
38+
preference = "CUSTOM_PREFERENCE"
39+
40+
days_of_week {
41+
name = "MONDAY"
42+
}
43+
44+
hours_of_day = ["4"]
45+
lead_time_in_weeks = 2
46+
47+
months {
48+
name = "APRIL"
49+
}
50+
51+
weeks_of_month = ["2"]
52+
}
53+
54+
disk_redundancy = var.db_disk_redundancy
55+
shape = var.db_system_shape
56+
subnet_id = oci_core_subnet.subnet.id
57+
backup_subnet_id = oci_core_subnet.subnet_backup.id
58+
ssh_public_keys = [var.ssh_public_key]
59+
display_name = var.db_system_display_name
60+
sparse_diskgroup = var.sparse_diskgroup
61+
62+
hostname = var.hostname
63+
data_storage_percentage = var.data_storage_percentage
64+
65+
#data_storage_size_in_gb = var.data_storage_size_in_gb
66+
license_model = var.license_model
67+
node_count = data.oci_database_db_system_shapes.test_db_system_shapes.db_system_shapes[0]["minimum_node_count"]
68+
backup_network_nsg_ids = [oci_core_network_security_group.test_network_security_group.id]
69+
nsg_ids = [oci_core_network_security_group.test_network_security_group_backup.id, oci_core_network_security_group.test_network_security_group.id]
70+
71+
#To use defined_tags, set the values below to an existing tag namespace, refer to the identity example on how to create tag namespaces
72+
#defined_tags = {"${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = "value"}
73+
74+
freeform_tags = {
75+
"Department" = "Finance"
76+
}
77+
}
78+
79+
80+
resource "oci_database_db_home" "test_db_home_source_none" {
81+
database {
82+
admin_password = "BEstrO0ng_#11"
83+
character_set = "AL32UTF8"
84+
85+
db_backup_config {
86+
auto_backup_enabled = "true"
87+
auto_backup_window = "SLOT_TWO"
88+
recovery_window_in_days = "10"
89+
}
90+
91+
database_software_image_id = "${var.test_database_software_image_ocid}"
92+
db_name = "dbNonegk"
93+
db_workload = "OLTP"
94+
ncharacter_set = "AL16UTF16"
95+
pdb_name = "pdbName"
96+
}
97+
98+
database_software_image_id = "${var.test_database_software_image_ocid}"
99+
db_system_id = "${oci_database_db_system.test_db_system.id}"
100+
db_version = "19.0.0.0"
101+
display_name = "createdDbHomeNone"
102+
source = "NONE"
103+
}
104+
105+
106+
resource "oci_database_db_system" "test_db_system_2" {
107+
availability_domain = data.oci_identity_availability_domain.ad.name
108+
compartment_id = var.compartment_ocid
109+
cpu_core_count = var.cpu_core_count
110+
database_edition = var.db_edition
111+
time_zone = var.time_zone
112+
113+
db_home {
114+
database {
115+
admin_password = var.db_admin_password
116+
db_name = "TFdb1Ex2"
117+
character_set = var.character_set
118+
ncharacter_set = var.n_character_set
119+
db_workload = var.db_workload
120+
pdb_name = var.pdb_name
121+
database_software_image_id = "${var.test_database_software_image_ocid}"
122+
123+
db_backup_config {
124+
auto_backup_enabled = false
125+
}
126+
}
127+
128+
database_software_image_id = "${var.test_database_software_image_ocid}"
129+
db_version = "19.0.0.0"
130+
display_name = "MyTFDBHome1Exa2"
131+
}
132+
133+
maintenance_window_details {
134+
preference = "CUSTOM_PREFERENCE"
135+
136+
days_of_week {
137+
name = "MONDAY"
138+
}
139+
140+
hours_of_day = ["4"]
141+
lead_time_in_weeks = 2
142+
143+
months {
144+
name = "APRIL"
145+
}
146+
147+
weeks_of_month = ["2"]
148+
}
149+
150+
disk_redundancy = var.db_disk_redundancy
151+
shape = var.db_system_shape
152+
subnet_id = oci_core_subnet.subnet.id
153+
backup_subnet_id = oci_core_subnet.subnet_backup.id
154+
ssh_public_keys = [var.ssh_public_key]
155+
display_name = "MyTFDBSystem2"
156+
sparse_diskgroup = var.sparse_diskgroup
157+
158+
hostname = var.hostname
159+
data_storage_percentage = var.data_storage_percentage
160+
161+
#data_storage_size_in_gb = var.data_storage_size_in_gb
162+
license_model = var.license_model
163+
node_count = data.oci_database_db_system_shapes.test_db_system_shapes.db_system_shapes[0]["minimum_node_count"]
164+
backup_network_nsg_ids = [oci_core_network_security_group.test_network_security_group.id]
165+
nsg_ids = [oci_core_network_security_group.test_network_security_group_backup.id, oci_core_network_security_group.test_network_security_group.id]
166+
167+
#To use defined_tags, set the values below to an existing tag namespace, refer to the identity example on how to create tag namespaces
168+
#defined_tags = {"${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = "value"}
169+
170+
freeform_tags = {
171+
"Department" = "Finance"
172+
}
173+
}
174+
175+
// if the Database uses a custom DSI then the standby DB is launched in existing DB System with same DSI
176+
// DGA can also be created by passing a custom DSI with one-off patches and the standby db will use this custom DSI for launch
177+
// check database software image example on how to launch custom DSI
178+
resource "oci_database_data_guard_association" "test_data_guard_association" {
179+
#Required
180+
creation_type = "ExistingDbSystem"
181+
database_admin_password = "BEstrO0ng_#11"
182+
database_id = "ocid1.database.oc1.iad.abuwcljt4jv5jpqhobwyum5rryb2ft4ixw4bi2alxlxohje3hcg5jsq3lfkq"
183+
protection_mode = "MAXIMUM_PERFORMANCE"
184+
transport_type = "ASYNC"
185+
delete_standby_db_home_on_delete = "true"
186+
187+
#required for ExistingDbSystem creation_type
188+
peer_db_system_id = oci_database_db_system.test_db_system_2.id
189+
190+
database_software_image_id = var.test_database_software_image_ocid2
191+
}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
// Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
resource "oci_core_vcn" "vcn" {
5+
cidr_block = "10.1.0.0/16"
6+
compartment_id = var.compartment_ocid
7+
display_name = "TFExampleVCNDBSystem"
8+
dns_label = "tfexvcndbsys"
9+
}
10+
11+
resource "oci_core_subnet" "subnet" {
12+
availability_domain = data.oci_identity_availability_domain.ad.name
13+
cidr_block = "10.1.20.0/24"
14+
display_name = "TFExampleSubnetDBSystem"
15+
dns_label = "tfexsubdbsys"
16+
security_list_ids = [oci_core_security_list.ExampleSecurityList.id]
17+
compartment_id = var.compartment_ocid
18+
vcn_id = oci_core_vcn.vcn.id
19+
route_table_id = oci_core_route_table.route_table.id
20+
dhcp_options_id = oci_core_vcn.vcn.default_dhcp_options_id
21+
}
22+
23+
resource "oci_core_subnet" "subnet_backup" {
24+
availability_domain = data.oci_identity_availability_domain.ad.name
25+
cidr_block = "10.1.1.0/24"
26+
display_name = "TFExampleSubnetDBSystemBackup"
27+
dns_label = "tfexsubdbsysbp"
28+
security_list_ids = [oci_core_security_list.ExampleSecurityList.id]
29+
compartment_id = var.compartment_ocid
30+
vcn_id = oci_core_vcn.vcn.id
31+
route_table_id = oci_core_route_table.route_table_backup.id
32+
dhcp_options_id = oci_core_vcn.vcn.default_dhcp_options_id
33+
}
34+
35+
resource "oci_core_internet_gateway" "internet_gateway" {
36+
compartment_id = var.compartment_ocid
37+
display_name = "TFExampleIGDBSystem"
38+
vcn_id = oci_core_vcn.vcn.id
39+
}
40+
41+
resource "oci_core_route_table" "route_table" {
42+
compartment_id = var.compartment_ocid
43+
vcn_id = oci_core_vcn.vcn.id
44+
display_name = "TFExampleRouteTableDBSystem"
45+
46+
route_rules {
47+
destination = "0.0.0.0/0"
48+
destination_type = "CIDR_BLOCK"
49+
network_entity_id = oci_core_internet_gateway.internet_gateway.id
50+
}
51+
}
52+
53+
resource "oci_core_route_table" "route_table_backup" {
54+
compartment_id = var.compartment_ocid
55+
vcn_id = oci_core_vcn.vcn.id
56+
display_name = "TFExampleRouteTableDBSystemBackup"
57+
58+
route_rules {
59+
destination = "0.0.0.0/0"
60+
destination_type = "CIDR_BLOCK"
61+
network_entity_id = oci_core_internet_gateway.internet_gateway.id
62+
}
63+
}
64+
65+
resource "oci_core_security_list" "ExampleSecurityList" {
66+
compartment_id = var.compartment_ocid
67+
vcn_id = oci_core_vcn.vcn.id
68+
display_name = "TFExampleSecurityList"
69+
70+
// allow outbound tcp traffic on all ports
71+
egress_security_rules {
72+
destination = "0.0.0.0/0"
73+
protocol = "6"
74+
}
75+
76+
// allow outbound udp traffic on a port range
77+
egress_security_rules {
78+
destination = "0.0.0.0/0"
79+
protocol = "17" // udp
80+
stateless = true
81+
}
82+
83+
egress_security_rules {
84+
destination = "0.0.0.0/0"
85+
protocol = "1"
86+
stateless = true
87+
}
88+
89+
// allow inbound ssh traffic from a specific port
90+
ingress_security_rules {
91+
protocol = "6" // tcp
92+
source = "0.0.0.0/0"
93+
stateless = false
94+
}
95+
96+
// allow inbound icmp traffic of a specific type
97+
ingress_security_rules {
98+
protocol = 1
99+
source = "0.0.0.0/0"
100+
stateless = true
101+
}
102+
}
103+
104+
resource "oci_core_network_security_group" "test_network_security_group" {
105+
compartment_id = var.compartment_ocid
106+
vcn_id = oci_core_vcn.vcn.id
107+
display_name = "displayName"
108+
}
109+
110+
resource "oci_core_network_security_group" "test_network_security_group_backup" {
111+
compartment_id = var.compartment_ocid
112+
vcn_id = oci_core_vcn.vcn.id
113+
display_name = "displayName"
114+
}
115+

0 commit comments

Comments
 (0)