ufo 4.4.1 → 4.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +5 -5
- data/docs/_docs/extras/minimal-deploy-iam.md +37 -37
- data/lib/ufo/dsl/helper.rb +9 -2
- data/lib/ufo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d98dc4756c6e74a03e33965e204e3d1e7df743e
|
4
|
+
data.tar.gz: fea753dd83bdeb2928e1947cf2e0f9290c7db3f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f08996b96a47e48349552d4ce47eeb823e9340c92c1a4f9f1c8fc77738864a5c00e2481a63184ec8af4256b68b7a6f11d6acd7abcdf15d153e79ad2369d48a1
|
7
|
+
data.tar.gz: e9cc6d0790208fcb42590269eb632aa7e654b571f316704d1cd2809e6c85a7cd1ad3e66cfe4e8c3485a4b2e55fdb9c18587fe8a81381f38710451c893bd1d151
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [4.4.2]
|
7
|
+
- fix current_region for codebuild
|
8
|
+
|
6
9
|
## [4.4.1]
|
7
10
|
- return correct exit code 1 when cloudformation deploy fails
|
8
11
|
- update docs: organize better into subfolders
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ufo (4.4.
|
4
|
+
ufo (4.4.2)
|
5
5
|
aws-sdk-cloudformation
|
6
6
|
aws-sdk-cloudwatchlogs
|
7
7
|
aws-sdk-ec2
|
@@ -25,19 +25,19 @@ GEM
|
|
25
25
|
minitest (~> 5.1)
|
26
26
|
tzinfo (~> 1.1)
|
27
27
|
aws-eventstream (1.0.2)
|
28
|
-
aws-partitions (1.
|
28
|
+
aws-partitions (1.151.0)
|
29
29
|
aws-sdk-cloudformation (1.18.0)
|
30
30
|
aws-sdk-core (~> 3, >= 3.48.2)
|
31
31
|
aws-sigv4 (~> 1.1)
|
32
32
|
aws-sdk-cloudwatchlogs (1.17.0)
|
33
33
|
aws-sdk-core (~> 3, >= 3.48.2)
|
34
34
|
aws-sigv4 (~> 1.1)
|
35
|
-
aws-sdk-core (3.48.
|
35
|
+
aws-sdk-core (3.48.4)
|
36
36
|
aws-eventstream (~> 1.0, >= 1.0.2)
|
37
37
|
aws-partitions (~> 1.0)
|
38
38
|
aws-sigv4 (~> 1.1)
|
39
39
|
jmespath (~> 1.0)
|
40
|
-
aws-sdk-ec2 (1.
|
40
|
+
aws-sdk-ec2 (1.79.0)
|
41
41
|
aws-sdk-core (~> 3, >= 3.48.2)
|
42
42
|
aws-sigv4 (~> 1.1)
|
43
43
|
aws-sdk-ecr (1.14.0)
|
@@ -78,7 +78,7 @@ GEM
|
|
78
78
|
rspec-mocks (~> 3.8.0)
|
79
79
|
rspec-core (3.8.0)
|
80
80
|
rspec-support (~> 3.8.0)
|
81
|
-
rspec-expectations (3.8.
|
81
|
+
rspec-expectations (3.8.3)
|
82
82
|
diff-lcs (>= 1.2.0, < 2.0)
|
83
83
|
rspec-support (~> 3.8.0)
|
84
84
|
rspec-mocks (3.8.0)
|
@@ -18,49 +18,49 @@ Route53 | To create vanity DNS endpoint when using [Route53 setting]({% link _do
|
|
18
18
|
|
19
19
|
## Instructions
|
20
20
|
|
21
|
-
It is recommended that you create an IAM group and associate it with the IAM users that need access to use `
|
21
|
+
It is recommended that you create an IAM group and associate it with the IAM users that need access to use `ufo ship`. Here are starter instructions and a policy that you can tailor for your needs:
|
22
22
|
|
23
23
|
### Commands Summary
|
24
24
|
|
25
25
|
Here's a summary of the commands:
|
26
26
|
|
27
|
-
aws iam create-group --group-name Ufo
|
28
|
-
cat << 'EOF' > /tmp/ecs-deploy-policy.json
|
29
|
-
{
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
27
|
+
aws iam create-group --group-name Ufo
|
28
|
+
cat << 'EOF' > /tmp/ecs-deploy-policy.json
|
29
|
+
{
|
30
|
+
"Version": "2012-10-17",
|
31
|
+
"Statement": [
|
32
|
+
{
|
33
|
+
"Action": [
|
34
|
+
"cloudformation:*",
|
35
|
+
"ec2:*",
|
36
|
+
"ecr:*",
|
37
|
+
"ecs:*",
|
38
|
+
"elasticloadbalancing:*",
|
39
|
+
"elasticloadbalancingv2:*",
|
40
|
+
"logs:*",
|
41
|
+
"route53:*"
|
42
|
+
],
|
43
|
+
"Resource": "*",
|
44
|
+
"Effect": "Allow"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"Action": [
|
48
|
+
"iam:PassRole"
|
49
|
+
],
|
50
|
+
"Effect": "Allow",
|
51
|
+
"Resource": "*",
|
52
|
+
"Condition": {
|
53
|
+
"StringLike": {
|
54
|
+
"iam:PassedToService": [
|
55
|
+
"ecs-tasks.amazonaws.com"
|
56
|
+
]
|
57
|
+
}
|
57
58
|
}
|
58
59
|
}
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
aws iam put-group-policy --group-name Ufo --policy-name UfoPolicy --policy-document file:///tmp/ecs-deploy-policy.json
|
60
|
+
]
|
61
|
+
}
|
62
|
+
EOF
|
63
|
+
aws iam put-group-policy --group-name Ufo --policy-name UfoPolicy --policy-document file:///tmp/ecs-deploy-policy.json
|
64
64
|
|
65
65
|
Then create a user and add the user to IAM group. Here's an example:
|
66
66
|
|
@@ -79,4 +79,4 @@ If you're using CodeBuild with `ufo ship` to handle deployments, you can use the
|
|
79
79
|
This page refers to your **user** IAM policy used when running `ufo ship`. These are different from the IAM Policies associated with ECS Task. For those iam policies refer to [IAM Roles for Tasks
|
80
80
|
](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html).
|
81
81
|
|
82
|
-
{% include prev_next.md %}
|
82
|
+
{% include prev_next.md %}
|
data/lib/ufo/dsl/helper.rb
CHANGED
@@ -9,6 +9,7 @@ module Ufo
|
|
9
9
|
# provides some helperally context variables
|
10
10
|
class Helper
|
11
11
|
include Ufo::Util
|
12
|
+
extend Memoist
|
12
13
|
|
13
14
|
##############
|
14
15
|
# helper variables
|
@@ -59,8 +60,14 @@ module Ufo
|
|
59
60
|
end
|
60
61
|
|
61
62
|
def current_region
|
62
|
-
|
63
|
-
|
63
|
+
default_region = 'us-east-1'
|
64
|
+
return default_region if ENV['TEST']
|
65
|
+
|
66
|
+
return ENV['UFO_AWS_REGION'] if ENV['UFO_AWS_REGION'] # highest precedence
|
67
|
+
return ENV['AWS_REGION'] if ENV['AWS_REGION']
|
68
|
+
|
69
|
+
region = `aws configure get region`.strip rescue default_region
|
70
|
+
region.blank? ? default_region : region
|
64
71
|
end
|
65
72
|
|
66
73
|
def parse_for_dockerfile_port(dockerfile_path)
|
data/lib/ufo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ufo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.4.
|
4
|
+
version: 4.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-cloudformation
|