Git Product home page Git Product logo

terraform-aws-vpc-peering-terraform-inspec's Introduction

Infrastructure as Code: From Provisioning to Testing

Introduction

AWS Blog

An article was published in AWS Blog to introduce the solution in detail.

How to Play

Both provisioning and testing would require that the default AWS region and profile be set beforehand. Use export to set those environmental variables.

export AWS_DEFAULT_REGION=cn-north-1
export AWS_PROFILE=

Provision

To provision the example resources, run the following:

cd main/terraform
terraform init
terraform apply -auto-approve

To release the resources, run:

terraform destroy -auto-approve

Test with INSPEC

The following commands test that the resources are provisioned as expected with supported INSPEC commands as defined in the profile folder. Make sure that the check command outptus no errors before running the exec command.

cd test/inspec
inspec vendor profile
inspec check profile
inspec exec profile --target=aws:// --input-file=input.yaml

The following command tests unsupported resources via bash scripts, which delegate to AWS CLI invocation to retrieve the information.

cd test/inspec
inspec vendor extension
inspec check extension
inspec exec extension --input-file=input.yaml

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

terraform-aws-vpc-peering-terraform-inspec's People

Contributors

amazon-auto avatar clementy-aws 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.