Terraform and Ansible are required You Can Install Using This Link
Instalation Aws Cli, Terraform and Ansible
provider "aws" {
access_key = "YOUR_AWS_ACCES_KEY"
secret_key = "YOUR_AWS_SECRET_KEY"
region = var.aws_region
}
variable "key_path" {
description = "SSH Public Key path"
default = "YOUR SSH PATH"
}
variable "key_name" {
description = "Desired name of Keypair..."
default = "YOUR NAME KEYPAIR"
}
[moodle]
${moodleIp} ansible_ssh_common_args='-o StrictHostKeyChecking=no' ansible_user=ubuntu ansible_private_key_file=PATH_KEY
-STORE
terraform init
terraform plan
terraform apply
sudo ansible-playbook -i inventory/hosts playbook.yml