# ----------------------------------------------------------------------------- # OCI Authentication # ----------------------------------------------------------------------------- variable "tenancy_ocid" { description = "OCID of the OCI tenancy" type = string } variable "user_ocid" { description = "OCID of the OCI user for API authentication" type = string } variable "fingerprint" { description = "Fingerprint of the OCI API signing key" type = string } variable "private_key_path" { description = "Path to the OCI API private key PEM file" type = string } variable "region" { description = "OCI region for deployment" type = string default = "us-ashburn-1" } # ----------------------------------------------------------------------------- # Compartment # ----------------------------------------------------------------------------- variable "compartment_ocid" { description = "OCID of the existing compartment for all resources" type = string } # ----------------------------------------------------------------------------- # Networking # ----------------------------------------------------------------------------- variable "vcn_cidr" { description = "CIDR block for the VCN" type = string default = "10.0.0.0/16" } variable "public_subnet_cidr" { description = "CIDR block for the public subnet (Load Balancer)" type = string default = "10.0.1.0/24" } variable "private_subnet_cidr" { description = "CIDR block for the private subnet (Compute)" type = string default = "10.0.2.0/24" } # ----------------------------------------------------------------------------- # Compute Instance # ----------------------------------------------------------------------------- variable "instance_shape" { description = "Compute instance shape" type = string default = "VM.Standard.A1.Flex" } variable "instance_ocpus" { description = "Number of OCPUs for the flex instance" type = number default = 2 } variable "instance_memory_gb" { description = "Memory in GB for the flex instance" type = number default = 16 } variable "ssh_public_key" { description = "SSH public key for instance access" type = string } # ----------------------------------------------------------------------------- # Block Volume # ----------------------------------------------------------------------------- variable "block_volume_size_gb" { description = "Size of the block volume in GB for /data" type = number default = 50 } variable "block_volume_vpus_per_gb" { description = "Volume performance units per GB (10=Balanced, 20=Higher, 30+=Ultra High)" type = number default = 20 } # ----------------------------------------------------------------------------- # Application Configuration # ----------------------------------------------------------------------------- variable "app_secret" { description = "Application secret key (64-byte hex string, 128 characters)" type = string sensitive = true validation { condition = can(regex("^[0-9a-fA-F]{128}$", var.app_secret)) error_message = "app_secret must be a 128-character hexadecimal string (64 bytes)." } } variable "jwt_expiry_hours" { description = "JWT token expiry time in hours" type = number default = 12 } variable "app_timezone" { description = "Timezone for the application (e.g. America/Sao_Paulo)" type = string default = "UTC" } # ----------------------------------------------------------------------------- # OCIR (Oracle Cloud Infrastructure Registry) # ----------------------------------------------------------------------------- variable "ocir_namespace" { description = "Object Storage namespace for OCIR (tenancy namespace)" type = string } variable "ocir_username" { description = "Username for OCIR login (e.g. tenancy-namespace/user@email.com)" type = string } variable "ocir_auth_token" { description = "Auth token for OCIR login" type = string sensitive = true } variable "ocir_repo_prefix" { description = "Repository prefix in OCIR (e.g. oci-cis-agent)" type = string default = "oci-cis-agent" } # ----------------------------------------------------------------------------- # Load Balancer # ----------------------------------------------------------------------------- variable "lb_min_bandwidth_mbps" { description = "Minimum bandwidth for the flexible load balancer in Mbps" type = number default = 10 } variable "lb_max_bandwidth_mbps" { description = "Maximum bandwidth for the flexible load balancer in Mbps" type = number default = 100 } # ----------------------------------------------------------------------------- # DNS (Optional) # ----------------------------------------------------------------------------- variable "domain_name" { description = "Domain name for DNS zone and A record. Leave empty to skip DNS setup." type = string default = "" } # ----------------------------------------------------------------------------- # Tags # ----------------------------------------------------------------------------- variable "freeform_tags" { description = "Freeform tags to apply to all resources" type = map(string) default = { "Project" = "oci-cis-agent" "ManagedBy" = "terraform" } }