# Creating local files when using Terraform Cloud

**URL:** <https://discuss.hashicorp.com/t/creating-local-files-when-using-terraform-cloud/47113>\
**Category:** Terraform\
**Created:** [November 20, 2022, 1:54am UTC](https://discuss.hashicorp.com/t/creating-local-files-when-using-terraform-cloud/47113 "2022-11-20T01:54:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nibblesnbits](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/nibblesnbits/32/32138_2.png) [@nibblesnbits](https://discuss.hashicorp.com/u/nibblesnbits)\
**Post date:** [November 20, 2022, 1:54am UTC](https://discuss.hashicorp.com/t/creating-local-files-when-using-terraform-cloud/47113/1 "2022-11-20T01:54:18Z")

</div>

According to [this issue](https://github.com/hashicorp/terraform/issues/32245), the `local_file` resource does not work as one would expect when using Terraform Cloud.

Is there a way to actually generate local files on the machine I’m running `terraform plan` on when using Terraform Cloud as the execution environment? Seems since I’m running the tool locally, there should be a way of still creating a local resource.

---

<div class="post-metadata">

**Author:** ![youssefbennour](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/youssefbennour/32/47180_2.png) [@youssefbennour](https://discuss.hashicorp.com/u/youssefbennour)\
**Post date:** [March 15, 2026, 10:18pm UTC](https://discuss.hashicorp.com/t/creating-local-files-when-using-terraform-cloud/47113/2 "2026-03-15T22:18:18Z")

</div>

I’m a bit late, but this might help anyone who is still encountering the same issue.

To fix this, you can change the execution mode of your workspace:

1. Go to **Terraform Cloud**.

2. Open your **workspace**.

3. Navigate to **Settings** → **General**.

4. Under **Execution Mode** , select **Local**.

With local execution enabled, your `terraform plan` and `terraform apply` will run on your own machine, and `local_file` resources will be created on your local filesystem.

In this mode, **HCP Terraform is only used to store and synchronize the state**.
