Cloudformation-coverage-roadmap: AWS::ServiceCatalog::CloudFormationProvisionedProduct-GetAtt Values from Product Stack

Created on 1 Aug 2019  路  11Comments  路  Source: aws-cloudformation/cloudformation-coverage-roadmap

1. AWS::ServiceCatalog::CloudFormationProvisionedProduct-GetAtt Values from Product Stack

2. Scope of request

The AWS::ServiceCatalog::CloudFormationProvisionedProduct resource has two return values, the Ref (product ID) and a GetAtt for CloudformationStackArn and RecordId.

What seems to be missing is the ability to get the values of the Outputs of the CloudFormation stack that it created for you.

3. Expected behavior

I believe this would be much more useful if it behaved like GetAtt <stack>.Outputs.OutputName does on AWS::CloudFormation::Stack.

4. Suggest specific test cases

I would love to do this:

ResourceA:
    Type: AWS::ServiceCatalog::CloudFormationProvisionedProduct 
    Properties: 
        ...stuff....

ResourceB:
    Type: AWS::OtherService::OtherResource
    Properties:
        SomeProperty: !GetAtt ResourceA.Outputs.SomeOutputValue

5. Helpful Links to speed up research and evaluation

Documentation for AWS::CloudFormation::Stack:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html

Documentation for AWS::ServiceCatalog::CloudFormationProvisionedProduct:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-cloudformationprovisionedproduct.html

6. Category

  1. Management (CloudFormation, Service Catalog)
enhancement management & governance

Most helpful comment

All 11 comments

Anyone is checking this from AWS, this one is much needed feature to use service catalog product.

Is there any work around for this ?

@rseerangan sort of - but it's rather hacky. You can place an stack export in the product template and use depends on relations to ensure the product has finished provisioning before the import is resolved.

It's totally un-ideal and doesn't work in all situations though.

@matt-tyler - I like that you mentioned it doesn't work in all situations and mine falls one of those categories. My use case involves lamdba and dynamodb where I created appropriate products in service catalog, to launch them I am using another cfn template. My lambda needs the properties of dynamo db to be passed as an env variables, I couldn't see any options to pass them dynamically. I tried using import / export and have depends on in the lamdba product launch part, but seems cfn import doesn't look for depends on clause and it immediately throws no export attribute validation error.
I tried the same using ssm parameter store to keep the values dynamo db attributes and use them in lambda, but didn't work in my case.
btw - I am using a single cfn template to launch all the products.

After hard fought, i found a messy work around using export / import values and it seems to be working. I would really suggest someone from AWS to look into and have this feature implemented to use service catalog effectively.

This really needs to be added. I don't see any realistic way to use a nested stack architecture with service catalog without the ability to pull outputs from sub stacks.

can someone share a provisioned product template for me. I need to put several products together and store the output in SSM preferably. One template to call about 4 products and store all the stack outputs.

This is really a bad omission on AWS part. Lack of the basic functionality requires workarounds and hacks that prevent service catalog from being a simple and straight-forward service for provisioning via CFN. AWS guys, get this corrected, please!

We created a really simple CloudFormation Custom Resource deployed to our accounts that calls boto3.client('servicecatalog').describe_record(Id=record_id) and returns the outputs, so we're able to chain resources together.

Plus 1 on this. I do note that a cloudformaiton stack calling a service catalog launch will block until the service catalog cloudformaiton stack is complete, however its not possible to build a 'dependson' chain against it within the stack.

This will need to be addressed with this.

Was this page helpful?
0 / 5 - 0 ratings