Skip to content

Commit

Permalink
Merge pull request #779 from tsahiduek/clone-env-support
Browse files Browse the repository at this point in the history
new withEnv function
  • Loading branch information
shapirov103 authored Jul 19, 2023
2 parents 0928491 + 7af9bbb commit d878d2b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/stacks/eks-blueprint-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ export class BlueprintBuilder implements spi.AsyncStackBuilder {
.account(account ?? this.env.account).region(region ?? this.env.region);
}

public withEnv(env: cdk.Environment): this {
this.env.account = env.account;
this.env.region = env.region;
return this;
}

public build(scope: Construct, id: string, stackProps?: cdk.StackProps): EksBlueprint {
return new EksBlueprint(scope, { ...this.props, ...{ id } },
{ ...{ env: this.env }, ...stackProps });
Expand Down Expand Up @@ -358,4 +364,4 @@ export class EksBlueprint extends cdk.Stack {
});
}
}
}
}

0 comments on commit d878d2b

Please sign in to comment.