Skip to content

Commit e269485

Browse files
author
Dmitry Berezovsky
committed
Added VPC setting and removed obsolete option
1 parent 9a6cf44 commit e269485

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

modules/domain_controller/ec2.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
resource "aws_security_group" "clearos" {
2+
vpc_id = "${var.vpc_id}"
23
name = "${var.env_name}: Domain controller SG"
34
description = "Rules for domain controller"
45

modules/domain_controller/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ variable "centos_ami" {
4646
default = "ami-46c1b650"
4747
}
4848

49-
variable "provisioning_key_path" {
50-
description = "Private key (.pem file) to be used for instance provisioning"
51-
}
52-
5349
variable "enable_termination_protection" {
5450
default = true
51+
}
52+
53+
variable "vpc_id" {
54+
description = "VPC to place instance in"
5555
}

test/test_domain_controller/modules.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ data "aws_security_group" "vpc_default" {
1717
module "domain_controller" {
1818
source = "../../modules/domain_controller"
1919
target_subnet_id = "${data.aws_subnet.default_subnet.id}"
20-
trusted_networks_ssh = "0.0.0.0/0"
20+
trusted_networks_ssh = ["0.0.0.0/0"]
2121
instance_key_name = "aws-logicifydev2"
2222
env_name = "${var.env_name}"
23-
trusted_networks_webpanel = "0.0.0.0/0"
23+
trusted_networks_webpanel = ["0.0.0.0/0"]
2424
centos_ami = "ami-f5d7f195"
25-
provisioning_key_path = "${path.root}/keys/aws-logicifydev2.pem"
2625
default_security_group_ids = ["${data.aws_security_group.vpc_default.id}"]
2726
enable_termination_protection = "false"
27+
vpc_id = "${data.aws_vpc.default_vpc.id}"
2828
}

0 commit comments

Comments
 (0)