Module: Awshark

Defined in:
lib/awshark/rds/manager.rb,
lib/awshark.rb,
lib/awshark/cli.rb,
lib/awshark/version.rb,
lib/awshark/s3/bucket.rb,
lib/awshark/s3/manager.rb,
lib/awshark/ssm/client.rb,
lib/awshark/ec2/manager.rb,
lib/awshark/ecs/cluster.rb,
lib/awshark/ecs/manager.rb,
lib/awshark/s3/artifact.rb,
lib/awshark/ec2/instance.rb,
lib/awshark/class_options.rb,
lib/awshark/s3/subcommand.rb,
lib/awshark/ec2/subcommand.rb,
lib/awshark/ecs/subcommand.rb,
lib/awshark/rds/subcommand.rb,
lib/awshark/ssm/subcommand.rb,
lib/awshark/concerns/logging.rb,
lib/awshark/profile_resolver.rb,
lib/awshark/s3/configuration.rb,
lib/awshark/ec2/configuration.rb,
lib/awshark/ec2/security_rule.rb,
lib/awshark/ecs/configuration.rb,
lib/awshark/sts/configuration.rb,
lib/awshark/ec2/security_group.rb,
lib/awshark/cloud_formation/files.rb,
lib/awshark/cloud_formation/stack.rb,
lib/awshark/rds/check_reservations.rb,
lib/awshark/cloud_formation/manager.rb,
lib/awshark/cloud_formation/inferrer.rb,
lib/awshark/cloud_formation/template.rb,
lib/awshark/cloud_formation/parameters.rb,
lib/awshark/cloud_formation/subcommand.rb,
lib/awshark/cloud_formation/stack_events.rb,
lib/awshark/cloud_formation/configuration.rb

Overview

Defined Under Namespace

Modules: ClassOptions, CloudFormation, Ec2, Ecs, Logging, Rds, S3, Ssm, Sts Classes: Cli, GracefulFail, ProfileResolver

Constant Summary collapse

VERSION =
'1.6.0'

Class Method Summary collapse

Class Method Details

.configObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/awshark.rb', line 19

def self.config
  @config ||= begin
                cf = CloudFormation::Configuration.new
                ec2 = Ec2::Configuration.new
                ecs = Ecs::Configuration.new
                s3 = S3::Configuration.new
                sts = Sts::Configuration.new

                OpenStruct.new(
                  cloud_formation: cf,
                  ec2: ec2,
                  ecs: ecs,
                  s3: s3,
                  sts: sts
                )
              end
end

.configure {|config| ... } ⇒ Object

Yields:



37
38
39
# File 'lib/awshark.rb', line 37

def self.configure
  yield config
end

.loggerObject



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/awshark.rb', line 41

def self.logger
  return @logger if @logger

  @logger = ::Logger.new($stdout)
  @logger.level = Logger::INFO
  @logger.formatter = proc do |_severity, _datetime, _progname, msg|
    "[awshark] #{msg}\n"
  end

  @logger
end