Skip to content

Commit

Permalink
Merge pull request #380 from jon4hz/tf
Browse files Browse the repository at this point in the history
docs: add terraform
  • Loading branch information
maidul98 authored Mar 4, 2023
2 parents 1dc59d0 + 10f75c8 commit 98b443d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/integrations/frameworks/terraform.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "Terraform"
description: "How to use Infisical to inject environment variables and secrets into terraform."
---

Prerequisites:

- Set up and add envars to [Infisical Cloud](https://app.infisical.com)
- [Install the CLI](/cli/overview)

## Initialize Infisical for your [Terraform](https://www.terraform.io/) project

```bash
# navigate to the root of your of your project
cd /path/to/project

# then initialize Infisical
infisical init
```

## Run terraform as usual but with Infisical

```bash
infisical run -- <your application start command>

# Example
infisical run -- terraform plan
```

<Note>
To inject any arbitrary variable to terraform, you have
to prefix them with `TF_VAR`. Read more about that
[here](https://developer.hashicorp.com/terraform/cli/config/environment-variables#tf_var_name).
</Note>
1 change: 1 addition & 0 deletions docs/integrations/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Missing an integration? Throw in a [request](https://github.com/Infisical/infisi
| [Docker](/integrations/platforms/docker) | Platform | Available |
| [Docker-Compose](/integrations/platforms/docker-compose) | Platform | Available |
| [Kubernetes](/integrations/platforms/kubernetes) | Platform | Available |
| [Terraform](/integrations/frameworks/terraform) | Infrastructure as code | Available |
| [PM2](/integrations/platforms/pm2) | Platform | Available |
| [Heroku](/integrations/cloud/heroku) | Cloud | Available |
| [Vercel](/integrations/cloud/vercel) | Cloud | Available |
Expand Down

0 comments on commit 98b443d

Please sign in to comment.