We are adding a new tab under Project Details for listing private locations. We keep it behind a feature flag. The create view simply gets the AWS region, ubicloud region name, access and secret keys. We list the locations and give chance to customer to be able to update the name.
24 lines
578 B
Ruby
24 lines
578 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../model"
|
|
|
|
class LocationCredential < Sequel::Model
|
|
include ResourceMethods
|
|
many_to_one :project
|
|
many_to_one :location, key: :id
|
|
plugin :column_encryption do |enc|
|
|
enc.column :access_key
|
|
enc.column :secret_key
|
|
end
|
|
end
|
|
|
|
# Table: location_credential
|
|
# Columns:
|
|
# access_key | text | NOT NULL
|
|
# secret_key | text | NOT NULL
|
|
# id | uuid | PRIMARY KEY
|
|
# Indexes:
|
|
# location_credential_pkey | PRIMARY KEY btree (id)
|
|
# Foreign key constraints:
|
|
# location_credential_id_fkey | (id) REFERENCES location(id)
|