File tree Expand file tree Collapse file tree 11 files changed +875
-10
lines changed Expand file tree Collapse file tree 11 files changed +875
-10
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,14 @@ $ saw watch /aws/lambda/events_debug_logger_ec2 --expand
103
103
104
104
| Name | Description |
105
105
| ------| -------------|
106
+ | cloudwatch\_ log\_ group\_ arn | ARN of cloudwatch log group which holds service-specific log events. |
106
107
| cloudwatch\_ log\_ group\_ name | Name of cloudwatch log group which holds service-specific log events. |
108
+ | event\_ bus\_ arn | ARN of the event bridge eventbus. |
109
+ | event\_ bus\_ name | Name of the event bridge eventbus. |
110
+ | event\_ rule\_ arn | ARN of the event bridge rule. |
111
+ | event\_ rule\_ id | ID of the event bridge rule. |
112
+ | event\_ rule\_ name | Name of the event bridge rule. |
113
+ | event\_ target\_ arn | ARN of the resource targeted by the eventbridge target. |
114
+ | event\_ target\_ rule | Eventbridge rule responsible for invoking the target. |
107
115
108
116
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Original file line number Diff line number Diff line change 1
1
provider "aws" {
2
- region = " us-east-1"
3
- profile = " sean"
2
+ region = " us-east-1"
4
3
}
Original file line number Diff line number Diff line change 1
1
module "eventbridge_debug_logger" {
2
2
source = " ../"
3
3
4
- name = " eventbridge_debug_logger "
5
- service_name = " ec2 "
4
+ name = var . name
5
+ service_name = var . service_name
6
6
lambda_logs_retention_in_days = 1
7
7
tags = var. tags
8
8
}
Original file line number Diff line number Diff line change 1
1
output "saw_command" {
2
- value = " saw watch ${ module . eventbridge_debug_logger . cloudwatch_log_group_name } --expand"
2
+ description = " Tails lambda log group with saw"
3
+ value = " saw watch ${ module . eventbridge_debug_logger . cloudwatch_log_group_name } --expand"
3
4
}
Original file line number Diff line number Diff line change
1
+ name = " events_logger"
2
+ service_name = " ec2"
3
+
1
4
tags = {
2
5
name = " eventbridge_debug_logger"
3
6
managed_by = " terraform"
Original file line number Diff line number Diff line change @@ -2,3 +2,120 @@ variable "tags" {
2
2
description = " A map of tags to add to all resources."
3
3
type = map (string )
4
4
}
5
+
6
+ variable "name" {
7
+ type = string
8
+ description = " Common name shared between resources."
9
+ }
10
+
11
+ variable "service_name" {
12
+ type = string
13
+ description = <<- DESC
14
+ Name of the service to create a catch-all eventbridge rule for.
15
+
16
+ See variables.tf for a complete list of input options.
17
+ DESC
18
+
19
+ validation {
20
+ condition = contains ([
21
+ " access-analyzer" ,
22
+ " forecast" ,
23
+ " apigateway" ,
24
+ " appflow" ,
25
+ " application-autoscaling" ,
26
+ " athena" ,
27
+ " autoscaling" ,
28
+ " codestar" ,
29
+ " connect" ,
30
+ " databrew" ,
31
+ " xray" ,
32
+ " backup" ,
33
+ " batch" ,
34
+ " acm" ,
35
+ " acm-pca" ,
36
+ " clouddirectory" ,
37
+ " cloudformation" ,
38
+ " cloudhsm" ,
39
+ " cloudsearch" ,
40
+ " cloudtrail" ,
41
+ " cloudwatch" ,
42
+ " applicationinsights" ,
43
+ " logs" ,
44
+ " synthetics" ,
45
+ " codeartifact" ,
46
+ " codebuild" ,
47
+ " codecommit" ,
48
+ " codedeploy" ,
49
+ " codepipeline" ,
50
+ " config" ,
51
+ " controltower" ,
52
+ " dataexchange" ,
53
+ " dlm" ,
54
+ " datapipeline" ,
55
+ " dms" ,
56
+ " datasync" ,
57
+ " directconnect" ,
58
+ " ds" ,
59
+ " dynamodb" ,
60
+ " ec2" ,
61
+ " ec2fleet" ,
62
+ " ec2spotfleet" ,
63
+ " elasticbeanstalk" ,
64
+ " ecr" ,
65
+ " ecs" ,
66
+ " elasticloadbalancing" ,
67
+ " elasticmapreduce" ,
68
+ " elastictranscoder" ,
69
+ " elasticache" ,
70
+ " es" ,
71
+ " mediapackage" ,
72
+ " emr" ,
73
+ " events" ,
74
+ " schemas" ,
75
+ " gamelift" ,
76
+ " glacier" ,
77
+ " glue" ,
78
+ " greengrass" ,
79
+ " groundstation" ,
80
+ " guardduty" ,
81
+ " health" ,
82
+ " iotanalytics" ,
83
+ " kms" ,
84
+ " kinesis" ,
85
+ " lambda" ,
86
+ " macie" ,
87
+ " mediaconvert" ,
88
+ " medialive" ,
89
+ " mediastore" ,
90
+ " metering-marketplace" ,
91
+ " monitoring" ,
92
+ " opsworks" ,
93
+ " redshift" ,
94
+ " redshift-data" ,
95
+ " rds" ,
96
+ " ram" ,
97
+ " s3-outposts" ,
98
+ " sagemaker" ,
99
+ " secretsmanager" ,
100
+ " securityhub" ,
101
+ " sts" ,
102
+ " sms" ,
103
+ " servicecatalog" ,
104
+ " signer" ,
105
+ " sns" ,
106
+ " sqs" ,
107
+ " s3" ,
108
+ " swf" ,
109
+ " states" ,
110
+ " storagegateway" ,
111
+ " ssm" ,
112
+ " tag" ,
113
+ " transcribe" ,
114
+ " waf" ,
115
+ " workdocs" ,
116
+ " workspaces" , ],
117
+ var. service_name
118
+ )
119
+ error_message = " The provided value is not supported for service_name, consult the module variables.tf for the possible input values."
120
+ }
121
+ }
Original file line number Diff line number Diff line change 4
4
5
5
require (
6
6
github.com/aws/aws-lambda-go v1.23.0
7
+ github.com/aws/aws-sdk-go v1.27.1
8
+ github.com/aws/aws-sdk-go-v2/config v1.1.6
9
+ github.com/aws/aws-sdk-go-v2/service/eventbridge v1.3.1
10
+ github.com/gruntwork-io/terratest v0.33.0
7
11
github.com/sirupsen/logrus v1.8.1
12
+ github.com/stretchr/testify v1.6.1
8
13
)
You can’t perform that action at this time.
0 commit comments