This repository was archived by the owner on Sep 9, 2022. It is now read-only.
Add security group individual rule descriptions#475
Open
liamrahav wants to merge 1 commit intodtan4:masterfrom
Open
Add security group individual rule descriptions#475liamrahav wants to merge 1 commit intodtan4:masterfrom
liamrahav wants to merge 1 commit intodtan4:masterfrom
Conversation
Author
|
Tagging @nitrocode who wrote up the issue. |
waqarkhan3389
approved these changes
Jan 21, 2020
|
@dtan4 @waqark3389 @liamrahav Nice job! LGTM! |
|
ALL CHEER |
|
Please merge 🙏 |
|
@liamrahav & @dtan4, this change would save us a lot of time with a large import we're currently doing, do you know if there are any blockers to merging it or when we could expect it to land? cc @arbabkhalil |
Author
|
@adzuci I don't have the ability to merge anything, sorry! Haven't looked at this in a while, but I suppose you can merge my branch locally for now if needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This addresses the concern from #437. This PR adds a description into each rule block in an SG.
is now
There is a limitation to this approach though. When creating a rule with multiple cidr blocks or security groups, 2 separate rules are created in the AWS console, but get processed by the API/terraforming as 1 rule with 2 cidr blocks / security groups.
If you were to (1) create a rule like described above, and (2) manually edit the description of one of those rules in the AWS console, the current way terraforming is structured (using in-line rules) would not be able to preserve the changed description.
As discussed in #262, using these in-line rules allows for mixing what are really multiple rules into one rule block. When using the separate
aws_security_group_ruleresource, only one ofcidr_blocks,ipv6_cidr_blocks,security_groupsandselfare allowed, which allows you to ensure that the separate descriptions for each are preserved.This isn't a major issue as I don't think what I described impacts most use cases of terraforming, but be aware that it exists and that the ideal solution is to migrate to creating
aws_security_group_ruleresources alongside the mainaws_security_groupresource.