Skip to content

Commit

Permalink
remove lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
crlssn committed Nov 13, 2024
1 parent 3286fd2 commit afebc1a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions infra/db.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
resource "aws_db_instance" "db" {
allocated_storage = 20 # Minimum required storage in GB
storage_type = "gp2" # General Purpose SSD
engine = "postgres" # Specifies the database engine as PostgreSQL
engine_version = "16.4" # PostgreSQL version 16.4
instance_class = "db.t3.micro" # Smallest instance type available
db_name = "getstronger" # Name of your database
username = var.db_username # Master username
password = var.db_password # Master password
parameter_group_name = "default.postgres16" # Parameter group for PostgreSQL 16
skip_final_snapshot = true # Skips the final snapshot on deletion
identifier = "terraform-20240816113854130600000001" # Unique identifier for the DB instance
resource "aws_db_instance" "postgres" {
allocated_storage = 20 # Minimum required storage in GB
storage_type = "gp2" # General Purpose SSD
engine = "postgres" # Specifies the database engine as PostgreSQL
engine_version = "16.4" # PostgreSQL version 16.4
instance_class = "db.t3.micro" # Smallest instance type available
db_name = "getstronger" # Name of your database
username = var.db_username # Master username
password = var.db_password # Master password
parameter_group_name = "default.postgres16" # Parameter group for PostgreSQL 16
skip_final_snapshot = true # Skips the final snapshot on deletion
identifier = "postgres" # Unique identifier for the DB instance

# VPC & Subnet group settings
# db_subnet_group_name = aws_db_subnet_group.default.name
Expand All @@ -18,10 +18,10 @@ resource "aws_db_instance" "db" {
# Security group settings
# vpc_security_group_ids = [aws_security_group.default.id]

lifecycle {
create_before_destroy = false
prevent_destroy = true
}
# lifecycle {
# create_before_destroy = false
# prevent_destroy = true
# }
}
#
# # Optional: Create a DB subnet group if you don't have one already
Expand Down

0 comments on commit afebc1a

Please sign in to comment.