Add support and docs for AWS parameter store and secret manager

This commit is contained in:
Tuan Dang
2023-02-11 01:40:18 +07:00
parent dd7e8d254b
commit 428022d1a2
67 changed files with 4527 additions and 259 deletions
@@ -8,6 +8,8 @@ interface Props {
sourceEnvironment: string;
targetEnvironment: string | null;
owner: string | null;
path: string | null;
region: string | null;
}
/**
* This route creates a new integration based on the integration authorization with id [integrationAuthId]
@@ -22,7 +24,9 @@ const createIntegration = ({
appId,
sourceEnvironment,
targetEnvironment,
owner
owner,
path,
region
}: Props) =>
SecurityClient.fetchCall('/api/v1/integration', {
method: 'POST',
@@ -36,7 +40,9 @@ const createIntegration = ({
appId,
sourceEnvironment,
targetEnvironment,
owner
owner,
path,
region
})
}).then(async (res) => {
if (res && res.status === 200) {
@@ -3,6 +3,7 @@ import SecurityClient from '@app/components/utilities/SecurityClient';
interface Props {
workspaceId: string | null;
integration: string | undefined;
accessId: string | null;
accessToken: string;
}
/**
@@ -19,6 +20,7 @@ interface Props {
const saveIntegrationAccessToken = ({
workspaceId,
integration,
accessId,
accessToken
}: Props) =>
SecurityClient.fetchCall(`/api/v1/integration-auth/access-token`, {
@@ -29,13 +31,14 @@ const saveIntegrationAccessToken = ({
body: JSON.stringify({
workspaceId,
integration,
accessId,
accessToken
})
}).then(async (res) => {
if (res && res.status === 200) {
return (await res.json()).integrationAuth;
}
console.log('Failed to save integration access token');
console.log('Failed to save integration access details');
return undefined;
});