Requirement before you deploy:
Install Terraform CLI : https://learn.hashicorp.com/tutorials/terraform/install-cli?in=terraform/aws-get-started
Install AWS CLI: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html
Create AWS Account
Create AWS Credentials access keys
After all the requirement installed and AWS credentials has been configured
-
To initialize the directory
terraform init
-
To see or simulate any change to your infrastructure
terraform plan
-
To create infrastructure
terraform apply
and type yes at the confirmation prompt
-
To destroy your infrastructure
terraform destroy