Skip to content

Commit

Permalink
Merge pull request #897 from hashicorp/local-provider
Browse files Browse the repository at this point in the history
chore(docs): Brief reference for local provider usage
  • Loading branch information
skorfmann authored Aug 6, 2021
2 parents c209fe9 + 70ca572 commit 2baf75f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/working-with-cdk-for-terraform/using-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,12 @@ When using the `cdktf` cli commands, it'll automatically set the process env `TF
Last but not least, when using multiple stacks within one application, provider caching is a basic prerequisite.

This behaviour can be disabled by setting `CDKTF_DISABLE_PLUGIN_CACHE_ENV` to non null value, e.g. `CDKTF_DISABLE_PLUGIN_CACHE_ENV=1`. This might be desired, when a different cache directory is configured via a `.terraformrc` configuration file.

## Using a Local Provider

Terraform supports using local providers. For CDK for Terrform being able to generate the type bindings from these providers, Terraform itself has to find these providers. There are two ways to achieve this:

- [Implied Local Mirrors](https://www.terraform.io/docs/cli/config/config-file.html#implied-local-mirror-directories)
- [Development Overrides](https://www.terraform.io/docs/cli/config/config-file.html#development-overrides-for-provider-developers)

Once configured properly, these providers can be referenced in the `cdktf.json` config file as any other provider in the Terraform registry.

0 comments on commit 2baf75f

Please sign in to comment.