You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/04/01 14:17:40 UTC
[incubator-dlab] 01/02: [DLAB-1664]: changed resource block AMI
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DLAB-1664
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 1346b9f2cec8942fc6057bf2755bcd24e3b57f9b
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Wed Apr 1 16:36:23 2020 +0300
[DLAB-1664]: changed resource block AMI
---
infrastructure-provisioning/terraform/aws/endpoint/main/ami.tf | 3 +--
infrastructure-provisioning/terraform/aws/endpoint/main/variables.tf | 5 +++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/infrastructure-provisioning/terraform/aws/endpoint/main/ami.tf b/infrastructure-provisioning/terraform/aws/endpoint/main/ami.tf
index 9b921b2..8a84590 100644
--- a/infrastructure-provisioning/terraform/aws/endpoint/main/ami.tf
+++ b/infrastructure-provisioning/terraform/aws/endpoint/main/ami.tf
@@ -20,9 +20,8 @@
# ******************************************************************************
resource "aws_ami" "shared_notebook_ami" {
- count = length(var.application_name)
+ count = var.delete_images ? length(var.application_name) : 0
name = "${var.service_base_name}-${var.endpoint_id}-${var.application_name[count.index]}-notebook-image"
virtualization_type = "hvm"
root_device_name = "/dev/sda1"
- force_destroy = true
}
\ No newline at end of file
diff --git a/infrastructure-provisioning/terraform/aws/endpoint/main/variables.tf b/infrastructure-provisioning/terraform/aws/endpoint/main/variables.tf
index a6ffbbb..05370d8 100644
--- a/infrastructure-provisioning/terraform/aws/endpoint/main/variables.tf
+++ b/infrastructure-provisioning/terraform/aws/endpoint/main/variables.tf
@@ -85,4 +85,9 @@ variable "tag_resource_id" {
variable "application_name" {
type = list(string)
default = ["jupyterlab", "jupyter", "rstudio", "tensor", "zeppelin", "deeplearning", "tensor-rstudio", "superset"]
+}
+
+variable "delete_images" {
+ description = "If set to true, delete shared images per endpoint"
+ type = bool
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org