Skip to content

Commit fcad972

Browse files
committed
Add exacc resources to resource discovery example
1 parent 57f1afc commit fcad972

File tree

2 files changed

+208
-0
lines changed

2 files changed

+208
-0
lines changed

infrastructure/resource_discovery/permanent/activation.zip

Whitespace-only changes.
Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
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_database_exadata_infrastructure" "exadata_infrastructure_rd" {
5+
#Required
6+
admin_network_cidr = "192.168.0.0/16"
7+
cloud_control_plane_server1 = "192.168.19.1"
8+
cloud_control_plane_server2 = "192.168.19.2"
9+
compartment_id = "${var.compartment_ocid}"
10+
display_name = "ExaInfraRD"
11+
dns_server = ["192.168.10.10"]
12+
gateway = "192.168.20.1"
13+
infini_band_network_cidr = "10.172.0.0/19"
14+
netmask = "255.255.0.0"
15+
ntp_server = ["192.168.10.20"]
16+
shape = "ExadataCC.Quarter3.100"
17+
time_zone = "US/Pacific"
18+
activation_file = "activation.zip"
19+
20+
#Optional
21+
corporate_proxy = "http://192.168.19.1:80"
22+
defined_tags = "${map("${oci_identity_tag_namespace.tag_namespace_rd.name}.${oci_identity_tag.tag_rd.name}", "value1")}"
23+
24+
freeform_tags = {
25+
"Department" = "Accounting"
26+
}
27+
}
28+
29+
resource "oci_database_vm_cluster_network" "vm_cluster_network_rd" {
30+
compartment_id = "${var.compartment_ocid}"
31+
display_name = "VmClusterRecommendedNetworkRD"
32+
dns = ["192.168.10.10"]
33+
ntp = ["192.168.10.20"]
34+
35+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.exadata_infrastructure_rd.id}"
36+
37+
scans {
38+
hostname = "myprefix1-nsubz-scan"
39+
40+
ips = [
41+
"192.168.19.7",
42+
"192.168.19.6",
43+
"192.168.19.8",
44+
]
45+
46+
port = 1521
47+
}
48+
49+
vm_networks {
50+
domain_name = "oracle.com"
51+
gateway = "192.169.20.1"
52+
netmask = "255.255.0.0"
53+
network_type = "BACKUP"
54+
55+
nodes {
56+
hostname = "myprefix2-cghdm1"
57+
ip = "192.169.19.18"
58+
}
59+
60+
nodes {
61+
hostname = "myprefix2-cghdm2"
62+
ip = "192.169.19.20"
63+
}
64+
65+
vlan_id = "11"
66+
}
67+
68+
vm_networks {
69+
domain_name = "oracle.com"
70+
gateway = "192.168.20.1"
71+
netmask = "255.255.0.0"
72+
network_type = "CLIENT"
73+
74+
nodes {
75+
hostname = "myprefix1-r64zc1"
76+
ip = "192.168.19.10"
77+
vip = "192.168.19.11"
78+
vip_hostname = "myprefix1-r64zc1-vip"
79+
}
80+
81+
nodes {
82+
hostname = "myprefix1-r64zc2"
83+
ip = "192.168.19.14"
84+
vip = "192.168.19.15"
85+
vip_hostname = "myprefix1-r64zc2-vip"
86+
}
87+
88+
vlan_id = "10"
89+
}
90+
91+
#Optional
92+
defined_tags = "${map("${oci_identity_tag_namespace.tag_namespace_rd.name}.${oci_identity_tag.tag_rd.name}", "value1")}"
93+
94+
freeform_tags = {
95+
"Department" = "Accounting"
96+
}
97+
98+
validate_vm_cluster_network = true
99+
}
100+
101+
resource "oci_database_vm_cluster" "test_vm_cluster" {
102+
#Required
103+
compartment_id = "${var.compartment_ocid}"
104+
cpu_core_count = "4"
105+
display_name = "VmClusterRD"
106+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.exadata_infrastructure_rd.id}"
107+
gi_version = "19.1.0.0"
108+
ssh_public_keys = ["${var.ssh_public_key}"]
109+
vm_cluster_network_id = "${oci_database_vm_cluster_network.vm_cluster_network_rd.id}"
110+
111+
#Optional
112+
defined_tags = "${map("${oci_identity_tag_namespace.tag_namespace_rd.name}.${oci_identity_tag.tag_rd.name}", "value1")}"
113+
114+
freeform_tags = {
115+
"Department" = "Accounting"
116+
}
117+
118+
is_local_backup_enabled = "false"
119+
is_sparse_diskgroup_enabled = "false"
120+
license_model = "LICENSE_INCLUDED"
121+
data_storage_size_in_tbs = "84"
122+
db_node_storage_size_in_gbs = "120"
123+
memory_size_in_gbs = "60"
124+
}
125+
126+
resource "oci_database_db_home" "test_db_home_vm_cluster" {
127+
vm_cluster_id = "${oci_database_vm_cluster.test_vm_cluster.id}"
128+
129+
database {
130+
admin_password = "BEstrO0ng_#11"
131+
db_name = "VMClusRD"
132+
character_set = "AL32UTF8"
133+
ncharacter_set = "AL16UTF16"
134+
db_workload = "OLTP"
135+
pdb_name = "pdbName"
136+
137+
freeform_tags = {
138+
"Department" = "Finance"
139+
}
140+
141+
db_backup_config {
142+
auto_backup_enabled = true
143+
auto_backup_window = "SLOT_TWO"
144+
145+
backup_destination_details {
146+
id = "${oci_database_backup_destination.test_backup_destination_nfs.id}"
147+
type = "NFS"
148+
}
149+
}
150+
}
151+
152+
source = "VM_CLUSTER_NEW"
153+
db_version = "12.1.0.2"
154+
display_name = "DbHomeRD"
155+
}
156+
157+
resource "oci_database_backup_destination" "test_backup_destination_nfs" {
158+
#Required
159+
compartment_id = "${var.compartment_ocid}"
160+
display_name = "testBackupDestinationRD"
161+
type = "NFS"
162+
163+
#Optional
164+
165+
freeform_tags = {
166+
"Department" = "Finance"
167+
}
168+
mount_type_details {
169+
local_mount_point_path = "localMountPointPath"
170+
mount_type = "SELF_MOUNT"
171+
}
172+
}
173+
174+
resource "oci_database_database" "test_database_rd" {
175+
#Required
176+
database {
177+
admin_password = "${var.db_admin_password}"
178+
db_name = "VMCluRD2"
179+
character_set = "${var.character_set}"
180+
ncharacter_set = "${var.n_character_set}"
181+
db_workload = "${var.db_workload}"
182+
183+
db_backup_config {
184+
auto_backup_enabled = false
185+
}
186+
}
187+
188+
db_home_id = "${oci_database_db_home.test_db_home_vm_cluster.id}"
189+
source = "NONE"
190+
}
191+
192+
resource "oci_database_autonomous_vm_cluster" "test_autonomous_vm_cluster" {
193+
#Required
194+
compartment_id = "${var.compartment_ocid}"
195+
display_name = "autonomousVmClusterRD"
196+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.exadata_infrastructure_rd.id}"
197+
vm_cluster_network_id = "${oci_database_vm_cluster_network.vm_cluster_network_rd.id}"
198+
199+
#Optional
200+
is_local_backup_enabled = "false"
201+
license_model = "LICENSE_INCLUDED"
202+
time_zone = "US/Pacific"
203+
defined_tags = "${map("${oci_identity_tag_namespace.tag_namespace_rd.name}.${oci_identity_tag.tag_rd.name}", "value1")}"
204+
205+
freeform_tags = {
206+
"Department" = "Finance"
207+
}
208+
}

0 commit comments

Comments
 (0)