-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
outputs.tf
240 lines (203 loc) · 8.88 KB
/
outputs.tf
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#------------------------------------------------------------------------------
# ECS CLUSTER
#------------------------------------------------------------------------------
output "aws_ecs_cluster_cluster_name" {
description = "The name of the cluster"
value = module.ecs-cluster.aws_ecs_cluster_cluster_name
}
output "aws_ecs_cluster_cluster_id" {
description = "The Amazon ID that identifies the cluster"
value = module.ecs-cluster.aws_ecs_cluster_cluster_id
}
output "aws_ecs_cluster_cluster_arn" {
description = "The Amazon Resource Name (ARN) that identifies the cluster"
value = module.ecs-cluster.aws_ecs_cluster_cluster_arn
}
#------------------------------------------------------------------------------
# AWS ECS Task Execution Role
#------------------------------------------------------------------------------
output "aws_iam_role_ecs_task_execution_role_arn" {
description = "The Amazon Resource Name (ARN) specifying the role."
value = module.td.aws_iam_role_ecs_task_execution_role_arn
}
output "aws_iam_role_ecs_task_execution_role_create_date" {
description = "The creation date of the IAM role."
value = module.td.aws_iam_role_ecs_task_execution_role_create_date
}
output "aws_iam_role_ecs_task_execution_role_description" {
description = "The description of the role."
value = module.td.aws_iam_role_ecs_task_execution_role_description
}
output "aws_iam_role_ecs_task_execution_role_id" {
description = "The ID of the role."
value = module.td.aws_iam_role_ecs_task_execution_role_id
}
output "aws_iam_role_ecs_task_execution_role_name" {
description = "The name of the role."
value = module.td.aws_iam_role_ecs_task_execution_role_name
}
output "aws_iam_role_ecs_task_execution_role_unique_id" {
description = "The stable and unique string identifying the role."
value = module.td.aws_iam_role_ecs_task_execution_role_unique_id
}
#------------------------------------------------------------------------------
# ECS Task Definition
#------------------------------------------------------------------------------
output "aws_ecs_task_definition_td_arn" {
description = "Full ARN of the Task Definition (including both family and revision)."
value = module.td.aws_ecs_task_definition_td_arn
}
output "aws_ecs_task_definition_td_family" {
description = "The family of the Task Definition."
value = module.td.aws_ecs_task_definition_td_family
}
output "aws_ecs_task_definition_td_revision" {
description = "The revision of the task in a particular family."
value = module.td.aws_ecs_task_definition_td_revision
}
output "container_name" {
description = "Name of the container"
value = var.container_name
}
#------------------------------------------------------------------------------
# APPLICATION LOAD BALANCER
#------------------------------------------------------------------------------
output "aws_lb_lb_id" {
description = "The ARN of the load balancer (matches arn)."
value = module.ecs-fargate-service.aws_lb_lb_id
}
output "aws_lb_lb_arn" {
description = "The ARN of the load balancer (matches id)."
value = module.ecs-fargate-service.aws_lb_lb_arn
}
output "aws_lb_lb_arn_suffix" {
description = "The ARN suffix for use with CloudWatch Metrics."
value = module.ecs-fargate-service.aws_lb_lb_arn_suffix
}
output "aws_lb_lb_dns_name" {
description = "The DNS name of the load balancer."
value = module.ecs-fargate-service.aws_lb_lb_dns_name
}
output "aws_lb_lb_zone_id" {
description = "The canonical hosted zone ID of the load balancer (to be used in a Route 53 Alias record)."
value = module.ecs-fargate-service.aws_lb_lb_zone_id
}
#------------------------------------------------------------------------------
# ACCESS CONTROL TO APPLICATION LOAD BALANCER
#------------------------------------------------------------------------------
output "aws_security_group_lb_access_sg_id" {
description = "The ID of the security group"
value = module.ecs-fargate-service.aws_security_group_lb_access_sg_id
}
output "aws_security_group_lb_access_sg_arn" {
description = "The ARN of the security group"
value = module.ecs-fargate-service.aws_security_group_lb_access_sg_arn
}
output "aws_security_group_lb_access_sg_vpc_id" {
description = "The VPC ID."
value = module.ecs-fargate-service.aws_security_group_lb_access_sg_vpc_id
}
output "aws_security_group_lb_access_sg_owner_id" {
description = "The owner ID."
value = module.ecs-fargate-service.aws_security_group_lb_access_sg_owner_id
}
output "aws_security_group_lb_access_sg_name" {
description = "The name of the security group"
value = module.ecs-fargate-service.aws_security_group_lb_access_sg_name
}
output "aws_security_group_lb_access_sg_description" {
description = "The description of the security group"
value = module.ecs-fargate-service.aws_security_group_lb_access_sg_description
}
output "aws_security_group_lb_access_sg_ingress" {
description = "The ingress rules."
value = module.ecs-fargate-service.aws_security_group_lb_access_sg_ingress
}
output "aws_security_group_lb_access_sg_egress" {
description = "The egress rules."
value = module.ecs-fargate-service.aws_security_group_lb_access_sg_egress
}
#------------------------------------------------------------------------------
# AWS LOAD BALANCER - Target Groups
#------------------------------------------------------------------------------
output "lb_http_tgs_ids" {
description = "List of HTTP Target Groups IDs"
value = module.ecs-fargate-service.lb_http_tgs_ids
}
output "lb_http_tgs_arns" {
description = "List of HTTP Target Groups ARNs"
value = module.ecs-fargate-service.lb_http_tgs_arns
}
output "lb_http_tgs_names" {
description = "List of HTTP Target Groups Names"
value = module.ecs-fargate-service.lb_http_tgs_names
}
output "lb_https_tgs_ids" {
description = "List of HTTPS Target Groups IDs"
value = module.ecs-fargate-service.lb_https_tgs_ids
}
output "lb_https_tgs_arns" {
description = "List of HTTPS Target Groups ARNs"
value = module.ecs-fargate-service.lb_https_tgs_arns
}
output "lb_https_tgs_names" {
description = "List of HTTPS Target Groups Names"
value = module.ecs-fargate-service.lb_https_tgs_names
}
#------------------------------------------------------------------------------
# AWS LOAD BALANCER - Listeners
#------------------------------------------------------------------------------
output "lb_http_listeners_ids" {
description = "List of HTTP Listeners IDs"
value = module.ecs-fargate-service.lb_http_listeners_ids
}
output "lb_http_listeners_arns" {
description = "List of HTTP Listeners ARNs"
value = module.ecs-fargate-service.lb_http_listeners_arns
}
output "lb_https_listeners_ids" {
description = "List of HTTPS Listeners IDs"
value = module.ecs-fargate-service.lb_https_listeners_ids
}
output "lb_https_listeners_arns" {
description = "List of HTTPS Listeners ARNs"
value = module.ecs-fargate-service.lb_https_listeners_arns
}
#------------------------------------------------------------------------------
# AWS ECS SERVICE
#------------------------------------------------------------------------------
output "aws_ecs_service_service_id" {
description = "The Amazon Resource Name (ARN) that identifies the service."
value = module.ecs-fargate-service.aws_ecs_service_service_id
}
output "aws_ecs_service_service_name" {
description = "The name of the service."
value = module.ecs-fargate-service.aws_ecs_service_service_name
}
output "aws_ecs_service_service_cluster" {
description = "The Amazon Resource Name (ARN) of cluster which the service runs on."
value = module.ecs-fargate-service.aws_ecs_service_service_cluster
}
output "aws_ecs_service_service_desired_count" {
description = "The number of instances of the task definition"
value = module.ecs-fargate-service.aws_ecs_service_service_desired_count
}
#------------------------------------------------------------------------------
# AWS SECURITY GROUPS
#------------------------------------------------------------------------------
output "ecs_tasks_sg_id" {
description = "$${var.name_prefix} ECS Tasks Security Group - The ID of the security group"
value = module.ecs-fargate-service.ecs_tasks_sg_id
}
output "ecs_tasks_sg_arn" {
description = "$${var.name_prefix} ECS Tasks Security Group - The ARN of the security group"
value = module.ecs-fargate-service.ecs_tasks_sg_arn
}
output "ecs_tasks_sg_name" {
description = "$${var.name_prefix} ECS Tasks Security Group - The name of the security group"
value = module.ecs-fargate-service.ecs_tasks_sg_name
}
output "ecs_tasks_sg_description" {
description = "$${var.name_prefix} ECS Tasks Security Group - The description of the security group"
value = module.ecs-fargate-service.ecs_tasks_sg_description
}