Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote iam_user* modules and tests #1053

Conversation

GomathiselviS
Copy link
Collaborator

@GomathiselviS GomathiselviS commented Sep 21, 2022

SUMMARY

Depends-On: ansible/zuul-config#445

Migration of iam_user* module from community.aws

ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
  • Feature Pull Request
  • New Module Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION

@softwarefactory-project-zuul
Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/ansible-collections/amazon.aws for 1053,20ff9866f1288a90e2c423a0ec734266944a1f8c

@ansibullbot
Copy link

@GomathiselviS This PR was evaluated as a potentially problematic PR for the following reasons:

  • More than 50 commits.

Such PR can only be merged by human. Contact a Core team member to review this PR on IRC: #ansible-devel on irc.freenode.net

click here for bot help

@ansibullbot ansibullbot added bug This issue/PR relates to a bug needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR needs_triage labels Sep 21, 2022
@github-actions
Copy link

github-actions bot commented Sep 21, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 32s
✔️ build-ansible-collection SUCCESS in 6m 02s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 12m 55s
✔️ ansible-test-sanity-aws-ansible-2.12-python38 SUCCESS in 8m 42s
✔️ ansible-test-sanity-aws-ansible-2.13-python38 SUCCESS in 8m 32s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 12s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 03s
✔️ ansible-test-splitter SUCCESS in 5m 46s
✔️ integration-amazon.aws-1 SUCCESS in 6m 05s
⚠️ integration-amazon.aws-2 SKIPPED
⚠️ integration-amazon.aws-3 SKIPPED
⚠️ integration-amazon.aws-4 SKIPPED
⚠️ integration-amazon.aws-5 SKIPPED
⚠️ integration-amazon.aws-6 SKIPPED
⚠️ integration-amazon.aws-7 SKIPPED
⚠️ integration-amazon.aws-8 SKIPPED
⚠️ integration-amazon.aws-9 SKIPPED
⚠️ integration-amazon.aws-10 SKIPPED
⚠️ integration-amazon.aws-11 SKIPPED
⚠️ integration-amazon.aws-12 SKIPPED
⚠️ integration-amazon.aws-13 SKIPPED
⚠️ integration-amazon.aws-14 SKIPPED
⚠️ integration-amazon.aws-15 SKIPPED
⚠️ integration-amazon.aws-16 SKIPPED
⚠️ integration-amazon.aws-17 SKIPPED
⚠️ integration-amazon.aws-18 SKIPPED
✔️ integration-community.aws-1 SUCCESS in 5m 49s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
✔️ ansible-test-changelog SUCCESS in 2m 27s

@softwarefactory-project-zuul
Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/ansible-collections/amazon.aws for 1053,63a80a861c8603525a2b8d7ca7b4728bcc43339c

jillr and others added 13 commits September 22, 2022 19:53
* Rename core collection

Rename references to ansible.amazon to amazon.aws.

* Rename community.amazon to community.aws
Fix pep8 line lengths for rewritten amazon.aws imports

* Missed a path in shippable.sh
* Dependency repos moved

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@235c5db
* Remove ANSIBLE_METADATA entirely, see ansible/ansible/pull/69454.
Remove `license` field from galaxy.yml, in favor of `license_file`.

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@05672a6
* Update docs

Remove .git from repo url so links in readme will generate correctly
Add required ansible version
Run latest version of add_docs.py
Add version_added string to modules

* galaxy.yml was missing authors

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@96ee268
* Split imports and reorder
* Import camel_dict_to_snake_dict and snake_dict_to_camel_dict direct from ansible.module_utils.common.dict_transformations
* Remove unused imports
* Route53 Info was migrated to Boto3 drop the HAS_BOTO check and import
* changelog

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@130cf3c
* Split imports and sort
* Move camel_dict_to_snake_dict imports to ansible.module_utils.common.dict_transformations
* Cleanup unused imports
* Bulk migration to fail_json_aws
* Changelog

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@6c88315
* Reorder imports
* Make use of is_boto3_error_message
* Mass-migration over to is_boto3_error_code
* Remove unused imports
* unused vars in exception
* Improve consistency around catching BotoCoreError and ClientError
* Remove unused imports
* Remove unused 'PolicyError' from iam_policy_info
* Avoid catching botocore.exceptions.ClientError when we only want some error codes
* Import camel_dict_to_snake_dict/snake_dict_to_camel_dict from ansible.module_utils.common.dict_transformations

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@4cf52ef
ansible-collections#411)

