-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_safe.tf
30 lines (27 loc) · 1.39 KB
/
data_safe.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
#####################################################################
## Paid Resources
#####################################################################
resource "oci_data_safe_data_safe_private_endpoint" "data_safe_private_endpoint" {
count = local.is_paid && var.prov_data_safe ? 1 : 0
compartment_id = local.compartment_ocid
display_name = format("%s-data-safe-private-endpoint", var.label_prefix)
subnet_id = oci_core_subnet.subnet_private[0].id
vcn_id = oci_core_vcn.vcn.id
nsg_ids = [oci_core_network_security_group.security_group_adb[0].id]
}
resource "oci_data_safe_target_database" "data_safe_target_database" {
count = local.is_paid && var.prov_data_safe ? 1 : 0
compartment_id = local.compartment_ocid
display_name = format("%s-data-safe-target-database", var.label_prefix)
database_details {
database_type = "AUTONOMOUS_DATABASE"
infrastructure_type = "ORACLE_CLOUD"
autonomous_database_id = oci_database_autonomous_database.autonomous_database.id
}
connection_option {
connection_type = "PRIVATE_ENDPOINT"
datasafe_private_endpoint_id = oci_data_safe_data_safe_private_endpoint.data_safe_private_endpoint[0].id
}
}