Open mila411 opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
I was working on something similar and stumbled upon the requirement for RoleArn when the target is a Batch job queue. Can you show what the IAM role looks like?
Documentation Link
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target#argument-reference
Description
Versions
Terraform: 1.3.2 AWS Provider: 4.34
What's happening
When creating an EventBridge Target, the current documentation states that RoleArn is optional:
I have accordingly created the following resource in
batch_target
:terraform plan
passes, but whenterraform deploy
, it complains as follows:My Batch is defined to be executed by Fargate. This potentially implies that the interpretation by the AWS API called by the SDK could be
ecs_target
, which requires a RoleArn to be specified. So, I actually specified the RoleArn and theterraform deploy
worked:Note
I am willing to contribute to the relevant documentation update, but it seems to me that
role_arn
may be required for other targets as #20519 and others indicate. I'm not too sure how to describe it in this case that would cause the least confusion to the end user :(References
Would you like to implement a fix?
Yes