File tree Expand file tree Collapse file tree 3 files changed +16
-11
lines changed
Expand file tree Collapse file tree 3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ resource "random_id" "name_suffix" {
88}
99
1010resource "aws_iam_role" "this" {
11- name = " ecs_events -${ local . unique_name } "
11+ name = " events -${ local . unique_name } "
1212
1313 assume_role_policy = jsonencode ({
1414 Version = " 2012-10-17"
Original file line number Diff line number Diff line change 22module "minimal" {
33 source = " ../"
44
5- ecs_cluster_arn = " "
6- task_definition_arn = " "
7- name = " "
5+ ecs_cluster_arn = " arn:aws:ecs:us-east-1:000000000000:cluster/test-cluster "
6+ task_definition_arn = " arn:aws:ecs:us-east-1:000000000000:task-definition/test-td:1 "
7+ name = " test-name "
88}
99
1010module "full" {
1111 source = " ../"
1212
13- ecs_cluster_arn = " a "
14- task_definition_arn = " b "
15- name = " c "
16- event_schedule = " d "
13+ ecs_cluster_arn = " arn:aws:ecs:us-east-1:000000000000:cluster/test-cluster "
14+ task_definition_arn = " arn:aws:ecs:us-east-1:000000000000:task-definition/test-td:1 "
15+ name = " 0123456789abcdef0123456789abcdef0123456789abcdef "
16+ event_schedule = " cron(0 0 1 1 ? 1) "
1717 enable = true
18- event_rule_description = " e "
19- event_target_input = " f "
20- tags = { g : " h " }
18+ event_rule_description = " a description "
19+ event_target_input = jsonencode ({ " containerOverrides " : [{ " name " : " container_name " , " command " : [ " true " ] }] })
20+ tags = { tag_name : " tag_value " }
2121}
2222
2323output "an_output" {
Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ variable "task_definition_arn" {
1111variable "name" {
1212 description = " name of event assigned to "
1313 type = string
14+
15+ validation {
16+ condition = length (var. name ) <= 48
17+ error_message = " The variable 'name' must be at most 48 characters to avoid exceeding the aws_iam_role name limit of 64 characters."
18+ }
1419}
1520
1621variable "event_schedule" {
You can’t perform that action at this time.
0 commit comments