-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutputs.tf
More file actions
64 lines (53 loc) · 2.11 KB
/
outputs.tf
File metadata and controls
64 lines (53 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
output "cluster_name" {
description = "Name of the ECS Fargate cluster."
value = module.ecs.name
}
output "docker_push" {
description = "Commands to push a Docker image to the container repository."
value = !var.create_repository ? "" : <<EOT
aws ecr get-login-password --region ${data.aws_region.current.name} | docker login --username AWS --password-stdin ${module.ecr["this"].repository_registry_id}.dkr.ecr.${data.aws_region.current.name}.amazonaws.com
docker build -t ${module.ecr["this"].repository_name} --platform linux/amd64 .
docker tag ${module.ecr["this"].repository_name}:${var.image_tag} ${local.image_url}:latest
docker push ${local.image_url}:latest
EOT
}
output "endpoint_security_group_id" {
description = "Security group ID for the endpoint."
value = module.endpoint_security_group.security_group_id
}
output "endpoint_url" {
description = "URL of the service endpoint."
value = var.create_endpoint ? aws_route53_record.endpoint["this"].fqdn : ""
}
output "execution_role_arn" {
description = "ARN of the role used to execute tasks."
value = aws_iam_role.execution.arn
}
output "load_balancer_arn" {
description = "ARN of the load balancer, if created."
value = var.create_endpoint ? module.alb["this"].arn : ""
}
output "log_group_names" {
description = "Names of managed CloudWatch log groups for the service."
value = [for key, group in aws_cloudwatch_log_group.this : group.name]
}
output "repository_arn" {
description = "ARN of the ECR repository, if created."
value = local.repository_arn
}
output "repository_url" {
description = "URL of the container image repository."
value = local.image_url
}
output "security_group_id" {
description = "Security group ID for the service."
value = module.task_security_group.security_group_id
}
output "task_role_arn" {
description = "ARN of the role attached to the running tasks."
value = aws_iam_role.task.arn
}
output "version_parameter" {
description = "Name of the SSM parameter, if one exists, to store the current version."
value = local.version_parameter
}