-
Notifications
You must be signed in to change notification settings - Fork 657
Conversation
It looks good for IAM resources. However, aws-sdk-resources gem currently supports a few resources (EC2, S3, IAM, SNS, SQS). So I'm worried that it would lose consistency between resources (e.g. IAM v.s. RDS)... |
Oh thanks for pointing that out. I'll back this out and not use the On Sunday, June 26, 2016, Daisuke Fujita notifications@github.com wrote:
|
edbf015
to
7a9a8aa
Compare
PTAL @dtan4 |
1 similar comment
ping @dtan4 Does this look okay for the resources I added it to ? I will finish with the other resources but I want to hear what you think about the approach first. |
@@ -1,3 +1,3 @@ | |||
module Terraforming | |||
VERSION = "0.9.1" | |||
VERSION = "0.10.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not bump the version in this pull request.
If you'd like to install this patch locally, just run rake install
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, and didn't know about rake install
, thanks
I'm sorry for late response... I missed your ping. As described here, fetching all resources can be written more simply. I prefer this style rather than the logic with client.list_users.map(&:users).flatten Is there any strong reason to use |
data_proc = Proc.new { |resp| [resp] } | ||
paginate_results(fetch_proc, data_proc).each do |resp| | ||
require 'pp' | ||
STDERR.puts resp.pretty_inspect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines seems to be inserted for debugging.
Please make sure that commit does not contain any debugging code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, sorry
'id' => 'fuga', | ||
'attributes' => { | ||
'arn' => 'arn:aws:iam::345678901234:group/fuga', | ||
'id' => 'fuga', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[rubocop]
- Align the elements of a hash literal if they span more than one line.
@philsnow I'm sorry but you do not have to fix all warnings by RuboCop now. If you would merge master into this branch now, most of warnings might be suppresed. |
bfa266a
to
1352e5f
Compare
@@ -44,11 +44,11 @@ def tfstate | |||
private | |||
|
|||
def group_members_of(group) | |||
@client.get_group(group_name: group.group_name).users.map { |user| user.user_name } | |||
@client.get_group(group_name: group.group_name).map(&:users).flatten.map { |user| user.user_name } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[rubocop]
- Line is too long. [106/80] :ref
@@ -49,7 +49,7 @@ def tfstate | |||
private | |||
|
|||
def hosted_zones | |||
@client.list_hosted_zones.hosted_zones.map { |hosted_zone| @client.get_hosted_zone(id: hosted_zone.id) } | |||
@client.list_hosted_zones.map(&:hosted_zones).flatten.map { |hosted_zone| @client.get_hosted_zone(id: hosted_zone.id) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[rubocop]
- Line is too long. [127/80] :ref
which rubocop warnings do you care about? I see that there's a rubocop.yml file, but I rebased my PR against master and a lot of the things it's complaining about are 1. also warnings in master and 2. would make the code not look like the surrounding code. |
I'd like to care all warnings RuboCop said, however I'm in the middle of configuring RuboCop to detect the appropriate warnings. For example I should relax the threshold of line length from now on. I'm so sorry you're in trouble with unexpected RuboCop warnings. Most of warnings appeared currently are not related to your changes. So you can ignore all warnings now and I'll fix these on another pull request by myself. |
Ah, you added pagination to all resources at efe3a6c. After that, I'll merge this pull request. |
efe3a6c
to
2e55bee
Compare
ok also squashed commits, there wasn't anything interesting in the history. |
LGTM 👍 Thank you. |
The resources API has a super clean way of enumerating without tons of
boilerplate
while resp.is_truncated
loops.I only did this for a few resource types because I wanted to check in with @dtan4 about using the resources API and didn't want to do the same work x20 if it's not mergeable.