AWS Service Catalog Principal Portfolio Association

This page shows how to write Terraform and CloudFormation for AWS Service Catalog Principal Portfolio Association and write them securely.

aws_servicecatalog_principal_portfolio_association (Terraform)

The Principal Portfolio Association in AWS Service Catalog can be configured in Terraform with the resource name aws_servicecatalog_principal_portfolio_association. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L31
resource "aws_servicecatalog_principal_portfolio_association" "prodprincassoci" {
  portfolio_id  = aws_servicecatalog_portfolio.portfolio.id
  principal_arn = "arn:aws:iam::881437877674:user/Train"
servicecatalog.tf#L22
resource "aws_servicecatalog_principal_portfolio_association" "control_tower_admin" {
  portfolio_id  = aws_servicecatalog_portfolio.control_tower.id
  principal_arn = aws_iam_role.controltoweradmin_role.arn
}

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

The following arguments are required:

  • portfolio_id - (Required) Portfolio identifier.
  • principal_arn - (Required) Principal ARN.

The following arguments are optional:

  • accept_language - (Optional) Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
  • principal_type - (Optional) Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid value is IAM. Default is IAM.

In addition to all arguments above, the following attributes are exported:

  • id - Identifier of the association.

Explanation in Terraform Registry

Manages a Service Catalog Principal Portfolio Association.

AWS::ServiceCatalog::PortfolioPrincipalAssociation (CloudFormation)

The PortfolioPrincipalAssociation in ServiceCatalog can be configured in CloudFormation with the resource name AWS::ServiceCatalog::PortfolioPrincipalAssociation. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

Explanation in CloudFormation Registry

Associates the specified principal ARN with the specified portfolio.

Frequently asked questions

What is AWS Service Catalog Principal Portfolio Association?

AWS Service Catalog Principal Portfolio Association is a resource for Service Catalog of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Service Catalog Principal Portfolio Association?

For Terraform, the seanremenyi/service_catalog and cisagov/cool-accounts source code examples are useful. See the Terraform Example section for further details.