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

sns_topic: Loop through defaultHealthyRetryPolicy attributes and cast them as integers #716

Closed

Conversation

gregharvey
Copy link

SUMMARY

This is a simple patch that intercepts the defaultHealthyRetryPolicy attributes just before they are sent to the AWS API and ensures they are cast as integers, otherwise you get type errors if you try and set those attributes via a role in a dict (due to known limitations of jinja they get cast as strings by Ansible).

Fixes #713

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

sns_topic

ADDITIONAL INFORMATION

Because the AWS documentation for the create-topic method is virtually non-existent we've had to guess the attributes based on the UI, but as far as we can tell every attribute should be an integer within the defaultHealthyRetryPolicy dict except for backoffFunction, so we simply loop through the provided attributes casting as integer if it is not that attribute. Similarly, we have hard-coded the http key in the dict because, again as far as we can tell and without any real docs, there simply is no other option, so this is safe to do.

BEFORE
======

TASK [aws/aws_sns : Create an SNS topic and subscription.] *********************
task path: /home/controller/ce-provision/roles/aws/aws_sns/tasks/main.yml:2
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_community.aws.sns_topic_payload_f1uqbdm9/ansible_community.aws.sns_topic_payload.zip/ansible_collections/community/aws/plugins/modules/sns_topic.py", line 346, in _set_topic_attrs
  File "/usr/local/lib/python3.7/dist-packages/botocore/client.py", line 386, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.7/dist-packages/botocore/client.py", line 705, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.InvalidParameterException: An error occurred (InvalidParameter) when calling the SetTopicAttributes operation: Invalid parameter: DeliveryPolicy: http.defaultHealthyRetryPolicy.minDelayTarget type mismatch, expecting integer, received a string
fatal: [localhost]: FAILED! => {
    "boto3_version": "1.17.98",
    "botocore_version": "1.20.98",
    "changed": false,
    "error": {
        "code": "InvalidParameter",
        "message": "Invalid parameter: DeliveryPolicy: http.defaultHealthyRetryPolicy.minDelayTarget type mismatch, expecting integer, received a string",
        "type": "Sender"
    },
    "invocation": {
        "module_args": {
            "aws_access_key": null,
            "aws_ca_bundle": null,
            "aws_config": null,
            "aws_secret_key": null,
            "debug_botocore_endpoint_logs": false,
            "delivery_policy": {
                "http": {
                    "defaultHealthyRetryPolicy": {
                        "backoffFunction": "linear",
                        "maxDelayTarget": "20",
                        "minDelayTarget": "20",
                        "numMaxDelayRetries": "0",
                        "numMinDelayRetries": "0",
                        "numNoDelayRetries": "0",
                        "numRetries": "3"
                    },
                    "disableSubscriptionOverrides": false
                }
            },
            "display_name": "",
            "ec2_url": null,
            "name": "Notify-CodeEnigma-Pushover",
            "policy": null,
            "profile": null,
            "purge_subscriptions": true,
            "region": null,
            "security_token": null,
            "state": "present",
            "subscriptions": [
                {
                    "endpoint": "alert@example.com",
                    "protocol": "email"
                }
            ],
            "validate_certs": true
        }
    },
    "msg": "Couldn't set topic delivery policy: An error occurred (InvalidParameter) when calling the SetTopicAttributes operation: Invalid parameter: DeliveryPolicy: http.defaultHealthyRetryPolicy.minDelayTarget type mismatch, expecting integer, received a string",
    "response_metadata": {
        "http_headers": {
            "content-length": "379",
            "content-type": "text/xml",
            "date": "Mon, 13 Sep 2021 12:54:00 GMT",
            "x-amzn-requestid": "264bf1a5-a080-5d81-84ae-a81ceca899d3"
        },
        "http_status_code": 400,
        "request_id": "264bf1a5-a080-5d81-84ae-a81ceca899d3",
        "retry_attempts": 0
    }
}


AFTER
=====

