CTAGS-LANG-TERRAFORM(7)
β¨ ctags-lang-terraform β random notes about tagging Terraform files with Universal Ctags π
okay bestie, so this is a page from the Universal Ctags manual set, section 7 (that's the "miscellaneous" girlies), and it's literally just a lil scrapbook of random notes about tagging Terraform files. no cap. let's get into it π¦
πΈ SYNOPSIS πΈ
here's the vibe β you run ctags and you point it at Terraform stuff:
ctags ... --languages=+Terraform ...
ctags ... --language-force=Terraform ...
ctags ... --map-Terraform=+.tf ...
and then, if you also want the variables that get assigned inside variable definitions, you add the reference extra and bring the TerraformVariables parser into the group chat:
ctags ... --extras=+{reference} --languages=+TerraformVariables ...
ctags ... --extras=+{reference} --language-force=TerraformVariables ...
ctags ... --extras=+{reference} --map-Terraform=+.tfvars ...
π DESCRIPTION π
this man page gathers random notes about tagging Terraform files. that's it, that's the whole premise. it's giving "notes app at 3am" but make it a parser doc π
π TIPS π
π Extracting variables assigned in Variable definitions
okay so this one is the main character of this page. if you want to pull out the variables that are assigned inside variable definitions β you know, the ones living in *.tfvars β you do this:
- specify
--extras=+{reference} - and specify
--languages=+TerraformVariables
the TerraformVariables parser is the one that handles *.tfvars files, and it extracts those variables with the variable kind and the assigned role of the Terraform language. so like, the Terraform parser and the TerraformVariables parser are besties working two different files, and the reference extra is what makes the connection pop off β¨
π VERSIONS π
π Change since "0.0"
- new kind
localπ
periodt. that's the whole changelog for this one, and honestly? she ate.
π«Ά SEE ALSO π«Ά
ctags(1)- Configuration Syntax β <https://developer.hashicorp.com/terraform/language/syntax/configuration>
- Variable Definitions (.tfvars) Files β <https://developer.hashicorp.com/terraform/language/values/variables#variable-definitions-tfvars-files>
π and that's the tea! this lil love letter was brought to you by Universal Ctags version 6.2.1, filed under CTAGS-LANG-TERRAFORM(7). go tag some infra, bestie, you're doing amazing sweetie ππ§πΈ
π¦ where this page comes from
- alpine 3.24: ctags-doc 6.2.1-r0 Β· GPL-2.0-or-later
- fedora 43: ctags 6.2.1-1.fc43 Β· GPL-2.0-or-later
- fedora 44: ctags 6.2.1-3.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms