From 7ec796a9c4595bfc05893516a193a0ca5f32e67a Mon Sep 17 00:00:00 2001 From: Valentin Radicevic Date: Tue, 10 Sep 2024 12:08:05 +0200 Subject: [PATCH 1/3] Implement multiline support for tfvars description --- tfvars.hcl.terraform-docs.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tfvars.hcl.terraform-docs.yml b/tfvars.hcl.terraform-docs.yml index 9d7af90..5d9304a 100644 --- a/tfvars.hcl.terraform-docs.yml +++ b/tfvars.hcl.terraform-docs.yml @@ -5,10 +5,15 @@ content: | {{ if .Module.Inputs -}} {{- range $index, $element := .Module.Inputs }} {{ if $element.Description -}} - # {{ tostring $element.Description }} + {{ if gt (len $element.Description) 350 }} + {{- range $value := (tostring $element.Description | split ". ") }}# {{ $value }}. + {{ end -}} + {{ else -}} + # {{ tostring $element.Description }} + {{ end -}} {{ end -}} - {{ $element.Name }} = {{ $element.GetValue }} - {{ end -}} + {{- $element.Name }} = {{ $element.GetValue }} + {{ end }} {{- end -}} settings: description: true From 3b2a8fa24e7a1835bed0e8d3ccd97ee8f4469e9e Mon Sep 17 00:00:00 2001 From: Valentin Radicevic Date: Wed, 11 Sep 2024 07:51:14 +0200 Subject: [PATCH 2/3] Change cut off length to 120 characters --- tfvars.hcl.terraform-docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tfvars.hcl.terraform-docs.yml b/tfvars.hcl.terraform-docs.yml index 5d9304a..ca452d2 100644 --- a/tfvars.hcl.terraform-docs.yml +++ b/tfvars.hcl.terraform-docs.yml @@ -5,8 +5,8 @@ content: | {{ if .Module.Inputs -}} {{- range $index, $element := .Module.Inputs }} {{ if $element.Description -}} - {{ if gt (len $element.Description) 350 }} - {{- range $value := (tostring $element.Description | split ". ") }}# {{ $value }}. + {{ if gt (len $element.Description) 120 }} + {{- range $value := (tostring $element.Description | split ". ") }}# {{ trimSuffix "." $value }}. {{ end -}} {{ else -}} # {{ tostring $element.Description }} From 628c69a922d4831543b4a32a0a38bb0a751ae1f9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Sep 2024 05:53:34 +0000 Subject: [PATCH 3/3] terraform-docs: automated action --- terraform.tfvars.example | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/terraform.tfvars.example b/terraform.tfvars.example index d28146c..c88ed7a 100644 --- a/terraform.tfvars.example +++ b/terraform.tfvars.example @@ -18,7 +18,9 @@ enable_ingress_nginx = false enable_ivs = false -# Scans license server EC2 instance and EKS nodes for updates. Installs patches on license server automatically. EKS nodes need to be updated manually. +# Scans license server EC2 instance and EKS nodes for updates. +# Installs patches on license server automatically. +# EKS nodes need to be updated manually. enable_patching = false # The maximum number of nodes for gpu job execution @@ -79,7 +81,9 @@ linuxExecutionNodeCountMin = 0 # The disk size in GiB of the nodes for the job execution linuxExecutionNodeDiskSize = 200 -# The machine size of the Linux nodes for the job execution, user must check the availability of the instance types for the region. The list is ordered by priority where the first instance type gets the highest priority. Instance types must fulfill the following requirements: 64 GB RAM, 16 vCPUs, at least 110 IPs, at least 2 availability zones. +# The machine size of the Linux nodes for the job execution, user must check the availability of the instance types for the region. +# The list is ordered by priority where the first instance type gets the highest priority. +# Instance types must fulfill the following requirements: 64 GB RAM, 16 vCPUs, at least 110 IPs, at least 2 availability zones. linuxExecutionNodeSize = [ "m6a.4xlarge", "m5a.4xlarge", @@ -99,7 +103,9 @@ linuxNodeCountMin = 1 # The disk size in GiB of the nodes for the regular services linuxNodeDiskSize = 200 -# The machine size of the Linux nodes for the regular services, user must check the availability of the instance types for the region. The list is ordered by priority where the first instance type gets the highest priority. Instance types must fulfill the following requirements: 64 GB RAM, 16 vCPUs, at least 110 IPs, at least 2 availability zones. +# The machine size of the Linux nodes for the regular services, user must check the availability of the instance types for the region. +# The list is ordered by priority where the first instance type gets the highest priority. +# Instance types must fulfill the following requirements: 64 GB RAM, 16 vCPUs, at least 110 IPs, at least 2 availability zones. linuxNodeSize = [ "m6a.4xlarge", "m5a.4xlarge",