|
| 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_security_list" "exadata_shapes_security_list_rd" { |
| 5 | + compartment_id = "${var.compartment_ocid}" |
| 6 | + vcn_id = "${oci_core_vcn.vcn_rd.id}" |
| 7 | + display_name = "ExadataSecurityListRD" |
| 8 | + |
| 9 | + ingress_security_rules { |
| 10 | + source = "10.1.23.0/24" |
| 11 | + protocol = "6" |
| 12 | + } |
| 13 | + |
| 14 | + ingress_security_rules { |
| 15 | + source = "10.1.23.0/24" |
| 16 | + protocol = "1" |
| 17 | + } |
| 18 | + |
| 19 | + egress_security_rules { |
| 20 | + destination = "10.1.23.0/24" |
| 21 | + protocol = "6" |
| 22 | + } |
| 23 | + |
| 24 | + egress_security_rules { |
| 25 | + destination = "10.1.23.0/24" |
| 26 | + protocol = "1" |
| 27 | + } |
| 28 | +} |
| 29 | + |
| 30 | +resource "oci_core_subnet" "exadata_subnet_rd" { |
| 31 | + availability_domain = "${data.oci_identity_availability_domain.ad1.name}" |
| 32 | + cidr_block = "10.1.23.0/24" |
| 33 | + display_name = "TestExadataSubnetRD" |
| 34 | + compartment_id = "${var.compartment_ocid}" |
| 35 | + vcn_id = "${oci_core_vcn.vcn_rd.id}" |
| 36 | + route_table_id = "${oci_core_vcn.vcn_rd.default_route_table_id}" |
| 37 | + dhcp_options_id = "${oci_core_vcn.vcn_rd.default_dhcp_options_id}" |
| 38 | + security_list_ids = ["${oci_core_vcn.vcn_rd.default_security_list_id}", "${oci_core_security_list.exadata_shapes_security_list_rd.id}"] |
| 39 | + dns_label = "subnetexadatard" |
| 40 | +} |
| 41 | + |
| 42 | +resource "oci_database_autonomous_exadata_infrastructure" "test_autonomous_exadata_infrastructure_rd" { |
| 43 | + availability_domain = "${data.oci_identity_availability_domain.ad1.name}" |
| 44 | + compartment_id = "${var.compartment_ocid}" |
| 45 | + display_name = "Exadata11RD" |
| 46 | + domain = "${var.autonomous_exadata_infrastructure_domain}" |
| 47 | + freeform_tags = "${var.autonomous_database_freeform_tags}" |
| 48 | + license_model = "LICENSE_INCLUDED" |
| 49 | + |
| 50 | + maintenance_window_details { |
| 51 | + preference = "CUSTOM_PREFERENCE" |
| 52 | + |
| 53 | + days_of_week { |
| 54 | + name = "MONDAY" |
| 55 | + } |
| 56 | + |
| 57 | + hours_of_day = ["4"] |
| 58 | + |
| 59 | + months { |
| 60 | + name = "APRIL" |
| 61 | + } |
| 62 | + |
| 63 | + weeks_of_month = ["2"] |
| 64 | + } |
| 65 | + |
| 66 | + nsg_ids = ["${oci_core_network_security_group.test_network_security_group.id}"] |
| 67 | + shape = "Exadata.Quarter2.92" |
| 68 | + subnet_id = "${oci_core_subnet.exadata_subnet_rd.id}" |
| 69 | +} |
| 70 | + |
| 71 | +resource "oci_database_autonomous_container_database" "test_autonomous_container_database_rd" { |
| 72 | + #Required |
| 73 | + autonomous_exadata_infrastructure_id = "${oci_database_autonomous_exadata_infrastructure.test_autonomous_exadata_infrastructure_rd.id}" |
| 74 | + display_name = "container-database-rd" |
| 75 | + patch_model = "RELEASE_UPDATES" |
| 76 | + |
| 77 | + #Optional |
| 78 | + backup_config { |
| 79 | + #Optional |
| 80 | + recovery_window_in_days = "${var.autonomous_container_database_backup_config_recovery_window_in_days}" |
| 81 | + } |
| 82 | + |
| 83 | + compartment_id = "${var.compartment_ocid}" |
| 84 | + freeform_tags = "${var.autonomous_database_freeform_tags}" |
| 85 | + service_level_agreement_type = "STANDARD" |
| 86 | + |
| 87 | + maintenance_window_details { |
| 88 | + preference = "CUSTOM_PREFERENCE" |
| 89 | + |
| 90 | + days_of_week { |
| 91 | + name = "MONDAY" |
| 92 | + } |
| 93 | + |
| 94 | + hours_of_day = ["4"] |
| 95 | + |
| 96 | + months { |
| 97 | + name = "APRIL" |
| 98 | + } |
| 99 | + |
| 100 | + weeks_of_month = ["2"] |
| 101 | + } |
| 102 | +} |
0 commit comments