Hi@akhtar,
You can use a remote-exec provisioner to do this task in your system. The remote-exec provisioner invokes a script on a remote resource after it is created. This can be used to run a configuration management tool, bootstrap into a cluster, etc. To invoke a local process, see the local-exec provisioner instead.
resource "aws_instance" "web" {
provisioner "remote-exec" {
inline = [
"yum install git",
]
}
}