-
-
Notifications
You must be signed in to change notification settings - Fork 204
/
outputs.tf
145 lines (115 loc) · 5.34 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
################################################################################
# API Gateway
################################################################################
output "api_id" {
description = "The API identifier"
value = try(aws_apigatewayv2_api.this[0].id, null)
}
output "api_endpoint" {
description = "URI of the API, of the form `https://{api-id}.execute-api.{region}.amazonaws.com` for HTTP APIs and `wss://{api-id}.execute-api.{region}.amazonaws.com` for WebSocket APIs"
value = try(aws_apigatewayv2_api.this[0].api_endpoint, null)
}
output "api_arn" {
description = "The ARN of the API"
value = try(aws_apigatewayv2_api.this[0].arn, null)
}
output "api_execution_arn" {
description = "The ARN prefix to be used in an `aws_lambda_permission`'s `source_arn` attribute or in an `aws_iam_policy` to authorize access to the `@connections` API"
value = try(aws_apigatewayv2_api.this[0].execution_arn, null)
}
################################################################################
# Authorizer(s)
################################################################################
output "authorizers" {
description = "Map of API Gateway Authorizer(s) created and their attributes"
value = aws_apigatewayv2_authorizer.this
}
################################################################################
# Domain Name
################################################################################
output "domain_name_id" {
description = "The domain name identifier"
value = try(aws_apigatewayv2_domain_name.this[0].id, null)
}
output "domain_name_arn" {
description = "The ARN of the domain name"
value = try(aws_apigatewayv2_domain_name.this[0].arn, null)
}
output "domain_name_api_mapping_selection_expression" {
description = "The API mapping selection expression for the domain name"
value = try(aws_apigatewayv2_domain_name.this[0].api_mapping_selection_expression, null)
}
output "domain_name_configuration" {
description = "The domain name configuration"
value = try(aws_apigatewayv2_domain_name.this[0].domain_name_configuration, null)
}
output "domain_name_target_domain_name" {
description = "The target domain name"
value = try(aws_apigatewayv2_domain_name.this[0].domain_name_configuration[0].target_domain_name, null)
}
output "domain_name_hosted_zone_id" {
description = "The Amazon Route 53 Hosted Zone ID of the endpoint"
value = try(aws_apigatewayv2_domain_name.this[0].domain_name_configuration[0].hosted_zone_id, null)
}
################################################################################
# Domain - Certificate
################################################################################
output "acm_certificate_arn" {
description = "The ARN of the certificate"
value = module.acm.acm_certificate_arn
}
################################################################################
# Integration(s)
################################################################################
output "integrations" {
description = "Map of the integrations created and their attributes"
value = aws_apigatewayv2_integration.this
}
################################################################################
# Route(s)
################################################################################
output "routes" {
description = "Map of the routes created and their attributes"
value = aws_apigatewayv2_route.this
}
################################################################################
# Stage
################################################################################
output "stage_id" {
description = "The stage identifier"
value = try(aws_apigatewayv2_stage.this[0].id, null)
}
output "stage_domain_name" {
description = "Domain name of the stage (useful for CloudFront distribution)"
value = replace(try(aws_apigatewayv2_stage.this[0].invoke_url, ""), "/^(wss?|https?)://([^/]*).*/", "$2")
}
output "stage_arn" {
description = "The stage ARN"
value = try(aws_apigatewayv2_stage.this[0].arn, null)
}
output "stage_execution_arn" {
description = "The ARN prefix to be used in an aws_lambda_permission's source_arn attribute or in an aws_iam_policy to authorize access to the @connections API"
value = try(aws_apigatewayv2_stage.this[0].execution_arn, null)
}
output "stage_invoke_url" {
description = "The URL to invoke the API pointing to the stage"
value = try(aws_apigatewayv2_stage.this[0].invoke_url, null)
}
################################################################################
# Stage Access Logs - Log Group
################################################################################
output "stage_access_logs_cloudwatch_log_group_name" {
description = "Name of cloudwatch log group created"
value = try(aws_cloudwatch_log_group.this[0].name, null)
}
output "stage_access_logs_cloudwatch_log_group_arn" {
description = "Arn of cloudwatch log group created"
value = try(aws_cloudwatch_log_group.this[0].arn, null)
}
################################################################################
# VPC Link
################################################################################
output "vpc_links" {
description = "Map of VPC links created and their attributes"
value = aws_apigatewayv2_vpc_link.this
}