Skip to content

Commit

Permalink
Move addresses api export bucket (#1503)
Browse files Browse the repository at this point in the history
* Revert "move bucket (#1501)"

This reverts commit 4b58732.

* move export bucket out of db_snapshot_to_s3 module

* revert changes to liberator bucket paths

* add aws_api_account provider
  • Loading branch information
timburke-hackit authored Nov 13, 2023
1 parent 4b58732 commit 99bc16b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
26 changes: 26 additions & 0 deletions terraform/core/10-aws-s3-buckets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,29 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "deprecated_rds_ex
bucket_key_enabled = true
}
}

module "addresses_api_rds_export_storage" {
source = "../modules/s3-bucket"

tags = module.tags.values
project = var.project
environment = var.environment
identifier_prefix = local.identifier_prefix
bucket_name = "RDS Export Storage"
bucket_identifier = "rds-export-storage"

providers = {
aws = aws.aws_api_account
}
}

resource "aws_s3_bucket_server_side_encryption_configuration" "addresses_api_rds_export_storage" {
bucket = module.addresses_api_rds_export_storage.bucket_id

rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
}
bucket_key_enabled = true
}
}
5 changes: 5 additions & 0 deletions terraform/core/29-db-snapshot-to-s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ moved {
from = module.db_snapshot_to_s3.module.rds_export_storage.aws_s3_bucket.bucket
to = module.db_snapshot_to_s3[0].module.rds_export_storage.aws_s3_bucket.bucket
}

moved {
from = module.db_snapshot_to_s3[0].module.rds_export_storage.aws_s3_bucket.bucket
to = module.addresses_api_rds_export_storage.aws_s3_bucket.bucket
}

0 comments on commit 99bc16b

Please sign in to comment.