mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 16:52:38 +00:00
Improve terraform-cloud secret sync destination variables
This commit is contained in:
+6
-1
@@ -1,3 +1,4 @@
|
||||
import { TerraformCloudSyncScope } from "@app/hooks/api/appConnections/terraform-cloud";
|
||||
import { SecretSync, TSecretSync } from "@app/hooks/api/secretSyncs";
|
||||
import {
|
||||
GitHubSyncScope,
|
||||
@@ -75,7 +76,11 @@ export const getSecretSyncDestinationColValues = (secretSync: TSecretSync) => {
|
||||
break;
|
||||
case SecretSync.TerraformCloud:
|
||||
primaryText = destinationConfig.org;
|
||||
secondaryText = destinationConfig.destinationName;
|
||||
if (destinationConfig.scope === TerraformCloudSyncScope.VariableSet) {
|
||||
secondaryText = destinationConfig.variableSetName;
|
||||
} else {
|
||||
secondaryText = destinationConfig.workspaceName;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unhandled Destination Col Values ${destination}`);
|
||||
|
||||
+2
-4
@@ -20,7 +20,7 @@ export const TerraformCloudSyncDestinationSection = ({ secretSync }: Props) => {
|
||||
<>
|
||||
<GenericFieldLabel label="Organization">{destinationConfig.org}</GenericFieldLabel>
|
||||
<GenericFieldLabel label="Variable Set">
|
||||
{destinationConfig.destinationName}
|
||||
{destinationConfig.variableSetName}
|
||||
</GenericFieldLabel>
|
||||
</>
|
||||
);
|
||||
@@ -29,9 +29,7 @@ export const TerraformCloudSyncDestinationSection = ({ secretSync }: Props) => {
|
||||
Components = (
|
||||
<>
|
||||
<GenericFieldLabel label="Organization">{destinationConfig.org}</GenericFieldLabel>
|
||||
<GenericFieldLabel label="Workspace">
|
||||
{destinationConfig.destinationName}
|
||||
</GenericFieldLabel>
|
||||
<GenericFieldLabel label="Workspace">{destinationConfig.workspaceName}</GenericFieldLabel>
|
||||
</>
|
||||
);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user