Sample code snippet to deploy application in aws ec2 with terraform
Terraform
- init Prepare your working directory for other commands
- validate Check whether the configuration is valid
- plan Show changes required by the current configuration
- apply Create or update infrastructure
- destroy Destroy previously-created infrastructure