Skip to content

Commit fbbac86

Browse files
authored
Msk feature 2 (#452)
* Create your own security group for msk * passing variables
1 parent c8193c7 commit fbbac86

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

terraform-modules/aws/msk_1.0.9/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ module "msk" {
144144
multi_vpc_connectivity_iam_enabled = var.multi_vpc_connectivity_iam_enabled
145145
properties = var.properties
146146
allowed_security_group_ids = var.allowed_security_group_ids
147+
associated_security_group_ids = var.associated_security_group_ids
148+
create_security_group = var.create_security_group
147149
depends_on = [
148150
aws_cloudwatch_log_group.msk_cloudwatch_log_group,
149151
aws_s3_bucket.this,

terraform-modules/aws/msk_1.0.9/variables.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,21 @@ variable "allowed_security_group_ids" {
117117
description = "The security_group_id_list output from the security_groups module"
118118
}
119119

120+
variable "create_security_group" {
121+
type = bool
122+
description = "Set `true` to create and configure a new security group. If false, `associated_security_group_ids` must be provided."
123+
default = true
124+
}
125+
126+
variable "associated_security_group_ids" {
127+
type = list(string)
128+
description = <<-EOT
129+
A list of IDs of Security Groups to associate the created resource with, in addition to the created security group.
130+
These security groups will not be modified and, if `create_security_group` is `false`, must have rules providing the desired access.
131+
EOT
132+
default = []
133+
}
134+
120135
variable "client_tls_auth_enabled" {
121136
type = bool
122137
description = "Set true to enable the Client TLS Authentication"

0 commit comments

Comments
 (0)