Terraform Cloud
Learn how to sync your Doppler secrets to your Terraform Cloud projects.
This guide is designed to get you set up with syncing your secrets to Terraform Cloud. We also have documentation available for our Terraform Provider along with information on how to use it with Terraform CDK.
Prerequisites
- You have an account setup at Terraform Cloud and have a project created.
Terraform Cloud API Token
Go to your Terraform Cloud dashboard. Once there, click on the Settings link in the left sidebar.
Next, click on the API tokens link in the updated sidebar. Then, click the Regenerate token button.
Terraform Cloud only allows you to have one active organization API token at a time, so to get one you'll have to regenerate the token, which will invalidate the previous one. Be careful not to break any other automation you have when you get this token!
You'll need this API token in the next step. You can get more information about these API tokens in Terraform Cloud's documentation.
Authorization
In your Doppler project, navigate to Integrations and select Terraform:
Set the Name to anything you like (this will be used to help you identify this sync when viewing the integrations for this config) and paste the API key you created in the previous step into the API Token field. Then click Connect.
You have now successfully connected your Terraform Cloud account with Doppler!
Configuration
Next, you can select which Terraform Cloud workspace or variable set you would like to sync to, what variable type you want, and which Doppler config you want to sync over. You can also choose the import behavior for any variables already existing for your Terraform Cloud project when the first sync is performed (note that only non-sensitive variables can be imported).
Click Set Up Integration and you're all set!
The secrets from your selected config will be immediately and continuously synced with your Terraform Cloud workspace or variable set.
Amazing Work!
Now you are all set up on Terraform Cloud. The next time you perform a run your secrets will be fetched from Doppler.
Updated 17 days ago