mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-11 19:28:58 +00:00
Terraform Cloud integration
This commit is contained in:
@@ -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