Code Monkey home page Code Monkey logo

testing-4-cloud's Introduction

Test-Driven Infrastructure for the Cloud

This repository demonstrates how to use InSpec helps you to verify your cloud setups in AWS, Azure or GCP. Recent additions in InSpec 3 also help you to extend InSpec to test your custom in-house applications.

I wrote a couple of articles about InSpec's ability to help you implement test-driven infrastructure with Terraform:

This repository demonstrates how to use InSpec with provisioning tools. Recent additions to InSpec 2.0 allow us to verify not only machines, but also any infrastructure provisioned in AWS or Azure cloud. This repository is providing guidance on the use of provising tools in conjunction with InSpec.

Examples

Test AWS Terraform setups with InSpec

The following example will provision a two-tier terraform architecture on AWS. It assumes that you have AWS credentials properly configured.

cd aws-terraform
# run terraform
terraform init
terraform apply -var 'key_name=terraform' -var 'public_key_path=/Users/chris/.ssh/id_rsa.pub'

# use terraform variables with InSpec
terraform output --json > test/verify/files/terraform.json
inspec exec test/verify -t aws://

InSpec Test Result

Use InSpec to verify Google Cloud Platform setups

cd gcp-example-profile
# authenticate to gpc
gcloud auth application-default login

# check that inspec can connect to gpc
inspec detect -t gcp://

# run the profile
inspec exec . -t gcp:// --attrs attributes.yml

License

Author: Christoph Hartmann ([email protected])
Author: Dominik Richter ([email protected])
Copyright: Christoph Hartmann ([email protected])
Copyright: Dominik Richter ([email protected])
License: Mozilla Public License Version 2.0

The terraform aws example is based on their two-tier example which is also MPL-2.0 licensed.

testing-4-cloud's People

Contributors

chris-rock avatar

Watchers

 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.