From 7d29384f8ae8bbb1e838382b4c40f5d65b2ff6bd Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Fri, 29 Nov 2024 15:57:45 -0500 Subject: [PATCH] emptyDir Volume --- modules/base/README.md | 2 ++ modules/base/humanitec.tf | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/modules/base/README.md b/modules/base/README.md index 8b325a6..56a14d7 100644 --- a/modules/base/README.md +++ b/modules/base/README.md @@ -44,10 +44,12 @@ Module that provides the reference architecture. | [aws_iam_role_policy_attachment.humanitec_svc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [helm_release.ingress_nginx](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | | [humanitec_resource_account.cluster_account](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_account) | resource | +| [humanitec_resource_definition.emptydir_volume](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | | [humanitec_resource_definition.k8s_cluster_driver](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | | [humanitec_resource_definition.k8s_namespace](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | | [humanitec_resource_definition_criteria.default_mysql](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | | [humanitec_resource_definition_criteria.default_postgres](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | +| [humanitec_resource_definition_criteria.emptydir_volume](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | | [humanitec_resource_definition_criteria.k8s_cluster_driver](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | | [humanitec_resource_definition_criteria.k8s_namespace](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | | [random_password.external_id](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource | diff --git a/modules/base/humanitec.tf b/modules/base/humanitec.tf index d950e11..aa350d6 100644 --- a/modules/base/humanitec.tf +++ b/modules/base/humanitec.tf @@ -92,3 +92,34 @@ resource "humanitec_resource_definition_criteria" "default_mysql" { resource_definition_id = module.default_mysql.id env_type = var.environment } + +resource "humanitec_resource_definition" "emptydir_volume" { + driver_type = "humanitec/template" + id = "volume-emptydir" + name = "volume-emptydir" + type = "volume" + driver_inputs = { + values_string = jsonencode({ + "templates" = { + "manifests" = { + "emptydir.yaml" = { + "location" = "volumes" + "data" = <