Managed secret providers
Terraform
Connect Terraform to Alter Vault for secure API access
Overview
Section titled “Overview”Use Terraform credentials to make authenticated API calls through Alter Vault without exposing API keys in code.
| Property | Value |
|---|---|
| Provider ID | terraform |
| Category | Developer Tools |
| Credential Type | Bearer Token |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”Log in to HCP Terraform
Log in to HCP Terraform at app.terraform.io.
Go to User Settings → Tokens
Go to User Settings → Tokens at app.terraform.io/app/settings/tokens.
Create an API token
Click ‘Create an API token’.
Copy your token
Copy the generated token.
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”Open the Developer Portal
Go to portal.alterauth.com and navigate to the application.
Add Terraform
Go to Managed Secrets > Add Provider > Terraform.
Enter credentials
Paste your API Token into the credential field.
Save
Click Save. You’ll receive a grant_id to use with the SDK.
Using in Code
Section titled “Using in Code”response = await alter_app.request( HttpMethod.GET, "https://app.terraform.io/api/v2/organizations", grant_id="YOUR_GRANT_ID",)