Class: TerraspacePluginAws::Interfaces::Backend::Setup

Inherits:
Base
  • Object
show all
Defined in:
lib/terraspace_plugin_aws/interfaces/backend/setup.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Logging

#logger

Methods included from Clients

#dynamodb, #s3, #secretsmanager, #ssm, #sts

Constructor Details

This class inherits a constructor from TerraspacePluginAws::Interfaces::Backend::Base

Instance Method Details

#check!Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/terraspace_plugin_aws/interfaces/backend/setup.rb', line 3

def check!
  sts.get_caller_identity
rescue Aws::Errors::MissingCredentialsError => e
  logger.info "ERROR: #{e.class}: #{e.message}".color(:red)
  logger.info <<~EOL
    It doesnt look like AWS credentials and access has been setup.
    Please double check the AWS credentials setup.
    IE: ~/.aws/config and the AWS_PROFILE env variable.
  EOL
  exit 1
end