feat: Allow Custom 'Name' Tag For SG #187
Merged
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.
Description
There are some use-cases where we need to set custom 'Name' tag for Security Group.
Eg: https://aws.amazon.com/blogs/security/how-to-automatically-update-your-security-groups-for-amazon-cloudfront-and-aws-waf-by-using-aws-lambda/
Above lambda script identify Msgs by looking at the name tag which needs to be set 'cloudfront_g / cloudfront_r'. Currently this is not possible as merge() function will give the second argument precedence over the first one.
From https://www.terraform.io/docs/configuration/functions/merge.html
If more than one given map or object defines the same key or attribute, then the one that is later in the argument sequence takes precedence.
Motivation and Context
Allow Custom Name Tags
Breaking Changes
None
How Has This Been Tested?
Tested locally by changing order in merge argument.