Files
ubicloud/model/nic_aws_resource.rb
Furkan Sahin 70971d37ee Fix eip leaking by id tracking
We were leaking EIPs because we used to pull the eip using the nic id
which results in the eip leak since the nic is already deleted at the
time of eip listing via API. Now, we simply store that information in
our database and release using that information without the need of
extra API call.
2025-04-08 13:41:28 +02:00

19 lines
409 B
Ruby

# frozen_string_literal: true
require_relative "../model"
class NicAwsResource < Sequel::Model
many_to_one :nic, key: :id
include ResourceMethods
end
# Table: nic_aws_resource
# Columns:
# id | uuid | PRIMARY KEY
# eip_allocation_id | text |
# Indexes:
# nic_aws_resource_pkey | PRIMARY KEY btree (id)
# Foreign key constraints:
# nic_aws_resource_id_fkey | (id) REFERENCES nic(id)