|
| 1 | +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. |
| 2 | + |
| 3 | +variable "tenancy_ocid" { |
| 4 | +} |
| 5 | + |
| 6 | +variable "user_ocid" { |
| 7 | +} |
| 8 | + |
| 9 | +variable "fingerprint" { |
| 10 | +} |
| 11 | + |
| 12 | +variable "private_key_path" { |
| 13 | +} |
| 14 | + |
| 15 | +variable "region" { |
| 16 | + // Define the region where destination backup will be created. |
| 17 | +} |
| 18 | + |
| 19 | +variable "compartment_ocid" { |
| 20 | +} |
| 21 | + |
| 22 | +provider "oci" { |
| 23 | + tenancy_ocid = var.tenancy_ocid |
| 24 | + user_ocid = var.user_ocid |
| 25 | + fingerprint = var.fingerprint |
| 26 | + private_key_path = var.private_key_path |
| 27 | + region = var.region |
| 28 | +} |
| 29 | + |
| 30 | +resource "oci_mysql_mysql_configuration" "test_mysql_configuration" { |
| 31 | + #Required |
| 32 | + compartment_id = var.compartment_ocid |
| 33 | + shape_name = "MySQL.VM.Standard.E3.1.8GB" |
| 34 | + |
| 35 | + #Optional |
| 36 | + description = "test configuration created by terraform" |
| 37 | + display_name = "terraform test configuration" |
| 38 | + parent_configuration_id = data.oci_mysql_mysql_configurations.test_mysql_configurations.configurations[0].id |
| 39 | + variables { |
| 40 | + #Optional |
| 41 | + block_encryption_mode = "aes-128-ecb" |
| 42 | + binlog_group_commit_sync_delay = 10 |
| 43 | + binlog_group_commit_sync_no_delay_count = 10 |
| 44 | + replica_net_timeout = 60 |
| 45 | + require_secure_transport = false |
| 46 | + local_infile = true |
| 47 | + thread_pool_query_threads_per_group = 10 |
| 48 | + thread_pool_transaction_delay = 10 |
| 49 | + innodb_redo_log_capacity = 104857600 |
| 50 | + explain_format = "TRADITIONAL" |
| 51 | + explicit_defaults_for_timestamp = true |
| 52 | + sql_generate_invisible_primary_key = false |
| 53 | + temptable_max_ram = 1073741824 |
| 54 | + innodb_change_buffering = "NONE" |
| 55 | + innodb_adaptive_hash_index = true |
| 56 | + innodb_undo_log_truncate = true |
| 57 | + table_definition_cache = 400 |
| 58 | + table_open_cache = 4000 |
| 59 | + relay_log_space_limit = 10 |
| 60 | + optimizer_switch = "batched_key_access=off" |
| 61 | + replica_type_conversions = "ALL_LOSSY" |
| 62 | + replica_parallel_workers = 10 |
| 63 | + auto_increment_increment = 10 |
| 64 | + auto_increment_offset = 10 |
| 65 | + skip_name_resolve = false |
| 66 | + max_user_connections = 10 |
| 67 | + join_buffer_size = 262144 |
| 68 | + max_seeks_for_key = 10 |
| 69 | + range_optimizer_max_mem_size = 8388608 |
| 70 | + innodb_autoinc_lock_mode = 2 |
| 71 | + innodb_rollback_on_timeout = false |
| 72 | + innodb_online_alter_log_max_size = 134217728 |
| 73 | + innodb_sort_buffer_size = 1048576 |
| 74 | + thread_pool_size = 16 |
| 75 | + innodb_numa_interleave = false |
| 76 | + long_query_time = 10 |
| 77 | + } |
| 78 | +} |
| 79 | + |
| 80 | +data "oci_mysql_mysql_configurations" "test_mysql_configurations" { |
| 81 | + compartment_id = var.compartment_ocid |
| 82 | + |
| 83 | + #Optional |
| 84 | + state = "ACTIVE" |
| 85 | + shape_name = "MySQL.VM.Standard.E3.1.8GB" |
| 86 | +} |
| 87 | + |
| 88 | +data "oci_identity_availability_domains" "test_availability_domains" { |
| 89 | + compartment_id = var.tenancy_ocid |
| 90 | +} |
0 commit comments