-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per alias resourcing does not appear to work #49
Comments
Ok. I'll check. Maybe the provider variable git broken with another fix. |
I tested the behavior and committed a fix into a separate branch. The table name (and other properties) are now substituted correctly (e.g. Nevertheless the resource name ( |
@HyperBrain by resource names, you mean the logical IDs? That's interesting, but it's something that we've explicitly ignored for now. If you see a strong use case for that could you open an issue about it? From the docs:
|
Yes, currently we don't have support to use variables in keys (as @eahefnawy mentioned). Here's the issue where we track this feature: serverless/serverless#2892 Could be an interesting addition though! |
@eahefnawy @pmuens The use case here is the creation of per-alias resources (defined by the user). This would automatically rename the logical resource ids to include the alias name (see my example in the README). This feature is very interesting for feature development, where one would add an per-alias resource, to make sure that every other developer would have it's own instance of the resource when he deploys to his alias. I will have a look at the feature issue in Serverless and check if I can do anything there. |
hmmm actually if I remember correctly we've ignored it because its not supported by the traverse module we were using back then, but now we ditched and might work out! |
I merged the fix for the property values part. The issue will be kept open until the property based variable substitution has been added to the Serverless framework. |
Sounds good. Thanks for the update on this one @HyperBrain 👍 For everyone reading through this: The Framework issue can be found here. |
An alternative here would be that we create a new configuration section in This would also allow to reference these resources in the same way as the standard CF resources (e.g. function event subscriptions, environment variables, etc.) |
Any ideas on how to best solve this? I'm trying to get this plugin to work with |
You have two ways (as I know) to define per alias resources:
|
@Enase Thanks, but some of the resources are generated by another plugin, so I don't have control over their resource ids. |
all the plugins generate resources based on some parameters, you can manage it I believe |
Attempting to deploy a previously packaged serverless build that makes use of the example under Use with per alias resource heading in the README results in the error -
Template format error: Resource name myKinesis${self:provider.alias} is non alphanumeric.
Section in question:
The text was updated successfully, but these errors were encountered: