aws-cloudformation / cloudformation-cli

The CloudFormation Provider Development Toolkit allows you to author your own resource providers and modules that can be used by CloudFormation.
Apache License 2.0
316 stars 157 forks source link

Inputs folder does not allow non-json file but cfn bundles it #1046

Open hanseltime opened 7 months ago

hanseltime commented 7 months ago

Description

I ran into this recently while setting up an example typescript cloudformation resource repository with a lot more tooling and documentation.

What I had wanted to do was add a README.md to that folder so that I could have better documentation for people looking through the directory.

As part of maturing this tool, I think it would be worth either providing a ".cfn-ignore" file or a hook for file copy transforms (the latter would be more valuable for things like adding comments to json but that may be a separate feature request).

I could implement the feature, but would like to submit this to see if there are strong opinions about the ignore file, etc.

Thanks in advance!

hanseltime commented 6 months ago

After taking a look at the code, I realize that somehting like a cfn-ignore file would require every plugin to honor the same contract (since those plugins are doing their own bundling from sources to ResourceProvider.zip). Because that migration path feels like it would require a ton of configuration, I have instead proposed that we just filter any non-json files from inputs/ out of the bundled resource package in the linked PR.