forked from CommanderK5/terraform-aws-metaflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
locals.tf
22 lines (16 loc) · 987 Bytes
/
locals.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
locals {
# Name of Batch service's security group used on the compute environment
batch_security_group_name = "${var.resource_prefix}batch-compute-environment-security-group${var.resource_suffix}"
# Prefix name of Batch compute environment
compute_env_prefix_name = "${var.resource_prefix}cpu${var.resource_suffix}"
# Name of Batch Queue.
# replace() ensures names that are composed of just prefix + suffix do not have duplicate dashes
batch_queue_name = replace("${var.resource_prefix}${var.resource_suffix}", "--", "-")
# Name of IAM role to create to manage ECS tasks
ecs_execution_role_name = "${var.resource_prefix}ecs-execution-role${var.resource_suffix}"
# Name of Batch service IAM role
batch_execution_role_name = "${var.resource_prefix}batch-execution-role${var.resource_suffix}"
# Name of ECS IAM role
ecs_instance_role_name = "${var.resource_prefix}ecs-iam-role${var.resource_suffix}"
enable_fargate_on_batch = var.batch_type == "fargate"
}