stax 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75641822b021f927037f37d69b733a2a6fd2a894f20da3094ff922b9af846bd5
4
- data.tar.gz: ecfa6da9d9b67ce326c199c94e4709e6f3debcf223636d57e0f0e466884e6eef
3
+ metadata.gz: 6819a13cc82ff1ec46bda042281f0e69c2da19733f560c1d199e9865a6920f39
4
+ data.tar.gz: 6438ee3245b0d5b60e9dbff9e1d329c88767942d2af02587844b5c95243c71e7
5
5
  SHA512:
6
- metadata.gz: a4ff5cdf4ffeb7bd24f5bcf2df160e725d84b45a13feb40d4886ccb351ae2f3abacff951159855da0aa23fd92025adcc620875c5b07c8ca406139268e3243903
7
- data.tar.gz: fb6672ac0878c1bd28266d5a06ce90d9bd477c911ed0755200c9246ba5836be35d9d12add0c8d8015432d94166fc395374c03e457afd401db348b7af691d3b84
6
+ metadata.gz: 0ff0dd2db8d1c8cad1479b43e761777f5630d1ba80591f65f6f8980f6cc740fcfa485eb93e0c85c01762077e5657b0c18d8e21c4ed9fad6dc8ef5544a0381232
7
+ data.tar.gz: 30f0f7ed35a116b44c72fd3510b5ca9bcaae12270fca6186f0253e727e251aabc22dbdb09db04010b33dc9d87cd2f03bf8b11c1c3c6b4cb3ede2251e4f691e92
@@ -71,11 +71,15 @@ module Stax
71
71
  end
72
72
 
73
73
  def change_set_unlock
74
- Aws::Cfn.set_policy(stack_name: stack_name, stack_policy_body: stack_policy_during_update)
74
+ unless stack_policy_during_update.nil?
75
+ Aws::Cfn.set_policy(stack_name: stack_name, stack_policy_body: stack_policy_during_update)
76
+ end
75
77
  end
76
78
 
77
79
  def change_set_lock
78
- Aws::Cfn.set_policy(stack_name: stack_name, stack_policy_body: stack_policy)
80
+ unless stack_policy.nil?
81
+ Aws::Cfn.set_policy(stack_name: stack_name, stack_policy_body: stack_policy)
82
+ end
79
83
  end
80
84
  end
81
85
 
@@ -91,4 +95,4 @@ module Stax
91
95
  end
92
96
 
93
97
  end
94
- end
98
+ end
@@ -24,28 +24,31 @@ module Stax
24
24
  }
25
25
  end
26
26
 
27
- ## policy to lock the stack to all updates
27
+ ## policy to lock the stack to all updates, for example:
28
+ ## {
29
+ ## Statement: [
30
+ ## Effect: 'Deny',
31
+ ## Action: 'Update:*',
32
+ ## Principal: '*',
33
+ ## Resource: '*'
34
+ ## ]
35
+ ## }.to_json
28
36
  def stack_policy
29
- {
30
- Statement: [
31
- Effect: 'Deny',
32
- Action: 'Update:*',
33
- Principal: '*',
34
- Resource: '*'
35
- ]
36
- }.to_json
37
+ nil
37
38
  end
38
39
 
39
- ## temporary policy during updates; modify this to restrict resources
40
+ ## tmp policy during updates, in case a deny was set in stack_policy()
41
+ ## for example:
42
+ ## {
43
+ ## Statement: [
44
+ ## Effect: 'Allow',
45
+ ## Action: 'Update:*',
46
+ ## Principal: '*',
47
+ ## Resource: '*'
48
+ ## ]
49
+ ## }.to_json
40
50
  def stack_policy_during_update
41
- {
42
- Statement: [
43
- Effect: 'Allow',
44
- Action: 'Update:*',
45
- Principal: '*',
46
- Resource: '*'
47
- ]
48
- }.to_json
51
+ nil
49
52
  end
50
53
 
51
54
  ## cleanup sometimes needs to wait
@@ -1,3 +1,3 @@
1
1
  module Stax
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Lister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-25 00:00:00.000000000 Z
11
+ date: 2020-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -624,7 +624,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
624
624
  - !ruby/object:Gem::Version
625
625
  version: '0'
626
626
  requirements: []
627
- rubygems_version: 3.1.2
627
+ rubygems_version: 3.0.3
628
628
  signing_key:
629
629
  specification_version: 4
630
630
  summary: Control Cloudformation stack and other stuff.