Skip to content

Impossible to specify Custom Resource Type or pass arbitrary arguments to a Custom Resource #40

@ababkin

Description

@ababkin

It appears to be currently impossible to:

  1. Give an arbitrary type to a Custom CF Resource like for example Custom::MyFancyType. The Custom Resource type is currently fixed at AWS::CloudFormation::CustomResource, which is not too convenient as it is impossible to use one Lambda as a Provider for many Custom Resources. (i.e the Lambda needs to know what type of Custom Resource to provision)
    (see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html)

  2. Pass arbitrary arguments to a Custom Resource from the CF template. This is quite a deal breaker when you need to pass a Ref of another resource to a Custom Resource for example. (see "provider-defined properties" here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html)
    An example of why this is important: I've recently been playing around with Cognito for authenticating api endpoints, etc, and it appears that CF currently does not have resource types for UserPool, UserPoolClient, IdentityPool, etc, so one needs to address this by using Custom Resources. UserPoolClient needs to be passed UserPool's reference and IdentityPool needs to be passed both UserPool's and UserPoolClient's references and it looks to me that "provider-defined properties" feature is really the only way to pass those.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions