> 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/ur/examples/terraform/medium-size-infrastructure.md).

# ٹیرافارم (Terraform) کے ساتھ درمیانے سائز کا انفراسٹرکچر

**ماخذ:** <https://github.com/antonbabenko/terraform-best-practices/tree/master/examples/medium-terraform>

یہ مثال ایک میڈیم سائز کے انفراسٹرکچر کے لیے ٹیرافارم Terraform **کنفیگریشنز کو ساخت دینے  طور پر استعمال کرتا ہے:**

* 2 AWS اکاؤنٹس
* 2 الگ انوائرنمنٹ (prod اور stage جو کچھ بھی شیئر نہیں کرتے)۔ ہر انوائرنمنٹ ایک الگ AWS **اکاؤنٹ میں رہتا ہے**
* ہر انوائرنمنٹ [Terraform Registry](https://registry.terraform.io/)  سے ماخوذ آف دی شیلف انفراسٹرکچر ماڈل (`alb`) **کے مختلف ورژن کا استعمال کرتا ہے۔**
* ہر انوائرنمنٹ `modules/network` کے ایک ہی ورژن کے اندرونی ماڈل کا استعمال کرتا ہے کیونکہ یہ `local` **ڈائرکٹری سے ماخوذ ہے۔**

**نوٹ:** میں نے "off-the-shelf infrastructure module" **کو "آف دی شیلف انفراسٹرکچر ماڈل" کے طور پر ترجمہ کیا ہے کیونکہ یہ اصطلاح اردو میں زیادہ عام ہے۔**<br>

{% hint style="success" %}

* ان منصوبوں کے لیے بہترین انفراسٹرکچر منطقی طور پر الگ کیا گیا ہے (الگ AWS اکاؤنٹس)
* یہ اچھا  **ہے۔**&#x62C;ب AWS اکاؤنٹس کے درمیان شیئر کیے جانے والے ریسورس کو تبدیل کرنے کی کوئی ضرورت نہ ہو (ایک انوائرنمنٹ = ایک AWS اکاؤنٹ = ایک state فائل)
* &#x20; یہ اچھا  **ہے۔** جب انوائرنمنٹ **کے درمیان تبدیلیوں کی آرکاسٹریشن کی کوئی ضرورت نہ ہو**
* &#x20;یہ اچھا  **ہے۔** جب انفراسٹرکچر ریسورس ہرانوائرنمنٹ کے لیے  مختلف مقصد پر  ہوں اور انہیں عام نہیں بنایا جا سکتا (مثلاً، کچھ ریسورس ایک انوائرنمنٹ میں یا کچھ regions **میں موجود نہیں ہیں)**
  {% endhint %}

{% hint style="warning" %}
جیسے جیسے پروجیکٹ بڑھتا ہے، ان انوائرنمنٹ کو ایک دوسرے کے ساتھ up-to-date رکھنا مشکل تر ہوتا جائے گا۔ دہرائے جانے والے کاموں کے لیے انفراسٹرکچر ماڈلز (آف دی شیلف یا اندرونی) استعمال کرنے پر غور کریں۔

{% endhint %}

##


---

# 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, and the optional `goal` query parameter:

```
GET https://www.terraform-best-practices.com/ur/examples/terraform/medium-size-infrastructure.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
