mirror of
https://github.com/Sea-Haven-Industries/file-share.git
synced 2026-09-30 05:33:10 +00:00
* fix(infra): look up the live office VPN gateway (PLAT-77) The gateway tagged syslog-server-office is deleted, so the plan cannot find a route target for the office LANs. * fix(infra): select the office VPN gateway by id (PLAT-77) A state-and-VPC lookup is not unique once syslog recreates its deleted gateway. The workspace variable pins the gateway that is carrying office traffic.
63 lines
2.2 KiB
HCL
63 lines
2.2 KiB
HCL
variable "aws_region" {
|
|
description = "Region every resource in this configuration is created in."
|
|
type = string
|
|
default = "us-east-1"
|
|
}
|
|
|
|
variable "ami_id" {
|
|
description = "Pinned Amazon Linux 2023 arm64 AMI. Changing this replaces the instance. Snapshot the data volume the same day and confirm before apply."
|
|
type = string
|
|
default = "ami-0eb45f74aa8a20238"
|
|
}
|
|
|
|
variable "filebrowser_version" {
|
|
description = "Pinned FileBrowser release. Do not track releases/latest."
|
|
type = string
|
|
default = "v2.63.23"
|
|
|
|
validation {
|
|
condition = can(regex("^v[0-9]+\\.[0-9]+\\.[0-9]+$", var.filebrowser_version))
|
|
error_message = "filebrowser_version must look like v2.63.23."
|
|
}
|
|
}
|
|
|
|
variable "smb_password_secret_arn" {
|
|
description = "Exact ARN of file-share/smb-password in this account. Set as an HCP workspace variable. Never the secret value."
|
|
type = string
|
|
|
|
validation {
|
|
condition = startswith(var.smb_password_secret_arn, "arn:aws:secretsmanager:")
|
|
error_message = "smb_password_secret_arn must be a Secrets Manager ARN."
|
|
}
|
|
}
|
|
|
|
variable "filebrowser_password_secret_arn" {
|
|
description = "Exact ARN of file-share/filebrowser-password in this account. Set as an HCP workspace variable. Never the secret value."
|
|
type = string
|
|
|
|
validation {
|
|
condition = startswith(var.filebrowser_password_secret_arn, "arn:aws:secretsmanager:")
|
|
error_message = "filebrowser_password_secret_arn must be a Secrets Manager ARN."
|
|
}
|
|
}
|
|
|
|
variable "vpn_gateway_id" {
|
|
description = "VPN gateway that carries office traffic into the syslog VPC. Set as an HCP workspace variable. The gateway named syslog-server-office in syslog state is deleted."
|
|
type = string
|
|
|
|
validation {
|
|
condition = startswith(var.vpn_gateway_id, "vgw-")
|
|
error_message = "vpn_gateway_id must be a VPN gateway id."
|
|
}
|
|
}
|
|
|
|
variable "data_volume_id" {
|
|
description = "Imported data volume id. Empty until cutover. Terraform attaches this volume and must not create or delete it."
|
|
type = string
|
|
default = ""
|
|
|
|
validation {
|
|
condition = var.data_volume_id == "" || startswith(var.data_volume_id, "vol-")
|
|
error_message = "data_volume_id must be empty or an EBS volume id."
|
|
}
|
|
}
|