From 66c90e5295655bf712aaadc318ef7ebba301d32e Mon Sep 17 00:00:00 2001 From: Salima Hassouni Date: Fri, 31 May 2024 13:17:46 +0000 Subject: [PATCH] DBP-ionos-basic-vm-mariadb --- modules/ionos-basic-vm-mariadb/main.tf | 0 modules/ionos-basic-vm-mariadb/output.tf | 4 + modules/ionos-basic-vm-mariadb/variables.tf | 111 ++++++++++++++++++++ modules/ionos-basic-vm-mariadb/versions.tf | 12 +++ 4 files changed, 127 insertions(+) create mode 100644 modules/ionos-basic-vm-mariadb/main.tf create mode 100644 modules/ionos-basic-vm-mariadb/output.tf create mode 100644 modules/ionos-basic-vm-mariadb/variables.tf create mode 100644 modules/ionos-basic-vm-mariadb/versions.tf diff --git a/modules/ionos-basic-vm-mariadb/main.tf b/modules/ionos-basic-vm-mariadb/main.tf new file mode 100644 index 0000000..e69de29 diff --git a/modules/ionos-basic-vm-mariadb/output.tf b/modules/ionos-basic-vm-mariadb/output.tf new file mode 100644 index 0000000..7d210e8 --- /dev/null +++ b/modules/ionos-basic-vm-mariadb/output.tf @@ -0,0 +1,4 @@ +output "dns_name" { + description = "The DNS name pointing to your cluster." + value = ionoscloud_mariadb_cluster.mariadb_cluster.dns_name +} diff --git a/modules/ionos-basic-vm-mariadb/variables.tf b/modules/ionos-basic-vm-mariadb/variables.tf new file mode 100644 index 0000000..078edb2 --- /dev/null +++ b/modules/ionos-basic-vm-mariadb/variables.tf @@ -0,0 +1,111 @@ +variable "datacenter_id" { + type = string + description = "ID of the datacenter where resources will be deployed" +} + +variable "datacenter_location" { + type = string + description = "Geographic location of the datacenter" +} + +variable "fulldomainname" { + type = string + description = "Domain under which the basic VM server will be available" +} + +variable "ip_pool_name" { + type = string + description = "Name of the IP pool" +} + +variable "image" { + type = string + description = "Image UUID for the VM" +} + +variable "server_memory" { + type = number + description = "Memory allocated to the VM" +} + +variable "server_cpu" { + type = number + description = "CPU cores allocated to the VM" +} + +variable "cpu_family" { + type = string + description = "Type of CPU to use" +} + +variable "volume_size" { + type = number + description = "Size of the primary volume in GB" +} + +variable "second_volume_size" { + type = number + description = "Size of the second volume in GB" +} + +variable "second_volume_disk_type" { + type = string + description = "Disk type of the second volume" +} + +variable "server_name" { + type = string + description = "Name of the server" +} + +variable "mariadb_version" { + type = string + description = "Version of MariaDB to deploy" +} + +variable "instances_count" { + type = number + description = "Number of instances in the MariaDB cluster" +} + +variable "cores" { + type = number + description = "Number of CPU cores per MariaDB instance" +} + +variable "memory" { + type = number + description = "Memory per MariaDB instance in GB" +} + +variable "display_name" { + type = string + description = "Display name for the MariaDB cluster" +} + +variable "maintenance_day" { + type = string + description = "Maintenance day for the MariaDB cluster" + default = "Sunday" +} + +variable "maintenance_hour" { + type = number + description = "Hour at which maintenance may start" + default = 3 +} + +variable "username" { + type = string + description = "Username for the initial MariaDB admin account" +} + +variable "password" { + type = string + description = "Password for the initial MariaDB admin account" +} + +variable "lan_id" { + type = string + description = "LAN ID for connecting the VM and MariaDB cluster" +} diff --git a/modules/ionos-basic-vm-mariadb/versions.tf b/modules/ionos-basic-vm-mariadb/versions.tf new file mode 100644 index 0000000..5040039 --- /dev/null +++ b/modules/ionos-basic-vm-mariadb/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_providers { + ionoscloud = { + source = "ionos-cloud/ionoscloud" + version = "6.3.6" + } + opentelekomcloud = { + source = "opentelekomcloud/opentelekomcloud" + } + } + required_version = ">= 0.13" +}