Simple IaC(Ansible && Terraform) Code that makes simple EC2 and it adds record forward to EC2 made before as proxied mode.
terraform $ terraform apply
ansible/playbooks $ $ ansible-playbook -i inventory/ deploy.yaml
This terraform code for cloudflare generates record as proxied mode, so I recommend you to download and use your origin signed certificates(that only can be used between cloudflare point and origin).
If you downlaod your origin certificates, you can upload your key under ansible/playbooks/roles/nginx/files/
.
Have a nice deployment. :)