1

It doesn't seem as if I am able to run Inspec against multiple targets using different controls. For instance I have the following:

control "aws" do
  describe aws_ec2_instance(name: 'Terraform Test Instance') do
    it { should exist }
  end
end

And I have the following

control 'operating_system' do
  describe command('lsb_release -a') do
    its('stdout') { should match (/Ubuntu/) }
  end
end

When I run inspec directly I can pass -t for either ssh or aws, and the aws control works when I pass the aws target (aws://us-east-1) and the operating system control passes when I pass the ssh target.

Is there a way to make BOTH of these run using Kitchen-Inspec? I found the feature request that was closed by Inspec team that multiple targets is out of scope Issue 268, I didn't know however if Kitchen addressed this since it wraps Inspec.

Brian Carpio
  • 493
  • 3
  • 9
  • 15

1 Answers1

0

No, this is not supported by Kitchen-Inspec. We only aim to support host-based tests since it's part of an integration testing cycle for that host.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • Now that InSpec supports various non-host targets such as Docker, AWS, etc, the focus on host-based tests is rather limiting. I use InSpec for Kubernetes and we have a variety of targets, only one of which requires SSH to a host. – RichVel Aug 21 '19 at 12:19