210 lines
6.5 KiB
Terraform
210 lines
6.5 KiB
Terraform
variable "ecs_cluster" {
|
|
type = string
|
|
description = "The name of the ECS cluster to use"
|
|
nullable = false
|
|
}
|
|
|
|
variable "vpc_id" {
|
|
type = string
|
|
default = null
|
|
}
|
|
|
|
variable "fleet_config" {
|
|
type = object({
|
|
task_mem = optional(number, null)
|
|
task_cpu = optional(number, null)
|
|
mem = optional(number, 4096)
|
|
cpu = optional(number, 512)
|
|
pid_mode = optional(string, null)
|
|
image = optional(string, "fleetdm/fleet:v4.64.1")
|
|
family = optional(string, "fleet")
|
|
sidecars = optional(list(any), [])
|
|
depends_on = optional(list(any), [])
|
|
mount_points = optional(list(any), [])
|
|
volumes = optional(list(any), [])
|
|
extra_environment_variables = optional(map(string), {})
|
|
extra_iam_policies = optional(list(string), [])
|
|
extra_execution_iam_policies = optional(list(string), [])
|
|
extra_secrets = optional(map(string), {})
|
|
security_group_name = optional(string, "fleet")
|
|
iam_role_arn = optional(string, null)
|
|
repository_credentials = optional(string, "")
|
|
private_key_secret_name = optional(string, "fleet-server-private-key")
|
|
service = optional(object({
|
|
name = optional(string, "fleet")
|
|
}), {
|
|
name = "fleet"
|
|
})
|
|
database = object({
|
|
password_secret_arn = string
|
|
user = string
|
|
database = string
|
|
address = string
|
|
rr_address = optional(string, null)
|
|
})
|
|
redis = object({
|
|
address = string
|
|
use_tls = optional(bool, true)
|
|
})
|
|
awslogs = optional(object({
|
|
name = optional(string, null)
|
|
region = optional(string, null)
|
|
create = optional(bool, true)
|
|
prefix = optional(string, "fleet")
|
|
retention = optional(number, 5)
|
|
}), {
|
|
name = null
|
|
region = null
|
|
prefix = "fleet"
|
|
retention = 5
|
|
})
|
|
loadbalancer = object({
|
|
arn = string
|
|
})
|
|
extra_load_balancers = optional(list(any), [])
|
|
networking = object({
|
|
subnets = optional(list(string), null)
|
|
security_groups = optional(list(string), null)
|
|
ingress_sources = object({
|
|
cidr_blocks = optional(list(string), [])
|
|
ipv6_cidr_blocks = optional(list(string), [])
|
|
security_groups = optional(list(string), [])
|
|
prefix_list_ids = optional(list(string), [])
|
|
})
|
|
})
|
|
autoscaling = optional(object({
|
|
max_capacity = optional(number, 5)
|
|
min_capacity = optional(number, 1)
|
|
memory_tracking_target_value = optional(number, 80)
|
|
cpu_tracking_target_value = optional(number, 80)
|
|
}), {
|
|
max_capacity = 5
|
|
min_capacity = 1
|
|
memory_tracking_target_value = 80
|
|
cpu_tracking_target_value = 80
|
|
})
|
|
iam = optional(object({
|
|
role = optional(object({
|
|
name = optional(string, "fleet-role")
|
|
policy_name = optional(string, "fleet-iam-policy")
|
|
}), {
|
|
name = "fleet-role"
|
|
policy_name = "fleet-iam-policy"
|
|
})
|
|
execution = optional(object({
|
|
name = optional(string, "fleet-execution-role")
|
|
policy_name = optional(string, "fleet-execution-role")
|
|
}), {
|
|
name = "fleet-execution-role"
|
|
policy_name = "fleet-iam-policy-execution"
|
|
})
|
|
}), {
|
|
name = "fleetdm-execution-role"
|
|
})
|
|
software_installers = optional(object({
|
|
create_bucket = optional(bool, true)
|
|
bucket_name = optional(string, null)
|
|
bucket_prefix = optional(string, "fleet-software-installers-")
|
|
s3_object_prefix = optional(string, "")
|
|
}), {
|
|
create_bucket = true
|
|
bucket_name = null
|
|
bucket_prefix = "fleet-software-installers-"
|
|
s3_object_prefix = ""
|
|
})
|
|
})
|
|
default = {
|
|
task_mem = null
|
|
task_cpu = null
|
|
mem = 512
|
|
cpu = 256
|
|
pid_mode = null
|
|
image = "fleetdm/fleet:v4.64.1"
|
|
family = "fleet"
|
|
sidecars = []
|
|
depends_on = []
|
|
mount_points = []
|
|
volumes = []
|
|
extra_environment_variables = {}
|
|
extra_iam_policies = []
|
|
extra_execution_iam_policies = []
|
|
extra_secrets = {}
|
|
security_group_name = "fleet"
|
|
iam_role_arn = null
|
|
repository_credentials = ""
|
|
private_key_secret_name = "fleet-server-private-key"
|
|
service = {
|
|
name = "fleet"
|
|
}
|
|
database = {
|
|
password_secret_arn = null
|
|
user = null
|
|
database = null
|
|
address = null
|
|
rr_address = null
|
|
}
|
|
redis = {
|
|
address = null
|
|
use_tls = true
|
|
}
|
|
awslogs = {
|
|
name = null
|
|
region = null
|
|
create = true
|
|
prefix = "fleet"
|
|
retention = 5
|
|
}
|
|
loadbalancer = {
|
|
arn = null
|
|
}
|
|
extra_load_balacners = []
|
|
networking = {
|
|
subnets = null
|
|
security_groups = null
|
|
ingress_sources = {
|
|
cidr_blocks = []
|
|
ipv6_cidr_blocks = []
|
|
security_groups = []
|
|
prefix_list_ids = []
|
|
}
|
|
}
|
|
autoscaling = {
|
|
max_capacity = 5
|
|
min_capacity = 1
|
|
memory_tracking_target_value = 80
|
|
cpu_tracking_target_value = 80
|
|
}
|
|
iam = {
|
|
role = {
|
|
name = "fleet-role"
|
|
policy_name = "fleet-iam-policy"
|
|
}
|
|
execution = {
|
|
name = "fleet-execution-role"
|
|
policy_name = "fleet-iam-policy-execution"
|
|
}
|
|
}
|
|
software_installers = {
|
|
create_bucket = true
|
|
bucket_name = null
|
|
bucket_prefix = "fleet-software-installers-"
|
|
s3_object_prefix = ""
|
|
}
|
|
}
|
|
description = "The configuration object for Fleet itself. Fields that default to null will have their respective resources created if not specified."
|
|
nullable = false
|
|
}
|
|
|
|
variable "migration_config" {
|
|
type = object({
|
|
mem = number
|
|
cpu = number
|
|
})
|
|
default = {
|
|
mem = 2048
|
|
cpu = 1024
|
|
}
|
|
description = "The configuration object for Fleet's migration task."
|
|
nullable = false
|
|
}
|