Skip to content

sermars/template_IaC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

[template] Infrastructure as Code - Terraform & Ansible

Template Infrastructure as Code - Terraform & Ansible
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

This template serves as a starting point for developing Infrastructure as Code projects. It is designed to streamline the process of provisioning and managing resources across public cloud platforms such as AWS, Azure, and Google Cloud. Modify the placeholder values (e.g., github_username, repo_name, twitter_handle, linkedin_username, email_client, email, project_title, project_description, project_license) to customize the template to your specific requirements.

(back to top)

Built With

Ansible    Terraform


AWS    Azure    Google Cloud

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This project requires the following tools:

  • Ansible

    Configuration management and automation tool.

    python3 -m pip install --user ansible
  • Terraform

    Infrastructure as Code tool.

    # Example for Ubuntu/Debian:
    wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
    echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
    sudo apt update && sudo apt install terraform
    terraform --version
  • Cloud CLIs

    Command-line interfaces for AWS, Azure, and Google Cloud.

    • AWS

      curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
      unzip awscliv2.zip
      sudo ./aws/install
      aws --version
    • Azure

      curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
      az --version
    • Google Cloud

      # Add the package key and repository
      sudo apt-get update && sudo apt-get install apt-transport-https ca-certificates gnupg curl
      curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
      echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
      # Update and install
      sudo apt-get update && sudo apt-get install google-cloud-cli
      gcloud init
      gcloud --version

Installation

This section guides users through the process of setting up the IaC environment on their local machine. It typically includes steps for:

  • Cloning the repository
  • Setting up authentication credentials for cloud providers
  • Configuring Terraform backend storage
  • Installing any additional dependencies
  • Setting up environment variables or configuration files

Once completed, users will have a working environment ready to deploy infrastructure using the templates provided in this project.

(back to top)

Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.

For more examples, please refer to the Documentation

(back to top)

Roadmap

  • Feature 1
  • Feature 2
  • Feature 3
    • Nested Feature

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Repo Structure

  template-IaC/
    │── ansible/
    │   ├── inventories/    # Inventories organized by environment
    │   │   ├── dev/
    │   │   └── prod/
    │   ├── playbooks/      # Playbooks for Ansible execution
    │   │   ├── setup.yml
    │   │   └── deploy.yml
    │   ├── vars/           # Global Ansible variables
    │   ├── roles/          # Reusable Ansible roles
    │   └── README.md       # Documentation for Ansible usage
    │
    │── terraform/
    │   ├── environments/    # Environment-specific configuration (dev, prod)
    │   │   ├── dev.tfvars
    │   │   └── prod.tfvars
    │   ├── modules/        # Reusable Terraform modules
    │   ├── backend.tf      # Backend configuration for remote state
    │   ├── main.tf         # General infrastructure definition
    │   ├── outputs.tf      # Definition of relevant outputs
    │   ├── (terraform.tfstate) # State file (should not be versioned)
    │   ├── README.md       # Documentation for Terraform usage
    │   └── variables.tf    # Global variables for Terraform
    │
    │── images/             # Images for documentation
    │── scripts/            # Helper scripts (automation, validations)
    │── .github/            # GitHub Actions workflows for CI/CD
    │   └── workflows/
    │── LICENSE             # License file for the project
    └── README.md           # General repository explanation

Top contributors:

contrib.rocks image

(back to top)

License

Distributed under the project_license. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @twitter_handle - email@email_client.com

Project Link: https://github.com/github_username/repo_name

(back to top)

Acknowledgments

(back to top)

About

Template Infrastructure as Code - Terraform & Ansible

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published