From 54ceddffc9168d6e36c8c68fdfbdaa9b5b85931c Mon Sep 17 00:00:00 2001 From: Paul Crimes Date: Tue, 16 Jul 2019 11:19:04 +0100 Subject: [PATCH] reverted prevent destroy variables as not compatible with terraform - see https://github.com/hashicorp/terraform/issues/10730 --- modules/s3bucket/s3bucket_kms_encryption/main.tf | 2 +- modules/s3bucket/s3bucket_kms_encryption/variables.tf | 4 ---- modules/s3bucket/s3bucket_logging_encryption/main.tf | 2 +- modules/s3bucket/s3bucket_logging_encryption/variables.tf | 4 ---- modules/s3bucket/s3bucket_without_policy/main.tf | 2 +- modules/s3bucket/s3bucket_without_policy/variables.tf | 4 ---- 6 files changed, 3 insertions(+), 15 deletions(-) diff --git a/modules/s3bucket/s3bucket_kms_encryption/main.tf b/modules/s3bucket/s3bucket_kms_encryption/main.tf index 837cdfc..479b941 100644 --- a/modules/s3bucket/s3bucket_kms_encryption/main.tf +++ b/modules/s3bucket/s3bucket_kms_encryption/main.tf @@ -7,7 +7,7 @@ resource "aws_s3_bucket" "environment" { } lifecycle { - prevent_destroy = "${var.prevent_destroy}" + prevent_destroy = false } server_side_encryption_configuration { diff --git a/modules/s3bucket/s3bucket_kms_encryption/variables.tf b/modules/s3bucket/s3bucket_kms_encryption/variables.tf index e0005b9..a10e935 100644 --- a/modules/s3bucket/s3bucket_kms_encryption/variables.tf +++ b/modules/s3bucket/s3bucket_kms_encryption/variables.tf @@ -19,7 +19,3 @@ variable "sse_algorithm" { variable "versioning" { default = false } - -variable "prevent_destroy" { - default = false -} \ No newline at end of file diff --git a/modules/s3bucket/s3bucket_logging_encryption/main.tf b/modules/s3bucket/s3bucket_logging_encryption/main.tf index 84c148b..1846d33 100644 --- a/modules/s3bucket/s3bucket_logging_encryption/main.tf +++ b/modules/s3bucket/s3bucket_logging_encryption/main.tf @@ -7,7 +7,7 @@ resource "aws_s3_bucket" "environment" { } lifecycle { - prevent_destroy = "${var.prevent_destroy}" + prevent_destroy = false } logging { diff --git a/modules/s3bucket/s3bucket_logging_encryption/variables.tf b/modules/s3bucket/s3bucket_logging_encryption/variables.tf index b768bc3..f3b7a84 100644 --- a/modules/s3bucket/s3bucket_logging_encryption/variables.tf +++ b/modules/s3bucket/s3bucket_logging_encryption/variables.tf @@ -27,8 +27,4 @@ variable "sse_algorithm" { variable "versioning" { default = false -} - -variable "prevent_destroy" { - default = false } \ No newline at end of file diff --git a/modules/s3bucket/s3bucket_without_policy/main.tf b/modules/s3bucket/s3bucket_without_policy/main.tf index a1e0eb7..bd78d23 100644 --- a/modules/s3bucket/s3bucket_without_policy/main.tf +++ b/modules/s3bucket/s3bucket_without_policy/main.tf @@ -7,7 +7,7 @@ resource "aws_s3_bucket" "environment" { } lifecycle { - prevent_destroy = "${var.prevent_destroy}" + prevent_destroy = false } server_side_encryption_configuration { diff --git a/modules/s3bucket/s3bucket_without_policy/variables.tf b/modules/s3bucket/s3bucket_without_policy/variables.tf index d444b50..fa733cd 100644 --- a/modules/s3bucket/s3bucket_without_policy/variables.tf +++ b/modules/s3bucket/s3bucket_without_policy/variables.tf @@ -11,7 +11,3 @@ variable "tags" { variable "versioning" { default = true } - -variable "prevent_destroy" { - default = false -} \ No newline at end of file