create s3 bucket for backups of db.dev
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
c895c1a4a6
commit
002cfd4ef2
|
@ -33,6 +33,6 @@ mongodb_backup_db_user: '{{ mongodb_users[0].name }}'
|
|||
mongodb_backup_db_pass: '{{ mongodb_users[0].password }}'
|
||||
|
||||
# backup uploads to S3
|
||||
mongodb_backup_bucket_name: 's3://dev-dap-ps-mongodb-backups'
|
||||
mongodb_backup_bucket_name: 's3://dev-dap-ps-db-backups'
|
||||
mongodb_backup_access_key: '{{lookup("passwordstore", "cloud/aws/s3/mongodb-backups/access-key")}}'
|
||||
mongodb_backup_secret_key: '{{lookup("passwordstore", "cloud/aws/s3/mongodb-backups/secret-key")}}'
|
||||
|
|
6
dev.tf
6
dev.tf
|
@ -27,6 +27,12 @@ locals {
|
|||
}
|
||||
}
|
||||
|
||||
module "dev_db_bucket" {
|
||||
source = "./modules/aws-s3-bucket"
|
||||
bucket_name = "dev-dap-ps-db-backups"
|
||||
description = "Bucket for MongoDB backups on db.dev"
|
||||
}
|
||||
|
||||
module "dev_db" {
|
||||
source = "./modules/aws-ec2-instance"
|
||||
groups = ["mongodb"]
|
||||
|
|
|
@ -20,6 +20,10 @@ resource "aws_s3_bucket" "main" {
|
|||
Desc = var.description
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
prevent_destroy = true
|
||||
}
|
||||
|
||||
policy = <<EOF
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
|
|
Loading…
Reference in New Issue