Skip to content

Commit 106b51e

Browse files
added new reference architectures
1 parent cd12fca commit 106b51e

File tree

35 files changed

+4342
-1
lines changed

35 files changed

+4342
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
resource "oci_database_cloud_vm_cluster" "this" {
5+
for_each = var.cloud_vm_cluster
6+
backup_subnet_id = each.value.backup_subnet_id
7+
cloud_exadata_infrastructure_id = each.value.cloud_exadata_infrastructure_id
8+
compartment_id = each.value.compartment_id
9+
cpu_core_count = each.value.cpu_core_count
10+
display_name = each.value.display_name
11+
gi_version = each.value.gi_version
12+
hostname = each.value.hostname
13+
ssh_public_keys = each.value.ssh_public_keys
14+
subnet_id = each.value.subnet_id
15+
cluster_name = each.value.cluster_name
16+
data_storage_percentage = each.value.data_storage_percentage
17+
defined_tags = each.value.defined_tags
18+
domain = each.value.domain
19+
freeform_tags = each.value.freeform_tags
20+
is_local_backup_enabled = each.value.is_local_backup_enabled
21+
is_sparse_diskgroup_enabled = each.value.is_sparse_diskgroup_enabled
22+
license_model = each.value.license_model
23+
nsg_ids = each.value.nsg_ids
24+
scan_listener_port_tcp = each.value.scan_listener_port_tcp
25+
scan_listener_port_tcp_ssl = each.value.scan_listener_port_tcp_ssl
26+
time_zone = each.value.time_zone
27+
lifecycle {
28+
ignore_changes = all
29+
}
30+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
output "cloud_vm_cluster_informations" {
5+
description = "Cloud VM Cluster informations."
6+
value = length(oci_database_cloud_vm_cluster.this) > 0 ? oci_database_cloud_vm_cluster.this[*] : null
7+
}
8+
9+
output "cloud_vm_cluster_id" {
10+
value = [for b in oci_database_cloud_vm_cluster.this : b.id]
11+
}
12+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
variable "cloud_vm_cluster" {
5+
type = map(object({
6+
backup_subnet_id = string
7+
cloud_exadata_infrastructure_id = string
8+
compartment_id = string
9+
cpu_core_count = number
10+
display_name = string
11+
gi_version = string
12+
hostname = string
13+
ssh_public_keys = list(string)
14+
subnet_id = string
15+
cluster_name = string
16+
data_storage_percentage = number
17+
defined_tags = map(string)
18+
domain = string
19+
freeform_tags = map(string)
20+
is_local_backup_enabled = string
21+
is_sparse_diskgroup_enabled = string
22+
license_model = string
23+
nsg_ids = list(string)
24+
scan_listener_port_tcp = number
25+
scan_listener_port_tcp_ssl = number
26+
time_zone = string
27+
}))
28+
}
29+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
data "oci_database_databases" "this" {
5+
compartment_id = var.compartment_id
6+
db_home_id = var.db_home_id
7+
}
8+
9+
resource "oci_database_data_guard_association" "this" {
10+
for_each = var.database_data_guard_association
11+
creation_type = each.value.creation_type
12+
database_admin_password = each.value.database_admin_password
13+
database_id = data.oci_database_databases.this.databases[0].id
14+
delete_standby_db_home_on_delete = each.value.delete_standby_db_home_on_delete
15+
peer_vm_cluster_id = each.value.peer_vm_cluster_id
16+
protection_mode = each.value.protection_mode
17+
transport_type = each.value.transport_type
18+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
output "exadata_infrastructure_informations" {
5+
description = "Exadata Infrastructure informations."
6+
value = length(oci_database_data_guard_association.this) > 0 ? oci_database_data_guard_association.this[*] : null
7+
}
8+
9+
output "database_data_guard_association" {
10+
value = {for s in oci_database_data_guard_association.this : s.display_name => s}
11+
}
12+
13+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
variable "compartment_id" {
5+
type = string
6+
}
7+
8+
variable "db_home_id" {
9+
type = string
10+
}
11+
12+
variable "database_data_guard_association" {
13+
type = map(object({
14+
creation_type = string
15+
database_admin_password = string
16+
delete_standby_db_home_on_delete = bool
17+
peer_vm_cluster_id = string
18+
protection_mode = string
19+
transport_type = string
20+
}))
21+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
resource "oci_database_db_home" "this" {
5+
for_each = var.database_db_home
6+
database {
7+
admin_password = each.value.admin_password
8+
defined_tags = each.value.defined_tags
9+
freeform_tags = each.value.freeform_tags
10+
db_name = each.value.db_name
11+
}
12+
db_version = each.value.db_version
13+
display_name = each.value.display_name
14+
source = each.value.source
15+
vm_cluster_id = each.value.vm_cluster_id
16+
lifecycle {
17+
ignore_changes = all
18+
}
19+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
output "database_db_home" {
5+
description = "Database DB HOME informations."
6+
value = length(oci_database_db_home.this) > 0 ? oci_database_db_home.this[*] : null
7+
}
8+
9+
output "db_home_id" {
10+
value = [ for b in oci_database_db_home.this : b.id]
11+
}
12+
13+
output "db_system_id" {
14+
value = join(", ", [for b in oci_database_db_home.this : b.id])
15+
}
16+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
variable "database_db_home" {
5+
type = map(object({
6+
admin_password = string
7+
defined_tags = map(string)
8+
freeform_tags = map(string)
9+
db_version = string
10+
display_name = string
11+
db_name = string
12+
source = string
13+
vm_cluster_id = string
14+
}))
15+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
data "oci_identity_availability_domains" "ADs" {
5+
compartment_id = var.tenancy_ocid
6+
}
7+
8+
resource "oci_database_cloud_exadata_infrastructure" "this" {
9+
for_each = var.exadata_infrastructure
10+
availability_domain = data.oci_identity_availability_domains.ADs.availability_domains[each.value.availability_domain - 1].name
11+
compartment_id = each.value.compartment_id
12+
display_name = each.value.display_name
13+
shape = each.value.shape
14+
customer_contacts {
15+
email = each.value.email
16+
}
17+
defined_tags = each.value.defined_tags
18+
freeform_tags = each.value.freeform_tags
19+
maintenance_window {
20+
hours_of_day = each.value.hours_of_day
21+
preference = each.value.preference
22+
weeks_of_month = each.value.weeks_of_month
23+
}
24+
lifecycle {
25+
ignore_changes = all
26+
}
27+
}

0 commit comments

Comments
 (0)