Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #62 from YouSeeU/additional-security-groups
Browse files Browse the repository at this point in the history
Ability to specify additional security groups
  • Loading branch information
brikis98 authored Aug 21, 2018
2 parents 7b2748f + a196971 commit b167325
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/consul-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ resource "aws_launch_configuration" "launch_configuration" {

iam_instance_profile = "${aws_iam_instance_profile.instance_profile.name}"
key_name = "${var.ssh_key_name}"
security_groups = ["${aws_security_group.lc_security_group.id}"]
security_groups = ["${concat(list(aws_security_group.lc_security_group.id), var.additional_security_group_ids)}"]
placement_tenancy = "${var.tenancy}"
associate_public_ip_address = "${var.associate_public_ip_address}"

Expand Down
6 changes: 6 additions & 0 deletions modules/consul-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ variable "allowed_inbound_security_group_ids" {
default = []
}

variable "additional_security_group_ids" {
description = "A list of additional security group IDs to add to Consul EC2 Instances"
type = "list"
default = []
}

variable "security_group_tags" {
description = "Tags to be applied to the LC security group"
type = "map"
Expand Down

0 comments on commit b167325

Please sign in to comment.