Skip to main content

aws_servicecatalog_launch_role_constraints Resource

Use the aws_servicecatalog_launch_role_constraints InSpec audit resource to test properties of multiple AWS Service Catalog launch constraint.

For additional information, including details on parameters and properties, see the AWS documentation on AWS ServiceCatalog LaunchRoleConstraint.

Install

This resource is available in the Chef InSpec AWS resource pack.

For information on configuring your AWS environment for Chef InSpec and creating an InSpec profile that uses the InSpec AWS resource pack, see the Chef InSpec documentation on the AWS cloud platform.

Syntax

Ensure that a portfolio exists.

describe aws_servicecatalog_launch_role_constraints(portfolio_id: 'PORTFOLIO_ID') do
  it { should exist }
end

Parameters

portfolio_id (required)

The identifier of the portfolio the product resides in.

Properties

constraint_ids
The identifier of the constraint.
types
The type of constraint. Valid values are: LAUNCH, NOTIFICATION, RESOURCE_UPDATE, STACKSET, and TEMPLATE.
descriptions
The description of the constraint.
owners
The owner of the constraint.
product_ids
The identifier of the product the constraint applies to. Note that a constraint applies to a specific instance of a product within a certain portfolio.
portfolio_ids
The identifier of the portfolio the product resides in. The constraint applies only to the instance of the product that lives within this portfolio.

Examples

Ensure a constraint is available.

describe aws_servicecatalog_launch_role_constraints(portfolio_id: 'PORTFOLIO_ID') do
  its('constraint_ids') { should include 'ID' }
end

Ensure that the type is ‘LAUNCH’.

describe aws_servicecatalog_launch_role_constraints(portfolio_id: 'PORTFOLIO_ID') do
    its('types') { should include 'LAUNCH' }
end

Matchers

For a full list of available matchers, see our Universal Matchers page.

The controls will pass if the list method returns at least one result.

exist

Use should to test that the entity exists.

describe aws_servicecatalog_launch_role_constraints(portfolio_id: 'PORTFOLIO_ID') do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_servicecatalog_launch_role_constraints(portfolio_id: 'PORTFOLIO_ID') do
  it { should_not exist }
end

AWS Permissions

Your Principal will need the ServiceCatalog:Client:ListConstraintsForPortfolioOutput action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×