CollActionteam / collaction_backend

Backend code for CollAction
6 stars 4 forks source link

[Bug] Unresolved resource dependency #105

Closed rubenhorn closed 2 years ago

rubenhorn commented 2 years ago

Bug:

Error: Failed to create changeset for the stack: dev-some-developer, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state: For expression "Status" we matched expected path: "FAILED" Status: FAILED. Reason: Template format error: Unresolved resource dependencies [StaticContentDistribution] in the Resources block of the template

How to reproduce it: Follow the instructions for deploying a developer stack here.

Issue: StaticContentDistribution is not defined when deploying without the parameter DomainParameter.

Solution: Conditionally set value of the environment variable CLOUDFRONT_DISTRIBUTION using:
!If [shouldUseCustomDomainNames, !Ref StaticContentDistribution, ""] (ternary operator).
A condition to ignore empty values for this environment variable parameter already exists, so no further action should be required. (Nonetheless the corresponding feature should be tested after this change)