cloudformation-tool 1.5.6 → 1.5.8

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: b6fe474c99b246dc7ef21cf17350a55dbee96917365b7914df003ba1c3e417b8
4
- data.tar.gz: bddb23119b8048777a0382ba953bc99ee02be8b6424a150ba164ae71283e9c39
3
+ metadata.gz: 1664bf2e43c0a1f38055655a7cf3f03e3cc894994b3f2c4999fe3ba2f176552d
4
+ data.tar.gz: 4629049058e37f0646ca4c2366056b30f53ea0984abe9bdb23ebdebba72fbb26
5
5
  SHA512:
6
- metadata.gz: 623f19f7dc807cfbc55a9be2c1300b9784962d805b12051ef3b2b681a2bb3904d345881d8d684356955d36e3dfbf2c5d020581ee7214e4bc2c87d39c1904f3b5
7
- data.tar.gz: 1f9903c01f0edf91dd61a8d6bd6d8572cab98f0ef9f6c2bd845ee47a971fde37718d3046b3b6cf3ba2af78c3d9154dd5f197157d1f585a4c55b7f273a01e3252
6
+ metadata.gz: 6ee389717fb40caa17dad26a53600005c59a1291e708a8512ace4745b9b053e66e38896be0097c3e00399ec834ed47e73f109ad2ed6ea52a030782276e73e231
7
+ data.tar.gz: 702635a6866f36e6abbb34bce3bf6192788c7fd1b1f4ce2950f19f25b9c8ca2a51f34c96be8abf3eb7357a71e7f496ee0608996cf221912e1090fdec1f11ee79
data/README.md CHANGED
@@ -363,7 +363,7 @@ The AWS region to be used can be select by specifying top level option (i.e. bef
363
363
 
364
364
  ### Credentials Selection
365
365
 
366
- The tool will use the standard AWS credentials selection process, except when you want to use AWS CLI configured credential profiles, you may select to use a profile other than "default" by specifying the top level option (i.e. before the command name) `-p <profile>`, by providing the standard environment variable `AWS_DEFAULT_PROFILE` or by having a file called `.awsprofile` - whose content is the name of a valid AWS REGION - in a parent directory (at any level up to the root directory).
366
+ The tool will use the standard AWS credentials selection process, except when you want to use AWS CLI configured credential profiles, you may select to use a profile other than "default" by specifying the top level option (i.e. before the command name) `-p <profile>`, by providing the standard environment variable `AWS_DEFAULT_PROFILE` or by having a file called `.awsprofile` - whose content is the name of a valid AWS credentials profile - in a parent directory (at any level up to the root directory).
367
367
 
368
368
  ## Library API
369
369
 
@@ -37,7 +37,7 @@ module CloudFormationTool
37
37
 
38
38
  def get_params
39
39
  params = if param_file
40
- yaml = YAML.load(read_param_file param_file, filename: param_file, permitted_classes: [Date, Symbol]).to_h
40
+ yaml = YAML.load(read_param_file(param_file), filename: param_file, permitted_classes: [Date, Symbol]).to_h
41
41
  if param_key
42
42
  raise "Missing parameter section '#{param_key}' in '#{param_file}'!" unless yaml[param_key].is_a? Hash
43
43
  yaml[param_key]
@@ -1,3 +1,3 @@
1
1
  module CloudFormationTool
2
- VERSION = '1.5.6'
2
+ VERSION = '1.5.8'
3
3
  end
@@ -57,18 +57,21 @@ module CloudFormationTool
57
57
  $__region ||= (ENV['AWS_DEFAULT_REGION'] || 'us-west-1')
58
58
  end
59
59
 
60
- def profile
61
- $__profile ||= find_profile(nil, ENV['AWS_PROFILE'] || ENV['AWS_DEFAULT_PROFILE'] || 'default')
60
+ def profile name = nil
61
+ $__profile ||= name || find_profile(nil, ENV['AWS_PROFILE'] || ENV['AWS_DEFAULT_PROFILE'] || 'default')
62
62
  end
63
63
 
64
64
  def awscreds
65
65
  require 'aws-sdk-core'
66
- $__aws_creds ||= Aws::SharedCredentials.new(profile_name: profile)
66
+ #$__aws_creds ||= Aws::SharedCredentials.new(profile_name: profile)
67
+ config = Aws::SharedConfig.new(profile_name: profile, config_enabled: true)
68
+ $__aws_creds ||= config.credentials
67
69
  end
68
70
 
69
71
  def aws_config
70
72
  {
71
- credentials: awscreds,
73
+ # credentials: awscreds,
74
+ profile: profile,
72
75
  region: region,
73
76
  http_read_timeout: 5
74
77
  }
@@ -116,11 +119,12 @@ module CloudFormationTool
116
119
  if bucket.nil?
117
120
  name = cf_bucket_name(region)
118
121
  log "Creating CF template bucket #{name}"
119
- awss3.create_bucket({
122
+ awss3(region).create_bucket({
120
123
  acl: "private",
121
124
  bucket: name,
122
125
  object_ownership: 'BucketOwnerPreferred'
123
126
  }.merge(if region == 'us-east-1' then {} else { create_bucket_configuration: { location_constraint: region } } end))
127
+ awss3(region).delete_public_access_block({bucket: name})
124
128
  name
125
129
  else
126
130
  bucket[:name]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudformation-tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oded Arbel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-27 00:00:00.000000000 Z
11
+ date: 2023-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 12.3.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: psych
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '4.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '4.0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: clamp
29
43
  requirement: !ruby/object:Gem::Requirement