Skip to content

Commit

Permalink
remove decode boolean from eks
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardomourar committed Jun 17, 2020
1 parent 494330f commit e82e8a6
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions packages/@aws-cdk/aws-eks/lib/cluster-resource-handler/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,6 @@ export interface EksUpdateId {

export type ResourceEvent = AWSLambda.CloudFormationCustomResourceEvent & EksUpdateId;

/**
* Decodes encoded true/false values
*/
function decodeBooleans(object: object) {
return JSON.parse(JSON.stringify(object), (_k, v) => {
switch (v) {
case 'TRUE:BOOLEAN':
return true;
case 'FALSE:BOOLEAN':
return false;
default:
return v;
}
});
}

export abstract class ResourceHandler {
protected readonly requestId: string;
protected readonly logicalResourceId: string;
Expand All @@ -49,10 +33,6 @@ export abstract class ResourceHandler {
throw new Error('AssumeRoleArn must be provided');
}

if (event.ResourceProperties.Config) {
this.event.ResourceProperties.Config = decodeBooleans(event.ResourceProperties.Config);
}

eks.configureAssumeRole({
RoleArn: roleToAssume,
RoleSessionName: `AWSCDK.EKSCluster.${this.requestType}.${this.requestId}`,
Expand Down

0 comments on commit e82e8a6

Please sign in to comment.