class GeoEngineer::Resources::AwsDbInstance

AwsDbInstance is the aws_db_instance terrform resource,

{www.terraform.io/docs/providers/aws/r/db_instance.html Terraform Docs}

Public Class Methods

_fetch_remote_resources(provider) click to toggle source
# File lib/geoengineer/resources/aws_db_instance.rb, line 42
def self._fetch_remote_resources(provider)
  AwsClients.rds(provider).describe_db_instances['db_instances'].map(&:to_h).map do |rds|
    rds[:_terraform_id] = rds[:db_instance_identifier]
    rds[:_geo_id]       = rds[:db_instance_identifier]
    rds[:identifier]    = rds[:db_instance_identifier]
    rds
  end
end

Public Instance Methods

short_type() click to toggle source
# File lib/geoengineer/resources/aws_db_instance.rb, line 38
def short_type
  "db"
end
to_terraform_state() click to toggle source
# File lib/geoengineer/resources/aws_db_instance.rb, line 28
def to_terraform_state
  tfstate = super
  tfstate[:primary][:attributes] = {
    'identifier' => _terraform_id,
    'final_snapshot_identifier' => final_snapshot_identifier,
    'skip_final_snapshot' => 'true'
  }
  tfstate
end