Skip to content

Commit 1d34333

Browse files
authored
feat: Add cloudwatch and security group outputs (#121)
1 parent d5cd1b8 commit 1d34333

File tree

2 files changed

+82
-26
lines changed

2 files changed

+82
-26
lines changed

examples/complete/outputs.tf

+42-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,51 @@
1-
output "vpn_endpoint_arn" {
2-
description = "The Amazon Resource Name (ARN) of the Client VPN endpoint"
3-
value = module.ec2_client_vpn.vpn_endpoint_arn
1+
output "client_configuration" {
2+
sensitive = true
3+
value = module.ec2_client_vpn.client_configuration
4+
description = "VPN Client Configuration data."
45
}
56

6-
output "vpn_endpoint_id" {
7-
description = "The ID of the Client VPN endpoint"
8-
value = module.ec2_client_vpn.vpn_endpoint_id
7+
output "full_client_configuration" {
8+
sensitive = true
9+
value = module.ec2_client_vpn.full_client_configuration
10+
description = "Client configuration including client certificate and private key"
11+
}
12+
13+
output "log_group_arn" {
14+
value = module.ec2_client_vpn.log_group_arn
15+
description = "The ARN of the CloudWatch Log Group used for Client VPN connection logging."
16+
}
17+
18+
output "log_group_name" {
19+
value = module.ec2_client_vpn.log_group_name
20+
description = "The name of the CloudWatch Log Group used for Client VPN connection logging."
21+
}
22+
23+
output "security_group_arn" {
24+
value = module.ec2_client_vpn.security_group_arn
25+
description = "The ARN of the security group associated with the Client VPN endpoint."
26+
}
27+
28+
output "security_group_id" {
29+
value = module.ec2_client_vpn.security_group_id
30+
description = "The ID of the security group associated with the Client VPN endpoint."
31+
}
32+
33+
output "security_group_name" {
34+
value = module.ec2_client_vpn.security_group_name
35+
description = "The name of the security group associated with the Client VPN endpoint."
36+
}
37+
38+
output "vpn_endpoint_arn" {
39+
value = module.ec2_client_vpn.vpn_endpoint_arn
40+
description = "The ARN of the Client VPN Endpoint Connection."
941
}
1042

1143
output "vpn_endpoint_dns_name" {
12-
description = "The DNS name to be used by clients when establishing their VPN session"
1344
value = module.ec2_client_vpn.vpn_endpoint_dns_name
45+
description = "The DNS Name of the Client VPN Endpoint Connection."
1446
}
1547

16-
output "client_configuration" {
17-
description = "The full client configuration file content for the VPN endpoint"
18-
sensitive = true
19-
value = module.ec2_client_vpn.full_client_configuration
48+
output "vpn_endpoint_id" {
49+
value = module.ec2_client_vpn.vpn_endpoint_id
50+
description = "The ID of the Client VPN Endpoint Connection."
2051
}

outputs.tf

+40-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
output "vpn_endpoint_arn" {
2-
value = local.enabled ? join("", aws_ec2_client_vpn_endpoint.default[*].arn) : null
3-
description = "The ARN of the Client VPN Endpoint Connection."
4-
}
5-
6-
output "vpn_endpoint_id" {
7-
value = local.enabled ? join("", aws_ec2_client_vpn_endpoint.default[*].id) : null
8-
description = "The ID of the Client VPN Endpoint Connection."
9-
}
10-
11-
output "vpn_endpoint_dns_name" {
12-
value = local.enabled ? join("", aws_ec2_client_vpn_endpoint.default[*].dns_name) : null
13-
description = "The DNS Name of the Client VPN Endpoint Connection."
14-
}
15-
161
output "client_configuration" {
172
value = local.enabled ? join("", data.awsutils_ec2_client_vpn_export_client_config.default[*].client_configuration) : null
183
description = "VPN Client Configuration data."
@@ -34,3 +19,43 @@ output "full_client_configuration" {
3419
description = "Client configuration including client certificate and private key"
3520
sensitive = true
3621
}
22+
23+
output "log_group_arn" {
24+
value = local.logging_enabled ? module.cloudwatch_log.log_group_arn : null
25+
description = "The ARN of the CloudWatch Log Group used for Client VPN connection logging."
26+
}
27+
28+
output "log_group_name" {
29+
value = local.logging_enabled ? module.cloudwatch_log.log_group_name : null
30+
description = "The name of the CloudWatch Log Group used for Client VPN connection logging."
31+
}
32+
33+
output "security_group_arn" {
34+
value = local.security_group_enabled ? module.vpn_security_group.arn : null
35+
description = "The ARN of the security group associated with the Client VPN endpoint."
36+
}
37+
38+
output "security_group_id" {
39+
value = local.security_group_enabled ? module.vpn_security_group.id : null
40+
description = "The ID of the security group associated with the Client VPN endpoint."
41+
}
42+
43+
output "security_group_name" {
44+
value = local.security_group_enabled ? module.vpn_security_group.name : null
45+
description = "The name of the security group associated with the Client VPN endpoint."
46+
}
47+
48+
output "vpn_endpoint_arn" {
49+
value = local.enabled ? join("", aws_ec2_client_vpn_endpoint.default[*].arn) : null
50+
description = "The ARN of the Client VPN Endpoint Connection."
51+
}
52+
53+
output "vpn_endpoint_dns_name" {
54+
value = local.enabled ? join("", aws_ec2_client_vpn_endpoint.default[*].dns_name) : null
55+
description = "The DNS Name of the Client VPN Endpoint Connection."
56+
}
57+
58+
output "vpn_endpoint_id" {
59+
value = local.enabled ? join("", aws_ec2_client_vpn_endpoint.default[*].id) : null
60+
description = "The ID of the Client VPN Endpoint Connection."
61+
}

0 commit comments

Comments
 (0)