Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nivleshc/fb8e2923ab5757f2ad1e07f89de6e128 to your computer and use it in GitHub Desktop.

Select an option

Save nivleshc/fb8e2923ab5757f2ad1e07f89de6e128 to your computer and use it in GitHub Desktop.
This gist contains code from the file service-catalog-product-s3-bucket.tf, which is part of the blog-aws-service-catalog-for-terraform-products repository.
# attach a launch constraint to the portfolio, this ensures product is launched with least privileges and user doesn't need
# additional permissions assined to them
resource "aws_servicecatalog_constraint" "product_s3_bucket_launch_constraint" {
description = "Launch constraint for the Service Catalog Product - S3 Bucket"
portfolio_id = var.portfolio_id
product_id = aws_servicecatalog_product.s3_bucket.id
type = "LAUNCH"
parameters = jsonencode({
"RoleArn" : "${aws_iam_role.service_catalog_product_s3_bucket_launch_contraint_role.arn}"
})
depends_on = [aws_iam_role_policy_attachment.service_catalog_product_s3_bucket_launch_contraint_role]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment