70 lines
2.5 KiB
HCL
70 lines
2.5 KiB
HCL
################################################################################
|
|
# Cluster
|
|
################################################################################
|
|
|
|
output "arn" {
|
|
description = "ARN that identifies the cluster"
|
|
value = try(aws_ecs_cluster.this[0].arn, null)
|
|
}
|
|
|
|
output "id" {
|
|
description = "ID that identifies the cluster"
|
|
value = try(aws_ecs_cluster.this[0].id, null)
|
|
}
|
|
|
|
output "name" {
|
|
description = "Name that identifies the cluster"
|
|
value = try(aws_ecs_cluster.this[0].name, null)
|
|
}
|
|
|
|
################################################################################
|
|
# CloudWatch Log Group
|
|
################################################################################
|
|
|
|
output "cloudwatch_log_group_name" {
|
|
description = "Name of CloudWatch log group created"
|
|
value = try(aws_cloudwatch_log_group.this[0].name, null)
|
|
}
|
|
|
|
output "cloudwatch_log_group_arn" {
|
|
description = "ARN of CloudWatch log group created"
|
|
value = try(aws_cloudwatch_log_group.this[0].arn, null)
|
|
}
|
|
|
|
################################################################################
|
|
# Cluster Capacity Providers
|
|
################################################################################
|
|
|
|
output "cluster_capacity_providers" {
|
|
description = "Map of cluster capacity providers attributes"
|
|
value = { for k, v in aws_ecs_cluster_capacity_providers.this : v.id => v }
|
|
}
|
|
|
|
################################################################################
|
|
# Capacity Provider - Autoscaling Group(s)
|
|
################################################################################
|
|
|
|
output "autoscaling_capacity_providers" {
|
|
description = "Map of autoscaling capacity providers created and their attributes"
|
|
value = aws_ecs_capacity_provider.this
|
|
}
|
|
|
|
################################################################################
|
|
# Task Execution - IAM Role
|
|
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html
|
|
################################################################################
|
|
|
|
output "task_exec_iam_role_name" {
|
|
description = "Task execution IAM role name"
|
|
value = try(aws_iam_role.task_exec[0].name, null)
|
|
}
|
|
|
|
output "task_exec_iam_role_arn" {
|
|
description = "Task execution IAM role ARN"
|
|
value = try(aws_iam_role.task_exec[0].arn, null)
|
|
}
|
|
|
|
output "task_exec_iam_role_unique_id" {
|
|
description = "Stable and unique string identifying the task execution IAM role"
|
|
value = try(aws_iam_role.task_exec[0].unique_id, null)
|
|
}
|