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
@cnuss that won't work for the reasons explained here. The plugin must run before (re)deploying a stack, since its main purpose is exactly to clear out the bucket before the stack deployment runs, otherwise it fails.
This means that embedding a !Ref does not work; this only works for plugins that modify the stack template.
The closest you would get is that cf:stackName example that I've shown in the referenced comment. At the time of posting it, that did not work because Serverless Framework was attempting to resolve the variables and would fail because (obviously) the stack is not yet deployed when first running a deploy. I haven't tried it since, maybe you could try to get it to fall back to a default value when the stack does not exist...?
I have a S3 bucket in serverless.yaml resources:
Note: I've left off the
BucketName
property, so I get a random-ish bucket name.In
serverless.yaml
its possible to use theRef
syntax for dynamic injection of the bucket name, for example withenvironment
:Is there a method to "inject" the randomized bucket name from CloudFormation State? Ideally I'd like to do something like:
The text was updated successfully, but these errors were encountered: