Skip to content

Commit

Permalink
feat(client-service-catalog): Introduce support for HashiCorp Terrafo…
Browse files Browse the repository at this point in the history
…rm Cloud in Service Catalog by addying TERRAFORM_CLOUD product type in CreateProduct and CreateProvisioningArtifact API.
  • Loading branch information
awstools committed Aug 8, 2023
1 parent 9ab7f45 commit 27fef8f
Show file tree
Hide file tree
Showing 17 changed files with 231 additions and 277 deletions.
Expand Up @@ -57,7 +57,7 @@ export interface CreateProductCommandOutput extends CreateProductOutput, __Metad
* SupportDescription: "STRING_VALUE",
* SupportEmail: "STRING_VALUE",
* SupportUrl: "STRING_VALUE",
* ProductType: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE", // required
* ProductType: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD", // required
* Tags: [ // AddTags
* { // Tag
* Key: "STRING_VALUE", // required
Expand All @@ -70,7 +70,7 @@ export interface CreateProductCommandOutput extends CreateProductOutput, __Metad
* Info: { // ProvisioningArtifactInfo
* "<keys>": "STRING_VALUE",
* },
* Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE",
* Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* DisableTemplateValidation: true || false,
* },
* IdempotencyToken: "STRING_VALUE", // required
Expand All @@ -96,7 +96,7 @@ export interface CreateProductCommandOutput extends CreateProductOutput, __Metad
* // Name: "STRING_VALUE",
* // Owner: "STRING_VALUE",
* // ShortDescription: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // Distributor: "STRING_VALUE",
* // HasDefaultPath: true || false,
* // SupportEmail: "STRING_VALUE",
Expand Down Expand Up @@ -129,7 +129,7 @@ export interface CreateProductCommandOutput extends CreateProductOutput, __Metad
* // Id: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // Description: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // CreatedTime: new Date("TIMESTAMP"),
* // Active: true || false,
* // Guidance: "DEFAULT" || "DEPRECATED",
Expand Down
Expand Up @@ -56,7 +56,7 @@ export interface CreateProvisioningArtifactCommandOutput extends CreateProvision
* Info: { // ProvisioningArtifactInfo
* "<keys>": "STRING_VALUE",
* },
* Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE",
* Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* DisableTemplateValidation: true || false,
* },
* IdempotencyToken: "STRING_VALUE", // required
Expand All @@ -68,7 +68,7 @@ export interface CreateProvisioningArtifactCommandOutput extends CreateProvision
* // Id: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // Description: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // CreatedTime: new Date("TIMESTAMP"),
* // Active: true || false,
* // Guidance: "DEFAULT" || "DEPRECATED",
Expand Down
Expand Up @@ -59,7 +59,7 @@ export interface DescribeProductAsAdminCommandOutput extends DescribeProductAsAd
* // Name: "STRING_VALUE",
* // Owner: "STRING_VALUE",
* // ShortDescription: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // Distributor: "STRING_VALUE",
* // HasDefaultPath: true || false,
* // SupportEmail: "STRING_VALUE",
Expand Down
Expand Up @@ -66,7 +66,7 @@ export interface DescribeProductCommandOutput extends DescribeProductOutput, __M
* // Name: "STRING_VALUE",
* // Owner: "STRING_VALUE",
* // ShortDescription: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // Distributor: "STRING_VALUE",
* // HasDefaultPath: true || false,
* // SupportEmail: "STRING_VALUE",
Expand Down
Expand Up @@ -56,7 +56,7 @@ export interface DescribeProductViewCommandOutput extends DescribeProductViewOut
* // Name: "STRING_VALUE",
* // Owner: "STRING_VALUE",
* // ShortDescription: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // Distributor: "STRING_VALUE",
* // HasDefaultPath: true || false,
* // SupportEmail: "STRING_VALUE",
Expand Down
Expand Up @@ -64,7 +64,7 @@ export interface DescribeProvisioningArtifactCommandOutput
* // Id: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // Description: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // CreatedTime: new Date("TIMESTAMP"),
* // Active: true || false,
* // Guidance: "DEFAULT" || "DEPRECATED",
Expand Down
Expand Up @@ -37,47 +37,39 @@ export interface ImportAsProvisionedProductCommandOutput extends ImportAsProvisi
/**
* @public
* <p>
* Requests the import
* of a resource
* as an Service Catalog provisioned product
* that is associated
* to an Service Catalog product and provisioning artifact.
* Once imported,
* all supported governance actions are supported
* on the provisioned product.
* Requests the import of a resource as an Service Catalog provisioned product
* that is associated to an Service Catalog product and provisioning artifact.
* Once imported, all supported governance actions are supported on the provisioned product.
* </p>
* <p>
* Resource import only supports CloudFormation stack ARNs. CloudFormation StackSets, and non-root nested stacks are not supported.
* Resource import only supports CloudFormation stack ARNs. CloudFormation StackSets,
* and non-root nested stacks, are not supported.
* </p>
* <p>
* The CloudFormation stack must have one
* of the following statuses
* to be imported: <code>CREATE_COMPLETE</code>, <code>UPDATE_COMPLETE</code>, <code>UPDATE_ROLLBACK_COMPLETE</code>, <code>IMPORT_COMPLETE</code>, and <code>IMPORT_ROLLBACK_COMPLETE</code>.
* to be imported: <code>CREATE_COMPLETE</code>, <code>UPDATE_COMPLETE</code>,
* <code>UPDATE_ROLLBACK_COMPLETE</code>, <code>IMPORT_COMPLETE</code>, and
* <code>IMPORT_ROLLBACK_COMPLETE</code>.
* </p>
* <p>
* Import
* of the resource requires
* that the CloudFormation stack template matches the associated Service Catalog product provisioning artifact.
* Import of the resource requires that the CloudFormation stack template matches
* the associated Service Catalog product provisioning artifact.
* </p>
* <note>
* <p>
* When you import an existing CloudFormation stack
* into a portfolio,
* constraints
* that are associated
* with the product
* aren't applied
* during the import process.
* The constraints are applied
* after you call <code>UpdateProvisionedProduct</code>
* for the provisioned product.
* into a portfolio, Service Catalog does not apply the product's associated constraints
* during the import process. Service Catalog applies the constraints
* after you call <code>UpdateProvisionedProduct</code> for the provisioned product.
* </p>
* </note>
* <p>
* The user or role
* that performs this operation
* must have the <code>cloudformation:GetTemplate</code> and <code>cloudformation:DescribeStacks</code> IAM policy permissions.
* The user or role that performs this operation must have the <code>cloudformation:GetTemplate</code>
* and <code>cloudformation:DescribeStacks</code> IAM policy permissions.
* </p>
* <p>You can only import one provisioned product at a time. The product's CloudFormation stack must have the
* <code>IMPORT_COMPLETE</code> status before you import another. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -55,7 +55,7 @@ export interface ListProvisioningArtifactsCommandOutput extends ListProvisioning
* // Id: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // Description: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // CreatedTime: new Date("TIMESTAMP"),
* // Active: true || false,
* // Guidance: "DEFAULT" || "DEPRECATED",
Expand Down
Expand Up @@ -69,7 +69,7 @@ export interface ListProvisioningArtifactsForServiceActionCommandOutput
* // Name: "STRING_VALUE",
* // Owner: "STRING_VALUE",
* // ShortDescription: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // Distributor: "STRING_VALUE",
* // HasDefaultPath: true || false,
* // SupportEmail: "STRING_VALUE",
Expand Down
Expand Up @@ -68,7 +68,7 @@ export interface SearchProductsAsAdminCommandOutput extends SearchProductsAsAdmi
* // Name: "STRING_VALUE",
* // Owner: "STRING_VALUE",
* // ShortDescription: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // Distributor: "STRING_VALUE",
* // HasDefaultPath: true || false,
* // SupportEmail: "STRING_VALUE",
Expand Down
Expand Up @@ -65,7 +65,7 @@ export interface SearchProductsCommandOutput extends SearchProductsOutput, __Met
* // Name: "STRING_VALUE",
* // Owner: "STRING_VALUE",
* // ShortDescription: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // Distributor: "STRING_VALUE",
* // HasDefaultPath: true || false,
* // SupportEmail: "STRING_VALUE",
Expand Down
Expand Up @@ -38,7 +38,8 @@ export interface UpdatePortfolioShareCommandOutput extends UpdatePortfolioShareO
* @public
* <p>Updates the specified portfolio share. You can use this API to enable or disable <code>TagOptions</code> sharing
* or Principal sharing for an existing portfolio share. </p>
* <p>The portfolio share cannot be updated if the <code>CreatePortfolioShare</code> operation is <code>IN_PROGRESS</code>, as the share is not available to recipient entities. In this case, you must wait for the portfolio share to be COMPLETED.</p>
* <p>The portfolio share cannot be updated if the <code>CreatePortfolioShare</code> operation is <code>IN_PROGRESS</code>, as the share is not available to recipient entities.
* In this case, you must wait for the portfolio share to be completed.</p>
* <p>You must provide the <code>accountId</code> or organization node in the input, but not both.</p>
* <p>If the portfolio is shared to both an external account and an organization node, and both shares need to be updated, you must invoke <code>UpdatePortfolioShare</code> separately for each share type. </p>
* <p>This API cannot be used for removing the portfolio share. You must use <code>DeletePortfolioShare</code> API for that action. </p>
Expand Down
Expand Up @@ -84,7 +84,7 @@ export interface UpdateProductCommandOutput extends UpdateProductOutput, __Metad
* // Name: "STRING_VALUE",
* // Owner: "STRING_VALUE",
* // ShortDescription: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // Distributor: "STRING_VALUE",
* // HasDefaultPath: true || false,
* // SupportEmail: "STRING_VALUE",
Expand Down
Expand Up @@ -60,7 +60,7 @@ export interface UpdateProvisioningArtifactCommandOutput extends UpdateProvision
* // Id: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // Description: "STRING_VALUE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE",
* // Type: "CLOUD_FORMATION_TEMPLATE" || "MARKETPLACE_AMI" || "MARKETPLACE_CAR" || "TERRAFORM_OPEN_SOURCE" || "TERRAFORM_CLOUD",
* // CreatedTime: new Date("TIMESTAMP"),
* // Active: true || false,
* // Guidance: "DEFAULT" || "DEPRECATED",
Expand Down
2 changes: 1 addition & 1 deletion clients/client-service-catalog/src/endpoint/ruleset.ts
Expand Up @@ -26,5 +26,5 @@ m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"
n=[i],
o=[j],
p=[{[t]:"Region"}];
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://servicecatalog-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://servicecatalog-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://servicecatalog.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://servicecatalog.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{endpoint:{url:"https://servicecatalog-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://servicecatalog-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{endpoint:{url:"https://servicecatalog.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://servicecatalog.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
export const ruleSet: RuleSetObject = _data;

0 comments on commit 27fef8f

Please sign in to comment.