Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[needs love] feat(@aws-cdk/s3): add support for bucket replication. #184

Closed
wants to merge 3 commits into from
Closed
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
16 changes: 11 additions & 5 deletions packages/@aws-cdk/kms/lib/key.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Construct, DeletionPolicy, Output, PolicyDocument, PolicyStatement } from '@aws-cdk/core';
import { Arn, Construct, DeletionPolicy, Output, PolicyDocument, PolicyStatement } from '@aws-cdk/core';
import { kms } from '@aws-cdk/resources';
import { EncryptionKeyAlias } from './alias';

export interface EncryptionKeyRefProps {
/**
* The ARN of the external KMS key.
*/
keyArn: kms.KeyArn;
keyArn: KeyArn;
}

export abstract class EncryptionKeyRef extends Construct {
Expand Down Expand Up @@ -35,7 +35,7 @@ export abstract class EncryptionKeyRef extends Construct {
/**
* The ARN of the key.
*/
public abstract readonly keyArn: kms.KeyArn;
public abstract readonly keyArn: KeyArn;

/**
* Optional policy document that represents the resource policy of this key.
Expand Down Expand Up @@ -109,7 +109,7 @@ export interface EncryptionKeyProps {
* Definews a KMS key.
*/
export class EncryptionKey extends EncryptionKeyRef {
public readonly keyArn: kms.KeyArn;
public readonly keyArn: KeyArn;
protected readonly policy?: PolicyDocument;

constructor(parent: Construct, name: string, props: EncryptionKeyProps = {}) {
Expand Down Expand Up @@ -161,7 +161,7 @@ export class EncryptionKey extends EncryptionKeyRef {
}

class EncryptionKeyRefImport extends EncryptionKeyRef {
public readonly keyArn: kms.KeyArn;
public readonly keyArn: KeyArn;
protected readonly policy = undefined; // no policy associated with an imported key

constructor(parent: Construct, name: string, props: EncryptionKeyRefProps) {
Expand All @@ -170,3 +170,9 @@ class EncryptionKeyRefImport extends EncryptionKeyRef {
this.keyArn = props.keyArn;
}
}

/**
* The ARN of an encryption key
*/
export class KeyArn extends Arn {
}
Loading