Skip to main content

aws_servicecatalog_portfolio_product_association Resource

Use the aws_servicecatalog_portfolio_product_association InSpec audit resource to test properties of a single specific AWS Service Catalog portfolio product association.

For additional information, including details on parameters and properties, see the AWS documentation on AWS Service Catalog Portfolio Product Association.

Installation

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

See the Chef InSpec documentation on cloud platforms for information on configuring your AWS environment for InSpec and creating an InSpec profile that uses the InSpec AWS resource pack.

Syntax

Ensure that a portfolio exists.

describe aws_servicecatalog_portfolio_product_association(product_id: 'PRODUCT_ID') do
  it { should exist }
end

Parameters

product_id (required)

The product identifier.

Properties

id
The portfolio identifier.
arn
The ARN assigned to the portfolio.
display_name
The name to use for display purposes.
description
The description of the portfolio.
created_time
The UTC time stamp of the creation time.
provider_name
The name of the portfolio provider.

Examples

Ensure a product name is available.

describe aws_servicecatalog_portfolio_product_association(product_id: 'PRODUCT_ID') do
  its('id') { should eq 'PORTFOLIO_ID' }
end

Ensure a status is available.

describe aws_servicecatalog_portfolio_product_association(product_id: 'PRODUCT_ID') do
    its('provider_name') { should eq 'PORTFOLIO_PROVIDER_NAME' }
end

Matchers

This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit 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_portfolio_product_association(product_id: 'PRODUCT_ID') do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_servicecatalog_portfolio_product_association(product_id: 'PRODUCT_ID') do
  it { should_not exist }
end

AWS Permissions

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

Edit this page on GitHub

Thank you for your feedback!

×









Search Results