As per the Terraform documentation, the parameters needed for import of aws_cloudwatch_event_target
are rule-name/target-id
. If the resource is created manually and now it is to be imported into state file, how can I get the target-id
from the console?
I don't see target-id
in the console, however you can retrieve it with the following CLI call:
$ aws events list-targets-by-rule --rule rule_name