sumomo 0.8.14 → 0.8.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14cea3c6a1850dccbf4f44fc0de5aac2f55082d2d881bd6b09486715b1514629
4
- data.tar.gz: 2e8b573a332ba356006ee19f00cc92150faf04ad0b4bd05e1515f6ad150532d7
3
+ metadata.gz: 2d31828749cf57f094afad4100d0a2c41e1e23db623f4d83c7af92ea09973a2b
4
+ data.tar.gz: 2651d1c3f796f9153199aee4077f7f5ee3aa2c65d35fa764d01309fc90e7b117
5
5
  SHA512:
6
- metadata.gz: 0c12ab52d9b883043cc9aa335ca2ce44420061c328831708c25a7a66f76289e7e913dc8c09b271e33067fbe2a9c98bc43403830ffbadadb3831b75529f5dcf27
7
- data.tar.gz: 21bc6b234abed78dc5effb72cf516200b5ae9a1f104bcbc22b629c9df5ed8a702ba8142063bc2e950b6fea86b026da00c731d4a556c281c55b4e6d23b7b7c435
6
+ metadata.gz: ea85e42594b8bd2c22396d9904277b97307256335f1a2a95c397ecd5cde7b90a2fdbd4a909576080d5e371c2d7130c7c5f3043d6e0086d7a8fbd965b6e7ad700
7
+ data.tar.gz: f963dd40b6a1ba5a4de069310d6c44e1d55254008093bbc7933ad37096e797b8a10faabc0936b6c591f6bea85a9ac80bb9f3862b33315b8bc7825c5921dd64ac
@@ -4,6 +4,8 @@ var acm = new aws.ACM({region: cert_region});
4
4
 
5
5
  var return_properties = {};
6
6
 
7
+ var retries = 0;
8
+
7
9
  function extractRootDomain(domain)
8
10
  {
9
11
  var splitArr = domain.split('.');
@@ -12,26 +14,55 @@ function extractRootDomain(domain)
12
14
  //extracting the root domain here
13
15
  if (arrLen > 2)
14
16
  {
15
- domain = splitArr[arrLen - 2] + '.' + splitArr[arrLen - 1];
17
+ domain = splitArr.slice(1).join(".");
16
18
  }
17
19
  return domain;
18
20
  }
19
21
 
20
22
  function wait_for_approval(domain_name, on_success, on_fail)
21
23
  {
24
+ console.log('read domain: ', domain_name);
22
25
  get_domain(domain_name, function(data)
23
26
  {
27
+ console.log('loaded domain data: ');
28
+ console.log(data);
29
+
24
30
  var params = {
25
31
  CertificateArn: data.arn
26
32
  };
27
33
 
28
34
  acm.describeCertificate(params, function(err, cert_data) {
35
+ console.log('received certificate data');
36
+ console.log(cert_data);
37
+ console.log(cert_data.Certificate.DomainValidationOptions);
38
+ console.log(cert_data.Certificate.DomainValidationOptions[0]);
39
+
40
+
29
41
  if (err)
30
42
  {
31
43
  on_fail(err);
32
44
  }
33
45
  else
34
46
  {
47
+ if (!cert_data.Certificate.DomainValidationOptions[0].ResourceRecord)
48
+ {
49
+ // damn AWS now does not return this information immediately
50
+ // and we have to wait for it.
51
+ return setTimeout(function()
52
+ {
53
+ console.log('no ResourceRecord found, retrying...', "attempts:", retries);
54
+ if (retries < 60)
55
+ {
56
+ wait_for_approval(domain_name, on_success, on_fail);
57
+ retries += 1;
58
+ }
59
+ else
60
+ {
61
+ on_fail('AWS did not return ResourceRecord. (AWS issue)');
62
+ }
63
+
64
+ }, 1000);
65
+ }
35
66
  // Do not wait if we requested DNS validation
36
67
  if (request.ResourceProperties.ValidationMethod === "DNS")
37
68
  {
@@ -11,6 +11,8 @@ function wait_for_approval(on_success, on_fail)
11
11
  };
12
12
 
13
13
  acm.describeCertificate(params, function(err, cert_data) {
14
+ console.log('describe certificate data');
15
+ console.log(cert_data);;
14
16
  if (err)
15
17
  {
16
18
  on_fail(err);
@@ -38,6 +40,8 @@ function wait_for_approval(on_success, on_fail)
38
40
 
39
41
  function fail(err)
40
42
  {
43
+ console.log('Errored.');
44
+ console.log(err);
41
45
  Cloudformation.send(request, context, Cloudformation.FAILED, {}, "Error: " + err);
42
46
  }
43
47
 
data/lib/sumomo/ec2.rb CHANGED
@@ -268,6 +268,7 @@ module Sumomo
268
268
  docker_password: '',
269
269
  eip: nil,
270
270
  policies: [],
271
+ scalein_protection: true,
271
272
  &block
272
273
  )
273
274
 
@@ -464,6 +465,8 @@ module Sumomo
464
465
 
465
466
  VPCZoneIdentifier subnet_ids
466
467
 
468
+ NewInstancesProtectedFromScaleIn scalein_protection
469
+
467
470
  LaunchConfigurationName launch_config
468
471
  LoadBalancerNames [elb] if elb
469
472
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sumomo
4
- VERSION = '0.8.14'
4
+ VERSION = '0.8.15'
5
5
  end
data/lib/sumomo.rb CHANGED
@@ -118,7 +118,7 @@ module Sumomo
118
118
  template_url: store.url('cloudformation/template'),
119
119
  parameters: hidden_values,
120
120
  disable_rollback: false,
121
- capabilities: ['CAPABILITY_IAM']
121
+ capabilities: ['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM']
122
122
  }
123
123
 
124
124
  begin
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sumomo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.14
4
+ version: 0.8.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Siaw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-20 00:00:00.000000000 Z
11
+ date: 2022-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler