@goldstack/infra-aws
Version:
Utilities to work with AWS infrastructure via the cli.
27 lines • 1.84 kB
TypeScript
import type { AwsCredentialIdentityProvider } from '@aws-sdk/types';
import type { AWSAccessKeyId, AWSAPIKeyUserConfig, AWSConfiguration, AWSEnvironmentVariableUserConfig, AWSProfileConfig, AWSRegion, AWSSecretAccessKey, AWSUser, Name } from './types/awsAccount';
import type { AWSTerraformState, RemoteState } from './types/awsTerraformState';
export type { AWSConfiguration, AWSUser, AWSRegion, AWSAccessKeyId, AWSSecretAccessKey, AWSProfileConfig as AWSLocalUserConfig, AWSAPIKeyUserConfig as AWSAPIKeyUser, AWSEnvironmentVariableUserConfig, AWSTerraformState, RemoteState, };
import type { AWSDeployment } from './types/awsDeployment';
export { getAWSCredentials } from './awsAuthUtils';
export type { AWSDeployment, AWSDeploymentRegion, AWSUserName, } from './types/awsDeployment';
export interface ReadDeploymentFromPackageConfigOptions {
deploymentName: string;
path?: string;
}
export declare const readDeploymentFromPackageConfig: (options: ReadDeploymentFromPackageConfigOptions) => AWSDeployment;
export declare const assertTerraformConfig: (user: Name, path?: string) => AWSTerraformState;
export declare const writeTerraformConfig: (config: AWSTerraformState, path?: string) => void;
export declare const hasConfig: (path?: string) => boolean;
export declare const readConfig: (path?: string) => AWSConfiguration;
export declare const writeConfig: (config: AWSConfiguration, path?: string) => void;
export declare const createDefaultConfig: () => AWSConfiguration;
/**
* Resets the environment variables set after obtaining AWS user.
*/
export declare const resetAWSUser: () => void;
/**
* Obtains AWS user credentials from config file or environment variables.
*/
export declare const getAWSUser: (userName: string, configPath?: string) => Promise<AwsCredentialIdentityProvider>;
//# sourceMappingURL=infraAws.d.ts.map