2024-05-23 13:26:58 +06:00
|
|
|
variable "iac_project_name" {
|
|
|
|
description = "The name of the iac project"
|
|
|
|
type = string
|
|
|
|
default = "oci-free"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "iac_project_source" {
|
|
|
|
description = "The source repo of the iac project"
|
|
|
|
type = string
|
|
|
|
default = "https://git.bdeshi.space/bdeshi/terraform-oci-free.git"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "oci_region" {
|
|
|
|
description = "The region for the OCI provider"
|
|
|
|
type = string
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "oci_profile" {
|
|
|
|
description = "The config file profile for the OCI provider"
|
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "tenancy_id" {
|
|
|
|
description = "The OCID of the tenancy"
|
|
|
|
type = string
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
variable "prefix" {
|
|
|
|
description = "Name prefix for all resources"
|
|
|
|
type = string
|
|
|
|
default = "free-"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "admin_create_credentials" {
|
|
|
|
type = object({
|
|
|
|
api_key = bool
|
|
|
|
auth_token = bool
|
|
|
|
customer_key = bool
|
|
|
|
password = bool
|
2024-05-28 05:26:50 +06:00
|
|
|
smtp = bool
|
2024-05-23 13:26:58 +06:00
|
|
|
})
|
|
|
|
default = {
|
|
|
|
api_key = true
|
|
|
|
auth_token = false
|
|
|
|
customer_key = false
|
|
|
|
password = false
|
2024-05-28 05:26:50 +06:00
|
|
|
smtp = true
|
2024-05-23 13:26:58 +06:00
|
|
|
}
|
|
|
|
description = "Types of credentials to create for the admin user"
|
|
|
|
}
|
2024-05-24 16:17:53 +06:00
|
|
|
|
|
|
|
variable "vcn_cidr" {
|
|
|
|
description = "The CIDR block for the VCN"
|
|
|
|
type = string
|
|
|
|
default = "10.0.0.0/16"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "enable_ipv6" {
|
|
|
|
description = "Enable IPv6 for the VCN"
|
|
|
|
type = bool
|
|
|
|
default = true
|
|
|
|
}
|
2024-05-24 16:18:39 +06:00
|
|
|
|
2024-05-28 01:49:08 +06:00
|
|
|
variable "create_vault" {
|
|
|
|
description = "Create vault"
|
|
|
|
type = bool
|
|
|
|
default = true
|
|
|
|
}
|
|
|
|
|
2024-05-28 03:43:55 +06:00
|
|
|
variable "use_kms" {
|
2024-05-28 01:49:08 +06:00
|
|
|
description = "Use created vault for key creation and management"
|
|
|
|
type = object({
|
|
|
|
volume = bool
|
|
|
|
object = bool
|
|
|
|
database = bool
|
|
|
|
})
|
|
|
|
default = {
|
|
|
|
volume = true
|
|
|
|
object = true
|
|
|
|
database = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-28 01:51:33 +06:00
|
|
|
variable "supplied_compute_ssh_public_key" {
|
2024-05-28 01:49:08 +06:00
|
|
|
description = "A pre-created public SSH key for the compute instances"
|
2024-05-24 16:18:39 +06:00
|
|
|
type = string
|
|
|
|
default = null
|
|
|
|
}
|
|
|
|
|
2024-05-28 01:51:33 +06:00
|
|
|
variable "created_compute_ssh_key_algorithm" {
|
2024-05-28 01:49:08 +06:00
|
|
|
description = "The algorithm for the created SSH key if no key is provided"
|
2024-05-24 16:18:39 +06:00
|
|
|
type = string
|
|
|
|
default = "ED25519"
|
2024-05-28 01:49:08 +06:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2024-05-28 05:19:36 +06:00
|
|
|
# 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 "database_types" {
|
|
|
|
# description = "Types of database workloads to create"
|
|
|
|
# type = list(string)
|
|
|
|
# default = []
|
|
|
|
# validation {
|
|
|
|
# error_message = "database_types must be a list of 'OLTP', 'DW', 'AJD' or 'APEX'"
|
|
|
|
# condition = alltrue([for v in var.database_types : contains(["OLTP", "DW", "AJD", "APEX"], v)])
|
|
|
|
# }
|
|
|
|
# }
|
2024-05-28 01:49:08 +06:00
|
|
|
|
|
|
|
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)
|
|
|
|
})
|
2024-05-28 01:55:34 +06:00
|
|
|
default = {
|
|
|
|
email_domains = []
|
|
|
|
approved_senders = []
|
|
|
|
suppression_list = []
|
|
|
|
}
|
2024-05-28 01:49:08 +06:00
|
|
|
}
|
|
|
|
|
2024-05-28 03:44:48 +06:00
|
|
|
variable "create_topics" {
|
2024-05-28 01:49:08 +06:00
|
|
|
description = "Create notification topics"
|
|
|
|
type = bool
|
|
|
|
default = true
|
|
|
|
}
|
|
|
|
|
2024-05-28 03:44:48 +06:00
|
|
|
variable "topics" {
|
2024-05-28 01:49:08 +06:00
|
|
|
description = "Values for notification topics configuration"
|
2024-05-28 03:44:48 +06:00
|
|
|
type = map(object({
|
|
|
|
description = string
|
|
|
|
subscriptions = list(object({
|
|
|
|
protocol = string
|
|
|
|
endpoint = string
|
|
|
|
}))
|
|
|
|
}))
|
|
|
|
default = {}
|
2024-05-24 16:18:39 +06:00
|
|
|
}
|