old_contents: from troposphere.ec2 import (
      VPC,
  )
  
  from .template import template
  
  
  vpc = VPC(
      "Vpc",
      template=template,
      CidrBlock="10.0.0.0/16",
  )
  
new_contents: from troposphere import (
      Ref,
  )
  
  from troposphere.ec2 import (
      InternetGateway,
      VPC,
      VPCGatewayAttachment,
  )
  
  from .template import template
  
  
  vpc = VPC(
      "Vpc",
      template=template,
      CidrBlock="10.0.0.0/16",
  )
  
  
  # Allow outgoing to outside VPC
  internet_gateway = InternetGateway(
      "InternetGateway",
      template=template,
  )
  
  
  # Attach Gateway to VPC
  VPCGatewayAttachment(
      "GatewayAttachement",
      template=template,
      VpcId=Ref(vpc),
      InternetGatewayId=Ref(internet_gateway),
  )
  
subject: Attach an `InternetGateway` to the `VPC`