Module: Backends::Ec2::Helpers::NetworkCreateHelper

Included in:
Network
Defined in:
lib/backends/ec2/helpers/network_create_helper.rb

Instance Method Summary collapse

Instance Method Details

#create_add_igw(vpc_id, tags) ⇒ Object


5
6
7
8
9
10
11
12
13
14
# File 'lib/backends/ec2/helpers/network_create_helper.rb', line 5

def create_add_igw(vpc_id, tags)
  igw_id = create_get_igw(tags)

  Backends::Ec2::Helpers::AwsConnectHelper.rescue_aws_service(@logger) do
    @ec2_client.attach_internet_gateway(
      internet_gateway_id: igw_id,
      vpc_id: vpc_id
    )
  end
end