Add some additional comments so we know *why* the various tests aren't running.  Looks like most of them just need policy updates

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@0d24559
szb640 and others added 16 commits September 22, 2022 19:53
Remove deprecated "facts" aliases

SUMMARY
Modules named "facts.py" that do not return ansible_facts were renamed to "info.py" in 2.9. Remove these aliases now that the deprecation period is over.
This PR should be included in 3.0.0 of the collection.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
*_facts.py

Reviewed-by: Mark Chappell <None>
Reviewed-by: Jill R <None>
Reviewed-by: None <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@68aaa70
iam_user password management support

SUMMARY
The iam module currently supports password management for IAM users, but the newer  iam_user module does not currently. This PR adds the password management functionality to bring parity with the old module.
To ensure the IAM user is properly created before adding a login profile, the waiter for the IAM creation has also been added.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
iam_user
ADDITIONAL INFORMATION
The added functionality uses the create_login_profile and update_login_profile methods:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.create_login_profile
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.update_login_profile
Local integration tests run:
ansible-test integration --docker centos8 -vv iam_user --allow-unsupported
...
PLAY RECAP *********************************************************************
testhost                   : ok=92   changed=24   unreachable=0    failed=0    skipped=0    rescued=0    ignored=2

AWS ACTIONS: ['iam:AddUserToGroup', 'iam:AttachUserPolicy', 'iam:CreateGroup', 'iam:CreateLoginProfile', 'iam:CreateUser', 'iam:DeleteGroup', 'iam:DeleteLoginProfile', 'iam:DeleteUser', 'iam:DetachUserPolicy', 'iam:GetGroup', 'iam:GetUser', 'iam:ListAccessKeys', 'iam:ListAttachedGroupPolicies', 'iam:ListAttachedUserPolicies', 'iam:ListGroupsForUser', 'iam:ListMFADevices', 'iam:ListPolicies', 'iam:ListSSHPublicKeys', 'iam:ListServiceSpecificCredentials', 'iam:ListSigningCertificates', 'iam:ListUserPolicies', 'iam:ListUsers', 'iam:RemoveUserFromGroup', 'iam:TagUser', 'iam:UntagUser', 'iam:UpdateLoginProfile']

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
Reviewed-by: None <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@a3d940a
add missing password_reset_required parameter

SUMMARY
password_reset_required parameter is missing in iam_user module.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
iam_user
ADDITIONAL INFORMATION
Sadly, LoginProfile is only returned on create_login_profile and not on update_login_profile.
Therefor the functionality can only be verified when the user is created, not when the user is udpated.

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.create_login_profile
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.update_login_profile

retval of update_login_profile is just
 0.0s create_or_update_user:
      {'ResponseMetadata': {'HTTPHeaders': {'content-length': '216', 'content-type': 'text/xml', 'date': 'Wed, 12 Jan 2022 20:18:08 GMT', 'x-amzn-requestid': '11b6fde3-9f28-4265-8fac-88e3f5a238d3'}, 'HTTPStatusCode': 200, 'RequestId': '11b6fde3-9f28-4265-8fac-88e3f5a238d3', 'RetryAttempts': 0}}

Reviewed-by: Mark Woolley <[email protected]>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Markus Bergholz <[email protected]>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@c0b3e1b
Integration test dependency cleanup

SUMMARY

