> For the complete documentation index, see [llms.txt](https://gwen-leigh.gitbook.io/multiverse-of-madness-terraform-with-go/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gwen-leigh.gitbook.io/multiverse-of-madness-terraform-with-go/2-5-0-deploying-to-terratowns-hcl.md).

# 2 5 0 Deploying to TerraTowns (HCL)

Andrew test-deploys a house on the test town Missingo using our fully-functional custom plugin.

* [Video 2 5 0](https://www.youtube.com/watch?v=fPYHmiM9r6Y\&list=PLBfufR7vyJJ4q5YCPl4o2XAzGRZUjuD-A\&index=56\&ab_channel=ExamPro)

## Code Notes

* I trust that we have covered enough knowledge to understand how Go works and how the plugin is written in Go. This section provides the side-by-side comparison of Go in use in HCL (left) and the underlying mechanism of the "Go binary" (right).
* The source code: [main.tf](https://github.com/omenking/terraform-beginner-bootcamp-2023/blob/2.5.0/main.tf) & [main.go](https://github.com/omenking/terraform-beginner-bootcamp-2023/blob/2.5.0/terraform-provider-terratowns/main.go)&#x20;

<div data-full-width="true"><figure><img src="/files/zrSuw2KcZjEEsckTPFFH" alt=""><figcaption><p>Provider() - the use of Go binary in HCL (left) and the source code of the Go binary (right)</p></figcaption></figure></div>

<div data-full-width="true"><figure><img src="/files/mC1bBoJIyrWlzopdlQoR" alt=""><figcaption><p>Resource() - the use of Go binary in HCL (left) and the source code of the Go binary (right)</p></figcaption></figure></div>

Or see the source code in Github yourself:

<table><thead><tr><th width="154.33333333333331">Element</th><th width="325">HCL (main.tf)</th><th>Go (main.go)</th></tr></thead><tbody><tr><td><code>Provider()</code></td><td><a href="https://github.com/omenking/terraform-beginner-bootcamp-2023/blob/2.5.0/main.tf">provider "terratowns"</a></td><td><a href="https://github.com/omenking/terraform-beginner-bootcamp-2023/blob/2.5.0/terraform-provider-terratowns/main.go#L36">*schema.Provider</a></td></tr><tr><td><code>Resource()</code></td><td><a href="https://github.com/omenking/terraform-beginner-bootcamp-2023/blob/2.5.0/main.tf">resource "terratowns_home" "home"</a></td><td><a href="https://github.com/omenking/terraform-beginner-bootcamp-2023/blob/2.5.0/terraform-provider-terratowns/main.go#L92">*schema.Resource</a></td></tr></tbody></table>

Once deployed, below is what a terratowns house looks like on the Cloud service ([TerraTowns](https://terratowns.cloud/)).&#x20;

<div data-full-width="true"><figure><img src="/files/I26aPYRTLb4wKGGAGeKf" alt=""><figcaption></figcaption></figure></div>

### Resources

* Development workflow documentation: [2.5.0 Deploying to Terratowns](https://medium.com/@gwenleigh/terraform-cloud-project-bootcamp-with-andrew-brown-2-5-0-deploying-to-terratowns-b937e75641c9)


---

# 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://gwen-leigh.gitbook.io/multiverse-of-madness-terraform-with-go/2-5-0-deploying-to-terratowns-hcl.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.
