diff --git a/modules/infra/submodules/storage/main.tf b/modules/infra/submodules/storage/main.tf index 04a6e53e..f5aa313f 100644 --- a/modules/infra/submodules/storage/main.tf +++ b/modules/infra/submodules/storage/main.tf @@ -20,6 +20,7 @@ locals { arn = aws_s3_bucket.blobs.arn } costs = { + count = var.domino_cost.storage_enabled ? 1 : 0 bucket_name = aws_s3_bucket.costs.bucket id = aws_s3_bucket.costs.id policy_json = data.aws_iam_policy_document.costs.json diff --git a/modules/infra/submodules/storage/variables.tf b/modules/infra/submodules/storage/variables.tf index a9fc442d..fcf4173a 100644 --- a/modules/infra/submodules/storage/variables.tf +++ b/modules/infra/submodules/storage/variables.tf @@ -120,3 +120,12 @@ variable "network_info" { }) }) } + +variable "domino_cost" { + description = "Determines whether to provision domino cost related infrastructures, ie, long term storage" + type = object({ + storage_enabled = optional(bool, true) + }) + + default = {} +}