Skip to content

RaveSplash/terraform-web

Repository files navigation

Installation

To install Terraform, follow these steps:

  1. Download Terraform from the official Terraform website.
  2. Add the downloaded binary to your system's PATH.
  3. Verify the installation by running:
    terraform --version

Usage

Below are the basic steps to use this module:

  1. Initialize the Terraform configuration:

    terraform init
  2. Validate the configuration:

    terraform validate
  3. Plan the infrastructure changes:

    terraform plan
  4. Apply the changes:

    terraform apply
  5. Destroy the resources (if needed):

    terraform destroy

Requirements

Name Version
terraform >= 1.2.0
aws ~> 4.16
cloudflare ~> 4.0

Providers

Name Version
aws 4.67.0
cloudflare 4.48.0

Inputs

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

Outputs

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

Contributing

Contributions are welcome! Please follow the typical Git workflow:

  1. Fork this repository.
  2. Create a feature branch (git checkout -b feature-name).
  3. Make your changes and commit them.
  4. Push the changes to your fork (git push origin feature-name).
  5. Create a pull request to merge your changes.

About

Repo for a terraform configs to create resources for Web Applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published