mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Terraform Cloud integration
This commit is contained in:
@@ -1855,6 +1855,7 @@ const syncSecretsTerraformCloud = async ({
|
||||
|
||||
Promise.all(payload);
|
||||
|
||||
|
||||
// get secrets from Terraform Cloud
|
||||
// const getSecretsRes = (
|
||||
// await standardRequest.get(
|
||||
@@ -1867,7 +1868,7 @@ const syncSecretsTerraformCloud = async ({
|
||||
// },
|
||||
// }
|
||||
// )
|
||||
// ).data?.data;
|
||||
// ).data;
|
||||
|
||||
// delete secrets from Terraform Cloud
|
||||
// getSecretsRes.forEach(async (data: any) => {
|
||||
|
||||
@@ -195,6 +195,15 @@ export const getIntegrationOptions = async () => {
|
||||
clientId: await getClientIdGitLab(),
|
||||
docsLink: "",
|
||||
},
|
||||
{
|
||||
name: "Terraform Cloud",
|
||||
slug: "terraform-cloud",
|
||||
image: "Terraform Cloud.png",
|
||||
isAvailable: true,
|
||||
type: "pat",
|
||||
cliendId: "",
|
||||
docsLink: "",
|
||||
},
|
||||
{
|
||||
name: "Travis CI",
|
||||
slug: "travisci",
|
||||
@@ -222,15 +231,6 @@ export const getIntegrationOptions = async () => {
|
||||
clientId: "",
|
||||
docsLink: "",
|
||||
},
|
||||
{
|
||||
name: "Terraform Cloud",
|
||||
slug: "terraform-cloud",
|
||||
image: "Terraform Cloud.png",
|
||||
isAvailable: true,
|
||||
type: "pat",
|
||||
cliendId: "",
|
||||
docsLink: "",
|
||||
},
|
||||
{
|
||||
name: "HashiCorp Vault",
|
||||
slug: "hashicorp-vault",
|
||||
|
||||
42
docs/integrations/cloud/terraform-cloud.mdx
Normal file
42
docs/integrations/cloud/terraform-cloud.mdx
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: "Terraform Cloud"
|
||||
description: "How to sync secrets from Infisical to Terraform Cloud"
|
||||
---
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- Set up and add envars to [Infisical Cloud](https://app.infisical.com)
|
||||
|
||||
## Navigate to your project's integrations tab
|
||||
|
||||

|
||||
|
||||
## Enter your Terraform Cloud API Token and Workspace Id
|
||||
|
||||
Obtain a Terraform Cloud API Token in User Settings > Tokens
|
||||
|
||||

|
||||

|
||||
|
||||
Obtain your Terraform Cloud Workspace Id in Projects & Workspaces > Workspace > ID
|
||||
|
||||

|
||||

|
||||
|
||||
Press on the Terraform Cloud tile and input your Terraform Cloud API Token and Workspace Id to grant Infisical access to your Terraform Cloud account.
|
||||
|
||||

|
||||
|
||||
<Info>
|
||||
If this is your project's first cloud integration, then you'll have to grant
|
||||
Infisical access to your project's environment variables. Although this step
|
||||
breaks E2EE, it's necessary for Infisical to sync the environment variables to
|
||||
the cloud platform.
|
||||
</Info>
|
||||
|
||||
## Start integration
|
||||
|
||||
Select which Infisical environment secrets and Terraform Cloud variable type you want to sync to which Terraform Cloud workspace/project and press create integration to start syncing secrets to Terraform Cloud.
|
||||
|
||||

|
||||

|
||||
@@ -20,6 +20,7 @@ Missing an integration? [Throw in a request](https://github.com/Infisical/infisi
|
||||
| [Render](/integrations/cloud/render) | Cloud | Available |
|
||||
| [Laravel Forge](/integrations/cloud/laravel-forge) | Cloud | Available |
|
||||
| [Railway](/integrations/cloud/railway) | Cloud | Available |
|
||||
| [Terraform Cloud](/integrations/cloud/terraform-cloud) | Cloud | Available |
|
||||
| [Fly.io](/integrations/cloud/flyio) | Cloud | Available |
|
||||
| [Supabase](/integrations/cloud/supabase) | Cloud | Available |
|
||||
| [Cloudflare Pages](/integrations/cloud/cloudflare-pages) | Cloud | Available |
|
||||
|
||||
@@ -130,7 +130,6 @@
|
||||
"self-hosting/deployment-options/standalone-infisical",
|
||||
"self-hosting/deployment-options/fly.io",
|
||||
"self-hosting/deployment-options/render",
|
||||
"self-hosting/deployment-options/laravel-forge",
|
||||
"self-hosting/deployment-options/digital-ocean-marketplace"
|
||||
]
|
||||
},
|
||||
@@ -198,6 +197,7 @@
|
||||
"integrations/cloud/flyio",
|
||||
"integrations/cloud/laravel-forge",
|
||||
"integrations/cloud/supabase",
|
||||
"integrations/cloud/terraform-cloud",
|
||||
"integrations/cloud/cloudflare-pages",
|
||||
"integrations/cloud/checkly",
|
||||
"integrations/cloud/hashicorp-vault",
|
||||
|
||||
@@ -33,6 +33,7 @@ export default function TerraformCloudCreateIntegrationPage() {
|
||||
const [targetApp, setTargetApp] = useState("");
|
||||
const [secretPath, setSecretPath] = useState("/");
|
||||
const [variableType, setVariableType] = useState("");
|
||||
const [variableTypeErrorText, setVariableTypeErrorText] = useState("");
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -55,6 +56,12 @@ export default function TerraformCloudCreateIntegrationPage() {
|
||||
try {
|
||||
if (!integrationAuth?._id) return;
|
||||
|
||||
setVariableTypeErrorText("");
|
||||
if (variableType.length === 0 ) {
|
||||
setVariableTypeErrorText("Variable Type cannot be blank!")
|
||||
return;
|
||||
}
|
||||
|
||||
setIsLoading(true);
|
||||
|
||||
await createIntegration({
|
||||
@@ -119,7 +126,8 @@ export default function TerraformCloudCreateIntegrationPage() {
|
||||
placeholder="Provide a path, default is /"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl label="Variable Type" className="mt-4">
|
||||
<FormControl label="Variable Type" className="mt-4" errorText={variableTypeErrorText}
|
||||
isError={variableTypeErrorText !== "" ?? false}>
|
||||
<Select
|
||||
value={variableType}
|
||||
onValueChange={(val) => setVariableType(val)}
|
||||
|
||||
Reference in New Issue
Block a user