Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tear down primary instance #224

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions terraform/aws.tf
Original file line number Diff line number Diff line change
Expand Up @@ -190,31 +190,6 @@ resource "aws_key_pair" "main" {
public_key = file("./keys/id_rsa.pub")
}

module "primary" {
source = "./modules/f2-instance"
name = "primary"

instance = {
type = "t2.nano"
ami = "ami-0ab14756db2442499"
vpc_id = aws_vpc.main.id
subnet_id = aws_subnet.main.id
}

configuration = {
bucket = module.config_bucket.name
key = "f2/config.yaml"
image_tag = "20240406-1025"
}

logging = {
bucket = module.logging_bucket.name
}

key_name = aws_key_pair.main.key_name
hosted_zone_id = aws_route53_zone.opentracker.id
}

module "secondary" {
source = "./modules/f2-instance"
name = "secondary"
Expand Down Expand Up @@ -263,16 +238,6 @@ module "database" {
elastic_ip = false
}

resource "aws_security_group_rule" "allow_inbound_connections_from_primary" {
description = format("Allow inbound connections from %s", module.primary.security_group_id)
type = "ingress"
from_port = 5432
to_port = 5432
protocol = "tcp"
source_security_group_id = module.primary.security_group_id
security_group_id = module.database.security_group_id
}

resource "aws_security_group_rule" "allow_inbound_connections_from_secondary" {
description = format("Allow inbound connections from %s", module.secondary.security_group_id)
type = "ingress"
Expand Down
Loading