skpaterson / example_aws_custom_resource_pack

Example InSpec AWS custom resource pack. This depends on InSpec AWS: https://github.com/inspec/inspec-aws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example Custom Resource InSpec Profile For AWS

This example shows the implementation of an InSpec profile for AWS with a custom resource that also depends on the InSpec AWS resource pack e.g. https://github.com/inspec/inspec-aws.

This repository shows how to use this resource pack: https://github.com/skpaterson/example_using_custom_aws_resource_pack

Included in this resource pack is the following:

.
├── README.md
├── attributes.yml
├── controls
│   └── example.rb
├── inspec.yml
└── libraries
    └── my_custom_aws_resource.rb

Note that the controls directory here contains the default created by inspec init profile example_aws_custom_resource --platform aws

Sample usage

$ inspec init profile --platform aws my-profile

 ─────────────────────────── InSpec Code Generator ───────────────────────────

Creating new profile at /Users/spaterson/my-profile
 • Creating directory libraries
 • Creating file README.md
 • Creating directory controls
 • Creating file controls/example.rb
 • Creating file inspec.yml
 • Creating file attributes.yml
 • Creating file libraries/.gitkeep
 

Update the created inspec.yml file

This should be updated to point here instead of directly to this resource pack:

depends:
- name: example_aws_custom_resource_pack
  url: https://github.com/skpaterson/example_aws_custom_resource_pack/archive/master.tar.gz

The dependency on InSpec AWS therefore comes from the inspec.yml file in this repository.

About

Example InSpec AWS custom resource pack. This depends on InSpec AWS: https://github.com/inspec/inspec-aws


Languages

Language:Ruby 100.0%