TASK [aws/aws_sns : Create an SNS topic and subscription.] *********************
task path: /home/controller/ce-provision/roles/aws/aws_sns/tasks/main.yml:2
changed: [localhost] => {
    "changed": true,
    "invocation": {
        "module_args": {
            "aws_access_key": null,
            "aws_ca_bundle": null,
            "aws_config": null,
            "aws_secret_key": null,
            "debug_botocore_endpoint_logs": false,
            "delivery_policy": {
                "http": {
                    "defaultHealthyRetryPolicy": {
                        "backoffFunction": "linear",
                        "maxDelayTarget": 20,
                        "minDelayTarget": 20,
                        "numMaxDelayRetries": 0,
                        "numMinDelayRetries": 0,
                        "numNoDelayRetries": 0,
                        "numRetries": 3
                    },
                    "disableSubscriptionOverrides": false
                }
            },
            "display_name": "",
            "ec2_url": null,
            "name": "Notify-CodeEnigma-Pushover",
            "policy": null,
            "profile": null,
            "purge_subscriptions": true,
            "region": null,
            "security_token": null,
            "state": "present",
            "subscriptions": [
                {
                    "endpoint": "alert@example.com",
                    "protocol": "email"
                }
            ],
            "topic_type": "standard",
            "validate_certs": true
        }
    },
    "sns_arn": "arn:aws:sns:eu-west-1:XXXXXXXXXXXXXXXXX:Notify-CodeEnigma-Pushover",
    "sns_topic": {
        "attributes_set": [
            "delivery_policy"
        ],
        "check_mode": false,
        "delivery_policy": "{\"http\":{\"defaultHealthyRetryPolicy\":{\"minDelayTarget\":20,\"maxDelayTarget\":20,\"numRetries\":3,\"numMaxDelayRetries\":0,\"numNoDelayRetries\":0,\"numMinDelayRetries\":0,\"backoffFunction\":\"linear\"},\"disableSubscriptionOverrides\":false}}",
        "display_name": "",
        "name": "Notify-CodeEnigma-Pushover",
        "owner": "XXXXXXXXXXXXXXXXX",
        "policy": "{\"Version\":\"2008-10-17\",\"Id\":\"__default_policy_ID\",\"Statement\":[{\"Sid\":\"__default_statement_ID\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"*\"},\"Action\":[\"SNS:GetTopicAttributes\",\"SNS:SetTopicAttributes\",\"SNS:AddPermission\",\"SNS:RemovePermission\",\"SNS:DeleteTopic\",\"SNS:Subscribe\",\"SNS:ListSubscriptionsByTopic\",\"SNS:Publish\",\"SNS:Receive\"],\"Resource\":\"arn:aws:sns:eu-west-1:XXXXXXXXXXXXXXXXX:Notify-CodeEnigma-Pushover\",\"Condition\":{\"StringEquals\":{\"AWS:SourceOwner\":\"XXXXXXXXXXXXXXXXX\"}}}]}",
        "state": "present",
        "subscriptions": [
            {
                "endpoint": "alert@example.com",
                "owner": "XXXXXXXXXXXXXXXXX",
                "protocol": "email",
                "subscription_arn": "arn:aws:sns:eu-west-1:XXXXXXXXXXXXXXXXX:Notify-CodeEnigma-Pushover:a00d4a62-48e5-4a46-a3bd-913e64c79a9a",
                "topic_arn": "arn:aws:sns:eu-west-1:XXXXXXXXXXXXXXXXX:Notify-CodeEnigma-Pushover"
            }
        ],
        "subscriptions_added": [],
        "subscriptions_confirmed": "1",
        "subscriptions_deleted": "0",
        "subscriptions_existing": [],
        "subscriptions_new": [
            {
                "endpoint": "alert@example.com",
                "protocol": "email"
            }
        ],
        "subscriptions_pending": "0",
        "subscriptions_purge": true,
        "topic_arn": "arn:aws:sns:eu-west-1:XXXXXXXXXXXXXXXXX:Notify-CodeEnigma-Pushover",
        "topic_created": false,
        "topic_deleted": false,
        "topic_type": "standard"
    }
}

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) python3 small_patch Hopefully easy to review traceback labels Sep 16, 2021
@gregharvey
Copy link
Author

Oops, indentations. I'm from a PHP background, I forgot to check if Python has different standards. 😃
Hopefully tests will be happier this time.

Copy link
Contributor

