> For the complete documentation index, see [llms.txt](https://www.terraform-best-practices.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.terraform-best-practices.com/ka/code-styling.md).

# კოდის სტილი

{% hint style="info" %}

* ტერაფორმის მოდულები და მაგალითები უნდა შეიცავდეს დოკუმენტაციას, ფუნქციონალების გამოყენების შესახებ.
* ყველა ბმული README.md ფაილებში უნდა იყოს სრული, რათა Terraform Registry ვებსაიტმა ისინი აჩვენოს სწორად.
* დოკუმენტაცია შესაძლოა მოიცავდეს mermaid-ით შექმნილ დიაგრამებს და [cloudcraft.co](http://cloudcraft.co/)-ით შექმნილ blueprint-ებს.
* იმისათვის რომ დავრწმუნდეთ კოდის არის ვალიდური, სათანადო ფორმატში და ავტომატურად დოკუმენტირებული, უნდა გამოვიყენოთ Terraform pre-commit hooks, სანამ კოდი გადავა Git-ზე და გახდება საჯარო.
  {% endhint %}

## დოკუმენტაცია

### ავტომატურად გენერირებული დოკუმენტაცია&#x20;

[pre-commit](https://pre-commit.com/) არის ფრეიმვორქი მრავალენოვანი pre-commit hooks-ების სამართავად და შესანარჩუნებლად. ის დაწერილია python-ზე და არის ძლიერი ხელსაწყო დეველოპერების კომპიუტერებზე კოდის git რეპოზიტორიაში გადატანამდე მოხდეს შემოწმება typo-ებზე. ჩვეულებრივ, ის გამოიყენება linter-ების გასაშვებად და კოდის ფორმატირებისთვის (იხილეთ [supported hooks](https://pre-commit.com/hooks.html)).

ტერაფორმის კონფიგურაციით `pre-commit` შეიძლება გამოყენებულ იქნას კოდის ფორმატირებისა და ვალიდაციისთვის, ასევე დოკუმენტაციის განახლებისთვის.

შეამოწმეთ [pre-commit-terraform repository](https://github.com/antonbabenko/pre-commit-terraform/blob/master/README.md) და უკვე არსებული საცავები, რათა უკეთესად გაიგოთ მისი არსი.

### terraform-docs

[terraform-docs](https://github.com/segmentio/terraform-docs) არის ხელსაწყო, რომლის მეშვეობითაც ტერაფორმის მოდულებიდან გენერირდება დოკუმენტაცია სხვადასხვა ფორმატში. შეგიძლიათ ის გაუშვათ მანუალურად (pre-commit hooks-ის გამოყენების გარეშე) ან გამოიყენოთ [pre-commit-terraform hooks](https://github.com/antonbabenko/pre-commit-terraform) თუ გსურთ რომ დოკუმენტაცია განახლდეს ავტომატურად.

@todo: Document module versions, release, GH actions

## რესურსები

1. [pre-commit framework homepage](https://pre-commit.com/)
2. [Collection of git hooks for Terraform to be used with pre-commit framework](https://github.com/antonbabenko/pre-commit-terraform)
3. Blog post by [Dean Wilson](https://github.com/deanwilson): [pre-commit hooks and terraform - a safety net for your repositories](https://www.unixdaemon.net/tools/terraform-precommit-hooks/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.terraform-best-practices.com/ka/code-styling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
