Toluna terraform module for AWS ECS APP MESH
This module creates an ECS cluster, ECS service, Task definition and IAM role for task excution.
module "ecs" {
source = "toluna-terraform/ecs-appmesh/aws"
version = "~>0.0.1" // Change to the required version.
region = local.region
app_name = local.app_name
environment = local.env_name
env_type = local.env_vars.env_type
aws_profile = local.aws_profile
vpc_id = local.vpc_id
app_mesh_owner = data.aws_caller_identity.mesh_owner.id
app_mesh_name = local.env_vars.app_mesh_name
app_mesh_env = local.env_vars.app_mesh_account
namespace = local.namespace
namespace_id = data.terraform_remote_state.shared.outputs.shared_namespace[0]["${local.env_vars.app_mesh_name}.${local.env_vars.app_mesh_account}.local"].id
ecs_service_desired_count = local.env_vars.ecs_service_desired_count
ecr_repo_url = local.ecr_repo_url
aws_cloudwatch_log_group_name = local.aws_cloudwatch_log_group
subnet_ids = local.subnet_ids
app_container_environment = local.app_container_environment
envoy_container_environment = local.envoy_container_environment
envoy_dockerLabels = local.envoy_dockerLabels
datadog_container_environment = local.dd_container_environment
datadog_dockerLabels = local.dd_dockerLabels
datadog_container_secrets = local.dd_container_secrets
app_container_secrets = local.app_container_secrets
app_container_image = "${local.ecr_repo_url}:${local.env_vars.from_env}"
create_datadog = true
task_definition_cpu = 512
task_definition_memory = 2048
app_container_memory = 2048
backends = local.env_vars.backends #list of backends for the service
external_services = local.env_vars.external_services #list of external service
access_by_gateway_route = true # create a route to the app mesh gateway
integrator_external_services = local.env_vars.external_services # list of external services (accessed by nginx with nat)
}
No requirements.
No requirements.
Name | Version |
---|---|
aws | n/a |
aws.app_mesh | n/a |
external | n/a |
template | n/a |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
access_by_gateway_route | Boolean which initiates if service is added to App mesh gatway | bool |
false |
no |
app_container_cpu | Default container cpu | number |
2 |
no |
app_container_environment | The environment variables to pass to a container | list(map(string)) |
[] |
no |
app_container_image | App container image | string |
n/a | yes |
app_container_memory | Default container memory | number |
4096 |
no |
app_container_port | Default container port | number |
80 |
no |
app_container_secrets | The secrets to pass to the app container | list(map(string)) |
[] |
no |
app_mesh_env | The mesh name | string |
n/a | yes |
app_mesh_name | The mesh name | string |
n/a | yes |
app_mesh_owner | The mesh owner id | string |
n/a | yes |
app_name | app name | string |
n/a | yes |
aws_cloudwatch_log_group_name | Cloud watch log group name | string |
n/a | yes |
aws_profile | profile | string |
n/a | yes |
backends | List of backends for ocastrator | list(string) |
[] |
no |
create_datadog | Boolean which initiate datadog container creation or not | bool |
false |
no |
datadog_container_cpu | Datadog container cpu | number |
10 |
no |
datadog_container_environment | Datadog container environment variables | list(map(string)) |
[] |
no |
datadog_container_image | Datadog container image | string |
"datadog/agent:latest" |
no |
datadog_container_memoryreservation | Datadog container memory | number |
256 |
no |
datadog_container_name | Datadog container name | string |
"datadog_agent" |
no |
datadog_container_port | Datadog container port | number |
8126 |
no |
datadog_container_secrets | The secrets to pass to the datadog container | list(map(string)) |
[] |
no |
datadog_dockerLabels | A key/value map of labels to add to the container | map(string) |
{} |
no |
dockerLabels | A key/value map of labels to add to the container | map(string) |
{} |
no |
ecr_repo_url | ecr repo url | string |
n/a | yes |
ecs_security_group_additional_rules | List of additional security group rules to add to the security group created | any |
{} |
no |
ecs_service_desired_count | ecs service desired count | number |
n/a | yes |
env_type | prod || non-prod | string |
n/a | yes |
environment | environment | string |
n/a | yes |
envoy_app_ports | The app ports for envoy to listen to | string |
"80" |
no |
envoy_container_environment | The environment variables to pass to a container | list(map(string)) |
[] |
no |
envoy_dockerLabels | A key/value map of labels to add to the container | map(string) |
{} |
no |
external_services | List of external services for integrator | list(string) |
[] |
no |
iam_role_additional_policies | Additional policies to be added to the IAM role | list(string) |
[] |
no |
integrator_external_services | Additional policies to be added to the IAM role | list(string) |
[] |
no |
namespace | The app namespac | string |
n/a | yes |
namespace_id | The app namespace id | string |
n/a | yes |
region | Boolean which initiates if service is added to App mesh gatway | string |
"us-east-1" |
no |
subnet_ids | Subnet IDs used in Service | list(string) |
null |
no |
task_definition_cpu | Task definition CPU | number |
2048 |
no |
task_definition_memory | Task definition memory | number |
4096 |
no |
vpc_id | VPC id | string |
n/a | yes |
No outputs.