@alinabuzachis alinabuzachis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gregharvey Thank you for taking time to work on this. Could you please add a changelog fragment https://cn-ansibledoc.readthedocs.io/zh_CN/latest/community/development_process.html#creating-a-changelog-fragment?

@gregharvey
Copy link
Author

@alinabuzachis You're welcome, done - hope I did it right?

Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gregharvey,

Thanks for taking the time to contribute this fix. I tried updating our integration tests to catch this bug in future. Unfortunately, it looks like your approach results in problems with idempotency: because during the comparison the value is still a string, it sees a change from an integer (in the existing policy) to a string (in the new policy) and always returns "changed" if someone uses strings instead of integers in the policy. It would also throw exceptions if someone did something silly like passing "notanumber" instead of an integer, or simply didn't pass defaultHealthyRetryPolicy.

Rather than updating the value and throwing an ugly exception if someone tried to pass something other than a number it's better to properly define the delivery_policy option so that rather than it just being a free-form dictionary (associative array) we define what we shape we expect the dictionary to have.

Since this then involves updating the docs (which can be downright tedious), I've opened #739 which hopefully fixes your issue, as well as significantly improves the documentation.

ansible-zuul bot added a commit that referenced this pull request Oct 1, 2021
sns_topic - Define shape for delivery_policy.

SUMMARY
delivery_policy was previously defined just as "dict", this meant that if someone passed in JSON or quoted the numbers, AWS would spit errors at them.
By defining the shape of delivery_policy Ansible will automatically convert "10" to 10, as well as providing cleaner error messages for missing components of the policy.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
sns_topic
ADDITIONAL INFORMATION
obsoletes #716

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
@tremble
Copy link
Contributor

tremble commented Oct 1, 2021

Hi @gregharvey,

I very much appreciate that you took the time to contribute a fix here.

#739 has now been merged and should fix your issue. It should be available in the collection whenever the next release occurs.

Mark

@tremble tremble closed this Oct 1, 2021
@gregharvey
Copy link
Author

That looks like it'll work well, yes, thank you! :-)

marknet15 added a commit to marknet15/community.aws that referenced this pull request Oct 8, 2021
commit 11ac443
Merge: c16440c 19e60c2
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Fri Oct 1 05:49:58 2021 -0700

    Merge pull request ansible-collections#739 from tremble/sns_topic/httpretry_strings

    sns_topic - Define shape for delivery_policy.

    SUMMARY
    delivery_policy was previously defined just as "dict", this meant that if someone passed in JSON or quoted the numbers, AWS would spit errors at them.
    By defining the shape of delivery_policy Ansible will automatically convert "10" to 10, as well as providing cleaner error messages for missing components of the policy.
    ISSUE TYPE

    Bugfix Pull Request

    COMPONENT NAME
    sns_topic
    ADDITIONAL INFORMATION
    obsoletes ansible-collections#716

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: None <None>

commit c16440c
Merge: d35601e f8fb040
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Fri Oct 1 11:57:13 2021 +0000

    Merge pull request ansible-collections#740 from tremble/tests/config

    Add tests config file to specificaly state that we're not interested in python < 3.6

    SUMMARY
    With Ansible 2.12 ansible-test supports explicitly defining the python version supported by a collection
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    sanity tests
    ADDITIONAL INFORMATION

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: None <None>

commit 19e60c2
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Oct 1 13:20:57 2021 +0200

    changelog

commit f8fb040
Author: Mark Chappell <mchappel@redhat.com>
Date:   Thu Sep 30 14:44:50 2021 +0200

    Add tests config file to specificaly state that we're not interested in python < 3.6

commit d35601e
Merge: 4babc11 f052df6
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Thu Sep 30 11:31:31 2021 +0000

    Merge pull request ansible-collections#735 from tremble/iam_cert/files

    Deprecate passing file names to the iam_server_certificate module

    SUMMARY
    iam_server_certificate currently accepts file names (or content) in the cert, chain_cert and key options.  Since the module directly uses open().  This will perform a 'remote' lookup with unexpected results for relative file paths.  Encourage the use of lookups so that the behaviour will at least be predictable.
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    iam_server_certificate
    ADDITIONAL INFORMATION

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: Mark Chappell <None>
    Reviewed-by: None <None>

