seahaven-ap/terraform/variables.tf

55 lines
1.7 KiB
HCL

variable "aws_region" {
description = "Region every resource in this configuration is created in."
type = string
default = "us-east-1"
}
variable "environment" {
description = "HCP workspace stage. seahaven-dev only; prod is AP-12."
type = string
validation {
condition = var.environment == "dev"
error_message = "environment must be \"dev\". Prod is AP-12."
}
}
variable "github_repo" {
description = "GitHub owner/name for the SPA and API deploy OIDC trust."
type = string
default = "Sea-Haven-Industries/seahaven-ap"
}
variable "github_deploy_branch" {
description = "Git branch pinned in job_workflow_ref for the SPA and API deploy role."
type = string
default = "main"
}
variable "existing_vpc_id" {
description = "When set, place the ALB, Fargate tasks, and Aurora in this VPC instead of creating one."
type = string
default = ""
}
variable "existing_public_subnet_ids" {
description = "Public subnet IDs in existing_vpc_id. Required with existing_vpc_id."
type = list(string)
default = []
validation {
condition = var.existing_vpc_id == "" || length(var.existing_public_subnet_ids) >= 2
error_message = "existing_public_subnet_ids must list at least two subnets when existing_vpc_id is set."
}
}
variable "existing_private_subnet_ids" {
description = "Private subnet IDs in existing_vpc_id for Aurora. Required with existing_vpc_id."
type = list(string)
default = []
validation {
condition = var.existing_vpc_id == "" || length(var.existing_private_subnet_ids) >= 2
error_message = "existing_private_subnet_ids must list at least two subnets when existing_vpc_id is set."
}
}