> For the complete documentation index, see [llms.txt](https://docs.terraforge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terraforge.io/tutorials/first-steps/2-first-terraform-stack/2.1-stack-readme.md).

# 2.1 - Source Code Editor

Goal: Create a Terraform resource

{% embed url="<https://beta-terraforge-public-assets.s3.amazonaws.com/first-steps-2.1-source-code-editor.mp4>" %}

## Steps

1. Select **main.tf** in the file tree and add the following Terraform code:\
   `resource "local_file" "txt" {`\
   &#x20; `filename = "tutorial.txt"`  \
   &#x20; `content  = "Hello world!"`\
   `}`
2. Click **SAVE**

{% hint style="info" %}
Your Terraform (HCL) source code is validated as you type!
{% endhint %}

{% hint style="success" %}
On the right side you can switch between the **CODE** view, **FORM** builder or official Terraform **DOCS** <img src="https://3882212096-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LahX5FBixtrNAsBFikz%2F-LlXvept5Mb6B3yo6CPq%2F-LlY-BAlBqWRa9Gk2DCG%2Fstaging.terraforge.io_megatech_aws-mock-cloud-1_stacks_text-file-2004_terraform_files_main.tf_t%3Dresource%26s%3Dlocal_file%26n%3Dtxt%20(1).png?alt=media&amp;token=406ebfac-3520-4a92-a897-9c7fc54fbdf0" alt="" data-size="original">
{% endhint %}