commit 99238d1
Author: Mark Chappell <mchappel@redhat.com>
Date:   Thu Sep 30 12:01:21 2021 +0200

    sns_topic - Define shape for delivery_policy.

commit 8d639c6
Author: Mark Chappell <mchappel@redhat.com>
Date:   Thu Sep 30 08:59:44 2021 +0200

    Add integration test

commit 4babc11
Merge: 3fbca8f fb38343
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Wed Sep 29 20:03:08 2021 +0000

    Merge pull request ansible-collections#595 from kbrebanov/fix-route53-identifier

    route53: Identifier missing from resource_record_set.

    SUMMARY

    Currently, the identifier parameter is never included in resource_record_set.

    ISSUE TYPE

    Bugfix Pull Request

    COMPONENT NAME

    route53
    ADDITIONAL INFORMATION

    The identifier parameter is always nullified as it's not included in resource_record_set.
    This change allows the identifier to be included and scrubbed if None.

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

commit fb38343
Author: Mark Chappell <mchappel@redhat.com>
Date:   Wed Sep 29 20:33:10 2021 +0200

    Add integration tests

commit 83dd7ba
Author: Kevin Brebanov <kbrebanov@users.noreply.github.com>
Date:   Thu Sep 16 16:00:06 2021 -0400

    Add changelog fragment for pull request ansible-collections#595

commit e038cb3
Author: Kevin Brebanov <kbrebanov@users.noreply.github.com>
Date:   Mon Jun 7 10:41:05 2021 -0400

    route53: Prevent identifier from always being scrubbed.

commit f052df6
Author: Mark Chappell <mchappel@redhat.com>
Date:   Mon Sep 27 09:44:38 2021 +0200

    changelog

commit cd42d43
Author: Mark Chappell <mchappel@redhat.com>
Date:   Mon Sep 27 09:26:23 2021 +0200

    Deprecate passing file names to the iam_server_certificate module

commit 3fbca8f
Merge: 0769e8e dddd547
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Tue Sep 28 12:48:14 2021 +0000

    Merge pull request ansible-collections#738 from Andersson007/test_1

    Copy ignore-2.12.txt to ignore-2.13.txt

    SUMMARY
    Relates to ansible-collections/overview#45 (comment)

    Reviewed-by: Mark Chappell <None>
    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: None <None>

commit dddd547
Author: Andrew Klychkov <aklychko@redhat.com>
Date:   Tue Sep 28 13:44:04 2021 +0200

    Copy ignore-2.12.txt to ignore-2.13.txt

commit 0769e8e
Merge: 4c6f54b 395b77a
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Fri Sep 24 18:19:57 2021 +0000

    Merge pull request ansible-collections#670 from alinabuzachis/elb_target_group/preserve_client_ip_enabled

    elb_target_group - add preserve_client_ip_enabled and proxy_protocol_v2_enabled options

    SUMMARY

    elb_target_group - add preserve_client_ip_enabled and proxy_protocol_v2_enabled options
    Fixes ansible-collections#555
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME

    elb_target_group.py

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

commit 4c6f54b
Merge: 85dffb3 4f44d69
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Fri Sep 24 13:38:10 2021 +0000

    Merge pull request ansible-collections#702 from doticatto/patch-1

    Undocumented IOPS return

    IOPS is being returned by the module, but simply was not documented. Simply a documentation change.
    ISSUE TYPE

    Docs Pull Request

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: Markus Bergholz <git@osuv.de>
    Reviewed-by: None <None>

commit 85dffb3
Merge: a55b7a9 59deefe
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Fri Sep 24 13:09:36 2021 +0000

    Merge pull request ansible-collections#707 from boutetnico/add-cf-ssl-version

    cloudfront_distribution: add new security policy version TLSv1.2_2021

    SUMMARY

    Add new TLSv1.2_2021 security policy for CloudFront viewer connections.

    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME

    cloudfront_distribution
    ADDITIONAL INFORMATION

    https://aws.amazon.com/about-aws/whats-new/2021/06/amazon-cloudfront-announces-new-tlsv12_2021-security-policy-for-viewer-connections/

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: Markus Bergholz <git@osuv.de>
    Reviewed-by: None <None>

