这是indexloc提供的服务,不要输入任何密码
Skip to content

folpindo/aws-vpc-peering-terraform-inspec

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 56.6%
  • Ruby 27.8%
  • Shell 15.6%