I wrote terraform script to create a lexbot in AWS. It is a very simple script. name, child_directed, abort_statment, intent are "Required" attributes for the "aws_lex_bot" resource.
It somehow throws error about the "intent" attribute Error: creating Lex Bot (Chat_AutoReply): BadRequestException: The resource 'FallbackIntent' referenced in resource 'Chat_AutoReply' was not found. Choose another resource.
resource "aws_lex_bot" "chatbot-autoreply" {
name = "Chat_AutoReply"
child_directed = false
abort_statement {
message {
content_type = "PlainText"
content = "Script aborted refer abort_statement"
}
}
intent {
intent_name = "FallbackIntent"
intent_version = "1"
}
}