Skip to content

Commit e4b2e22

Browse files
ecabrersankhsin
authored andcommitted
Added - Support for BaseDB@Partner Clouds- DBAAS Support
1 parent 699a042 commit e4b2e22

38 files changed

+922
-11
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# NAME
4+
# datasource.tf
5+
#
6+
# USAGE
7+
# Use the following path for the Example & Backward Compatibility tests: database/dataguard/db_vm/multicloud
8+
# NOTES
9+
# Terraform Integration Test: TestDatabaseDataGuardAssociationResourceMultiCloud
10+
#
11+
# FILE(S)
12+
# database_data_guard_association_multicloud_test.go
13+
#
14+
# MODIFIED MM/DD/YY
15+
# escabrer 08/28/2025 - Created
16+
17+
18+
19+
data "oci_identity_availability_domain" "test_multicloud_availability_domain" {
20+
ad_number = "3"
21+
compartment_id = var.multicloud_compartment_id
22+
}
23+
24+
data "oci_database_db_homes" "test_multicloud_db_homes" {
25+
compartment_id = var.multicloud_compartment_id
26+
db_system_id = oci_database_db_system.test_multicloud_db_system.id
27+
}
28+
29+
data "oci_database_databases" "test_multicloud_databases" {
30+
compartment_id = var.multicloud_compartment_id
31+
db_home_id = data.oci_database_db_homes.test_multicloud_db_homes.db_homes.0.db_home_id
32+
}
33+
34+
data "oci_database_data_guard_association" "test_multicloud_dataguard_association" {
35+
data_guard_association_id = oci_database_data_guard_association.test_multicloud_dataguard_association.id
36+
database_id = data.oci_database_databases.test_multicloud_databases.databases.0.id
37+
}
38+
39+
data "oci_database_data_guard_associations" "test_multicloud_dataguard_associations" {
40+
database_id = data.oci_database_databases.test_multicloud_databases.databases.0.id
41+
filter {
42+
name = "id"
43+
values = [oci_database_data_guard_association.test_multicloud_dataguard_association.id]
44+
}
45+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# NAME
4+
# dbsystem.tf
5+
#
6+
# USAGE
7+
# Use the following path for the Example & Backward Compatibility tests: database/dataguard/db_vm/multicloud
8+
# NOTES
9+
# Terraform Integration Test: TestDatabaseDataGuardAssociationResourceMultiCloud
10+
#
11+
# FILE(S)
12+
# database_data_guard_association_multicloud_test.go
13+
#
14+
# MODIFIED MM/DD/YY
15+
# escabrer 08/28/2025 - Created
16+
17+
18+
resource "oci_database_db_system" "test_multicloud_db_system" {
19+
availability_domain = data.oci_identity_availability_domain.test_multicloud_availability_domain.name
20+
cluster_placement_group_id = var.multicloud_cluster_placement_group_id
21+
compartment_id = var.multicloud_compartment_id
22+
compute_count = "8"
23+
compute_model = "ECPU"
24+
data_collection_options {
25+
is_diagnostics_events_enabled = "false"
26+
is_health_monitoring_enabled = "false"
27+
is_incident_logs_enabled = "false"
28+
}
29+
data_storage_percentage = "80"
30+
data_storage_size_in_gb = "256"
31+
database_edition = "ENTERPRISE_EDITION"
32+
db_home {
33+
database {
34+
admin_password = var.admin_password
35+
character_set = "AL32UTF8"
36+
db_backup_config {
37+
auto_backup_enabled = "false"
38+
}
39+
db_name = "tfdb310"
40+
db_workload = "OLTP"
41+
ncharacter_set = "AL16UTF16"
42+
}
43+
db_version = "19.26.0.0"
44+
display_name = "tfDbHomeMultiCloud"
45+
}
46+
db_system_options {
47+
storage_management = "LVM"
48+
}
49+
display_name = "tfDBSystemMultiCloud"
50+
domain = var.multicloud_domain
51+
hostname = "tfdbhost311"
52+
license_model = "LICENSE_INCLUDED"
53+
node_count = "1"
54+
nsg_ids = [var.multicloud_nsg_id]
55+
shape = "VM.Standard.x86"
56+
source = "NONE"
57+
ssh_public_keys = [var.ssh_public_key]
58+
storage_volume_performance_mode = "HIGH_PERFORMANCE"
59+
subnet_id = var.multicloud_subnet_id
60+
subscription_id = var.multicloud_subscription_id
61+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# NAME
4+
# main.tf
5+
#
6+
# USAGE
7+
# Use the following path for the Example & Backward Compatibility tests: database/dataguard/db_vm/multicloud
8+
# NOTES
9+
# Terraform Integration Test: TestDatabaseDataGuardAssociationResourceMultiCloud
10+
#
11+
# FILE(S)
12+
# database_data_guard_association_multicloud_test.go
13+
#
14+
# MODIFIED MM/DD/YY
15+
# escabrer 08/28/2025 - Created
16+
17+
18+
resource "oci_database_data_guard_association" "test_multicloud_dataguard_association" {
19+
availability_domain = data.oci_identity_availability_domain.test_multicloud_availability_domain.name
20+
cluster_placement_group_id = var.multicloud_cluster_placement_group_id
21+
compute_count = "4"
22+
compute_model = "ECPU"
23+
creation_type = "NewDbSystem"
24+
data_collection_options {
25+
is_diagnostics_events_enabled = "false"
26+
is_health_monitoring_enabled = "false"
27+
is_incident_logs_enabled = "false"
28+
}
29+
database_admin_password = var.admin_password
30+
database_id = data.oci_database_databases.test_multicloud_databases.databases.0.id
31+
delete_standby_db_home_on_delete = "true"
32+
display_name = "tfDataguardAssociationMultiCloud"
33+
domain = var.multicloud_domain
34+
hostname = "tfpeerdb311"
35+
is_active_data_guard_enabled = "false"
36+
license_model = "LICENSE_INCLUDED"
37+
node_count = "1"
38+
nsg_ids = [var.multicloud_nsg_id]
39+
protection_mode = "MAXIMUM_PERFORMANCE"
40+
shape = "VM.Standard.x86"
41+
storage_volume_performance_mode = "HIGH_PERFORMANCE"
42+
subnet_id = var.multicloud_subnet_id
43+
subscription_id = var.multicloud_subscription_id
44+
transport_type = "ASYNC"
45+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# NAME
4+
# provider.tf
5+
#
6+
# USAGE
7+
# Use the following path for the Example & Backward Compatibility tests: database/dataguard/db_vm/multicloud
8+
# NOTES
9+
# Terraform Integration Test: TestDatabaseDataGuardAssociationResourceMultiCloud
10+
#
11+
# FILE(S)
12+
# database_data_guard_association_multicloud_test.go
13+
#
14+
# MODIFIED MM/DD/YY
15+
# escabrer 08/28/2025 - Created
16+
17+
18+
provider "oci" {
19+
auth = "SecurityToken"
20+
config_file_profile = "terraform-federation-test"
21+
region = var.region
22+
tenancy_ocid = var.compartment_id
23+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# NAME
4+
# variables.tf
5+
#
6+
# USAGE
7+
# Use the following path for the Example & Backward Compatibility tests: database/dataguard/db_vm/multicloud
8+
# NOTES
9+
# Terraform Integration Test: TestDatabaseDataGuardAssociationResourceMultiCloud
10+
#
11+
# FILE(S)
12+
# database_data_guard_association_multicloud_test.go
13+
#
14+
# MODIFIED MM/DD/YY
15+
# escabrer 08/28/2025 - Created
16+
17+
18+
variable "tenancy_ocid" {
19+
type = string
20+
}
21+
22+
variable "compartment_id" {
23+
type = string
24+
}
25+
26+
variable "region" {
27+
type = string
28+
}
29+
30+
variable "ssh_public_key" {
31+
type = string
32+
}
33+
34+
variable "admin_password" {
35+
type = string
36+
}
37+
38+
variable "multicloud_compartment_id" {
39+
type = string
40+
}
41+
42+
variable "multicloud_domain" {
43+
type = string
44+
}
45+
46+
variable "multicloud_nsg_id" {
47+
type = string
48+
}
49+
50+
variable "multicloud_subnet_id" {
51+
type = string
52+
}
53+
54+
variable "multicloud_subscription_id" {
55+
type = string
56+
}
57+
58+
variable "multicloud_cluster_placement_group_id" {
59+
type = string
60+
}

0 commit comments

Comments
 (0)