serverless: Fn::ImportValue throws error when used in deploymentBucket

This is a (Bug Report)

Fn::ImportValue throws error when used in deploymentBucket

Description

Fn::ImportValue (!ImportValue) (‘Fn::ImportValue’) when used in provider:   deploymentBucket:     name:       Fn::ImportValue: DeploymentBucket

Where DeploymentBucket is a valid export.

Expectation

I would expect Fn::ImportValue to work here as it works in other parts, such as: provider:   vpc:     securityGroupIds:       - Fn::ImportValue: ‘SecurityGroupId’

Limitations of workarounds

The current work around is to use ${cf:<stackName>:<export>} The limitation to that is that I must know at all times the name of the <stackName> which should be considered dynamic. Deploying to dev, the <stackName> may be dev-bucket, where deploying to stage the <stackName> may be stage-bucket.

Additional Data

  • Operating System: macOS High Sierra
  Serverless Error ---------------------------------------

  Bucket name must start with a letter or number. [object Object]

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           8.11.1
     Serverless Version:     1.26.1

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 6
  • Comments: 18 (6 by maintainers)

Most upvoted comments

+1 definitely still a problem

The problem was previously fixed but rejected in #3189.

It is frustrating that we cannot predict which configuration properties will work with config variables and CF exports.

This is still broken / an issue in 2.4.0 😭 Building stack dependencies on a common bucket stack is just not possible in this manner, which is frustrating.