console/deployment/services/slack-app.ts
2024-03-04 13:56:12 +01:00

22 lines
586 B
TypeScript

import { Config, Output } from '@pulumi/pulumi';
import { ServiceSecret } from '../utils/secrets';
class SlackIntegrationSecret extends ServiceSecret<{
clientId: string | Output<string>;
clientSecret: string | Output<string>;
}> {}
export function configureSlackApp() {
const slackConfig = new Config('slack');
const secret = new SlackIntegrationSecret('slack-app', {
clientId: slackConfig.require('clientId'),
clientSecret: slackConfig.requireSecret('clientSecret'),
});
return {
secret,
};
}
export type SlackApp = ReturnType<typeof configureSlackApp>;