Should succeed since the maximum_event_age_in_seconds field of retry_policy is optional, and should be sent as null (or omitted ?) to AWS on apply.
Actual Behavior
Terraform defaults that maximum_event_age_in_seconds field to 0 if omitted, which results in a 400 error from AWS
Relevant Error/Panic Output Snippet
│ Error: creating EventBridge Target (XXXXXXX): operation error EventBridge: PutTargets, https response error StatusCode: 400, RequestID: 457116d9-87ea-40a2-861a-82957cdf2341, api error ValidationException: 1 validation error detected: Value '0' at 'targets.1.member.retryPolicy.maximumEventAgeInSeconds' failed to satisfy constraint: Member must have value greater than or equal to 60
│
│ with module.catalog_event_rules["XXXXX"].module.event_rule_targets["XXXXX"].aws_cloudwatch_event_target.this,
│ on ../modules/event_bridge/rules/event_target/main.tf line 1, in resource "aws_cloudwatch_event_target" "this":
│ 1: resource "aws_cloudwatch_event_target" "this" {
│
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.9.1
AWS Provider Version
5.48.0
Affected Resource(s)
Expected Behavior
Declaring a resource like :
Should succeed since the
maximum_event_age_in_seconds
field ofretry_policy
is optional, and should be sent asnull
(or omitted ?) to AWS onapply
.Actual Behavior
Terraform defaults that
maximum_event_age_in_seconds
field to0
if omitted, which results in a 400 error from AWSRelevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Try to apply the config. After typing
yes
, terraform will fail with the aformentioned errorDebug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None