To install Terraform, follow these steps:
- Download Terraform from the official Terraform website.
- Add the downloaded binary to your system's PATH.
- Verify the installation by running:
terraform --version
Below are the basic steps to use this module:
-
Initialize the Terraform configuration:
terraform init
-
Validate the configuration:
terraform validate
-
Plan the infrastructure changes:
terraform plan
-
Apply the changes:
terraform apply
-
Destroy the resources (if needed):
terraform destroy
Name | Version |
---|---|
terraform | >= 1.2.0 |
aws | ~> 4.16 |
cloudflare | ~> 4.0 |
Name | Version |
---|---|
aws | 4.67.0 |
cloudflare | 4.48.0 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
ami_id | AMI ID for the EC2 instance | string |
n/a | yes |
aws_access_key | AWS access key for terraform moves | string |
n/a | yes |
aws_region | AWS region to deploy resources | string |
n/a | yes |
aws_secret_key | AWS secret key for terraform moves | string |
n/a | yes |
cloudflare_api_token | Cloudflare API Token | string |
n/a | yes |
cloudflare_zone_id | Cloudflare Zone ID | string |
n/a | yes |
dockerhub_repo | Dockerhub repo name that store the application iamge | string |
n/a | yes |
ebs_volume_size | Size of Ebs attached to the ec2 instance | string |
n/a | yes |
env_secrets_id | The ID of the environment secrets in AWS Secrets Manager | string |
n/a | yes |
environment | Deployment environment (dev/staging/prod) | string |
n/a | yes |
instance_type | The instance size and type that is going to be deploy in the server | string |
n/a | yes |
key_pair_name | key pair pem to ssh into the server | string |
n/a | yes |
project_name | Name of the project | string |
n/a | yes |
Name | Description |
---|---|
cloudflare_domain | Cloudflare domain record |
instance_public_ip | Public IP of the EC2 instance |
launch_template_id | ID of the created launch template |
Contributions are welcome! Please follow the typical Git workflow:
- Fork this repository.
- Create a feature branch (
git checkout -b feature-name
). - Make your changes and commit them.
- Push the changes to your fork (
git push origin feature-name
). - Create a pull request to merge your changes.