From c247f3a20dd4cbd0721496a365385b25b9442459 Mon Sep 17 00:00:00 2001 From: bdeshi Date: Tue, 28 May 2024 01:49:08 +0600 Subject: [PATCH] tentative variables --- terraform.variables.tf | 109 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) diff --git a/terraform.variables.tf b/terraform.variables.tf index 01df8b0..977820d 100644 --- a/terraform.variables.tf +++ b/terraform.variables.tf @@ -61,14 +61,119 @@ variable "enable_ipv6" { default = true } +variable "create_vault" { + description = "Create vault" + type = bool + default = true +} + +variable "use_vault" { + description = "Use created vault for key creation and management" + type = object({ + volume = bool + object = bool + database = bool + }) + default = { + volume = true + object = true + database = true + } +} + variable "compute_ssh_key" { - description = "The public SSH key for the compute instances" + description = "A pre-created public SSH key for the compute instances" type = string default = null } variable "created_ssh_key_algorithm" { - description = "The algorithm for the created SSH key" + description = "The algorithm for the created SSH key if no key is provided" type = string default = "ED25519" + validation { + error_message = "created_compute_ssh_key_algorithm must be 'RSA', 'ECDSA' or 'ED25519'" + condition = contains(["RSA", "ECDSA", "ED25519"], var.created_compute_ssh_key_algorithm) + } +} + +variable "create_instances" { + description = "Create compute instances types" + type = object({ + micro = bool + flex = bool + }) + default = { + micro = true + flex = true + } +} + +variable "create_static_ip" { + description = "Create a reserved static IP" + type = bool + default = true +} + +variable "attach_static_ip_to_flex" { + description = "Attach reserved static IP to flex instance" + type = bool + default = true +} + +variable "create_databases" { + description = "Create databases" + type = bool + default = true +} + +variable "db_types" { + description = "Types of database workloads to create" + type = list(string) + default = [] + # validate that each entry is a valid workload type + validation { + error_message = "db_types must be a list of 'OLTP', 'DW', 'AJD' or 'APEX'" + condition = alltrue([for v in var.db_types : contains(["OLTP", "DW", "AJD", "APEX"], v)]) + } +} + +variable "enable_email_delivery" { + description = "Create email delivery supporting configurations" + type = bool + default = true +} + +variable "email_configuration" { + description = "values for email configuration" + type = object({ + email_domains = list(string) + approved_senders = list(string) + suppression_list = list(string) + }) + default = {} +} + +variable "create_notification_topics" { + description = "Create notification topics" + type = bool + default = true +} + +variable "topic_configuration" { + description = "Values for notification topics configuration" + type = any + default = {} +} + +variable "enable_object_storage" { + description = "Create object storage bucket supporting configuration" + type = bool + default = true +} + +variable "object_storage_buckets" { + description = "Values for object storage buckets to create" + type = any + default = {} }