This repository was archived by the owner on Sep 12, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 151151
152152resource "aws_cloudwatch_event_rule" "monitoring_jump_start_connection" {
153153 depends_on = [aws_sns_topic_subscription . marbot ]
154- count = local. enabled ? 1 : 0
154+ count = (var . module_version_monitoring_enabled && local. enabled ) ? 1 : 0
155155
156156 name = " marbot-ec2-instance-connection-${ random_id . id8 . hex } "
157157 description = " Monitoring Jump Start connection. (created by marbot)"
@@ -160,7 +160,7 @@ resource "aws_cloudwatch_event_rule" "monitoring_jump_start_connection" {
160160}
161161
162162resource "aws_cloudwatch_event_target" "monitoring_jump_start_connection" {
163- count = local. enabled ? 1 : 0
163+ count = (var . module_version_monitoring_enabled && local. enabled ) ? 1 : 0
164164
165165 rule = join (" " , aws_cloudwatch_event_rule. monitoring_jump_start_connection . * . name )
166166 target_id = " marbot"
@@ -169,7 +169,7 @@ resource "aws_cloudwatch_event_target" "monitoring_jump_start_connection" {
169169{
170170 "Type": "monitoring-jump-start-tf-connection",
171171 "Module": "ec2-instance",
172- "Version": "1.0 .0",
172+ "Version": "1.1 .0",
173173 "Partition": "${ data . aws_partition . current . partition } ",
174174 "AccountId": "${ data . aws_caller_identity . current . account_id } ",
175175 "Region": "${ data . aws_region . current . name } "
Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ variable "enabled" {
2828 default = true
2929}
3030
31+ variable "module_version_monitoring_enabled" {
32+ type = bool
33+ description = " Report the module version back to marbot to notify if updates are available."
34+ default = true
35+ }
36+
3137variable "tags" {
3238 description = " A map of tags to add to all resources"
3339 type = map (string )
You can’t perform that action at this time.
0 commit comments