From ded18673b97a5c182ee8452190268c1fe9645a48 Mon Sep 17 00:00:00 2001 From: Marcel Patzwahl Date: Tue, 5 Sep 2023 13:29:42 +0200 Subject: [PATCH] expose bastion host ip (#351) --- lib/bastion-host-forward.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/bastion-host-forward.ts b/lib/bastion-host-forward.ts index a01d368..b14604a 100644 --- a/lib/bastion-host-forward.ts +++ b/lib/bastion-host-forward.ts @@ -81,6 +81,11 @@ export class BastionHostForward extends Construct { */ public securityGroup?: ISecurityGroup; + /** + * @returns the private ip address of the bastion host + */ + public instancePrivateIp?: string; + /** * @returns The BastionHost Instance */ @@ -113,5 +118,6 @@ export class BastionHostForward extends Construct { cfnBastionHost.userData = Fn.base64(shellCommands.render()); this.instanceId = this.bastionHost.instance.instanceId; + this.instancePrivateIp = this.bastionHost.instance.instancePrivateIp; } }