mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
updates aws profile init to use inputs instead of attributes
Signed-off-by: Collin McNeese <cmcneese@chef.io>
This commit is contained in:
parent
2f4dc632a1
commit
9da7a7338d
3 changed files with 5 additions and 8 deletions
|
@ -1,2 +0,0 @@
|
|||
# Below is to be uncommented and set with your AWS Custom VPC ID:
|
||||
# aws_vpc_id: 'vpc-xxxxxxx'
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
title "Sample Section"
|
||||
|
||||
aws_vpc_id = attribute("aws_vpc_id", default: "", description: "Optional AWS VPC identifier.")
|
||||
aws_vpc_id = input("aws_vpc_id")
|
||||
|
||||
# You add controls here
|
||||
control "aws-single-vpc-exists-check" do # A unique ID for this control.
|
||||
only_if { aws_vpc_id != "" } # Only run this control if the `aws_vpc_id` attribute is provided.
|
||||
control "aws-single-vpc-exists-check" do # A unique ID for this control.
|
||||
only_if { aws_vpc_id != "" } # Only run this control if the `aws_vpc_id` input is provided.
|
||||
impact 1.0 # The criticality, if this control fails.
|
||||
title "Check to see if custom VPC exists." # A human-readable title.
|
||||
describe aws_vpc(aws_vpc_id) do # The test itself.
|
||||
|
|
|
@ -7,14 +7,13 @@ license: Apache-2.0
|
|||
summary: An InSpec Compliance Profile For AWS
|
||||
version: 0.1.0
|
||||
inspec_version: '~> 4'
|
||||
attributes:
|
||||
inputs:
|
||||
- name: aws_vpc_id
|
||||
required: false
|
||||
# Below is deliberately left as a default empty string to allow the profile to run when this is not provided.
|
||||
# Please see the README for more details.
|
||||
default: ''
|
||||
value: ''
|
||||
description: 'Optional Custom AWS VPC Id'
|
||||
type: string
|
||||
depends:
|
||||
- name: inspec-aws
|
||||
url: https://github.com/inspec/inspec-aws/archive/master.tar.gz
|
||||
|
|
Loading…
Reference in a new issue