There are bunch on information we would like to persist in our database instead of fetching them from AWS SDK every time we need them. This commit adds a new model `AwsInstance` to store `instance_id` and `az_in` for each AWS VM.
18 lines
342 B
Ruby
18 lines
342 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../model"
|
|
|
|
class AwsInstance < Sequel::Model
|
|
one_to_one :vm, key: :id
|
|
|
|
plugin ResourceMethods, etc_type: true
|
|
end
|
|
|
|
# Table: aws_instance
|
|
# Columns:
|
|
# id | uuid | PRIMARY KEY
|
|
# instance_id | text |
|
|
# az_id | text |
|
|
# Indexes:
|
|
# aws_instance_pkey | PRIMARY KEY btree (id)
|