This project uses Terraform to provision and manage resources for MaxStore.
.gitignore .terraform.lock.hcl key.pem maxstore.tfvars.json modules/ admin-infra/ main.tf outputs.tf templates/ cloudinit.yaml variables.tf modules.tf outputs.tf privatekeygithub.pem providers.tf README.md terraform.tfplan terraform.tfstate variables.tf versions.tf
- Terraform installed (version specified in
versions.tf
) - AWS CLI configured with appropriate access credentials
- Initialize the Terraform project:
terraform init
- Validate the Terraform configuration files:
terraform validate
- Generate a plan and save it to terraform.tfplan:
terraform plan -var-file="maxstore.tfvars.json" -out terraform.tfplan
- Apply the plan:
terraform apply "terraform.tfplan"
- To destroy the resources when you're done:
terraform destroy -var-file="maxstore.tfvars.json"
- if you have done some manualy changes created resource in cloud do this
terraform refresh -var_file="maxstore.tfvars.json"
Variables are defined in variables.tf and values are provided in maxstore.tfvars.json.
Outputs are defined in outputs.tf.