Hello, I am reviewing: <https://www.pulumi.com/reg...
# general
s
Hello, I am reviewing: https://www.pulumi.com/registry/packages/aws/api-docs/cloudwatch/eventtarget/ based on this documentation, we need an arn parameter and the documentation specifies
ARN of the SQS queue specified as the target for the dead-letter queue.
. However, I am trying to set it as a ECS target and I'm a bit confused as to if the documentation is wrong or if I really need a SQS DQL for an ECS target? Any advice would be great. thanks!
s
The docs are incorrect here, resulting from this issue: https://github.com/pulumi/pulumi-terraform-bridge/issues/529 Could you upvote the issue and also add a comment?
You're referring to this
arn
input, correct?
(There's a lot of
arn
inputs which all share the same incorrect description due to the aforementioned bug.)
s
yes that line
out of curiosity, do you know what the parameter's object should be if youre doing a ECS target?
im a bit confused.
s
I'm guessing you want the ARN of the ECS task.
I swear someone just asked about this exact use case - let me do a search.
s
yeah its ECS cluster ARN
s
The correct target is the cluster ARN, not the task ARN?
s
yeah because the ecs_target= parameter has the task def .arn
im almost 100% certain.. im about to finish it up and deploy it, i will let you know
s
Your lived experience would be the info that matters here. 😉
s
and even looking at the console, it wants the cluster when trying to do it manually
FYI, it is the cluster ARN
basically something like this
Copy code
reaction_data_event_target = aws.cloudwatch.EventTarget(
    "reaction-data-event-target",
    arn=cluster.arn,
    rule=reaction_data_event_rule.name,
    role_arn=reaction_cloud_event_rule_role.arn,
    ecs_target=aws.cloudwatch.EventTargetEcsTargetArgs(
        task_definition_arn=reaction_data_task.arn,
        enable_execute_command=True,
        launch_type="FARGATE",
        network_configuration=aws.ecs.ServiceNetworkConfigurationArgs(
            assign_public_ip=False,
            subnets=vpc.private_subnet_ids,
            security_groups=[group.id],
        ),
        task_count=1,
    ),
)