cloudformation-tool 1.5.7 → 1.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/cloud_formation_tool/version.rb +1 -1
- data/lib/cloud_formation_tool.rb +9 -5
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1664bf2e43c0a1f38055655a7cf3f03e3cc894994b3f2c4999fe3ba2f176552d
|
4
|
+
data.tar.gz: 4629049058e37f0646ca4c2366056b30f53ea0984abe9bdb23ebdebba72fbb26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
|
data/lib/cloud_formation_tool.rb
CHANGED
@@ -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
|
-
|
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.
|
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-
|
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
|