File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 77 " arn:aws:rds:${ local . aws_region } :${ local . aws_account } :db:idp-${ var . idp_name } -${ var . app_env } "
88 )
99 )
10+ s3_backup_bucket = coalesce (var. s3_backup_bucket , " ${ var . idp_name } -${ var . app_name } -${ var . app_env } " )
1011}
1112
1213
@@ -22,7 +23,7 @@ data "aws_region" "current" {}
2223 * Create S3 bucket for storing backups
2324 */
2425resource "aws_s3_bucket" "backup" {
25- bucket = " ${ var . idp_name } - ${ var . app_name } - ${ var . app_env } "
26+ bucket = local . s3_backup_bucket
2627 force_destroy = true
2728
2829 tags = {
Original file line number Diff line number Diff line change @@ -92,6 +92,15 @@ variable "rds_arn" {
9292 default = " "
9393}
9494
95+ variable "s3_backup_bucket" {
96+ description = <<- EOT
97+ The name of the S3 bucket to use for backup storage. If not specified, a bucket will be created with the name
98+ {var.idp_name}-{var.app_name}-{var.app_env}.
99+ EOT
100+ type = string
101+ default = " "
102+ }
103+
95104variable "service_mode" {
96105 description = " Service mode, either `backup` or `restore`"
97106 type = string
You can’t perform that action at this time.
0 commit comments