title: How can I look up an existing Internet Gateway in CDK?
body: <p>I'm using the <code>FromLookup()</code> method on the <code>Vpc</code> construct to get a reference to the default VPC in an account like this:</p>
  <p><code>Vpc.FromLookup(this, &quot;Default VPC&quot;, new VpcLookupOptions {IsDefault = true});</code> <em>(C#)</em></p>
  <p>Is there a way to do something similar for the Internet Gateway (IGW) that's created by default in that VPC? Alternatively, can I list the IGWs for an existing VPC? I need to get a reference to that IGW in order to add routes to it.</p>
  <p>I came across <a href="https://github.com/aws/aws-cdk/issues/5327" rel="nofollow noreferrer">this GitHub issue</a> which shows a workaround using a Cfn escape hatch to get a reference to the existing IGW using its ID, but the need to manually look up and provide the ID breaks the automation we're trying to achieve. We need to spin up copies of these stacks in dozens of isolated accounts and having a manual lookup step is a deal breaker.</p>
  <p>Also, <a href="https://github.com/aws/aws-cdk/pull/7939" rel="nofollow noreferrer">the PR</a> that addresses that issue only allows getting references for IGWs in new VPCs created as part of the stack, not existing ones.</p>