File tree Expand file tree Collapse file tree 5 files changed +42
-0
lines changed Expand file tree Collapse file tree 5 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ module "database" {
52
52
source = " ./modules/database"
53
53
deployment_name = var. deployment_name
54
54
postgres_instance_type = var. postgres_instance_type
55
+ multi_az = var. postgres_multi_az
55
56
postgres_storage_size = var. postgres_storage_size
56
57
postgres_max_storage_size = var. postgres_max_storage_size
57
58
postgres_storage_type = var. postgres_storage_type
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ resource "aws_db_instance" "main" {
19
19
storage_type = var. postgres_storage_type
20
20
storage_throughput = var. postgres_storage_throughput
21
21
iops = var. postgres_storage_iops
22
+ multi_az = var. multi_az
22
23
23
24
db_name = " postgres"
24
25
username = local. postgres_username
Original file line number Diff line number Diff line change @@ -61,3 +61,9 @@ variable "kms_key_arn" {
61
61
type = string
62
62
default = null
63
63
}
64
+
65
+ variable "multi_az" {
66
+ description = " Specifies if the RDS instance is multi-AZ. Increases cost but provides higher availability. Recommended for production environments."
67
+ type = bool
68
+ default = false
69
+ }
Original file line number Diff line number Diff line change @@ -36,6 +36,34 @@ resource "aws_s3_bucket" "lambda_responses_bucket" {
36
36
tags = local. common_tags
37
37
}
38
38
39
+ resource "aws_s3_bucket_lifecycle_configuration" "lambda_responses_bucket" {
40
+ bucket = aws_s3_bucket. lambda_responses_bucket . id
41
+
42
+ rule {
43
+ id = " ExpireObjectsAfterOneDay"
44
+ status = " Enabled"
45
+
46
+ filter {
47
+ prefix = " "
48
+ }
49
+
50
+ expiration {
51
+ days = 1
52
+ }
53
+ }
54
+ }
55
+
56
+ resource "aws_s3_bucket_cors_configuration" "lambda_responses_bucket" {
57
+ bucket = aws_s3_bucket. lambda_responses_bucket . id
58
+
59
+ cors_rule {
60
+ allowed_headers = [" *" ]
61
+ allowed_methods = [" GET" , " HEAD" ]
62
+ allowed_origins = [" *" ]
63
+ max_age_seconds = 3600
64
+ }
65
+ }
66
+
39
67
resource "aws_s3_bucket_server_side_encryption_configuration" "lambda_responses_bucket" {
40
68
bucket = aws_s3_bucket. lambda_responses_bucket . id
41
69
Original file line number Diff line number Diff line change @@ -158,6 +158,12 @@ variable "postgres_version" {
158
158
default = " 15.7"
159
159
}
160
160
161
+ variable "postgres_multi_az" {
162
+ description = " Specifies if the RDS instance is multi-AZ. Increases cost but provides higher availability. Recommended for production environments."
163
+ type = bool
164
+ default = false
165
+ }
166
+
161
167
# # Redis
162
168
variable "redis_instance_type" {
163
169
description = " Instance type for the Redis cluster"
You can’t perform that action at this time.
0 commit comments