This PR makes the resource type explicit by importing the framework for resource types from cfn-certificate-provider, but defaulting to the backwards-compatible Custom::Custom. Unlike cfn-certificate-provider (which has a provider in the else), I have added an explicit error branch. I'm not sure if there's a compelling reason to not do this, but a typo in the Custom Resource name could land the user in the else branch. If this is another provider, it could produce strange errors (e.g. parameters missing or even building wrong resources).
While I was in the file, I also changed the import strategy for providers. This ensures that IDEs understand the imports even if they're nested in projects with different source roots. I did this for a while to use a custom modification while it was PR'd.
This PR makes the resource type explicit by importing the framework for resource types from
cfn-certificate-provider
, but defaulting to the backwards-compatibleCustom::Custom
. Unlikecfn-certificate-provider
(which has a provider in theelse
), I have added an explicit error branch. I'm not sure if there's a compelling reason to not do this, but a typo in the Custom Resource name could land the user in theelse
branch. If this is another provider, it could produce strange errors (e.g. parameters missing or even building wrong resources).While I was in the file, I also changed the import strategy for providers. This ensures that IDEs understand the imports even if they're nested in projects with different source roots. I did this for a while to use a custom modification while it was PR'd.