Resource: aws_servicecatalog_constraint

Manages a Service Catalog Constraint.

Example Usage

Basic Usage

resource "aws_servicecatalog_constraint" "example" {
  description  = "Back off, man. I'm a scientist."
  portfolio_id = aws_servicecatalog_portfolio.example.id
  product_id   = aws_servicecatalog_product.example.id
  type         = "LAUNCH"

  parameters = jsonencode({
    "RoleArn" : "arn:aws:iam::123456789012:role/LaunchRole"
  })
}

Argument Reference

The following arguments are required:

The following arguments are optional:

parameters

The type you specify determines what must be included in the parameters JSON:

{ "RoleArn" : "arn:aws:iam::123456789012:role/LaunchRole" }
{ "LocalRoleName" : "SCBasicLaunchRole" }
{ "NotificationArns" : ["arn:aws:sns:us-east-1:123456789012:Topic"] }
{ "Version" : "2.0","Properties" :{ "TagUpdateOnProvisionedProduct" : "String" }}
{ "Version" : "String", "Properties" : { "AccountList" : [ "String" ], "RegionList" : [ "String" ], "AdminRole" : "String", "ExecutionRole" : "String" }}

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import aws_servicecatalog_constraint using the constraint ID. For example:

import {
  to = aws_servicecatalog_constraint.example
  id = "cons-nmdkb6cgxfcrs"
}

Using terraform import, import aws_servicecatalog_constraint using the constraint ID. For example:

% terraform import aws_servicecatalog_constraint.example cons-nmdkb6cgxfcrs