Skip to content

Commit

Permalink
Revert attempt to parametrize allowing destruction of hub disk. hashi…
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemarsden committed Apr 26, 2020
1 parent e5ebf9e commit cff108c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 22 deletions.
6 changes: 0 additions & 6 deletions aws/dotscience-aws.tf
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,6 @@ resource "aws_ebs_volume" "ds_hub_volume" {
tags = {
Name = "ds-hub-volume-${random_id.default.hex}"
}

lifecycle {
# Prevent destruction of the hub disk if data loss is not permitted.
prevent_destroy = var.permit_data_loss ? false : true
}

}

resource "aws_iam_role" "dlm_lifecycle_role" {
Expand Down
4 changes: 0 additions & 4 deletions aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,3 @@ variable "associate_public_ip" {
default = true
}

variable "permit_data_loss" {
description = "Whether to allow hub EBS volume to be deleted - you have to set this to true if you want to destroy the whole stack"
default = false
}
8 changes: 1 addition & 7 deletions gcp/dotscience-gcp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,8 @@ resource "google_compute_disk" "dotscience_hub_disk" {
name = "dotscience-hub-disk-${random_id.default.hex}"
type = "pd-ssd"
zone = local.zone
size = var.hub_volume_size
size = 100
snapshot = var.restore_from_backup

lifecycle {
# Prevent destruction of the hub disk if data loss is not permitted.
prevent_destroy = var.permit_data_loss ? false : true
}

}

resource "google_compute_disk_resource_policy_attachment" "attachment" {
Expand Down
5 changes: 0 additions & 5 deletions gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,3 @@ variable "restore_from_backup" {
type = string
default = ""
}

variable "permit_data_loss" {
description = "Whether to allow hub attached disk to be deleted - you have to set this to true if you want to destroy the whole stack"
default = false
}

0 comments on commit cff108c

Please sign in to comment.