You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using the foreach loop in my Serverless Framework YAML to iterate over resources and generate multiple CloudFormation resources dynamically. However, I encountered an issue with the generated resource names, where hyphens (-) appear in the resource names, which is not allowed for some AWS resource types.
I need to ensure that the generated resource names are unique but also need to strip out or replace the hyphens. This is currently problematic as I rely on the foreach loop to generate these names dynamically.
As you can see, the resource names such as DatadogForwarderLambdaLogFiltertest-1 and DatadogForwarderLambdaLogFiltertest-2 are generated with hyphens, which causes issues with some AWS resources that don’t allow hyphens in their names. It would be really helpful to have the ability to replace hyphens or modify the resource name structure to ensure they are valid and unique. Event use of foreach index could solve it I think.
Could support for this feature be added to handle resource names in this way? Thank you!
The text was updated successfully, but these errors were encountered:
Issue Description:
Hi,
I've been using the
foreach
loop in my Serverless Framework YAML to iterate over resources and generate multiple CloudFormation resources dynamically. However, I encountered an issue with the generated resource names, where hyphens (-
) appear in the resource names, which is not allowed for some AWS resource types.I need to ensure that the generated resource names are unique but also need to strip out or replace the hyphens. This is currently problematic as I rely on the
foreach
loop to generate these names dynamically.Here’s my YAML code:
JSON generated:
Issue:
As you can see, the resource names such as
DatadogForwarderLambdaLogFiltertest-1
andDatadogForwarderLambdaLogFiltertest-2
are generated with hyphens, which causes issues with some AWS resources that don’t allow hyphens in their names. It would be really helpful to have the ability to replace hyphens or modify the resource name structure to ensure they are valid and unique. Event use of foreach index could solve it I think.Could support for this feature be added to handle resource names in this way? Thank you!
The text was updated successfully, but these errors were encountered: