title | platform |
---|---|
About the aws_servicecatalog_portfolio_principal_association Resource |
aws |
Use the aws_servicecatalog_portfolio_principal_association
InSpec audit resource to test properties of a single specific AWS Service Catalog portfolio principal association.
Ensure that a portfolio is available.
describe aws_servicecatalog_portfolio_principal_association(portfolio_id: 'PORTFOLIO_ID') do
it { should exist }
end
portfolio_id
(required)
The ID of the portfolio.
For additional information, see the AWS documentation on AWS Service Catalog Portfolio Principal Association.
Property | Description |
---|---|
principal_arn | The ARN of the principal (IAM user, role, or group). |
principal_type | The principal type. The supported value is IAM . |
describe aws_servicecatalog_portfolio_principal_association(portfolio_id: 'PORTFOLIO_ID') do
its('principal_arn') { should eq 'principal_arn' }
end
describe aws_servicecatalog_portfolio_principal_association(portfolio_id: 'PORTFOLIO_ID') do
its('principal_type') { should eq 'IAM' }
end
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 describe
method returns at least one result.
Use should
to test that the entity exists.
describe aws_servicecatalog_portfolio_principal_association(portfolio_id: 'PORTFOLIO_ID') do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_servicecatalog_portfolio_principal_association(portfolio_id: 'PORTFOLIO_ID') do
it { should_not exist }
end
Use should
to check if the entity is available.
describe aws_servicecatalog_portfolio_principal_association(portfolio_id: 'PORTFOLIO_ID') do
it { should be_available }
end
Your Principal will need the ServiceCatalog:Client:ListPrincipalsForPortfolioOutput
action with Effect
set to Allow
.