fix: add conditional on empty custom identifier SSM param #542
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.
Issue #, if available:
If CustomIdentifier is not used when deploying SDLF the data-lakes-on-aws/sdlf-cicd/template-cicd-domain-roles.yaml creation will fail because it will try to create an empty SSM param.
Description of changes:
1. template-cicd-domain-roles.yaml:
• Modified rCustomIdentifierSsm to always create the SSM parameter, using "FALSE" as default when pCustomIdentifier is empty
2. sdlf-foundations/src/template.yaml:
• Added UseCustomSuffix condition that checks if pCustomSuffix is not equal to "FALSE"
• Updated all resource names (KMS alias, queues, Lambda functions, DynamoDB tables) to conditionally include the suffix only when UseCustomSuffix is true
3. sdlf-team/src/template.yaml:
• Added UseCustomOctagonSuffix condition that checks if pCustomOctagonSuffix is not equal to "FALSE"
• Updated Lambda environment variables to conditionally include the suffix only when UseCustomOctagonSuffix is true
Now when pCustomSuffix or pCustomOctagonSuffix is set to "FALSE", the custom suffix won't be appended to resource names, while any other value (including the resolved SSM parameter) will be used as the
suffix.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.