111 lines
2.9 KiB
HCL
Executable File
111 lines
2.9 KiB
HCL
Executable File
resource "oci_mysql_mysql_configuration" "sei_mysql_configuration" {
|
|
compartment_id = var.ocid_compartment_database
|
|
description = "Copy of: MySQL.2.Standalone\nDefault standalone configuration for the ${var.mysql_shape} MySQL shape"
|
|
display_name = "mysql-sei-configuration-${var.environment}"
|
|
parent_configuration_id = data.oci_mysql_mysql_configurations.sei_mysql_configurations.configurations[0].id
|
|
shape_name = var.mysql_shape
|
|
options {
|
|
name = "lower_case_table_names"
|
|
value = "CASE_SENSITIVE"
|
|
}
|
|
|
|
options {
|
|
name = "character_set_server"
|
|
value = "LATIN1"
|
|
}
|
|
|
|
options {
|
|
name = "collation_server"
|
|
value = "LATIN1_SWEDISH_CI"
|
|
}
|
|
|
|
options {
|
|
name = "character_set_client"
|
|
value = "LATIN1"
|
|
}
|
|
|
|
options {
|
|
name = "character_set_connection"
|
|
value = "LATIN1"
|
|
}
|
|
|
|
options {
|
|
name = "character_set_results"
|
|
value = "LATIN1"
|
|
}
|
|
|
|
options {
|
|
name = "collation_connection"
|
|
value = "LATIN1_SWEDISH_CI"
|
|
}
|
|
|
|
options {
|
|
name = "init_connect"
|
|
value = "SET NAMES latin1"
|
|
}
|
|
|
|
options {
|
|
name = "sql_require_primary_key"
|
|
value = "OFF"
|
|
}
|
|
|
|
|
|
}
|
|
|
|
resource "oci_mysql_mysql_db_system" "sei_mysql_dbsystem" {
|
|
customer_contacts {
|
|
email = var.mysql_contacts_email
|
|
}
|
|
access_mode = "UNRESTRICTED"
|
|
admin_password = random_password.password_mysql_admin.result
|
|
admin_username = "admin"
|
|
availability_domain = data.oci_identity_availability_domains.ads.availability_domains[0].name
|
|
compartment_id = var.ocid_compartment_database
|
|
configuration_id = oci_mysql_mysql_configuration.sei_mysql_configuration.id
|
|
crash_recovery = "ENABLED"
|
|
data_storage_size_in_gb = var.mysql_database_storage_size
|
|
database_management = "ENABLED"
|
|
database_mode = "READ_WRITE"
|
|
description = "Instância MySQL SEI"
|
|
display_name = "${var.mysql_database_name}-${var.environment}"
|
|
hostname_label = "${var.mysql_database_name}-${var.environment}"
|
|
is_highly_available = var.mysql_highly_available
|
|
mysql_version = var.mysql_database_version
|
|
port = 3306
|
|
port_x = 33060
|
|
security_attributes = {}
|
|
shape_name = var.mysql_shape
|
|
state = "ACTIVE"
|
|
subnet_id = var.ocid_subnet_database
|
|
|
|
data_storage {
|
|
is_auto_expand_storage_enabled = false
|
|
}
|
|
|
|
deletion_policy {
|
|
automatic_backup_retention = "RETAIN"
|
|
final_backup = "REQUIRE_FINAL_BACKUP"
|
|
is_delete_protected = true
|
|
}
|
|
|
|
encrypt_data {
|
|
key_generation_type = "SYSTEM"
|
|
}
|
|
|
|
maintenance {
|
|
window_start_time = "SUNDAY 00:00"
|
|
}
|
|
|
|
read_endpoint {
|
|
exclude_ips = []
|
|
is_enabled = false
|
|
}
|
|
|
|
secure_connections {
|
|
certificate_generation_type = "SYSTEM"
|
|
}
|
|
|
|
source {
|
|
source_type = "NONE"
|
|
}
|
|
} |