-
-
Notifications
You must be signed in to change notification settings - Fork 40
Security group updates #43
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 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3b3c2b8
Applying latest Github updates, test Makefiles, and Go deps
danjbh 13c9550
Updating to new security group pattern & standards
danjbh 21966a1
Formatting updates
danjbh a65924c
Auto Format
cloudpossebot 11f0188
Fixing go.mod reference in test/src
danjbh a78a828
Bumping mininum Terraform version to 0.14
danjbh 8a02e9c
Fixing SG variable description
danjbh 1664e56
Auto Format
cloudpossebot 13ad096
Bumping AWS provider version constraint
danjbh 02f78bd
Auto Format
cloudpossebot c8d25bb
README updates
danjbh 0b35e47
Additional security-group, Terraform 1.x, and workflow updates
Nuru 651bb13
Update validate-codeowners to current version
Nuru 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,111 @@ | ||
| # security_group_inputs Version: 1 | ||
| ## | ||
|
|
||
|
|
||
| variable "create_security_group" { | ||
| type = bool | ||
| default = true | ||
| description = "Set `true` to create and configure a new security group. If false, `associated_security_group_ids` must be provided." | ||
| } | ||
|
|
||
| locals { | ||
| create_security_group = local.enabled && (var.use_existing_security_groups == null ? var.create_security_group : !var.use_existing_security_groups) | ||
| } | ||
|
|
||
| variable "associated_security_group_ids" { | ||
| type = list(string) | ||
| default = [] | ||
| description = <<-EOT | ||
| A list of IDs of Security Groups to associate the created resource with, in addition to the created security group. | ||
| These security groups will not be modified and, if `create_security_group` is `false`, must provide all the required access. | ||
| EOT | ||
| } | ||
|
|
||
| locals { | ||
| associated_security_group_ids = concat(var.existing_security_groups, var.associated_security_group_ids) | ||
| } | ||
|
|
||
| variable "allowed_security_group_ids" { | ||
| type = list(string) | ||
| default = [] | ||
| description = <<-EOT | ||
| A list of IDs of Security Groups to allow access to the security group created by this module. | ||
| EOT | ||
| } | ||
|
|
||
| locals { | ||
| allowed_security_group_ids = concat(var.allowed_security_groups, var.allowed_security_group_ids) | ||
| } | ||
|
|
||
|
|
||
| variable "security_group_name" { | ||
| type = list(string) | ||
| default = [] | ||
| description = <<-EOT | ||
| The name to assign to the created security group. Must be unique within the VPC. | ||
| If not provided, will be derived from the `null-label.context` passed in. | ||
| If `create_before_destroy` is true, will be used as a name prefix. | ||
| EOT | ||
| } | ||
|
|
||
| variable "security_group_description" { | ||
| type = string | ||
| default = "Security group for Elasticache Memcached" | ||
| description = <<-EOT | ||
| The description to assign to the created Security Group. | ||
| Warning: Changing the description causes the security group to be replaced. | ||
| Set this to `null` to maintain parity with releases <= `0.34.0`. | ||
| EOT | ||
| } | ||
|
|
||
| locals { | ||
| security_group_description = var.security_group_description == null ? "Managed by Terraform" : var.security_group_description | ||
| } | ||
|
|
||
| variable "security_group_create_before_destroy" { | ||
| type = bool | ||
| default = true | ||
| description = <<-EOT | ||
| Set `true` to enable Terraform `create_before_destroy` behavior on the created security group. | ||
| We only recommend setting this `false` if you are upgrading this module and need to keep | ||
| the existing security group from being replaced. | ||
| Note that changing this value will always cause the security group to be replaced. | ||
| EOT | ||
| } | ||
|
|
||
| variable "security_group_create_timeout" { | ||
| type = string | ||
| default = "10m" | ||
| description = "How long to wait for the security group to be created." | ||
| } | ||
|
|
||
| variable "security_group_delete_timeout" { | ||
| type = string | ||
| default = "15m" | ||
| description = <<-EOT | ||
| How long to retry on `DependencyViolation` errors during security group deletion. | ||
| EOT | ||
| } | ||
|
|
||
|
|
||
| variable "allow_all_egress" { | ||
| type = bool | ||
| default = true | ||
| description = <<-EOT | ||
| If `true`, the created security group will allow egress on all ports and protocols to all IP address. | ||
| If this is false and no egress rules are otherwise specified, then no egress will be allowed. | ||
| EOT | ||
| } | ||
|
|
||
| variable "additional_security_group_rules" { | ||
| type = list(any) | ||
| default = [] | ||
| description = <<-EOT | ||
| A list of Security Group rule objects to add to the created security group, in addition to the ones | ||
| this module normally creates. (To suppress the module's rules, set `create_security_group` to false | ||
| and supply your own security group via `associated_security_group_ids`.) | ||
| The keys and values of the objects are fully compatible with the `aws_security_group_rule` resource, except | ||
| for `security_group_id` which will be ignored, and the optional "key" which, if provided, must be unique and known at "plan" time. | ||
| To get more info see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule . | ||
| EOT | ||
| } | ||
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.