commit 395b77a
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Sep 24 14:49:59 2021 +0200

    bump version added - missed the 2.0.0 release

commit 5d0b57e
Author: Alina Buzachis <abuzachis@redhat.com>
Date:   Tue Jul 20 16:03:48 2021 +0200

    elb_target - add preserve_client_ip_enabled ond proxy_protocol_v2_enabled ptions

    Signed-off-by: Alina Buzachis <abuzachis@redhat.com>

commit a55b7a9
Merge: 0954679 093aa24
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Fri Sep 24 12:22:23 2021 +0000

    Merge pull request ansible-collections#731 from tremble/eip_unbound

    Fix EIP allocation with in_vpc not set

    SUMMARY
    Our integration tests were setting in_vpc (because most use-cases need it) so we missed that setting the minimum possible configuration for an EIP resulted in an exception:
    ec2_eip:
      state: present
      in_vpc: '{{ omit }}'

    task path: /root/ansible_collections/community/aws/tests/output/.tmp/integration/ec2_eip-hkuj00lj-ÅÑŚÌβŁÈ/tests/integration/targets/ec2_eip/tasks/main.yml:666
    <testhost> ESTABLISH LOCAL CONNECTION FOR USER: root
    <testhost> EXEC /bin/sh -c 'echo ~root && sleep 0'
    <testhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1632477941.356962-3535-26932306567289 `" && echo ansible-tmp-1632477941.356962-3535-26932306567289="` echo /root/.ansible/tmp/ansible-tmp-1632477941.356962-3535-26932306567289 `" ) && sleep 0'
    Using module file /root/ansible_collections/community/aws/plugins/modules/ec2_eip.py
    <testhost> PUT /root/.ansible/tmp/ansible-local-1077my3ghuvo/tmp0lqxcnwq TO /root/.ansible/tmp/ansible-tmp-1632477941.356962-3535-26932306567289/AnsiballZ_ec2_eip.py
    <testhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1632477941.356962-3535-26932306567289/ /root/.ansible/tmp/ansible-tmp-1632477941.356962-3535-26932306567289/AnsiballZ_ec2_eip.py && sleep 0'
    <testhost> EXEC /bin/sh -c 'ANSIBLE_DEBUG_BOTOCORE_LOGS=True /usr/bin/python3.9 /root/.ansible/tmp/ansible-tmp-1632477941.356962-3535-26932306567289/AnsiballZ_ec2_eip.py && sleep 0'
    <testhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1632477941.356962-3535-26932306567289/ > /dev/null 2>&1 && sleep 0'
    The full traceback is:
    Traceback (most recent call last):
      File "/tmp/ansible_ec2_eip_payload_rqxrzx_j/ansible_ec2_eip_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_eip.py", line 376, in allocate_address
      File "/tmp/ansible_ec2_eip_payload_rqxrzx_j/ansible_ec2_eip_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/core.py", line 334, in deciding_wrapper
        return retrying_wrapper(*args, **kwargs)
      File "/tmp/ansible_ec2_eip_payload_rqxrzx_j/ansible_ec2_eip_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/cloud.py", line 118, in _retry_wrapper
        return _retry_func(
      File "/tmp/ansible_ec2_eip_payload_rqxrzx_j/ansible_ec2_eip_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/cloud.py", line 68, in _retry_func
        return func()
      File "/usr/local/lib/python3.9/dist-packages/botocore/client.py", line 337, in _api_call
        return self._make_api_call(operation_name, kwargs)
      File "/usr/local/lib/python3.9/dist-packages/botocore/client.py", line 628, in _make_api_call
        request_dict = self._convert_to_request_dict(
      File "/usr/local/lib/python3.9/dist-packages/botocore/client.py", line 676, in _convert_to_request_dict
        request_dict = self._serializer.serialize_to_request(
      File "/usr/local/lib/python3.9/dist-packages/botocore/validate.py", line 297, in serialize_to_request
        raise ParamValidationError(report=report.generate_report())
    botocore.exceptions.ParamValidationError: Parameter validation failed:
    Invalid type for parameter Domain, value: None, type: <class 'NoneType'>, valid types: <class 'str'>
    fatal: [testhost]: FAILED! => {
        "boto3_version": "1.15.0",
        "botocore_version": "1.18.0",
        "changed": false,
        "invocation": {
            "module_args": {
                "allow_reassociation": false,
                "aws_access_key": "AKIAQAEICK57ETHUOKNO",
                "aws_ca_bundle": null,
                "aws_config": null,
                "aws_secret_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
                "debug_botocore_endpoint_logs": true,
                "device_id": null,
                "ec2_url": null,
                "in_vpc": false,
                "private_ip_address": null,
                "profile": null,
                "public_ip": null,
                "public_ipv4_pool": null,
                "region": "us-east-1",
                "release_on_disassociation": false,
                "reuse_existing_ip_allowed": false,
                "security_token": null,
                "state": "present",
                "tag_name": null,
                "tag_value": null,
                "validate_certs": true,
                "wait_timeout": null
            }
        },
        "msg": "Couldn't allocate Elastic IP address: Parameter validation failed:\nInvalid type for parameter Domain, value: None, type: <class 'NoneType'>, valid types: <class 'str'>",
        "resource_actions": []
    }

    ISSUE TYPE

    Bugfix Pull Request

    COMPONENT NAME
    ec2_eip
    ADDITIONAL INFORMATION

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: Mark Chappell <None>
    Reviewed-by: None <None>

commit 093aa24
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Sep 24 13:22:30 2021 +0200

    Update changelogs/fragments/731-ec2_eip-not_in_vpc.yml

commit e018cae
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Sep 24 12:15:11 2021 +0200

    Changelog

commit 0091444
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Sep 24 12:10:08 2021 +0200

    Fix bug when allocating an EIP with in_vpc not set

commit 78fc2db
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Sep 24 12:06:51 2021 +0200

    Add integration test

commit 0954679
Merge: f9654cf df28789
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Thu Sep 23 10:51:48 2021 +0000

    Merge pull request ansible-collections#728 from tremble/rename/iam_cert

    Rename iam_cert to iam_server_certificate for consistency

    SUMMARY
    iam_cert (and what used to be known as iam_cert_facts) only deal with "server" certificates (AWS also has a CA cert offering in IAM)
    with the big 2.9 _fact rename iam_cert_facts was renamed to iam_server_certificate_info.
    (more tests and a migration to boto3 to follow)
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    iam_cert
    ADDITIONAL INFORMATION

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: None <None>

commit df28789
Author: Mark Chappell <mchappel@redhat.com>
Date:   Thu Sep 23 10:46:27 2021 +0200

    Rename iam_cert to iam_server_certificate for consistency

commit f9654cf
Merge: ee984b2 861c966
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Thu Sep 23 08:54:50 2021 +0000

    Merge pull request ansible-collections#724 from tremble/boto3/redshift_subnet_group

    Migrate redshift_subnet_group to boto3

    SUMMARY
    Migrate redshift_subnet_group to boto3
    note: while there additional features (tagging springs to mind) that could be added, I'm trying to avoid scope creep and mostly just want to knock out migrations of the remaining old-boto modules.  That said, I am converting tags using the boto3_tag_list_to_ansible_dict helper, in the return values this is just to avoid needing to change formats in future
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    redshift_subnet_group
    ADDITIONAL INFORMATION
    Depends-On: ansible-collections#719

    Reviewed-by: Markus Bergholz <git@osuv.de>
    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: None <None>

commit 861c966
Author: Mark Chappell <mchappel@redhat.com>
Date:   Thu Sep 23 09:10:45 2021 +0200

    changelog

commit 451bef7
Author: Mark Chappell <mchappel@redhat.com>
Date:   Sat Sep 18 10:13:55 2021 +0200

    Add documentation and support for check_mode

commit aac8190
Author: Mark Chappell <mchappel@redhat.com>
Date:   Sat Sep 18 09:59:28 2021 +0200

    Add additional tests and documentation around new return values

commit dc4cd6e
Author: Mark Chappell <mchappel@redhat.com>
Date:   Sat Sep 18 09:12:11 2021 +0200

    Add additional tests for minimal/partial parameters.

commit c21eac8
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Sep 17 23:56:02 2021 +0200

    Migrate redshift_subnet_group to boto3

commit ee984b2
Merge: 0ed628a 402b472
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Thu Sep 23 00:06:44 2021 +0000

    Merge pull request ansible-collections#715 from jillr/2_0_0_prep

    Prepare 2.0.0 release

    SUMMARY
    Prepare 2.0.0 release.  Run add_docs, generate changelog, update versions
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    community.aws

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: Mark Chappell <None>
    Reviewed-by: Jill R <None>
    Reviewed-by: Markus Bergholz <git@osuv.de>
    Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
    Reviewed-by: None <None>

commit 402b472
Author: jillr <jillr@redhat.com>
Date:   Tue Sep 21 18:44:50 2021 +0000

    refresh docs

commit 398badf
Author: jillr <jillr@redhat.com>
Date:   Thu Sep 16 17:54:21 2021 +0000

    refresh fragments and docs

commit 49b2618
Author: jillr <jillr@redhat.com>
Date:   Wed Sep 15 21:46:41 2021 +0000

    Prepare 2.0.0 release

commit 0ed628a
Merge: 7672e7d 7c7b028
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Wed Sep 22 16:01:49 2021 +0000

    Merge pull request ansible-collections#719 from tremble/tests/redshift_subnet_group

    Add integration tests for redshift_subnet_group

    SUMMARY
    Add integration tests for redshift_subnet_group

     CI / IAM Permissions

    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    redshift_subnet_group
    ADDITIONAL INFORMATION

    Reviewed-by: None <None>

commit 7672e7d
Merge: 2defed0 d779a7b
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Mon Sep 20 15:11:18 2021 +0000

    Merge pull request ansible-collections#723 from tremble/boto3/elasticache_subnet_group

    Migrate elasticache_subnet_group to boto3

    SUMMARY
    Migrate elasticache_subnet_group to boto3
    note: while there additional features (tagging springs to mind) that could be added, I'm trying to avoid scope creep and mostly just want to knock out migrations of the remaining old-boto modules.
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    elasticache_subnet_group
    ADDITIONAL INFORMATION
    Depends-On: ansible-collections#720

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: Mark Chappell <None>
    Reviewed-by: None <None>

commit 2defed0
Merge: e125e89 002b237
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Mon Sep 20 09:28:58 2021 +0000

    Merge pull request ansible-collections#725 from tremble/tests/dynamodb_table

    Integration tests for dynamodb

    SUMMARY
    Integration tests for dynamodb
    There's a lot of commented out tests, the current module's really inconsistent about return values and the "defaults" result in various settings being reset.  The current module also handles a number of temporary failures poorly (hence a lot of retry/until in the tests).
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    dynamodb
    ADDITIONAL INFORMATION

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: None <None>

commit 002b237
Author: Mark Chappell <mchappel@redhat.com>
Date:   Sat Sep 18 21:10:40 2021 +0200

    Integration tests for dynamodb

commit d779a7b
Author: Mark Chappell <mchappel@redhat.com>
Date:   Sat Sep 18 08:36:41 2021 +0200

    Test creation with no description provided

commit 8db0ada
Author: Mark Chappell <mchappel@redhat.com>
Date:   Sat Sep 18 08:35:38 2021 +0200

    Fail cleanly if no subnets are provided on creation.

commit e6804ce
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Sep 17 20:48:03 2021 +0200

    Add support for check_mode

commit 24c8211
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Sep 17 22:06:13 2021 +0200

    Add documentation and tests for return values

commit 3cb67e4
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Sep 17 20:38:34 2021 +0200

    Migrate elasticache_subnet_group to boto3

commit e125e89
Merge: 095d4e4 7e14f92
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Fri Sep 17 19:46:15 2021 +0000

    Merge pull request ansible-collections#720 from tremble/tests/elasticache_subnet_group

    Split elasticache_subnet_group integration tests out

    SUMMARY
    In preparation for rewriting elasticache_subnet_group using boto3 split out the integration tests and exercise it slightly more.
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    elasticache_subnet_group
    ADDITIONAL INFORMATION

    Reviewed-by: Markus Bergholz <git@osuv.de>
    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: None <None>

commit 7e14f92
Author: Mark Chappell <mchappel@redhat.com>
Date:   Thu Sep 16 21:52:09 2021 +0200

    Split elasticache_subnet_group out

commit 7c7b028
Author: Mark Chappell <mchappel@redhat.com>
Date:   Thu Sep 16 18:03:30 2021 +0200

    Add integration tests for redshift_subnet_group

commit 095d4e4
Merge: 97972e0 0a9551d
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Thu Sep 16 15:50:14 2021 +0000

    Merge pull request ansible-collections#644 from tremble/boto_versions

    Add constraints and requirements for unit/integration tests

    SUMMARY
    Now that we state that we support specific minimum versions of the AWS SDKs, make sure we base our unit/integration tests against them such that modules need to explicitly test/request newer versions of the SDKs.
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    tests/integration
    tests/unit
    ADDITIONAL INFORMATION
    Depends-On: ansible-collections/amazon.aws#461
    see also: ansible/ansible-zuul-jobs#991
    see also: ansible-collections/amazon.aws#404

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: None <None>

commit 97972e0
Merge: 8025686 0b5d1be
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Thu Sep 16 14:12:37 2021 +0000

    Merge pull request ansible-collections#717 from tremble/tests/setup_roles

    Add setup_botocore_pip/ setup_ec2_facts/ setup_sshkey/ integration test helpers from amazon.aws

    SUMMARY
    Various components of the integration tests have been refactored to aid in consistency.  Bring the helper modules over from amazon.aws
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    tests/integration
    ADDITIONAL INFORMATION
    Original PRs (https://github.com/ansible-collections/amazon.aws/pull/):

    427
    485
    481
    498

    Reviewed-by: None <None>

commit 0a9551d
Author: Mark Chappell <mchappel@redhat.com>
Date:   Fri Jul 16 15:47:40 2021 +0200

    Add constraints and requirements for unit/integration tests consistent with the minimum versions of the AWS SDK we explicitly state we support

commit 0b5d1be
Author: Mark Chappell <mchappel@redhat.com>
Date:   Thu Sep 16 12:07:38 2021 +0200

    Add setup_botocore_pip/ setup_ec2_facts/ setup_sshkey/ integration test helpers from amazon.aws

commit 8025686
Merge: 19cc031 f5d98ba
Author: ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>
Date:   Thu Sep 16 06:22:34 2021 +0000

    Merge pull request ansible-collections#711 from tremble/botocore/1.18.0

    Bump botocore/boto3 requirements prior to release of 2.0.0

    SUMMARY
    Follow up to ansible-collections/amazon.aws#502
    We've bumped our minimum requirements in anticipation of release 2.0.0
    ISSUE TYPE

    Feature Pull Request

    COMPONENT NAME
    ADDITIONAL INFORMATION

    Reviewed-by: Alina Buzachis <None>
    Reviewed-by: None <None>

commit f5d98ba
Author: Mark Chappell <mchappel@redhat.com>
Date:   Wed Sep 15 06:44:54 2021 +0200

    Bump botocore/boto3 requirements prior to release of 2.0.0

commit 4f44d69
Author: John Mahoney <john.david.mahoney@gmail.com>
Date:   Tue Sep 14 16:23:03 2021 -0400

    Removed rst changes b/c autogenerated

commit 59deefe
Author: Nicolas Boutet <amd3002@gmail.com>
Date:   Thu Sep 9 10:30:04 2021 +0200

    Add changelog fragment

commit 9156837
Author: Nicolas Boutet <amd3002@gmail.com>
Date:   Thu Sep 9 10:23:56 2021 +0200

    cloudfront_distribution: add new cipher version TLSv1.2_2021

commit fea75df
Author: John Mahoney <john.david.mahoney@gmail.com>
Date:   Thu Sep 2 16:30:12 2021 -0400

    Update community.aws.rds_instance_info_module.rst

commit 64fc073
Author: John Mahoney <john.david.mahoney@gmail.com>
Date:   Thu Sep 2 16:11:50 2021 -0400

    Undocumented IOPS return

    IOPS is being returned by the module, but simply was not documented.
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 has_issue module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) python3 small_patch Hopefully easy to review traceback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sns_topic: Integer parameters within defaultHealthyRetryPolicy are not converted from strings
4 participants