Skip to content

Commit

Permalink
Merge pull request #27 from TaopaiC/add-ssh-cidr-for-elastikube-worker
Browse files Browse the repository at this point in the history
add a list of CIDR networks to allow ssh access to worker
  • Loading branch information
smalltown authored Mar 22, 2019
2 parents 3432140 + 8265015 commit 1975a94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions aws/elastikube/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ variable "ssh_key" {
description = "The key name that should be used for the instances."
}

variable "allowed_ssh_cidr" {
type = "list"
default = ["0.0.0.0/0"]
description = "(Optional) A list of CIDR networks to allow ssh access to. Defaults to \"0.0.0.0/0\""
}

variable "service_cidr" {
type = "string"
default = "172.16.0.0/13"
Expand Down
2 changes: 1 addition & 1 deletion aws/elastikube/worker-sg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ resource "aws_security_group_rule" "workers_ingress_ssh" {
security_group_id = "${aws_security_group.workers.id}"

protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
cidr_blocks = ["${var.allowed_ssh_cidr}"]
from_port = 22
to_port = 22
}
Expand Down

0 comments on commit 1975a94

Please sign in to comment.