An argument named "redshift_target" is not expected here, in aws_cloudwatch_event_target

I’m getting errors

“An argument named “redshift_target” is not expected here”.

My provider (AWS) version matches the latest version as per docs.

Last time I had errors like this, it was because I was using an old version of TF that did not support the attribute.

So question - how do I find out if my TF version is the cause, and if so, how to find which version I would need to use a specific resource feature ?

(I cannot default to ‘latest’ as my org has to approve all releases, and that takes time!)


Hi @simonB2020!

I suppose you’re trying to supply the redshift_target as an argument instead of a code block.

Try the following syntax:

redshift_target { # no "=" sign here

In the provider doc, I see that other targets are passed as blocks in the code examples

Now I feel silly !
Many Thanks