Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #85
The problem of the bug is, that stream references are implemented as relation from the alias stack to the base stack, but using
Fn::Import
. As that works for most cases, it breaks with DynamoDB streams, because their ARNs change between deploys. When CF tries to update the output variable that is referenced, it bails out, because all outputs that are referenced byFn::ImportValue
are made read-only and their values must not change anymore.I implemented a solution in a way, that instead of the read-only reference, now the plain arn is fetched via the API from the base stack and added to the alias stack. Now it will succeed, even if the ARN changes.
This change does not mean any descrease in reliability or protection of the resources, because that is already guaranteed by the ImportValues that are used to reference the resources themselves.
As the reference resolution is deferred now, I also had to move the sequence of uploading the CF alias template behind the upload of the base stack. This has no effects on the plugin or its execution.