Terraform Cloud Secret Sync Integration Docs
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Available"
|
||||
openapi: "GET /api/v1/app-connections/terraform-cloud/available"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Create"
|
||||
openapi: "POST /api/v1/app-connections/terraform-cloud"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Delete"
|
||||
openapi: "DELETE /api/v1/app-connections/terraform-cloud/{connectionId}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Get by ID"
|
||||
openapi: "GET /api/v1/app-connections/terraform-cloud/{connectionId}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Get by Name"
|
||||
openapi: "GET /api/v1/app-connections/terraform-cloud/connection-name/{connectionName}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "List"
|
||||
openapi: "GET /api/v1/app-connections/terraform-cloud"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Update"
|
||||
openapi: "PATCH /api/v1/app-connections/terraform-cloud/{connectionId}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Create"
|
||||
openapi: "POST /api/v1/secret-syncs/terraform-cloud"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Delete"
|
||||
openapi: "DELETE /api/v1/secret-syncs/terraform-cloud/{syncId}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Get by ID"
|
||||
openapi: "GET /api/v1/secret-syncs/terraform-cloud/{syncId}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Get by Name"
|
||||
openapi: "GET /api/v1/secret-syncs/terraform-cloud/sync-name/{syncName}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "List"
|
||||
openapi: "GET /api/v1/secret-syncs/terraform-cloud"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Remove Secrets"
|
||||
openapi: "POST /api/v1/secret-syncs/terraform-cloud/{syncId}/remove-secrets"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Sync Secrets"
|
||||
openapi: "POST /api/v1/secret-syncs/terraform-cloud/{syncId}/sync-secrets"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Update"
|
||||
openapi: "PATCH /api/v1/secret-syncs/terraform-cloud/{syncId}"
|
||||
---
|
||||
|
After Width: | Height: | Size: 241 KiB |
|
After Width: | Height: | Size: 909 KiB |
|
After Width: | Height: | Size: 573 KiB |
|
After Width: | Height: | Size: 581 KiB |
|
After Width: | Height: | Size: 391 KiB |
|
After Width: | Height: | Size: 345 KiB |
|
After Width: | Height: | Size: 311 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 633 KiB |
|
After Width: | Height: | Size: 608 KiB |
|
After Width: | Height: | Size: 634 KiB |
|
After Width: | Height: | Size: 667 KiB |
|
After Width: | Height: | Size: 639 KiB |
|
After Width: | Height: | Size: 604 KiB |
83
docs/integrations/app-connections/terraform-cloud.mdx
Normal file
@@ -0,0 +1,83 @@
|
||||
---
|
||||
title: "Terraform Cloud Connection"
|
||||
description: "Learn how to configure a Terraform Cloud Connection for Infisical."
|
||||
---
|
||||
|
||||
Infisical supports connecting to Terraform Cloud using a service user.
|
||||
|
||||
## Setup Terraform Cloud Connection in Infisical
|
||||
|
||||
<Steps>
|
||||
<Step title="Move to Account Settings on Terraform Cloud">
|
||||
Navigate to the Terraform Cloud **Account Settings** tab.
|
||||

|
||||
</Step>
|
||||
<Step title="Move to Tokens Tab">
|
||||
Move to the **Tokens** tab.
|
||||

|
||||
</Step>
|
||||
<Step title="Create the API Token">
|
||||
Create the API token to be used by Infisical.
|
||||
<Note>
|
||||
If you configure an expiry date for your API token you will need to manually rotate to a new token prior to expiration to avoid integration downtime.
|
||||
</Note>
|
||||

|
||||
</Step>
|
||||
<Step title="Copy the API Token">
|
||||
The API token will be displayed after creating it. Save the token in a secure location for later use in the following steps.
|
||||

|
||||
</Step>
|
||||
<Step title="Add Terraform Cloud Connection in Infisical">
|
||||
<Tabs>
|
||||
<Tab title="Infisical UI">
|
||||
1. Navigate to the **App Connections** tab on the **Organization Settings** page.
|
||||

|
||||
2. Select the **Terraform Cloud Connection** option from the connection options modal.
|
||||

|
||||
3. Fill the Terraform Cloud Connection modal, here you will need to provide the API Token generated in the previous step.
|
||||

|
||||
4. Your **Terraform Cloud Connection** is now available for use.
|
||||

