Skip to content

Commit

Permalink
emptyDir Volume
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu-benoit authored Nov 29, 2024
1 parent 9b0a444 commit 7d29384
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
31 changes: 31 additions & 0 deletions modules/base/humanitec.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" = <<END_OF_TEXT
name: $${context.res.guresid}-emptydir
emptyDir:
sizeLimit: 1024Mi
END_OF_TEXT
}
}
}
})
}
}

resource "humanitec_resource_definition_criteria" "emptydir_volume" {
resource_definition_id = humanitec_resource_definition.emptydir_volume.id
env_id = var.environment
env_type = var.environment_type

force_delete = true
}

0 comments on commit 7d29384

Please sign in to comment.