Commit graph

28 commits

Author SHA1 Message Date
Chris Redekop
c8d4244ef4 Add has_roles to aws_ec2_instance (#90)
* Rename EC2-instance resources

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Add interim updates

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* testing for issue 82

Signed-off-by: Simon Varlow <simon.varlow@d2l.com>

* completed integration for EC2 roles

Signed-off-by: Simon Varlow <simon.varlow@d2l.com>

* adding in the beginning of the unit test for issue 82

Signed-off-by: Simon Varlow <simon.varlow@d2l.com>

* Fix unit tests

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Add has_roles? examples

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Remove redundant gsub

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* corrected OpenStruct format

Signed-off-by: Simon Varlow <simon.varlow@d2l.com>

* setting up variable for InstanceProfile

Signed-off-by: Simon Varlow <simon.varlow@d2l.com>

* Updated the unit test so all variables are at the top

Signed-off-by: Simon Varlow <simon.varlow@d2l.com>

* Fixed Rubocop issues that were detected

Signed-off-by: Simon Varlow <simon.varlow@d2l.com>

* Updating README.md to include changes to aws_ec2

Signed-off-by: Simon Varlow <simon.varlow@d2l.com>

* Add failing IT for has_roles?

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Add negative IT and fix uncovered issue

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Fix Rubocop issue

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Fix integration test

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Fix Rubocop issues and unit tests

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Pin AWS dependency to '~> 2'

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-10-26 15:56:32 -04:00
Steffanie Freeman
1a31425e81 Issue #46 Lazily load attributes in aws_iam_users (#89)
* Initial Commit

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>

* aws_iam_user uses lazy loading

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>

* Disassociates convert call from list_users

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>

* A real-world working AwsIamUsers (#71)

* Add aws_iam_users

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Adding Filter table and Collect User Details to aws_iam_users.rb

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Adding Filter table and Collect User Details to aws_iam_users.rb

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Adding Filter table and Collect User Details to aws_iam_users.rb

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Get an aws_iam_users integration test to pass

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Fix RuboCop issues and tests

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Improving code based on PR feedback

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* AWS IAM Users unit tests work with new lazy loading feature

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>

* Fixes tests

Signed-off-by: aduric <adnan.duric@d2l.com>

* Users should only hold the returned user references, transfering responsibility to each user to fetch any details

Signed-off-by: aduric <adnan.duric@d2l.com>

* Create user details provider class

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>

* Using details provider factory to delegate creation of detail providers, and updates tests

Signed-off-by: aduric <adnan.duric@d2l.com>

* Rubocop fixes

Signed-off-by: aduric <adnan.duric@d2l.com>

* Rename user details provider factory to initializer, and remove unnecessary instance variables

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>
2017-10-26 15:22:15 -04:00
Christoph Hartmann
d21e2af15f rename file for aws_ec2 resource
* rename to aws_ec2_instance

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-10-11 16:18:20 -04:00
Chris Redekop
c77d442007 Add has_mfa_enabled? to aws_iam_root_account (#80)
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-08-16 11:53:44 +02:00
Chris Redekop
033bc13aa0 A real-world working AwsIamUsers (#71)
* Add aws_iam_users

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Adding Filter table and Collect User Details to aws_iam_users.rb

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Adding Filter table and Collect User Details to aws_iam_users.rb

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Adding Filter table and Collect User Details to aws_iam_users.rb

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Get an aws_iam_users integration test to pass

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Fix RuboCop issues and tests

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Improving code based on PR feedback

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-08-08 15:50:35 +02:00
Steffanie Freeman
660ab99d98 Run linter on unit tests (#51)
* Run linter on unit tests

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>

* Bring remaining unit tests up to spec with rubocop

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>
2017-07-05 22:31:27 +02:00
Steffanie Freeman
29b4fbebe4 Add to_s method to aws_iam_password_policy (#61)
* Add to_s method to aws_iam_password_policy

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>

* Use single quoted string and remove unnecessary substring

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>
2017-06-29 03:03:20 -07:00
Steffanie Freeman
99baa9b2ab Add to_s method to aws_iam_user (#60)
Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>
2017-06-28 05:46:59 -07:00
Miles Tjandrawidjaja
a1dc5e981e [ISSUE-39] - Cover Recommendation 1.12 (#49)
* Adding resource aws_iam_root_user

Signed-off-by: Miles Tjandrawidjaja <miles@tjandrawidjaja.com>

* Adding to_s method to class aws_iam_root_user

Signed-off-by: Miles Tjandrawidjaja <miles@tjandrawidjaja.com>

* Cleaner to_s result for aws_iam_root_user

Signed-off-by: Miles Tjandrawidjaja <miles@tjandrawidjaja.com>
2017-06-13 07:44:11 +02:00
Miles Tjandrawidjaja
5c319ff056 [ISSUE-36] - Cover Recommendation 1.10 (#47)
* Add query for password_reuse_prevention to iam_password_policy

Signed-off-by: Miles Tjandrawidjaja <miles@tjandrawidjaja.com>

* Use mock over stub, and more concise language for tests in aws_iam_password_policy

Signed-off-by: Miles Tjandrawidjaja <miles@tjandrawidjaja.com>

* Rename method prevent_password_reuse to prevents_password_reuse

Signed-off-by: Miles Tjandrawidjaja <miles@tjandrawidjaja.com>
2017-06-13 07:41:43 +02:00
Chris Redekop
15459ca295 Add access_keys method to aws_iam_user (#44)
* Add access_keys method to aws_iam_user

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Fix unit test that accessed AWS

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Incorporate PR feedback

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Fix unit tests

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Update tests based on PR feedback

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>

* Rebase to master

Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-06-13 07:36:43 +02:00
sfreeman
beedecf247 Add list_users
Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>
2017-05-10 15:41:03 -04:00
Chris Redekop
0ab4ae7d6e Update resource based on PR feedback
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-05-02 14:54:57 +00:00
Chris Redekop
37bcce6618 Add defensive programming
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-05-02 14:54:57 +00:00
Christoph Hartmann
11905af32a Merge pull request #32 from chef/issue31
add password expiry and password expiry time to iam_password_policy
2017-05-02 11:23:44 +02:00
Chris Redekop
891f075d13 Update resource based on PR feedback
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-04-28 10:52:42 +00:00
Viktor Yakovlyev
19f752f778 add 1.11, password expiry and password expiry time in days, fix examples
Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>

check for unset password expiry

Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>

pr changes

Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>
2017-04-28 10:52:42 +00:00
sfreeman
c43c863109 Added user provider
Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>
2017-04-27 16:17:43 -04:00
Chris Redekop
3cdb639a0c Uncomment unit tests
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-04-18 15:03:31 +02:00
Chris Redekop
fcb8d17feb Incorporate PR feedback
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-04-18 15:03:31 +02:00
Chris Redekop
d428a96bab Add a new access-key resource
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-04-18 15:03:31 +02:00
Viktor Yakovlyev
ff72e81915 Add iam password policy
Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>

wire up mock resource twice

Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>

cleaning up as per pr feedback

Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>

style fixes

Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>

fix indent in test

Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>

remove unneeded line

Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>

use minitest mock instead of object

Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>
2017-04-11 14:16:21 -04:00
sfreeman
d9221bb925 Add ability to choose a user by username
Add has MFA enabled member
Add "has console password" member

Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>
2017-03-15 15:49:13 -04:00
Viktor Yakovlyev
bdd86542b0 add negative case test for exists?
Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>
2017-02-16 14:33:21 -05:00
Viktor Yakovlyev
f0773ccc75 fix tests
Signed-off-by: Viktor Yakovlyev <Viktor.Y@D2L.com>
2017-02-16 14:27:35 -05:00
Chris Redekop
9d8afa5440 add tests for :instance and :exists
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-02-14 18:38:15 +01:00
Chris Redekop
1842cc2fd9 add another id-method test
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-02-14 18:38:11 +01:00
Chris Redekop
5d00aac059 Add unit test skeleton with Minitest dependency
Signed-off-by: Chris Redekop <chris.redekop@d2l.com>
2017-02-14 18:38:06 +01:00