Skip to content
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

Export Names format prevents using plugin in different stacks #491

Open
danielstandby opened this issue Feb 11, 2022 · 0 comments
Open

Export Names format prevents using plugin in different stacks #491

danielstandby opened this issue Feb 11, 2022 · 0 comments

Comments

@danielstandby
Copy link

danielstandby commented Feb 11, 2022

Hi,

I'm having an issue using this plugin in multiple stacks deploying to the same AWS account. CloudFormation Export Names have to be unique across the same AWS account.

The problem resides that the Export logical IDs are being formed using this templates:

sls-${service.service}-${domain.stage}-DistributionDomainName
sls-${service.service}-${domain.stage}-DomainName
sls-${service.service}-${domain.stage}-HostedZoneId

If the values of service and stage are the same for to different stacks. The first one succeeds because there aren't any exports yet. But the second one fails stating that the export name has already been used.

Normally, one would be able to easily solve this by overriding the Export name using the Outputs attribute like this:

Outputs:
  DistributionDomainName:
    Export:
      Name: something-else-DistributionDomainName

But unfortunately, that doesn't work in this case. I presume is due to the plugin is using the CloudFormation API to perform its actions. It works fine until release 5.3.0. In release 5.3.1 where you included de Export, the mentioned behavior happens.

I can think of a couple of possibilities:

  • Include app and org as part of the export names
  • Provide a way to customize/override export names
  • A flag to disable exports
  • Not using exports but SSM parameter store instead

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant