Skip to content

Commit

Permalink
updating kms and solving special tags members
Browse files Browse the repository at this point in the history
  • Loading branch information
moofish32 committed Jun 7, 2019
1 parent 6193da3 commit ac60000
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-kms/lib/key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export class Key extends KeyBase {
keyPolicy: this.policy,
});

this.keyArn = resource.keyArn;
this.keyArn = resource.attrArn;
resource.options.deletionPolicy = props.retain === false
? DeletionPolicy.Delete
: DeletionPolicy.Retain;
Expand Down
7 changes: 7 additions & 0 deletions tools/cfn2ts/lib/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ export default class CodeGenerator {
this.code.indent(`if (props !== undefined) {`);
}
for (const prop of Object.values(propMap)) {
// tags are handled by the tagmanager already
if (prop === 'tags') {
continue;
}
this.code.line(`this.${prop} = props.${prop};`);
}
if (optionalProps) {
Expand Down Expand Up @@ -355,6 +359,9 @@ export default class CodeGenerator {
this.code.openBlock(`protected get updatedProperties(): ${propsType.className}`);
this.code.indent('return {');
for (const prop of Object.values(propMap)) {
if (prop === 'tags') {
continue;
}
this.code.line(`${prop}: this.${prop},`);
}
this.code.unindent('};');
Expand Down

0 comments on commit ac60000

Please sign in to comment.