From 88706057efcd332a9e13af42a4fd08e0f56103ca Mon Sep 17 00:00:00 2001 From: Isaac4real Date: Fri, 24 Feb 2023 10:40:36 +0000 Subject: [PATCH 1/5] add force_destroy_s3_bucket to main --- main.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.tf b/main.tf index 23b6029..bea068a 100644 --- a/main.tf +++ b/main.tf @@ -1,5 +1,7 @@ module "metaflow-datastore" { source = "./modules/datastore" + + force_destroy_s3_bucket = var.force_destroy_s3_bucket resource_prefix = local.resource_prefix resource_suffix = local.resource_suffix From f0e2a2647b81656e0a90dc61b0c208d484e0c102 Mon Sep 17 00:00:00 2001 From: Isaac4real Date: Fri, 24 Feb 2023 11:45:50 +0000 Subject: [PATCH 2/5] add var and update doc --- variables.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/variables.tf b/variables.tf index 88bdfce..9fbc456 100644 --- a/variables.tf +++ b/variables.tf @@ -170,3 +170,9 @@ variable "with_public_ip" { type = bool description = "Enable public IP assignment for the Metadata Service. Typically you want this to be set to true if using public subnets as subnet1_id and subnet2_id, and false otherwise" } + +variable "force_destroy_s3_bucket" { + type = bool + description = "Empty S3 bucket before destroying via terraform destroy" + default = false +} From 1930f4de5a7b864685b92b416efdec6860ef3302 Mon Sep 17 00:00:00 2001 From: Isaac4real Date: Fri, 24 Feb 2023 11:46:46 +0000 Subject: [PATCH 3/5] update doc --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ac91649..c4b94c9 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,7 @@ You can find a more complete example that uses this module but also includes set | [vpc\_cidr\_blocks](#input\_vpc\_cidr\_blocks) | The VPC CIDR blocks that we'll access list on our Metadata Service API to allow all internal communications | `list(string)` | n/a | yes | | [vpc\_id](#input\_vpc\_id) | The id of the single VPC we stood up for all Metaflow resources to exist in. | `string` | n/a | yes | | [with\_public\_ip](#input\_with\_public\_ip) | Enable public IP assignment for the Metadata Service. Typically you want this to be set to true if using public subnets as subnet1\_id and subnet2\_id, and false otherwise | `bool` | n/a | yes | +| [force\_destroy\_s3\_bucket](#input\_force\_destroy\_s3\_bucket) | Empty S3 bucket before destroying via terraform destroy | `bool` | n/a | no | ## Outputs From d38b04b4826e804ddcc7970fb5c98db89e41758e Mon Sep 17 00:00:00 2001 From: Isaac4real Date: Mon, 27 Feb 2023 09:22:48 +0000 Subject: [PATCH 4/5] fix lint --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index bea068a..f789071 100644 --- a/main.tf +++ b/main.tf @@ -1,6 +1,6 @@ module "metaflow-datastore" { source = "./modules/datastore" - + force_destroy_s3_bucket = var.force_destroy_s3_bucket resource_prefix = local.resource_prefix From ed18761c79e8fa3d3faf596dd9e093852e79edcb Mon Sep 17 00:00:00 2001 From: Isaac4real Date: Fri, 3 Mar 2023 10:38:13 +0000 Subject: [PATCH 5/5] fix commit hook --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4b94c9..ffe03ad 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ You can find a more complete example that uses this module but also includes set | [enable\_step\_functions](#input\_enable\_step\_functions) | Provisions infrastructure for step functions if enabled | `bool` | n/a | yes | | [extra\_ui\_backend\_env\_vars](#input\_extra\_ui\_backend\_env\_vars) | Additional environment variables for UI backend container | `map(string)` | `{}` | no | | [extra\_ui\_static\_env\_vars](#input\_extra\_ui\_static\_env\_vars) | Additional environment variables for UI static app | `map(string)` | `{}` | no | +| [force\_destroy\_s3\_bucket](#input\_force\_destroy\_s3\_bucket) | Empty S3 bucket before destroying via terraform destroy | `bool` | `false` | no | | [iam\_partition](#input\_iam\_partition) | IAM Partition (Select aws-us-gov for AWS GovCloud, otherwise leave as is) | `string` | `"aws"` | no | | [launch\_template\_http\_endpoint](#input\_launch\_template\_http\_endpoint) | Whether the metadata service is available. Can be 'enabled' or 'disabled' | `string` | `"enabled"` | no | | [launch\_template\_http\_put\_response\_hop\_limit](#input\_launch\_template\_http\_put\_response\_hop\_limit) | The desired HTTP PUT response hop limit for instance metadata requests. Can be an integer from 1 to 64 | `number` | `2` | no | @@ -125,7 +126,6 @@ You can find a more complete example that uses this module but also includes set | [vpc\_cidr\_blocks](#input\_vpc\_cidr\_blocks) | The VPC CIDR blocks that we'll access list on our Metadata Service API to allow all internal communications | `list(string)` | n/a | yes | | [vpc\_id](#input\_vpc\_id) | The id of the single VPC we stood up for all Metaflow resources to exist in. | `string` | n/a | yes | | [with\_public\_ip](#input\_with\_public\_ip) | Enable public IP assignment for the Metadata Service. Typically you want this to be set to true if using public subnets as subnet1\_id and subnet2\_id, and false otherwise | `bool` | n/a | yes | -| [force\_destroy\_s3\_bucket](#input\_force\_destroy\_s3\_bucket) | Empty S3 bucket before destroying via terraform destroy | `bool` | n/a | no | ## Outputs