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

Commit

Permalink
fix: add root block device settings on ec2
Browse files Browse the repository at this point in the history
  • Loading branch information
jspark2000 committed Feb 23, 2024
1 parent b7b3733 commit 311dd3b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions aws/royals/ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ resource "aws_instance" "database" {
subnet_id = aws_subnet.private_1.id
vpc_security_group_ids = [aws_security_group.ec2.id]

root_block_device {
volume_size = 50
volume_type = "gp3"
delete_on_termination = true
}

user_data = templatefile("${path.module}/postgres-docker.sh.tpl", { postgres_password = var.postgres_password })

tags = {
Expand All @@ -17,6 +23,12 @@ resource "aws_instance" "cache" {
subnet_id = aws_subnet.private_2.id
vpc_security_group_ids = [aws_security_group.ec2.id]

root_block_device {
volume_size = 15
volume_type = "gp3"
delete_on_termination = true
}

user_data = templatefile("${path.module}/redis-docker.sh.tpl", {})

tags = {
Expand Down

0 comments on commit 311dd3b

Please sign in to comment.