@innovationson/cdk-iamuserwithaccesskey
Version:
Creating an IAM user with access key stored in Secrets manager
34 lines (33 loc) • 1.04 kB
TypeScript
import * as iam from 'aws-cdk-lib/aws-iam';
import * as kms from 'aws-cdk-lib/aws-kms';
import * as sm from 'aws-cdk-lib/aws-secretsmanager';
import { Construct } from 'constructs';
/**
* Properties for the IAM User
*/
export interface IamUserWithAccessKeyProps extends iam.UserProps {
/**
* An optional custom encryption key for the secret.
*
* @default The Accounts default Secret Manager KMS Key will be used.
*/
readonly encryptionKey?: kms.IKey | undefined;
}
/**
* An IAM User including an Access Key that will be stored in Secrets Manager. The properties as for normal IAM Users.
*/
export declare class IamUserWithAccessKey extends iam.User {
/**
* An attribute that represents the iam access_key.
*
* @attribute true
*/
readonly accessKey: iam.CfnAccessKey;
/**
* An attribute that represents the secret.
*
* @attribute true
*/
readonly secret: sm.Secret;
constructor(scope: Construct, id: string, props?: IamUserWithAccessKeyProps);
}