aws_beanstalk_tunkki 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws_beanstalk_tunkki.rb +7 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 41faff9d2ac42895ea9c965ddf4ac97d9f67ee4dbe62b739bd23f19658a0b03c
|
|
4
|
+
data.tar.gz: 905f0b381e719c8635d8dbd0524925ba472585d4d743eef8f451553326d6399a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c4a7be70944aab8eeb893babb597be472db5704e979643359c68d5084fc1a5a0210495b35b2002a93910e8a5fb9c16333175ff1de7348d9a1402011cebf1ea2
|
|
7
|
+
data.tar.gz: 3686ff823c78b5db9716749517a7c5d57b192819e6300b0577ef8ed81207d12afb73cfa1f9c37814e99e5bfd247a09b70531a7dfe087101b5b586b1a7a0def3d
|
data/lib/aws_beanstalk_tunkki.rb
CHANGED
|
@@ -61,15 +61,18 @@ class AWSBeanstalkTunkki
|
|
|
61
61
|
|
|
62
62
|
def set_aws_clients
|
|
63
63
|
if @local == "true"
|
|
64
|
-
# Deploy from local machine, requires AWS_PROFILE
|
|
65
|
-
|
|
64
|
+
# Deploy from local machine, requires AWS_PROFILE environment variable to be set
|
|
65
|
+
# and aws-mfa based login before execution
|
|
66
|
+
raise "AWS_PROFILE environment varible is not set!" if ENV['AWS_PROFILE'].nil?
|
|
67
|
+
@elasticbeanstalk = Aws::ElasticBeanstalk::Client.new(region: @aws_region)
|
|
68
|
+
@s3 = Aws::S3::Client.new(region: @aws_region)
|
|
66
69
|
else
|
|
67
70
|
aws_access_key_id, aws_secret_access_key = *get_aws_keys()
|
|
68
71
|
raise "AWS keys are not defined!" if aws_access_key_id.nil? || aws_secret_access_key.nil?
|
|
69
72
|
credentials = Aws::Credentials.new(aws_access_key_id, aws_secret_access_key)
|
|
73
|
+
@elasticbeanstalk = Aws::ElasticBeanstalk::Client.new(region: @aws_region, credentials: credentials)
|
|
74
|
+
@s3 = Aws::S3::Client.new(region: @aws_region, credentials: credentials)
|
|
70
75
|
end
|
|
71
|
-
@elasticbeanstalk = Aws::ElasticBeanstalk::Client.new(region: @aws_region, credentials: credentials)
|
|
72
|
-
@s3 = Aws::S3::Client.new(region: @aws_region, credentials: credentials)
|
|
73
76
|
bucket = @s3.list_buckets.buckets.find { |b| /\Aelasticbeanstalk-#{@aws_region}/ =~ b.name }
|
|
74
77
|
raise "Could not resolve s3 bucket name." if bucket.nil?
|
|
75
78
|
@s3_bucket_name = bucket.name
|