Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Commit

Permalink
Remove accidental hardcoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Ghiloni authored and rowanjacobs committed Jun 6, 2018
1 parent 0f77bb8 commit 9510afd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions modules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module "ops_manager" {
instance_type = "${var.ops_manager_instance_type}"
private = "${var.ops_manager_private}"
vpc_id = "${aws_vpc.vpc.id}"
vpc_cidr = "${var.vpc_cidr}"
dns_suffix = "${var.dns_suffix}"
zone_id = "${local.zone_id}"
iam_ops_manager_user_name = "${aws_iam_user.ops_manager.name}"
Expand Down
8 changes: 4 additions & 4 deletions ops_manager/security_group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ resource "aws_security_group" "ops_manager_security_group" {
count = "${var.count}"

ingress {
cidr_blocks = ["${var.private ? "10.0.0.0/8" : "0.0.0.0/0"}"]
cidr_blocks = ["${var.private ? var.vpc_cidr : "0.0.0.0/0"}"]
protocol = "tcp"
from_port = 22
to_port = 22
}

ingress {
cidr_blocks = ["${var.private ? "10.0.0.0/8" : "0.0.0.0/0"}"]
cidr_blocks = ["${var.private ? var.vpc_cidr : "0.0.0.0/0"}"]
protocol = "tcp"
from_port = 80
to_port = 80
}

ingress {
cidr_blocks = ["${var.private ? "10.0.0.0/8" : "0.0.0.0/0"}"]
cidr_blocks = ["${var.private ? var.vpc_cidr : "0.0.0.0/0"}"]
protocol = "tcp"
from_port = 443
to_port = 443
}

egress {
cidr_blocks = ["${var.private ? "10.0.0.0/8" : "0.0.0.0/0"}"]
cidr_blocks = ["${var.private ? var.vpc_cidr : "0.0.0.0/0"}"]
protocol = "-1"
from_port = 0
to_port = 0
Expand Down
2 changes: 2 additions & 0 deletions ops_manager/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ variable "subnet_id" {}

variable "vpc_id" {}

variable "vpc_cidr" {}

variable "iam_ops_manager_user_name" {}

variable "iam_ops_manager_role_name" {}
Expand Down

0 comments on commit 9510afd

Please sign in to comment.