aboutsummaryrefslogtreecommitdiffstats
path: root/terraform/rds.tf
diff options
context:
space:
mode:
authorAlex <git@ajschof.me>2024-08-19 12:09:25 +0100
committerGitHub <noreply@github.com>2024-08-19 12:09:25 +0100
commitf28e4038d20b4630fafcae9a7825794e529bace2 (patch)
tree0c378561e0dde843c0a281c692d137bb6bb0d0a7 /terraform/rds.tf
parent5cc511d2afeea262db0db7039c8f83c123da77ea (diff)
parent09b8b7903098a988a9a022d0ab607f8131c9c78f (diff)
downloadde-project-bentley-f28e4038d20b4630fafcae9a7825794e529bace2.tar.gz
de-project-bentley-f28e4038d20b4630fafcae9a7825794e529bace2.zip
Merge branch 'development' into feature/test-extract-lambda
Diffstat (limited to 'terraform/rds.tf')
-rw-r--r--terraform/rds.tf128
1 files changed, 59 insertions, 69 deletions
diff --git a/terraform/rds.tf b/terraform/rds.tf
index 88783b7..a013fb3 100644
--- a/terraform/rds.tf
+++ b/terraform/rds.tf
@@ -1,80 +1,70 @@
-data "aws_availability_zones" "available" {}
+# data "aws_availability_zones" "available" {}
-module "vpc" {
- source = "terraform-aws-modules/vpc/aws"
- version = "5.12.1"
+# module "vpc" {
+# source = "terraform-aws-modules/vpc/aws"
+# version = "5.12.1"
- name = var.project_name
- cidr = "10.0.0.0/16"
- azs = data.aws_availability_zones.available.names
- public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
- enable_dns_hostnames = true
- enable_dns_support = true
-}
+# name = var.project_name
+# cidr = "10.0.0.0/16"
+# azs = data.aws_availability_zones.available.names
+# public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
+# enable_dns_hostnames = true
+# enable_dns_support = true
+# }
-resource "aws_db_subnet_group" "Terrific-Totes-sub-gr" {
- name = "tt-db-subnet"
- subnet_ids = module.vpc.public_subnets
+# resource "aws_db_subnet_group" "Terrific-Totes-sub-gr" {
+# name = "tt-db-subnet"
+# subnet_ids = module.vpc.public_subnets
- tags = {
- Name = "${var.project_name}"
- }
-}
+# tags = {
+# Name = "${var.project_name}"
+# }
+# }
-resource "aws_security_group" "rds" {
- name = "${var.project_name}-rds"
- vpc_id = module.vpc.vpc_id
+# resource "aws_security_group" "rds" {
+# name = "${var.project_name}-rds"
+# vpc_id = module.vpc.vpc_id
- ingress {
- from_port = 5432
- to_port = 5432
- protocol = "tcp"
- cidr_blocks = ["0.0.0.0/0"]
- }
+# ingress {
+# from_port = 5432
+# to_port = 5432
+# protocol = "tcp"
+# cidr_blocks = ["0.0.0.0/0"]
+# }
- egress {
- from_port = 5432
- to_port = 5432
- protocol = "tcp"
- cidr_blocks = ["0.0.0.0/0"]
- }
+# egress {
+# from_port = 5432
+# to_port = 5432
+# protocol = "tcp"
+# cidr_blocks = ["0.0.0.0/0"]
+# }
- tags = {
- Name = "${var.project_name}-rds"
- }
-}
+# tags = {
+# Name = "${var.project_name}-rds"
+# }
+# }
-resource "aws_db_parameter_group" "Terrific-Totes-param-gr" {
- name = "tt-db-param"
- family = "postgres14"
+# resource "aws_db_parameter_group" "Terrific-Totes-param-gr" {
+# name = "tt-db-param"
+# family = "postgres14"
- parameter {
- name = "log_connections"
- value = "1"
- }
-}
+# parameter {
+# name = "log_connections"
+# value = "1"
+# }
+# }
-resource "aws_db_instance" "terrific-totes-rds" {
- db_name = var.project_name
- instance_class = "db.t3.micro"
- allocated_storage = 5
- engine = "postgres"
- engine_version = "14.10"
- username = "totes"
- password = "totes123"
- # username = "user credentials for the root user" # we could use .env here
- # password = "user password for the root user" # we could use .env here
- ### alternatively to providing username nad password we can specify:
- # resource "aws_kms_key" "example_key" {
- # description = "Example KMS Key"
- # }
- # within the resource:
- # manage_master_user_password = true
- # master_user_secret_kms_key_id = aws_kms_key.example.key_id
- # }
- db_subnet_group_name = aws_db_subnet_group.Terrific-Totes-sub-gr.name
- vpc_security_group_ids = [aws_security_group.rds.id]
- parameter_group_name = aws_db_parameter_group.Terrific-Totes-param-gr.name
- publicly_accessible = false
- skip_final_snapshot = true
-}
+# resource "aws_db_instance" "terrific-totes-rds" {
+# db_name = var.project_name
+# instance_class = "db.t3.micro"
+# allocated_storage = 5
+# engine = "postgres"
+# engine_version = "14.10"
+# username = ""
+# password = ""
+# db_subnet_group_name = aws_db_subnet_group.Terrific-Totes-sub-gr.name
+# vpc_security_group_ids = [aws_security_group.rds.id]
+# parameter_group_name = aws_db_parameter_group.Terrific-Totes-param-gr.name
+# publicly_accessible = false
+# skip_final_snapshot = true
+# }
git.ajschof.me — hosted by ajschofield — powered by cgit