Initial Oracle Deep Data Security lab kit
This commit is contained in:
21
terraform/modules/autonomous_database/main.tf
Normal file
21
terraform/modules/autonomous_database/main.tf
Normal file
@@ -0,0 +1,21 @@
|
||||
resource "oci_database_autonomous_database" "this" {
|
||||
compartment_id = var.compartment_id
|
||||
db_name = var.db_name
|
||||
display_name = var.display_name
|
||||
admin_password = var.admin_password
|
||||
db_workload = var.db_workload
|
||||
db_version = var.db_version
|
||||
compute_model = var.compute_model
|
||||
compute_count = var.compute_count
|
||||
data_storage_size_in_tbs = var.data_storage_size_in_tbs
|
||||
is_auto_scaling_enabled = var.is_auto_scaling_enabled
|
||||
license_model = var.license_model
|
||||
subnet_id = var.subnet_id
|
||||
nsg_ids = var.nsg_ids
|
||||
private_endpoint_label = var.private_endpoint_label
|
||||
whitelisted_ips = var.whitelisted_ips
|
||||
is_mtls_connection_required = var.is_mtls_connection_required
|
||||
vault_id = var.customer_managed_vault_id
|
||||
kms_key_id = var.customer_managed_key_id
|
||||
freeform_tags = var.freeform_tags
|
||||
}
|
||||
16
terraform/modules/autonomous_database/outputs.tf
Normal file
16
terraform/modules/autonomous_database/outputs.tf
Normal file
@@ -0,0 +1,16 @@
|
||||
output "autonomous_database_id" {
|
||||
description = "Autonomous Database OCID."
|
||||
value = oci_database_autonomous_database.this.id
|
||||
}
|
||||
|
||||
output "private_endpoint" {
|
||||
description = "Private endpoint IP/FQDN reported by OCI."
|
||||
value = try(oci_database_autonomous_database.this.private_endpoint, null)
|
||||
}
|
||||
|
||||
output "connection_strings" {
|
||||
description = "Connection strings generated by Autonomous Database."
|
||||
value = try(oci_database_autonomous_database.this.connection_strings, null)
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
101
terraform/modules/autonomous_database/variables.tf
Normal file
101
terraform/modules/autonomous_database/variables.tf
Normal file
@@ -0,0 +1,101 @@
|
||||
variable "compartment_id" {
|
||||
description = "Compartment OCID."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "db_name" {
|
||||
description = "Autonomous Database DB name."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "display_name" {
|
||||
description = "Autonomous Database display name."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "admin_password" {
|
||||
description = "ADMIN password."
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "db_workload" {
|
||||
description = "Database workload."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "db_version" {
|
||||
description = "Optional database version."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "compute_model" {
|
||||
description = "Autonomous Database compute model."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "compute_count" {
|
||||
description = "Autonomous Database compute count."
|
||||
type = number
|
||||
}
|
||||
|
||||
variable "data_storage_size_in_tbs" {
|
||||
description = "Storage size in TB."
|
||||
type = number
|
||||
}
|
||||
|
||||
variable "is_auto_scaling_enabled" {
|
||||
description = "Enable autoscaling."
|
||||
type = bool
|
||||
}
|
||||
|
||||
variable "license_model" {
|
||||
description = "License model."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "subnet_id" {
|
||||
description = "Private endpoint subnet OCID."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "nsg_ids" {
|
||||
description = "NSG OCIDs."
|
||||
type = list(string)
|
||||
}
|
||||
|
||||
variable "private_endpoint_label" {
|
||||
description = "Private endpoint DNS label."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "customer_managed_key_id" {
|
||||
description = "Optional KMS key OCID."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "customer_managed_vault_id" {
|
||||
description = "Optional Vault OCID for customer-managed key."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "whitelisted_ips" {
|
||||
description = "Whitelisted IPs. Empty for private endpoint use."
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "is_mtls_connection_required" {
|
||||
description = "Require mTLS."
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "freeform_tags" {
|
||||
description = "Freeform tags."
|
||||
type = map(string)
|
||||
default = {}
|
||||
}
|
||||
9
terraform/modules/autonomous_database/versions.tf
Normal file
9
terraform/modules/autonomous_database/versions.tf
Normal file
@@ -0,0 +1,9 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
oci = {
|
||||
source = "oracle/oci"
|
||||
version = ">= 6.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user