Skip to content

Commit

Permalink
terraform formatting (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
alabdao committed Jul 17, 2023
1 parent b48a5a0 commit ca5fa3c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion infrastructure/terraform/jupyter.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "aws_instance" "plex_jupyter" {
for_each = toset(["littlehub"])
ami = var.ami_main
ami = var.ami_main
instance_type = "t3.xlarge"

vpc_security_group_ids = [aws_security_group.plex.id]
Expand Down
18 changes: 9 additions & 9 deletions infrastructure/terraform/network.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
resource "aws_security_group" "plex" {
name = "dev-web"
name = "dev-web"
description = "SSH with key and HTTP open"
}

resource "aws_security_group" "internal" {
name = "internal-sg"
name = "internal-sg"
description = "allow all internal traffic"
ingress {
from_port = 0
to_port = 0
protocol = "-1"
self = true
from_port = 0
to_port = 0
protocol = "-1"
self = true
}
// allow all egress
egress {
Expand All @@ -23,7 +23,7 @@ resource "aws_security_group" "internal" {
}

resource "aws_security_group" "external_ssh" {
name = "external-ssh-sg"
name = "external-ssh-sg"
description = "Allow ssh from outside"
}

Expand All @@ -32,7 +32,7 @@ resource "aws_security_group_rule" "ingress_ssh_external" {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = ["::/0"]
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = ["::/0"]
security_group_id = aws_security_group.external_ssh.id
}
16 changes: 8 additions & 8 deletions infrastructure/terraform/plex.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ resource "aws_instance" "receptor" {
}

resource "aws_db_instance" "default" {
allocated_storage = 10
db_name = "receptor"
engine = "postgres"
engine_version = "15.3"
instance_class = "db.t3.small"
username = "receptor"
skip_final_snapshot = true
allocated_storage = 10
db_name = "receptor"
engine = "postgres"
engine_version = "15.3"
instance_class = "db.t3.small"
username = "receptor"
skip_final_snapshot = true
manage_master_user_password = true
vpc_security_group_ids = [aws_security_group.internal.id,]
vpc_security_group_ids = [aws_security_group.internal.id, ]
}
2 changes: 1 addition & 1 deletion infrastructure/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ variable "availability_zones" {
}

variable "cloudflare_zone_id" {
type = string
type = string
default = "858fe9f16ace6df3deefd366cb7defd6"
}

0 comments on commit ca5fa3c

Please sign in to comment.