@@ -233,7 +233,7 @@ resource "oci_database_autonomous_vm_cluster" "primary_autonomous_vm_cluster" {
233
233
display_name = " PrimaryVmCluster"
234
234
exadata_infrastructure_id = oci_database_exadata_infrastructure. primary_exadata_infrastructure . id
235
235
vm_cluster_network_id = oci_database_vm_cluster_network. primary_vm_cluster_network . id
236
- cpu_core_count_per_node = " 10 "
236
+ cpu_core_count_per_node = " 20 "
237
237
autonomous_data_storage_size_in_tbs = " 2.0"
238
238
memory_per_oracle_compute_unit_in_gbs = " 12"
239
239
total_container_databases = " 2"
@@ -256,7 +256,7 @@ resource "oci_database_autonomous_vm_cluster" "standby_autonomous_vm_cluster" {
256
256
display_name = " StandbyVmCluster"
257
257
exadata_infrastructure_id = oci_database_exadata_infrastructure. standby_exadata_infrastructure . id
258
258
vm_cluster_network_id = oci_database_vm_cluster_network. standby_vm_cluster_network . id
259
- cpu_core_count_per_node = " 10 "
259
+ cpu_core_count_per_node = " 20 "
260
260
autonomous_data_storage_size_in_tbs = " 2.0"
261
261
memory_per_oracle_compute_unit_in_gbs = " 12"
262
262
total_container_databases = " 2"
@@ -273,6 +273,68 @@ resource "oci_database_autonomous_vm_cluster" "standby_autonomous_vm_cluster" {
273
273
}
274
274
}
275
275
276
+ resource "oci_database_autonomous_vm_cluster" "test_autonomous_vm_cluster_primary" {
277
+ # Required
278
+ compartment_id = var. compartment_ocid
279
+ display_name = " TestAutonomousVmClusterPrimary"
280
+ exadata_infrastructure_id = oci_database_exadata_infrastructure. primary_exadata_infrastructure . id
281
+ vm_cluster_network_id = oci_database_vm_cluster_network. primary_vm_cluster_network . id
282
+ cpu_core_count_per_node = " 20"
283
+ autonomous_data_storage_size_in_tbs = " 2.0"
284
+ memory_per_oracle_compute_unit_in_gbs = " 12"
285
+ total_container_databases = " 2"
286
+ # Optional
287
+ is_local_backup_enabled = " false"
288
+ license_model = " LICENSE_INCLUDED"
289
+ time_zone = " US/Pacific"
290
+ defined_tags = {
291
+ " ${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = " SampleTagValue"
292
+ }
293
+
294
+ freeform_tags = {
295
+ " Department" = " Finance"
296
+ }
297
+
298
+ // To ignore changes to autonomous_data_storage_size_in_tbs and db_servers
299
+ lifecycle {
300
+ ignore_changes = [
301
+ autonomous_data_storage_size_in_tbs ,
302
+ db_servers ,
303
+ ]
304
+ }
305
+ }
306
+
307
+ resource "oci_database_autonomous_vm_cluster" "test_autonomous_vm_cluster_standby" {
308
+ # Required
309
+ compartment_id = var. compartment_ocid
310
+ display_name = " TestAutonomousVmClusterStandby"
311
+ exadata_infrastructure_id = oci_database_exadata_infrastructure. standby_exadata_infrastructure . id
312
+ vm_cluster_network_id = oci_database_vm_cluster_network. standby_vm_cluster_network . id
313
+ cpu_core_count_per_node = " 20"
314
+ autonomous_data_storage_size_in_tbs = " 2.0"
315
+ memory_per_oracle_compute_unit_in_gbs = " 12"
316
+ total_container_databases = " 2"
317
+ # Optional
318
+ is_local_backup_enabled = " false"
319
+ license_model = " LICENSE_INCLUDED"
320
+ time_zone = " US/Pacific"
321
+ defined_tags = {
322
+ " ${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = " SampleTagValue"
323
+ }
324
+
325
+ freeform_tags = {
326
+ " Department" = " Finance"
327
+ }
328
+
329
+ // To ignore changes to autonomous_data_storage_size_in_tbs and db_servers
330
+ lifecycle {
331
+ ignore_changes = [
332
+ autonomous_data_storage_size_in_tbs ,
333
+ db_servers ,
334
+ ]
335
+ }
336
+ }
337
+
276
338
# DG enabled ACD resource
277
339
resource "oci_database_autonomous_container_database" "dg_autonomous_container_database" {
278
340
autonomous_vm_cluster_id = oci_database_autonomous_vm_cluster. primary_autonomous_vm_cluster . id
@@ -320,8 +382,8 @@ resource "oci_database_autonomous_database" "test_autonomous_database" {
320
382
# Required
321
383
admin_password = random_string. autonomous_database_admin_password . result
322
384
compartment_id = var. compartment_ocid
323
- cpu_core_count = " 1"
324
385
data_storage_size_in_tbs = " 1"
386
+ compute_count = 16
325
387
db_name = " atpdb1"
326
388
327
389
# Optional
@@ -357,13 +419,6 @@ resource "oci_database_autonomous_container_database_dataguard_association_opera
357
419
oci_database_autonomous_container_database_dataguard_association_operation . failover ]
358
420
}
359
421
360
- resource "oci_database_autonomous_container_database_dataguard_association" dgresource {
361
- autonomous_container_database_id = oci_database_autonomous_container_database. dg_autonomous_container_database . id
362
- autonomous_container_database_dataguard_association_id = data. oci_database_autonomous_container_database_dataguard_associations . primary_autonomous_dg_associations . autonomous_container_database_dataguard_associations [0 ]. id
363
- is_automatic_failover_enabled = false
364
- protection_mode = " MAXIMUM_AVAILABILITY"
365
- fast_start_fail_over_lag_limit_in_seconds = null
366
- }
367
422
368
423
data "oci_database_db_servers" "primary_db_servers" {
369
424
# Required
@@ -376,6 +431,88 @@ data "oci_database_db_servers" "standby_db_servers" {
376
431
compartment_id = var. compartment_ocid
377
432
exadata_infrastructure_id = oci_database_exadata_infrastructure. standby_exadata_infrastructure . id
378
433
}
434
+
435
+ resource "oci_database_autonomous_container_database" "test_autonomous_container_database_primary" {
436
+ # Required
437
+ autonomous_vm_cluster_id = oci_database_autonomous_vm_cluster. test_autonomous_vm_cluster_primary . id
438
+ display_name = " PrimaryACD"
439
+ patch_model = " RELEASE_UPDATES"
440
+ db_version = " 19.21.0.1.0"
441
+ db_name = " PRIMARY"
442
+
443
+ # Optional
444
+ backup_config {
445
+ backup_destination_details {
446
+ type = " LOCAL"
447
+ }
448
+ recovery_window_in_days = " 7"
449
+ }
450
+
451
+ compartment_id = var. compartment_ocid
452
+ freeform_tags = var. autonomous_database_freeform_tags
453
+ service_level_agreement_type = " STANDARD"
454
+
455
+ maintenance_window_details {
456
+ preference = " CUSTOM_PREFERENCE"
457
+
458
+ days_of_week {
459
+ name = " MONDAY"
460
+ }
461
+
462
+ hours_of_day = [" 4" ]
463
+
464
+ months {
465
+ name = " JANUARY"
466
+ }
467
+
468
+ months {
469
+ name = " APRIL"
470
+ }
471
+
472
+ months {
473
+ name = " JULY"
474
+ }
475
+
476
+ months {
477
+ name = " OCTOBER"
478
+ }
479
+
480
+ weeks_of_month = [" 2" ]
481
+ }
482
+ version_preference = " LATEST_RELEASE_UPDATE"
483
+
484
+ lifecycle {
485
+ ignore_changes = [
486
+ peer_autonomous_container_database_display_name ,
487
+ peer_autonomous_exadata_infrastructure_id ,
488
+ peer_autonomous_vm_cluster_id ,
489
+ peer_cloud_autonomous_vm_cluster_id ,
490
+ peer_db_unique_name ,
491
+ service_level_agreement_type ,
492
+ protection_mode ,
493
+ peer_autonomous_container_database_backup_config ,
494
+ ]
495
+ }
496
+
497
+ }
498
+
499
+ resource "oci_database_autonomous_container_database_dataguard_association" "test_autonomous_container_database_dataguard_association" {
500
+ # Required
501
+ autonomous_container_database_id = oci_database_autonomous_container_database. test_autonomous_container_database_primary . id
502
+ is_automatic_failover_enabled = false
503
+ protection_mode = " MAXIMUM_AVAILABILITY"
504
+ peer_autonomous_vm_cluster_id = oci_database_autonomous_vm_cluster. test_autonomous_vm_cluster_standby . id
505
+ peer_autonomous_container_database_display_name = " StandbyACD"
506
+ peer_autonomous_container_database_compartment_id = var. compartment_ocid
507
+ peer_autonomous_container_database_backup_config {
508
+ backup_destination_details {
509
+ type = " LOCAL"
510
+ }
511
+ recovery_window_in_days = " 7"
512
+ }
513
+ peer_db_unique_name = " Y3Z69J5C_sea1835"
514
+ }
515
+
379
516
# ### End Resources ####
380
517
# ######################
381
518
0 commit comments