remove dependencies on setup_remote_tmp_dir where it's not used (often just copy & paste from another test)
remove setup_ec2 (no main.yml means it's not doing anything)
remove prepare_tests (empty main.yml means it's not doing anything)

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
tests/integration/targets
ADDITIONAL INFORMATION
By cleaning up what we have we reduce the chance of people copying things about "because that's what test XYZ did".

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Woolley <[email protected]>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@dd12046
Docs linting fixups

SUMMARY
While testing out linting/validation of the generated docs, a number of issues were highlighted.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
plugins/modules/aws_batch_job_definition.py
plugins/modules/aws_config_rule.py
plugins/modules/aws_secret.py
plugins/modules/aws_waf_rule.py
plugins/modules/cloudfront_invalidation.py
plugins/modules/ec2_placement_group_info.py
plugins/modules/iam_user.py
plugins/modules/route53_health_check.py
plugins/modules/s3_sync.py
ADDITIONAL INFORMATION

Reviewed-by: Markus Bergholz <[email protected]>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@c5363d5
…#1059)

iam_user - stabilize for migration to amazon.aws

SUMMARY
Stabilize for migration to amazon.aws

dont delete user login profile on check mode
add extra return value user to deprecate iam_user
gracefully handle iam_user_info when no users returned

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
iam_user

Reviewed-by: Mark Chappell <None>
Reviewed-by: Joseph Torcasso <None>
Reviewed-by: Jill R <None>
Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Woolley <[email protected]>
Reviewed-by: Mike Graves <[email protected]>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@a11e66a
iam_user - remove duplicate method

SUMMARY
Remove duplicate method delete_user_login_profile, as there is already a delete_login_profile method
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
iam_user

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Alina Buzachis <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@2a84777
…sible-collections#1182)

Tagging fragment - Move simplest cases over to the docs fragment.

Depends-On: ansible-collections#844
SUMMARY
Migrate simplest cases over to the new docs fragment and add resource_tags as an alias to tags.
ISSUE TYPE

Docs Pull Request
Feature Pull Request

COMPONENT NAME
changelogs/fragments/1182-tagging.yml
plugins/modules/aws_glue_job.py
plugins/modules/aws_msk_cluster.py
plugins/modules/aws_secret.py
plugins/modules/aws_step_functions_state_machine.py
plugins/modules/dynamodb_table.py
plugins/modules/ec2_eip.py
plugins/modules/ec2_transit_gateway_vpc_attachment.py
plugins/modules/ec2_vpc_peer.py
plugins/modules/elb_application_lb.py
plugins/modules/elb_network_lb.py
plugins/modules/iam_role.py
plugins/modules/iam_user.py
plugins/modules/networkfirewall.py
plugins/modules/networkfirewall_policy.py
plugins/modules/networkfirewall_rule_group.py
plugins/modules/rds_cluster.py
plugins/modules/rds_instance.py
plugins/modules/rds_instance_snapshot.py
plugins/modules/rds_option_group.py
plugins/modules/rds_subnet_group.py
plugins/modules/redshift.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@b11ffae
@goneri goneri added the mergeit Merge the PR (SoftwareFactory) label Sep 22, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

✔️ ansible-galaxy-importer SUCCESS in 6m 17s
✔️ build-ansible-collection SUCCESS in 3m 08s
ansible-test-units-amazon-aws-python39 POST_FAILURE in 12m 03s

@goneri
Copy link
Member

goneri commented Sep 23, 2022

regate

1 similar comment
@goneri
Copy link
Member

goneri commented Sep 23, 2022

regate

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 5m 20s
✔️ build-ansible-collection SUCCESS in 3m 34s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 9m 50s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 9d15aa8 into ansible-collections:main Sep 23, 2022
@goneri
Copy link
Member

goneri commented Sep 23, 2022

regate

3 similar comments
@goneri
Copy link
Member

goneri commented Sep 23, 2022

regate

@goneri
Copy link
Member

goneri commented Sep 23, 2022

regate

@goneri
Copy link
Member

goneri commented Sep 23, 2022

regate

softwarefactory-project-zuul bot pushed a commit to ansible-collections/community.aws that referenced this pull request Sep 23, 2022
Promote iam_user* modules and test

SUMMARY
Depends-On: ansible-collections/amazon.aws#1053


Remove iam_user* modules and tests
These modules have been migrated to amazon.aws
Update runtime.yml with redirects to that collection
Update ignore files
ISSUE TYPE


Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
Promote iam_user* modules and test

SUMMARY
Depends-On: ansible-collections#1053


Remove iam_user* modules and tests
These modules have been migrated to amazon.aws
Update runtime.yml with redirects to that collection
Update ignore files
ISSUE TYPE


Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
Promote iam_user* modules and test

SUMMARY
Depends-On: ansible-collections#1053


Remove iam_user* modules and tests
These modules have been migrated to amazon.aws
Update runtime.yml with redirects to that collection
Update ignore files
ISSUE TYPE


Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug community_review mergeit Merge the PR (SoftwareFactory) needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR needs_triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.