Terraform ansible provisioning

I’m looking for some direction. I’m provisioning ec2 instance with terraform, after that i want to call java installation with ansible playbook , Need some example how to do this in cloud-init
I want to call
data “template_file” “setup_java_sh” {
template = “{file("{path.module}/data/scripts/install_java.sh”)}"

install_java.sh should contain execute ansible playbook – need this mechanism
any help would be appreciated