Giter Site home page Giter Site logo

gordonmurray / terraform_aws_atlantis Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 13 KB

A Terraform module to create an EC2 instance with Atlantis and Infracost

License: MIT License

HCL 90.31% Shell 9.69%
atlantis docker-compose packer terraform infracost

terraform_aws_atlantis's Introduction

Terraform AWS Atlantis

A Terraform module to create a small EC2 instance that runs Atlantis and Infracost

Packer is used to create an AMI with Docker, Nginx, Certbot and a few other tools.

Terraform is used to create an EC2 instance from the AMI with a suitable security group.

Docker-compose is used on the instance to run the Infracost Docker image 'infracost-atlantis' to provide Atlantis and Infracost in one (link)

Once running, you will need to update your Github repo(s) to point a webhook to the address if this new instance, such as https://{youdomain.com}/events so that Atlantis can plan your Terraform PRs.

Estimated cost

Project: gordonmurray/terraform_aws_atlantis

 Name                                                      Monthly Qty  Unit                  Monthly Cost 
                                                                                                           
 module.atlantis.aws_instance.atlantis                                                                     
 ├─ Instance usage (Linux/UNIX, on-demand, t3.micro)               730  hours                        $8.32 
 └─ root_block_device                                                                                      
    └─ Storage (general purpose SSD, gp2)                           10  GB                           $1.10 
                                                                                                           
 module.atlantis.aws_route53_record.atlantis                                                               
 ├─ Standard queries (first 1B)                       Monthly cost depends on usage: $0.40 per 1M queries  
 ├─ Latency based routing queries (first 1B)          Monthly cost depends on usage: $0.60 per 1M queries  
 └─ Geo DNS queries (first 1B)                        Monthly cost depends on usage: $0.70 per 1M queries  
                                                                                                           
 OVERALL TOTAL                                                                                       $9.42 
──────────────────────────────────
8 cloud resources were detected:
∙ 2 were estimated, all of which include usage-based costs, see https://infracost.io/usage-file
∙ 6 were free:
  ∙ 4 x aws_security_group_rule
  ∙ 1 x aws_key_pair
  ∙ 1 x aws_security_group

To do

  • EC2 instance, security group rules, docker-compose to run infracost-atlantis image
  • Get Infracost going, gives a 404 for repos.yaml
  • Add a DNS entry in Route53 to point a sub domain to the EC2 instance
  • Cron entry on the instance to keep the cert renewed
  • Change to a t4g instance if the Infracost docker image supports ARM in future

terraform_aws_atlantis's People

Contributors

gordonmurray avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.