generated from cloudposse/terraform-example-module
-
-
Notifications
You must be signed in to change notification settings - Fork 109
Feat: Use Security Group Module; Restrict MSK Ingress Based on Enabled Protocols #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 19 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
a899cea
Add broker_node_security_groups
nitrocode 426730b
Add broker_node_security_groups
nitrocode 995a283
Auto Format
cloudpossebot 7d42a92
Add broker_node_security_groups to readme
nitrocode 2dce0a1
Auto Format
cloudpossebot 1463f70
Update main.tf
nitrocode 61e5682
Restrict security groups based on enabled protocols.
korenyoni 6e464ee
Use Security Group module.
korenyoni 3963055
Auto Format
cloudpossebot fce6147
Bump minimum Terraform version to support SG module.
korenyoni cd3cddf
Auto Format
cloudpossebot dba04fc
Upgrade to new Security Group standards (use security_group_inputs.tf…
korenyoni 5e0e6fb
Merge branch 'master' into feat/security-group-module
korenyoni f88a6c0
Auto Format
cloudpossebot df562b9
Fix regex in Terratest.
korenyoni a9339bf
Add support for 0-downtime upgrade.
korenyoni 01cf7db
Auto Format
cloudpossebot 6019317
Clarify migration doc.
korenyoni 747d2e0
Merge branch 'feat/security-group-module' of github.com:cloudposse/te…
korenyoni 2497fe8
Apply suggestions from code review
korenyoni 0e52f87
Auto Format
cloudpossebot abee1b4
Update go.mod in order to allow for regex expressions to work in terr…
korenyoni 1c5e101
Update security group inputs and migration doucment based on PR review.
korenyoni 592a2ab
Auto Format
cloudpossebot 1dd4ac3
Fix references to nonexistant local variables.
korenyoni 7cd80da
Merge branch 'feat/security-group-module' of github.com:cloudposse/te…
korenyoni bf905d2
Bump terratest version.
korenyoni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Migration from 0.7.x to 0.8.x | ||
|
|
||
| Version `0.8.0` of this module introduces breaking changes that, without taking additional precautions, will cause the MSK | ||
| cluster to be recreated. | ||
|
|
||
| This is because version `0.8.0` relies on the [terraform-aws-security-group](https://github.com/cloudposse/terraform-aws-security-group) | ||
| module for managing the broker security group. This changes the Terraform resource address for the Security Group, which will | ||
| [cause Terraform to recreate the SG](https://github.com/hashicorp/terraform-provider-aws/blob/3988f0c55ad6eb33c2b4c660312df9a4be4586b9/internal/service/kafka/cluster.go#L90-L97). | ||
|
|
||
| To circumvent this, after bumping the module version to `0.8.0` (or above), run a plan to retrieve the resource addresses of | ||
| the SG that Terraform would like to destroy, and the resource address of the SG which Terraform would like to create. | ||
|
|
||
| or above but before applying, remove the existing SG from the state: | ||
|
|
||
| ```bash | ||
| $ terraform state rm "...aws_security_group.default[0]" | ||
| ``` | ||
|
|
||
| Then, import the existing SG to the resource address of the new SG: | ||
|
|
||
| ```bash | ||
| $ terraform import -var-file ...tfvars "...module.broker_security_group.aws_security_group.default[0]" sg-.............abc1 | ||
| ``` | ||
korenyoni marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| This will result in an apply that will only destroy SG Rules, but not the itself or the MSK cluster. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.