Giter Club home page Giter Club logo

csw-infra's Introduction

csw-infra

Cloud Security Watch - Infrastructure

Instructions

The below does not cover how you supply your AWS credentials to terraform.

This script allows you to deploy the same terraform configuration to multiple environments in separate accounts and VPCs.

This means that in our AWS test account we can defined a VPC for each developer containing their own public and private subnets and a small RDS instance.

Similarly we can use the same script to provision multiple separate test environments uat, qa...

Because the tfstate lives in a separate folder you can have multiple independent tfstates rather than one terraform apply destroying the resources created by another.

Creating an environment

  1. Create a folder in tools/csw/environments for your environment your name for a dev env or uat, qa, prod...

  2. Copy the tfvars files from example environment and populate the

Environments are ignored by default except for the placeholder example_environment.

TODO We need to find a way to store and share the tfvars file for test and production environments

Initialising or switching environment

Change directory to tools/csw

terraform init -backend-config=environments/<your env>/backend.tfvars -var-file=environments/<your env>/apply.tfvars -reconfigure

Because it's running in the same folder if you go switch the apply.tfvars for a different env you first need to tell terraform to use the different backend-config and -reconfigure makes it reload the backend state if it's already defined

Test the configuration

Change directory to tools/csw

terraform plan -var-file=environments/<your env>/apply.tfvars

If init runs successfully without errors you should be OK to apply

Apply the configuration

Change directory to tools/csw

terraform apply -var-file=environments/<your env>/apply.tfvars

csw-infra's People

Contributors

akinnane avatar andreagrandi avatar coolteddy avatar danjoneslf avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csw-infra's Issues

Migrate CSW terraform to TF12

What

Upgrade CSW to TF12

Why

It's a live service and needs maintenance.

Done When:

  • csw-infra - csw
  • csw-infra - csw_cloudfront_distribution
  • csw-infra - concourse
  • csw-configuration - users - production
  • csw-configuration - users - staging
  • Rebuild concourse worker docker container to install TF 12

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.