A terraform repository for provisioning AWS infrastructure resources.
- Create an AWS account if not already in place.
- Check if terraform is installed on the machine. If not follow the link to install terraform - https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli
- Once AWS account is set-up, get the user credetails to access the account.
- Pre-requiste for next steps (Theses can be obtained from the GUI account-> security credentials)
- Clone this repo locally in any IDE (VS-Code, IntelliJ) or use terminal.
- Open the file provider.tf and replace this text "place-aws-account-access-key" with your access_key and replace this text "place-aws-account-secret-key" with your secret_key
- Change the bucket_name in the file terraform.tfvars as bucket-name should be unique globally
- Initialize the set-up, meaning installing required provider.
terraform init - Next, validate if the terraform syntax is correct.
terraform validate - Next, preview the resources to be provisioned.
terraform plan - Finally, provision all the resources for the provider.
terraform apply - Destroy the resources if not required.
(This should be used carefully and only when all the resources are not required)
terraform destroy