Skip to content

Commit d338375

Browse files
authored
fix: update event rules to use solution prefix (#23)
1 parent 4c7b515 commit d338375

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

examples/basic/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ Follow the steps below to deploy the module and attach it to your HCP Terraform
3939
|------|---------|
4040
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.7 |
4141
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.72.1 |
42-
| <a name="requirement_tfe"></a> [tfe](#requirement\_tfe) | ~> 0.38.0 |
42+
| <a name="requirement_tfe"></a> [tfe](#requirement\_tfe) | >= 0.38.0 |
4343

4444
## Providers
4545

4646
| Name | Version |
4747
|------|---------|
4848
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.72.1 |
49-
| <a name="provider_tfe"></a> [tfe](#provider\_tfe) | ~> 0.38.0 |
49+
| <a name="provider_tfe"></a> [tfe](#provider\_tfe) | >= 0.38.0 |
5050

5151
## Modules
5252

main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ resource "aws_cloudwatch_event_rule" "runtask_rule" {
1313
description = "Rule to capture HCP Terraform run task events"
1414
event_bus_name = var.event_bus_name
1515
event_pattern = templatefile("${path.module}/templates/runtask_rule.tpl", {
16-
var_event_source = var.event_source
17-
var_runtask_stages = jsonencode(var.runtask_stages)
16+
var_event_source = var.event_source
17+
var_runtask_stages = jsonencode(var.runtask_stages)
18+
var_event_rule_detail_type = local.solution_prefix
1819
})
1920
tags = local.combined_tags
2021
}

templates/runtask_rule.tpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
],
77
"detail": {
88
"stage": ${var_runtask_stages}
9-
}
9+
},
10+
"detail-type" : ["${var_event_rule_detail_type}"]
1011
}

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ variable "lambda_python_runtime" {
107107
type = string
108108
default = "python3.11"
109109
validation {
110-
condition = contains(["python3.13","python3.12","python3.11", "python3.10", "python3.9"], var.lambda_python_runtime)
110+
condition = contains(["python3.13", "python3.12", "python3.11", "python3.10", "python3.9"], var.lambda_python_runtime)
111111
error_message = "Valid values for var: lambda_python_runtime are python3.13, python3.12, python3.11, python3.10, python3.9"
112112
}
113113
}

0 commit comments

Comments
 (0)