serverless-operations / serverless-lambda-edge-pre-existing-cloudfront

A Serverless Framework plugin to create your Lambda@Edge against a pre-existing CloudFront.
Other
56 stars 17 forks source link

Support Fn::ImportValue as distribution id #20

Closed mordka closed 3 years ago

mordka commented 3 years ago

This PR adds support for distribution id specified as an intrinsic function Fn::ImportValue Example:

      - preExistingCloudFront:
          distributionId:
            'Fn::ImportValue': 'CloudFront-SomeDistribution::CloudFrontID'

Currently this is not supported and the following error is returned upon deploy

Expected params.Id to be a string
flonn commented 3 years ago

As a workaround, @jgrumboe discovered that using outputs instead of exports work. https://www.serverless.com/framework/docs/providers/aws/guide/variables/#referencing-environment-variables

brianantonelli commented 3 years ago

Any chance of merging this down?

horike37 commented 3 years ago

:tada: This PR is included in version 1.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: