Skip to content

Commit

Permalink
Merge pull request #16 from comet-ml/s3-force-delete
Browse files Browse the repository at this point in the history
Enable force_destroy option for s3 bucket
  • Loading branch information
burmek authored Jan 12, 2024
2 parents 3c7654f + 10c3e74 commit 779cde7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@ module "comet_s3" {
environment = var.environment

comet_s3_bucket = var.s3_bucket_name
s3_force_destroy = var.s3_force_destroy
}
2 changes: 2 additions & 0 deletions modules/comet_s3/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ locals {
resource "aws_s3_bucket" "comet_s3_bucket" {
bucket = var.comet_s3_bucket

force_destroy = var.s3_force_destroy

tags = merge(local.tags, {
Name = var.comet_s3_bucket
})
Expand Down
5 changes: 5 additions & 0 deletions modules/comet_s3/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ variable "environment" {
variable "comet_s3_bucket" {
description = "Name of S3 bucket"
type = string
}

variable "s3_force_destroy" {
description = "Option to enable force delete of S3 bucket"
type = bool
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@ variable "s3_bucket_name" {
type = string
}

variable "s3_force_destroy" {
description = "Option to enable force delete of S3 bucket"
type = bool
default = false
}

#### comet_vpc ####
variable "single_nat_gateway" {
description = "Controls whether single NAT gateway used for all public subnets"
Expand Down

0 comments on commit 779cde7

Please sign in to comment.