|
||||
</Tab>
|
||||
<Tab title="API">
|
||||
To create an Terraform Cloud Connection, make an API request to the [Create Terraform Cloud
|
||||
Connection](/api-reference/endpoints/app-connections/terraform-cloud/create) API endpoint.
|
||||
|
||||
### Sample request
|
||||
|
||||
```bash Request
|
||||
curl --request POST \
|
||||
--url https://app.infisical.com/api/v1/app-connections/terraform-cloud \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"name": "my-terraform-cloud-connection",
|
||||
"method": "api-token",
|
||||
"credentials": {
|
||||
"apiToken": "...",
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
### Sample response
|
||||
|
||||
```bash Response
|
||||
{
|
||||
"appConnection": {
|
||||
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"name": "my-terraform-cloud-connection",
|
||||
"version": 123,
|
||||
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"createdAt": "2023-11-07T05:31:56Z",
|
||||
"updatedAt": "2023-11-07T05:31:56Z",
|
||||
"app": "terraform-cloud",
|
||||
"method": "api-token",
|
||||
"credentials": {
|
||||
"apiToken": "..."
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
</Step>
|
||||
</Steps>
|
||||
161
docs/integrations/secret-syncs/terraform-cloud.mdx
Normal file
@@ -0,0 +1,161 @@
|
||||
---
|
||||
title: "Terraform Cloud Sync"
|
||||
description: "Learn how to configure a Terraform Cloud Sync for Infisical."
|
||||
---
|
||||
|
||||
**Prerequisites:**
|
||||
|
||||
- Set up and add secrets to [Infisical Cloud](https://app.infisical.com)
|
||||
- Create a [Terraform Cloud Connection](/integrations/app-connections/terraform-cloud)
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Infisical UI">
|
||||
1. Navigate to **Project** > **Integrations** and select the **Secret Syncs** tab. Click on the **Add Sync** button.
|
||||

|
||||
|
||||
2. Select the **Terraform Cloud** option.
|
||||

|
||||
|
||||
3. Configure the **Source** from where secrets should be retrieved, then click **Next**.
|
||||

|
||||
|
||||
- **Environment**: The project environment to retrieve secrets from.
|
||||
- **Secret Path**: The folder path to retrieve secrets from.
|
||||
|
||||
<Tip>
|
||||
If you need to sync secrets from multiple folder locations, check out [secret imports](/documentation/platform/secret-reference#secret-imports).
|
||||
</Tip>
|
||||
|
||||
4. Configure the **Destination** to where secrets should be deployed, then click **Next**.
|
||||

|
||||
|
||||
- **Terraform Cloud Connection**: The Terraform Cloud Connection to authenticate with.
|
||||
- **Organization**: The Terraform Cloud organization to deploy secrets to.
|
||||
- **Category**: The Terraform Cloud variable category to use on secrets syncs. Choose from:
|
||||
- **Environment**: Sync secrets as environment variables.
|
||||
- **Terraform**: Sync secrets as Terraform variables.
|
||||
- **Scope**: The Terraform Cloud secret scope to sync secrets to.
|
||||
- **Variable Set**: Sync secrets to a specific variable set.
|
||||
- **Workspace**: Sync secrets to a specific workspace.
|
||||
<p class="height:1px" />
|
||||
The remaining fields are determined by the selected **Scope**:
|
||||
<AccordionGroup>
|
||||
<Accordion title="Variable Set">
|
||||
- **Variable Set**: The variable set to deploy secrets to.
|
||||
</Accordion>
|
||||
<Accordion title="Workspace">
|
||||
- **Workspace**: The workspace to deploy secrets to.
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**.
|
||||

|
||||
|
||||
- **Initial Sync Behavior**: Determines how Infisical should resolve the initial sync.
|
||||
- **Overwrite Destination Secrets**: Removes any secrets at the destination endpoint not present in Infisical.
|
||||
<Note>
|
||||
Terraform Cloud does not support importing secrets.
|
||||
</Note>
|
||||
- **Auto-Sync Enabled**: If enabled, secrets will automatically be synced from the source location when changes occur. Disable to enforce manual syncing only.
|
||||
- **Disable Secret Deletion**: If enabled, Infisical will not remove secrets from the sync destination. Enable this option if you intend to manage some secrets manually outside of Infisical.
|
||||
|
||||
6. Configure the **Details** of your Terraform Cloud Sync, then click **Next**.
|
||||

|
||||
|
||||
- **Name**: The name of your sync. Must be slug-friendly.
|
||||
- **Description**: An optional description for your sync.
|
||||
|
||||
7. Review your Terraform Cloud Sync configuration, then click **Create Sync**.
|
||||

|
||||
|
||||
8. If enabled, your Terraform Cloud Sync will begin syncing your secrets to the destination endpoint.
|
||||

|
||||
|
||||
</Tab>
|
||||
<Tab title="API">
|
||||
To create an **Terraform Cloud Sync**, make an API request to the [Create Terraform Cloud Sync](/api-reference/endpoints/secret-syncs/terraform-cloud/create) API endpoint.
|
||||
|
||||
### Sample request
|
||||
|
||||
```bash Request
|
||||
curl --request POST \
|
||||
--url https://app.infisical.com/api/v1/secret-syncs/terraform-cloud \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"name": "my-terraform-cloud-sync",
|
||||
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"description": "an example sync",
|
||||
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"environment": "dev",
|
||||
"secretPath": "/my-secrets",
|
||||
"isEnabled": true,
|
||||
"syncOptions": {
|
||||
"initialSyncBehavior": "overwrite-destination"
|
||||
},
|
||||
"destinationConfig": {
|
||||
"scope": "variable-set",
|
||||
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
|
||||
"destinationName": "my-variable-set",
|
||||
"org": "my-organization-id",
|
||||
"category": "env"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
### Sample response
|
||||
|
||||
```bash Response
|
||||
{
|
||||
"secretSync": {
|
||||
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"name": "my-terraform-cloud-sync",
|
||||
"description": "an example sync",
|
||||
"isEnabled": true,
|
||||
"version": 1,
|
||||
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"createdAt": "2023-11-07T05:31:56Z",
|
||||
"updatedAt": "2023-11-07T05:31:56Z",
|
||||
"syncStatus": "succeeded",
|
||||
"lastSyncJobId": "123",
|
||||
"lastSyncMessage": null,
|
||||
"lastSyncedAt": "2023-11-07T05:31:56Z",
|
||||
"importStatus": null,
|
||||
"lastImportJobId": null,
|
||||
"lastImportMessage": null,
|
||||
"lastImportedAt": null,
|
||||
"removeStatus": null,
|
||||
"lastRemoveJobId": null,
|
||||
"lastRemoveMessage": null,
|
||||
"lastRemovedAt": null,
|
||||
"syncOptions": {
|
||||
"initialSyncBehavior": "overwrite-destination"
|
||||
},
|
||||
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"connection": {
|
||||
"app": "terraform-cloud",
|
||||
"name": "my-terraform-cloud-connection",
|
||||
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
|
||||
},
|
||||
"environment": {
|
||||
"slug": "dev",
|
||||
"name": "Development",
|
||||
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
|
||||
},
|
||||
"folder": {
|
||||
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"path": "/my-secrets"
|
||||
},
|
||||
"destination": "terraform-cloud",
|
||||
"destinationConfig": {
|
||||
"scope": "workspace",
|
||||
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"destinationName": "my-workspace",
|
||||
"org": "my-organization-id",
|
||||
"category": "terraform"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Infisical",
|
||||
"openapi": "https://app.infisical.com/api/docs/json",
|
||||
"openapi": "https://1243-190-31-36-142.ngrok-free.app/api/docs/json",
|
||||
"logo": {
|
||||
"dark": "/logo/dark.svg",
|
||||
"light": "/logo/light.svg",
|
||||
@@ -419,7 +419,8 @@
|
||||
"integrations/app-connections/databricks",
|
||||
"integrations/app-connections/gcp",
|
||||
"integrations/app-connections/github",
|
||||
"integrations/app-connections/humanitec"
|
||||
"integrations/app-connections/humanitec",
|
||||
"integrations/app-connections/terraform-cloud"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -438,7 +439,8 @@
|
||||
"integrations/secret-syncs/databricks",
|
||||
"integrations/secret-syncs/gcp-secret-manager",
|
||||
"integrations/secret-syncs/github",
|
||||
"integrations/secret-syncs/humanitec"
|
||||
"integrations/secret-syncs/humanitec",
|
||||
"integrations/secret-syncs/terraform-cloud"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -922,6 +924,18 @@
|
||||
"api-reference/endpoints/app-connections/humanitec/update",
|
||||
"api-reference/endpoints/app-connections/humanitec/delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Terraform Cloud",
|
||||
"pages": [
|
||||
"api-reference/endpoints/app-connections/terraform-cloud/list",
|
||||
"api-reference/endpoints/app-connections/terraform-cloud/available",
|
||||
"api-reference/endpoints/app-connections/terraform-cloud/get-by-id",
|
||||
"api-reference/endpoints/app-connections/terraform-cloud/get-by-name",
|
||||
"api-reference/endpoints/app-connections/terraform-cloud/create",
|
||||
"api-reference/endpoints/app-connections/terraform-cloud/update",
|
||||
"api-reference/endpoints/app-connections/terraform-cloud/delete"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1038,6 +1052,19 @@
|
||||
"api-reference/endpoints/secret-syncs/humanitec/sync-secrets",
|
||||
"api-reference/endpoints/secret-syncs/humanitec/remove-secrets"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Terraform Cloud",
|
||||
"pages": [
|
||||
"api-reference/endpoints/secret-syncs/terraform-cloud/list",
|
||||
"api-reference/endpoints/secret-syncs/terraform-cloud/get-by-id",
|
||||
"api-reference/endpoints/secret-syncs/terraform-cloud/get-by-name",
|
||||
"api-reference/endpoints/secret-syncs/terraform-cloud/create",
|
||||
"api-reference/endpoints/secret-syncs/terraform-cloud/update",
|
||||
"api-reference/endpoints/secret-syncs/terraform-cloud/delete",
|
||||
"api-reference/endpoints/secret-syncs/terraform-cloud/sync-secrets",
|
||||
"api-reference/endpoints/secret-syncs/terraform-cloud/remove-secrets"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||