Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions packages/oc-types/src/common/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,37 @@ export interface SecretVariable {
disabled?: boolean;
type?: VariableValueType;
}

interface BaseExternalSecretVariable {
name: string;
description?: Description;
disabled?: boolean;
}

export interface HashicorpVaultExternalSecret extends BaseExternalSecretVariable {
path: string;
}

export interface AwsSecretsManagerExternalSecret extends BaseExternalSecretVariable {
secretName: string;
}

export interface AzureKeyVaultExternalSecret extends BaseExternalSecretVariable {
vaultName: string;
}

export type ExternalSecretVariable =
| HashicorpVaultExternalSecret
| AwsSecretsManagerExternalSecret
| AzureKeyVaultExternalSecret;

export type SecretProviderType =
| 'hashicorp-vault-cloud'
| 'hashicorp-vault-server'
| 'aws-secrets-manager'
| 'azure-key-vault';

export interface ExternalSecrets {
type: SecretProviderType;
variables?: ExternalSecretVariable[];
}
3 changes: 2 additions & 1 deletion packages/oc-types/src/config/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
*/

import type { Description } from '../common/description';
import type { Variable, SecretVariable } from '../common/variables';
import type { Variable, SecretVariable, ExternalSecrets } from '../common/variables';
import type { ClientCertificate } from './certificates';

export interface Environment {
name: string;
color?: string;
description?: Description;
variables?: (Variable | SecretVariable)[];
externalSecrets?: ExternalSecrets;
clientCertificates?: ClientCertificate[];
extends?: string;
dotEnvFilePath?: string;
Expand Down
Loading