A hastily thrown together sample of using terraform to create infrastructure in AWS with Ansible used to provide further configuration in a dynamically built environment.
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-prereqs.html
https://developer.hashicorp.com/terraform/cli/install/apt
https://docs.ansible.com/ansible/latest/installation_guide/installation_distros.html
ansible-galaxy collection install -r ansible/requirements.yml -p ./ansible
sudo apt install python3-pip
pip3 install boto3
https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html
https://jinja.palletsprojects.com/en/latest/templates/
ansible-inventory --graph (Make sure your environment varialbe for ANSIBLE_CONFIG is set to the correct path)
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html