mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 00:45:19 +00:00
fleet tf module config (#12304)
This commit is contained in:
parent
0f9bfa3dbd
commit
97a705af5d
@ -52,7 +52,8 @@ resource "aws_ecs_task_definition" "backend" {
|
||||
image = var.fleet_config.image
|
||||
cpu = var.fleet_config.cpu
|
||||
memory = var.fleet_config.mem
|
||||
mountPoints = []
|
||||
mountPoints = var.fleet_config.mount_points
|
||||
dependsOn = var.fleet_config.depends_on
|
||||
volumesFrom = []
|
||||
essential = true
|
||||
portMappings = [
|
||||
@ -128,6 +129,32 @@ resource "aws_ecs_task_definition" "backend" {
|
||||
], local.environment)
|
||||
}
|
||||
], var.fleet_config.sidecars))
|
||||
dynamic "volume" {
|
||||
for_each = var.fleet_config.volumes
|
||||
content {
|
||||
name = volume.value.name
|
||||
host_path = lookup(volume.value, "host_path", null)
|
||||
|
||||
dynamic "docker_volume_configuration" {
|
||||
for_each = lookup(volume.value, "docker_volume_configuration", [])
|
||||
content {
|
||||
scope = lookup(docker_volume_configuration.value, "scope", null)
|
||||
autoprovision = lookup(docker_volume_configuration.value, "autoprovision", null)
|
||||
driver = lookup(docker_volume_configuration.value, "driver", null)
|
||||
driver_opts = lookup(docker_volume_configuration.value, "driver_opts", null)
|
||||
labels = lookup(docker_volume_configuration.value, "labels", null)
|
||||
}
|
||||
}
|
||||
|
||||
dynamic "efs_volume_configuration" {
|
||||
for_each = lookup(volume.value, "efs_volume_configuration", [])
|
||||
content {
|
||||
file_system_id = lookup(efs_volume_configuration.value, "file_system_id", null)
|
||||
root_directory = lookup(efs_volume_configuration.value, "root_directory", null)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_appautoscaling_target" "ecs_target" {
|
||||
|
@ -16,6 +16,9 @@ variable "fleet_config" {
|
||||
image = optional(string, "fleetdm/fleet:v4.31.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), [])
|
||||
@ -94,6 +97,9 @@ variable "fleet_config" {
|
||||
image = "fleetdm/fleet:v4.31.1"
|
||||
family = "fleet"
|
||||
sidecars = []
|
||||
depends_on = []
|
||||
mount_points = []
|
||||
volumes = []
|
||||
extra_environment_variables = {}
|
||||
extra_iam_policies = []
|
||||
extra_execution_iam_policies = []
|
||||
|
@ -55,6 +55,9 @@ variable "fleet_config" {
|
||||
image = optional(string, "fleetdm/fleet:v4.31.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), [])
|
||||
@ -133,6 +136,9 @@ variable "fleet_config" {
|
||||
image = "fleetdm/fleet:v4.31.1"
|
||||
family = "fleet"
|
||||
sidecars = []
|
||||
depends_on = []
|
||||
volumes = []
|
||||
mount_points = []
|
||||
extra_environment_variables = {}
|
||||
extra_iam_policies = []
|
||||
extra_execution_iam_policies = []
|
||||
|
@ -145,6 +145,9 @@ variable "fleet_config" {
|
||||
image = optional(string, "fleetdm/fleet:v4.31.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), [])
|
||||
@ -223,6 +226,9 @@ variable "fleet_config" {
|
||||
image = "fleetdm/fleet:v4.31.1"
|
||||
family = "fleet"
|
||||
sidecars = []
|
||||
depends_on = []
|
||||
volumes = []
|
||||
mount_points = []
|
||||
extra_environment_variables = {}
|
||||
extra_iam_policies = []
|
||||
extra_execution_iam_policies = []
|
||||
|
@ -218,6 +218,9 @@ variable "fleet_config" {
|
||||
image = optional(string, "fleetdm/fleet:v4.31.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), [])
|
||||
@ -310,6 +313,9 @@ variable "fleet_config" {
|
||||
image = "fleetdm/fleet:v4.31.1"
|
||||
family = "fleet"
|
||||
sidecars = []
|
||||
depends_on = []
|
||||
volumes = []
|
||||
mount_points = []
|
||||
extra_environment_variables = {}
|
||||
extra_iam_policies = []
|
||||
extra_execution_iam_policies = []
|
||||
|
Loading…
Reference in New Issue
Block a user