diff --git a/changelogs/fragments/65559-iam_policy-require-iam_name.yml b/changelogs/fragments/65559-iam_policy-require-iam_name.yml new file mode 100644 index 00000000000..0242871ca40 --- /dev/null +++ b/changelogs/fragments/65559-iam_policy-require-iam_name.yml @@ -0,0 +1,2 @@ +minor_changes: +- iam_policy - make `iam_name` a required field. diff --git a/lib/ansible/modules/cloud/amazon/iam_policy.py b/lib/ansible/modules/cloud/amazon/iam_policy.py index 999affcafa3..8db58e083aa 100644 --- a/lib/ansible/modules/cloud/amazon/iam_policy.py +++ b/lib/ansible/modules/cloud/amazon/iam_policy.py @@ -292,7 +292,7 @@ def main(): argument_spec = dict( iam_type=dict(required=True, choices=['user', 'group', 'role']), state=dict(default='present', choices=['present', 'absent']), - iam_name=dict(default=None, required=False), + iam_name=dict(required=True), policy_name=dict(required=True), policy_document=dict(default=None, required=False), policy_json=dict(type='json', default=None, required=False), diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index 7453139360d..9bedd603e7e 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -492,7 +492,6 @@ lib/ansible/modules/cloud/alicloud/ali_instance.py validate-modules:parameter-ty lib/ansible/modules/cloud/alicloud/ali_instance_info.py validate-modules:doc-missing-type lib/ansible/modules/cloud/alicloud/ali_instance_info.py validate-modules:doc-required-mismatch lib/ansible/modules/cloud/alicloud/ali_instance_info.py validate-modules:parameter-type-not-in-doc -lib/ansible/modules/cloud/amazon/iam_policy.py validate-modules:doc-required-mismatch lib/ansible/modules/cloud/atomic/atomic_container.py validate-modules:doc-missing-type lib/ansible/modules/cloud/atomic/atomic_container.py validate-modules:doc-required-mismatch lib/ansible/modules/cloud/atomic/atomic_container.py validate-modules:no-default-for-required-parameter