Class: AwsEc2Environment::Config
- Inherits:
-
Object
- Object
- AwsEc2Environment::Config
- Defined in:
- lib/aws_ec2_environment/config.rb
Instance Attribute Summary collapse
-
#aws_region ⇒ Object
readonly
Returns the value of attribute aws_region.
-
#bastion_filters ⇒ Object
readonly
Returns the value of attribute bastion_filters.
-
#bastion_ssh_user ⇒ Object
readonly
Returns the value of attribute bastion_ssh_user.
-
#env_name ⇒ Object
readonly
Returns the value of attribute env_name.
-
#instance_filters ⇒ Object
readonly
Returns the value of attribute instance_filters.
-
#ssh_user ⇒ Object
readonly
Returns the value of attribute ssh_user.
-
#ssm_host ⇒ Object
readonly
Returns the value of attribute ssm_host.
-
#use_ssm ⇒ Object
readonly
Returns the value of attribute use_ssm.
Instance Method Summary collapse
-
#initialize(env_name, attrs) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(env_name, attrs) ⇒ Config
Returns a new instance of Config.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/aws_ec2_environment/config.rb', line 20 def initialize(env_name, attrs) @env_name = env_name @aws_region = attrs.fetch("aws_region") @use_ssm = attrs.fetch("use_ssm", false) @ssm_host = attrs.fetch("ssm_host", "127.0.0.1") @ssh_user = attrs.fetch("ssh_user") @instance_filters = attrs.fetch("filters") @bastion_filters, @bastion_ssh_user = fetch_bastion_details(attrs) end |
Instance Attribute Details
#aws_region ⇒ Object (readonly)
Returns the value of attribute aws_region.
9 10 11 |
# File 'lib/aws_ec2_environment/config.rb', line 9 def aws_region @aws_region end |
#bastion_filters ⇒ Object (readonly)
Returns the value of attribute bastion_filters.
9 10 11 |
# File 'lib/aws_ec2_environment/config.rb', line 9 def bastion_filters @bastion_filters end |
#bastion_ssh_user ⇒ Object (readonly)
Returns the value of attribute bastion_ssh_user.
9 10 11 |
# File 'lib/aws_ec2_environment/config.rb', line 9 def bastion_ssh_user @bastion_ssh_user end |
#env_name ⇒ Object (readonly)
Returns the value of attribute env_name.
9 10 11 |
# File 'lib/aws_ec2_environment/config.rb', line 9 def env_name @env_name end |
#instance_filters ⇒ Object (readonly)
Returns the value of attribute instance_filters.
9 10 11 |
# File 'lib/aws_ec2_environment/config.rb', line 9 def instance_filters @instance_filters end |
#ssh_user ⇒ Object (readonly)
Returns the value of attribute ssh_user.
9 10 11 |
# File 'lib/aws_ec2_environment/config.rb', line 9 def ssh_user @ssh_user end |
#ssm_host ⇒ Object (readonly)
Returns the value of attribute ssm_host.
9 10 11 |
# File 'lib/aws_ec2_environment/config.rb', line 9 def ssm_host @ssm_host end |
#use_ssm ⇒ Object (readonly)
Returns the value of attribute use_ssm.
9 10 11 |
# File 'lib/aws_ec2_environment/config.rb', line 9 def use_ssm @use_ssm end |