diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index f90bd1ad861..94645b576fa 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -17,10 +17,10 @@ contact_links: url: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_template_chooser_ansible_collections about: Be nice to other members of the community. - name: Talks to the community - url: https://docs.ansible.com/ansible/latest/community/communication.html?utm_medium=github&utm_source=issue_template_chooser#mailing-list-information + url: https://docs.ansible.com/ansible/devel/community/communication.html about: Please ask and answer usage questions here - name: Working groups - url: https://github.com/ansible/community/wiki + url: https://forum.ansible.com/g about: Interested in improving a specific area? Become a part of a working group! - name: For Enterprise url: https://www.ansible.com/products/engine?utm_medium=github&utm_source=issue_template_chooser_ansible_collections diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index e1f6ac1f69b..be826cba8d2 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -17,6 +17,7 @@ jobs: with: init-lenient: false init-fail-on-error: true + ansible-ref: devel extra-collections: 'git+https://github.com/ansible-collections/amazon.aws.git,main' intersphinx-links: | amazon_aws:https://ansible-collections.github.io/amazon.aws/branch/main/ @@ -32,6 +33,7 @@ jobs: with: init-lenient: true init-fail-on-error: false + ansible-ref: devel extra-collections: 'git+https://github.com/ansible-collections/amazon.aws.git,main' intersphinx-links: | amazon_aws:https://ansible-collections.github.io/amazon.aws/branch/main/ diff --git a/.github/workflows/docs-push.yml b/.github/workflows/docs-push.yml index 79168f97dc0..9df3fbc6e42 100644 --- a/.github/workflows/docs-push.yml +++ b/.github/workflows/docs-push.yml @@ -21,6 +21,7 @@ jobs: with: init-lenient: true init-fail-on-error: true + ansible-ref: devel extra-collections: 'git+https://github.com/ansible-collections/amazon.aws.git,main' intersphinx-links: | amazon_aws:https://ansible-collections.github.io/amazon.aws/branch/main/ diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5e7208f47ed..ea2a0ce2dbd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,82 @@ community.aws Release Notes .. contents:: Topics +v9.0.0 +====== + +Release Summary +--------------- + +This release includes some new features, bugfixes and breaking changes. Several modules have been migrated to amazon.aws and the Fully Qualified Collection Name for these modules needs to be updated. The community.aws collection has dropped support for botocore<1.31.0 and boto3<1.28.0. Due to the AWS SDKs announcing Python less than 3.8 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/), support for Python less than 3.8 by this collection was deprecated in this release and will be removed in release 10.0.0 (https://github.com/ansible-collections/community.aws/pull/2194). + +Minor Changes +------------- + +- autoscaling_instance_refresh - Add support for ``skip_matching`` and ``max_healthy_percentage`` in ``preference`` (https://github.com/ansible-collections/community.aws/pull/2150). +- autoscaling_instance_refresh - refactor module to use shared code from ``ansible_collections.amazon.aws.plugins.module_utils.autoscaling`` and add type hinting (https://github.com/ansible-collections/community.aws/pull/2150). +- autoscaling_instance_refresh_info - refactor module to use shared code from ``ansible_collections.amazon.aws.plugins.module_utils.autoscaling`` and add type hinting (https://github.com/ansible-collections/community.aws/pull/2150). +- ec2_launch_template - Add option ``tag_specifications`` to define tags to be applied to the resources created with the launch template (https://github.com/ansible-collections/community.aws/issues/176). +- ec2_launch_template - Add suboption ``throughput`` to ``block_device_mappings`` argument (https://github.com/ansible-collections/community.aws/issues/1944). +- ec2_launch_template - Add support ``purge_tags`` parameter (https://github.com/ansible-collections/community.aws/issues/176). +- ec2_launch_template - Add the possibility to delete specific versions of a launch template using ``versions_to_delete`` (https://github.com/ansible-collections/community.aws/pull/2164). +- ec2_launch_template - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2164). +- ec2_placement_group - Added support for creating with ``tags`` (https://github.com/ansible-collections/community.aws/pull/2081). +- ec2_placement_group - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2167). +- ec2_transit_gateway - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2158). +- ec2_transit_gateway - Support for enable multicast on Transit Gateway (https://github.com/ansible-collections/community.aws/pull/2063). +- ec2_transit_gateway_info - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2158). +- ec2_transit_gateway_vpc_attachment - Modify doumentation and refactor to adhere to coding guidelines (https://github.com/ansible-collections/community.aws/pull/2157). +- ec2_vpc_egress_igw - Add the possibility to update/add tags on Egress only internet gateway (https://github.com/ansible-collections/community.aws/pull/2152). +- ec2_vpc_egress_igw - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` util (https://github.com/ansible-collections/community.aws/pull/2152). +- ec2_vpc_nacl - Refactor module to use shared code from `amazon.aws.plugins.module_utils.ec2` (https://github.com/ansible-collections/community.aws/pull/2159). +- ec2_vpc_nacl_info - Refactor module to use shared code from `amazon.aws.plugins.module_utils.ec2` (https://github.com/ansible-collections/community.aws/pull/2159). +- ec2_vpc_peer - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` (https://github.com/ansible-collections/community.aws/pull/2153). +- ec2_vpc_peering_info - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` (https://github.com/ansible-collections/community.aws/pull/2153). +- ec2_vpc_vgw - Fix call to parent static method in class ``VGWRetry`` (https://github.com/ansible-collections/community.aws/pull/2140). +- ec2_vpc_vgw - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2171). +- ec2_vpc_vgw_info - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2171). +- ec2_vpc_vpn - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` (https://github.com/ansible-collections/community.aws/pull/2160). +- ec2_vpc_vpn_info - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` (https://github.com/ansible-collections/community.aws/pull/2160). +- elb_classic_lb_info - Refactor elb_classic_lb_info module (https://github.com/ansible-collections/community.aws/pull/2139). + +Breaking Changes / Porting Guide +-------------------------------- + +- The community.aws collection has dropped support for ``botocore<1.31.0`` and ``boto3<1.28.0``. Most modules will continue to work with older versions of the AWS SDK. However, compatability with older versions of the SDK is not guaranteed and will not be tested. When using older versions of the SDK a warning will be emitted by Ansible (https://github.com/ansible-collections/community.aws/pull/2195). +- autoscaling_instance_refresh - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.autoscaling_instance_refresh`` (https://github.com/ansible-collections/community.aws/pull/2177). +- autoscaling_instance_refresh_info - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.autoscaling_instance_refresh_info`` (https://github.com/ansible-collections/community.aws/pull/2177). +- ec2_launch_template - Tags defined using option ``tags`` are now applied to the launch template resources not the resource created using this launch template (https://github.com/ansible-collections/community.aws/issues/176). +- ec2_launch_template - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_launch_template`` (https://github.com/ansible-collections/community.aws/pull/2185). +- ec2_placement_group - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_placement_group``. +- ec2_placement_group_info - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_placement_group_info``. +- ec2_transit_gateway - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_transit_gateway``. +- ec2_transit_gateway_info - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_transit_gateway_info``. +- ec2_transit_gateway_vpc_attachment - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_transit_gateway_vpc_attachment``. +- ec2_transit_gateway_vpc_attachment_info - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_transit_gateway_vpc_attachment_info``. +- ec2_vpc_egress_igw - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_vpc_egress_igw`` (https://api.github.com/repos/ansible-collections/community.aws/pulls/2169). +- ec2_vpc_nacl - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_vpc_nacl`` (https://github.com/ansible-collections/community.aws/pull/2178). +- ec2_vpc_nacl_info - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_vpc_nacl_info`` (https://github.com/ansible-collections/community.aws/pull/2178). +- ec2_vpc_peer - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_vpc_peer``. +- ec2_vpc_peering_info - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_vpc_peering_info``. +- ec2_vpc_vgw - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_vpc_vgw``. +- ec2_vpc_vgw_info - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_vpc_vgw_info``. +- ec2_vpc_vpn - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_vpc_vpn``. +- ec2_vpc_vpn_info - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.ec2_vpc_vpn_info``. +- ecs_cluster - the parameter ``purge_capacity_providers`` defaults to true. (https://github.com/ansible-collections/community.aws/pull/2165). +- elb_classic_lb_info - The module has been migrated from the ``community.aws`` collection. Playbooks using the Fully Qualified Collection Name for this module should be updated to use ``amazon.aws.elb_classic_lb_info``. +- iam_policy - the ``connection_properties`` return key was previously deprecated and has been removed, please use ``raw_connection_properties`` instead (https://github.com/ansible-collections/community.aws/pull/2165). + +Deprecated Features +------------------- + +- community.aws collection - due to the AWS SDKs announcing the end of support for Python less than 3.8 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/) support for Python less than 3.8 by this collection has been deprecated and will removed in release 10.0.0 (https://github.com/ansible-collections/community.aws/pull/2195). + +Bugfixes +-------- + +- autoscaling_instance_refresh - Fix typo in module ``exit_json`` (https://github.com/ansible-collections/community.aws/issues/2019). +- ecs_taskdefinition - avoid throttling exceptions on task definitions with a large number of revisions by using the retry mechanism (https://github.com/ansible-collections/community.aws/issues/2123). + v8.0.0 ====== diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eb41c927453..4aad92bd23e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -114,9 +114,6 @@ For general information on running the integration tests see Ignore the part about `source hacking/env-setup`. That's only applicable for working on `ansible-core`. You should be able to use the `ansible-test` that's installed with Ansible generally. Look at [the section on configuration for cloud tests](https://docs.ansible.com/ansible/devel/dev_guide/testing_integration.html#other-configuration-for-cloud-tests). -For questions about writing tests the Ansible AWS community can -be found on Libera.Chat IRC as detailed below. - - [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) - Details on contributing to Ansible - [Contributing to Collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections) - How to check out collection git repositories correctly @@ -129,10 +126,3 @@ be found on Libera.Chat IRC as detailed below. The `community.aws` collection follows the Ansible project's [Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html). Please read and familiarize yourself with this document. - -### IRC -Our IRC channels may require you to register your nickname. If you receive an error when you connect, see -[Libera.Chat's Nickname Registration guide](https://libera.chat/guides/registration) for instructions. - -The `#ansible-aws` channel on [irc.libera.chat](https://libera.chat/) is the main and official place to discuss use and development -of the `community.aws` collection. diff --git a/README.md b/README.md index 1cc7ff4ba7c..1c4a4ed6173 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,19 @@ The Ansible Community AWS collection includes a variety of Ansible content to he AWS related modules and plugins supported by the Ansible Cloud team are in the [amazon.aws](https://github.com/ansible-collections/amazon.aws) collection. +## Communication + +* Join the Ansible forum: + * [Get Help](https://forum.ansible.com/c/help/6): get help or help others. + * [Posts tagged with 'aws'](https://forum.ansible.com/tag/aws): subscribe to participate in collection-related conversations. + * [AWS Working Group](https://forum.ansible.com/g/AWS): by joining the team you will automatically get subscribed to the posts tagged with [aws](https://forum.ansible.com/tags). + * [Social Spaces](https://forum.ansible.com/c/chat/4): gather and interact with fellow enthusiasts. + * [News & Announcements](https://forum.ansible.com/c/news/5): track project-wide announcements including social events. + +* The Ansible [Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn): used to announce releases and important changes. + +For more information about communication, see the [Ansible communication guide](https://docs.ansible.com/ansible/devel/community/communication.html). + ## Ansible version compatibility Tested with the Ansible Core >= 2.15.0 versions, and the current development version of Ansible. Ansible Core versions before 2.15.0 are not supported. @@ -40,7 +53,7 @@ As such support for Python less than 3.8 will be removed in a release after 2024 Starting with the 2.0.0 releases of amazon.aws and community.aws, it is generally the collection's policy to support the versions of `botocore` and `boto3` that were released 12 months prior to the most recent major collection release, following semantic versioning (for example, 2.0.0, 3.0.0). -Version 7.0.0 of this collection supports `boto3 >= 1.26.0` and `botocore >= 1.29.0` +Version 9.0.0 of this collection supports `boto3 >= 1.28.0` and `botocore >= 1.31.0` All support for the original AWS SDK `boto` was removed in release 4.0.0. @@ -113,10 +126,6 @@ You can either call modules by their Fully Qualified Collection Name (FQCN), suc We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the [Community AWS collection repository](https://github.com/ansible-collections/community.aws). See [Contributing to Ansible-maintained collections](https://docs.ansible.com/ansible/devel/community/contributing_maintained_collections.html#contributing-maintained-collections) for more details. -You can also join us on: - -- Libera.Chat IRC - the ``#ansible-aws`` [irc.libera.chat](https://libera.chat/) channel - ### More information about contributing - [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) - Details on contributing to Ansible diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index beb6b030ceb..e2702bdfb5a 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -3875,3 +3875,180 @@ releases: - python37.yml - workflow-requirements.yml release_date: '2024-05-20' + 9.0.0: + changes: + breaking_changes: + - The community.aws collection has dropped support for ``botocore<1.31.0`` and + ``boto3<1.28.0``. Most modules will continue to work with older versions of + the AWS SDK. However, compatability with older versions of the SDK is not + guaranteed and will not be tested. When using older versions of the SDK a + warning will be emitted by Ansible (https://github.com/ansible-collections/community.aws/pull/2195). + - autoscaling_instance_refresh - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.autoscaling_instance_refresh`` (https://github.com/ansible-collections/community.aws/pull/2177). + - autoscaling_instance_refresh_info - The module has been migrated from the + ``community.aws`` collection. Playbooks using the Fully Qualified Collection + Name for this module should be updated to use ``amazon.aws.autoscaling_instance_refresh_info`` + (https://github.com/ansible-collections/community.aws/pull/2177). + - ec2_launch_template - Tags defined using option ``tags`` are now applied to + the launch template resources not the resource created using this launch template + (https://github.com/ansible-collections/community.aws/issues/176). + - ec2_launch_template - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.ec2_launch_template`` (https://github.com/ansible-collections/community.aws/pull/2185). + - ec2_placement_group - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.ec2_placement_group``. + - ec2_placement_group_info - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.ec2_placement_group_info``. + - ec2_transit_gateway - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.ec2_transit_gateway``. + - ec2_transit_gateway_info - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.ec2_transit_gateway_info``. + - ec2_transit_gateway_vpc_attachment - The module has been migrated from the + ``community.aws`` collection. Playbooks using the Fully Qualified Collection + Name for this module should be updated to use ``amazon.aws.ec2_transit_gateway_vpc_attachment``. + - ec2_transit_gateway_vpc_attachment_info - The module has been migrated from + the ``community.aws`` collection. Playbooks using the Fully Qualified Collection + Name for this module should be updated to use ``amazon.aws.ec2_transit_gateway_vpc_attachment_info``. + - ec2_vpc_egress_igw - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.ec2_vpc_egress_igw`` (https://api.github.com/repos/ansible-collections/community.aws/pulls/2169). + - ec2_vpc_nacl - The module has been migrated from the ``community.aws`` collection. + Playbooks using the Fully Qualified Collection Name for this module should + be updated to use ``amazon.aws.ec2_vpc_nacl`` (https://github.com/ansible-collections/community.aws/pull/2178). + - ec2_vpc_nacl_info - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.ec2_vpc_nacl_info`` (https://github.com/ansible-collections/community.aws/pull/2178). + - ec2_vpc_peer - The module has been migrated from the ``community.aws`` collection. + Playbooks using the Fully Qualified Collection Name for this module should + be updated to use ``amazon.aws.ec2_vpc_peer``. + - ec2_vpc_peering_info - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.ec2_vpc_peering_info``. + - ec2_vpc_vgw - The module has been migrated from the ``community.aws`` collection. + Playbooks using the Fully Qualified Collection Name for this module should + be updated to use ``amazon.aws.ec2_vpc_vgw``. + - ec2_vpc_vgw_info - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.ec2_vpc_vgw_info``. + - ec2_vpc_vpn - The module has been migrated from the ``community.aws`` collection. + Playbooks using the Fully Qualified Collection Name for this module should + be updated to use ``amazon.aws.ec2_vpc_vpn``. + - ec2_vpc_vpn_info - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.ec2_vpc_vpn_info``. + - ecs_cluster - the parameter ``purge_capacity_providers`` defaults to true. + (https://github.com/ansible-collections/community.aws/pull/2165). + - elb_classic_lb_info - The module has been migrated from the ``community.aws`` + collection. Playbooks using the Fully Qualified Collection Name for this module + should be updated to use ``amazon.aws.elb_classic_lb_info``. + - iam_policy - the ``connection_properties`` return key was previously deprecated + and has been removed, please use ``raw_connection_properties`` instead (https://github.com/ansible-collections/community.aws/pull/2165). + bugfixes: + - autoscaling_instance_refresh - Fix typo in module ``exit_json`` (https://github.com/ansible-collections/community.aws/issues/2019). + - ecs_taskdefinition - avoid throttling exceptions on task definitions with + a large number of revisions by using the retry mechanism (https://github.com/ansible-collections/community.aws/issues/2123). + deprecated_features: + - community.aws collection - due to the AWS SDKs announcing the end of support + for Python less than 3.8 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/) + support for Python less than 3.8 by this collection has been deprecated and + will removed in release 10.0.0 (https://github.com/ansible-collections/community.aws/pull/2195). + minor_changes: + - autoscaling_instance_refresh - Add support for ``skip_matching`` and ``max_healthy_percentage`` + in ``preference`` (https://github.com/ansible-collections/community.aws/pull/2150). + - autoscaling_instance_refresh - refactor module to use shared code from ``ansible_collections.amazon.aws.plugins.module_utils.autoscaling`` + and add type hinting (https://github.com/ansible-collections/community.aws/pull/2150). + - autoscaling_instance_refresh_info - refactor module to use shared code from + ``ansible_collections.amazon.aws.plugins.module_utils.autoscaling`` and add + type hinting (https://github.com/ansible-collections/community.aws/pull/2150). + - ec2_launch_template - Add option ``tag_specifications`` to define tags to + be applied to the resources created with the launch template (https://github.com/ansible-collections/community.aws/issues/176). + - ec2_launch_template - Add suboption ``throughput`` to ``block_device_mappings`` + argument (https://github.com/ansible-collections/community.aws/issues/1944). + - ec2_launch_template - Add support ``purge_tags`` parameter (https://github.com/ansible-collections/community.aws/issues/176). + - ec2_launch_template - Add the possibility to delete specific versions of a + launch template using ``versions_to_delete`` (https://github.com/ansible-collections/community.aws/pull/2164). + - ec2_launch_template - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2164). + - ec2_placement_group - Added support for creating with ``tags`` (https://github.com/ansible-collections/community.aws/pull/2081). + - ec2_placement_group - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2167). + - ec2_transit_gateway - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2158). + - ec2_transit_gateway - Support for enable multicast on Transit Gateway (https://github.com/ansible-collections/community.aws/pull/2063). + - ec2_transit_gateway_info - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2158). + - ec2_transit_gateway_vpc_attachment - Modify doumentation and refactor to adhere + to coding guidelines (https://github.com/ansible-collections/community.aws/pull/2157). + - ec2_vpc_egress_igw - Add the possibility to update/add tags on Egress only + internet gateway (https://github.com/ansible-collections/community.aws/pull/2152). + - ec2_vpc_egress_igw - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + util (https://github.com/ansible-collections/community.aws/pull/2152). + - ec2_vpc_nacl - Refactor module to use shared code from `amazon.aws.plugins.module_utils.ec2` + (https://github.com/ansible-collections/community.aws/pull/2159). + - ec2_vpc_nacl_info - Refactor module to use shared code from `amazon.aws.plugins.module_utils.ec2` + (https://github.com/ansible-collections/community.aws/pull/2159). + - ec2_vpc_peer - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + (https://github.com/ansible-collections/community.aws/pull/2153). + - ec2_vpc_peering_info - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + (https://github.com/ansible-collections/community.aws/pull/2153). + - ec2_vpc_vgw - Fix call to parent static method in class ``VGWRetry`` (https://github.com/ansible-collections/community.aws/pull/2140). + - ec2_vpc_vgw - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2171). + - ec2_vpc_vgw_info - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + and update ``RETURN`` block (https://github.com/ansible-collections/community.aws/pull/2171). + - ec2_vpc_vpn - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + (https://github.com/ansible-collections/community.aws/pull/2160). + - ec2_vpc_vpn_info - Refactor module to use shared code from ``amazon.aws.plugins.module_utils.ec2`` + (https://github.com/ansible-collections/community.aws/pull/2160). + - elb_classic_lb_info - Refactor elb_classic_lb_info module (https://github.com/ansible-collections/community.aws/pull/2139). + release_summary: This release includes some new features, bugfixes and breaking + changes. Several modules have been migrated to amazon.aws and the Fully Qualified + Collection Name for these modules needs to be updated. The community.aws collection + has dropped support for botocore<1.31.0 and boto3<1.28.0. Due to the AWS SDKs + announcing Python less than 3.8 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/), + support for Python less than 3.8 by this collection was deprecated in this + release and will be removed in release 10.0.0 (https://github.com/ansible-collections/community.aws/pull/2194). + fragments: + - 0-readme.yml + - 20240110-ec2_launch_template-refactor.yml + - 20240423-msk_cluster-disable-tests.yml + - 20240613_ec2_placement_group_tags.yml + - 20240909-ec2_vpc_vgw-fix-super-exception.yaml + - 20240919-fix_sanity.yml + - 20240920-refactor-autoscaling_instance_refresh-modules.yml + - 20240923-refactor-ec2_vpc_egress_igw-modules.yml + - 20240924-create-ignore-2.19.yml + - 20240924-ec2_vpc_peer-refactor.yml + - 20240924-fix-documentation-tgw-vpc-att.yml + - 20240924-refactor-ec2_vpc_nacl-modules.yaml + - 20240930-ec2_vpc_vpn_refactoring.yml + - 20241007-drop_deprecations.yml + - 20241029-update-docs.yml + - 20250515-main-9.0.0.yml + - 2063-add-multicast-support.yml + - 2124-add-retry-to-ecs_taskdefinition.yml + - 2139-elb_classic_lb_info-refactor-module.yml + - 2142-elb_network_lb-update-tests-to-use-valid-cert.yml + - botocore-python.yaml + - migrate_autoscaling_instance_refresh_autoscaling_instance_refresh_info.yaml + - migrate_ec2_launch_template.yaml + - migrate_ec2_placement_group.yml + - migrate_ec2_transit_gateway.yml + - migrate_ec2_transit_gateway_info.yml + - migrate_ec2_transit_gateway_vpc_attachment.yml + - migrate_ec2_vpc_egress_igw.yml + - migrate_ec2_vpc_nacl_ec2_vpc_nacl_info.yaml + - migrate_ec2_vpc_peer.yml + - migrate_ec2_vpc_vgw.yml + - migrate_ec2_vpc_vpn.yml + - migrate_elb_classic_lb_info.yml + - refactor-ec2_transit_gateway-modules.yml + - refactor-ec2_vpc_vgw-modules.yml + - refactor_ec2_placement_group.yml + - release_summary.yml + release_date: '2024-10-30' diff --git a/changelogs/fragments/20240423-msk_cluster-disable-tests.yml b/changelogs/fragments/20240423-msk_cluster-disable-tests.yml deleted file mode 100644 index 28be7b8378d..00000000000 --- a/changelogs/fragments/20240423-msk_cluster-disable-tests.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: - - msk_cluster - Disable integration tests because they are too slow. diff --git a/changelogs/fragments/20241029-main-10.0.0.yml b/changelogs/fragments/20241029-main-10.0.0.yml new file mode 100644 index 00000000000..9fbf7b5efb3 --- /dev/null +++ b/changelogs/fragments/20241029-main-10.0.0.yml @@ -0,0 +1,2 @@ +trivial: + - galaxy.yml - bump ``release`` for main branch to ``10.0.0-dev0``. diff --git a/changelogs/fragments/20250515-main-9.0.0.yml b/changelogs/fragments/20250515-main-9.0.0.yml deleted file mode 100644 index 7d31e9997a9..00000000000 --- a/changelogs/fragments/20250515-main-9.0.0.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: - - galaxy.yml - bump ``release`` for main branch to ``9.0.0-dev0``. diff --git a/changelogs/fragments/2063-add-multicast-support.yml b/changelogs/fragments/2063-add-multicast-support.yml deleted file mode 100644 index ed6ec1e9eb3..00000000000 --- a/changelogs/fragments/2063-add-multicast-support.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - ec2_transit_gateway - Support for enable multicast on Transit Gateway (https://github.com/ansible-collections/community.aws/pull/2063). diff --git a/changelogs/fragments/2124-add-retry-to-ecs_taskdefinition.yml b/changelogs/fragments/2124-add-retry-to-ecs_taskdefinition.yml deleted file mode 100644 index cd03aab2d41..00000000000 --- a/changelogs/fragments/2124-add-retry-to-ecs_taskdefinition.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - ecs_taskdefinition - avoid throttling exceptions on task definitions with a large number of revisions by using the retry mechanism (https://github.com/ansible-collections/community.aws/issues/2123). diff --git a/changelogs/fragments/botocore-python.yaml b/changelogs/fragments/botocore-python.yaml new file mode 100644 index 00000000000..08b72eacd07 --- /dev/null +++ b/changelogs/fragments/botocore-python.yaml @@ -0,0 +1,14 @@ +--- +breaking_changes: + - The community.aws collection has dropped support for ``botocore<1.31.0`` and + ``boto3<1.28.0``. Most modules will continue to work with older versions of + the AWS SDK. However, compatability with older versions of the SDK is not guaranteed + and will not be tested. When using older versions of the SDK a warning will + be emitted by Ansible + (https://github.com/ansible-collections/community.aws/pull/2195). +deprecated_features: + - community.aws collection - due to the AWS SDKs announcing the end of support + for Python less than 3.8 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/) + support for Python less than 3.8 by this collection has been deprecated + and will removed in release 10.0.0 + (https://github.com/ansible-collections/community.aws/pull/2195). diff --git a/galaxy.yml b/galaxy.yml index 72c91f51b01..e264d3977d6 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: community name: aws -version: 9.0.0-dev0 +version: 10.0.0-dev0 readme: README.md authors: - Ansible (https://github.com/ansible) @@ -9,7 +9,7 @@ description: A variety of Ansible content to help automate the management of AWS license_file: COPYING tags: [community, aws, cloud, amazon] dependencies: - amazon.aws: '>=8.0.0-dev0' + amazon.aws: '>=10.0.0-dev0' repository: https://github.com/ansible-collections/community.aws documentation: https://ansible-collections.github.io/community.aws/branch/main/collections/community/aws/index.html homepage: https://github.com/ansible-collections/community.aws diff --git a/meta/runtime.yml b/meta/runtime.yml index ea50b016258..5d54de6274b 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -10,8 +10,6 @@ action_groups: - api_gateway_info - application_autoscaling_policy - autoscaling_complete_lifecycle_action - - autoscaling_instance_refresh - - autoscaling_instance_refresh_info - autoscaling_launch_config - autoscaling_launch_config_find - autoscaling_launch_config_info @@ -94,35 +92,17 @@ action_groups: - ec2_ami_copy - ec2_asg - ec2_asg_info - - ec2_asg_instance_refresh - - ec2_asg_instance_refresh_info - ec2_asg_lifecycle_hook - ec2_asg_scheduled_action - ec2_customer_gateway - ec2_customer_gateway_info - ec2_elb - - ec2_launch_template - ec2_lc - ec2_lc_find - ec2_lc_info - ec2_metric_alarm - - ec2_placement_group - - ec2_placement_group_info - ec2_scaling_policy - ec2_snapshot_copy - - ec2_transit_gateway - - ec2_transit_gateway_info - - ec2_transit_gateway_vpc_attachment - - ec2_transit_gateway_vpc_attachment_info - - ec2_vpc_egress_igw - - ec2_vpc_nacl - - ec2_vpc_nacl_info - - ec2_vpc_peer - - ec2_vpc_peering_info - - ec2_vpc_vgw - - ec2_vpc_vgw_info - - ec2_vpc_vpn - - ec2_vpc_vpn_info - ec2_win_password - ecs_attribute - ecs_cluster @@ -146,7 +126,6 @@ action_groups: - elasticache_subnet_group - elasticbeanstalk_app - elb_classic_lb - - elb_classic_lb_info - elb_instance - elb_network_lb - elb_target @@ -384,10 +363,10 @@ plugin_routing: redirect: amazon.aws.autoscaling_group_info ec2_asg_instance_refresh: # Deprecation for this alias should not *start* prior to 2024-09-01 - redirect: community.aws.autoscaling_instance_refresh + redirect: amazon.aws.autoscaling_instance_refresh ec2_asg_instance_refresh_info: # Deprecation for this alias should not *start* prior to 2024-09-01 - redirect: community.aws.autoscaling_instance_refresh_info + redirect: amazon.aws.autoscaling_instance_refresh_info ec2_asg_lifecycle_hook: # Deprecation for this alias should not *start* prior to 2024-09-01 redirect: community.aws.autoscaling_lifecycle_hook @@ -520,6 +499,44 @@ plugin_routing: redirect: amazon.aws.s3_bucket_info sts_assume_role: redirect: amazon.aws.sts_assume_role + ec2_vpc_egress_igw: + redirect: amazon.aws.ec2_vpc_egress_igw + ec2_transit_gateway_vpc_attachment: + redirect: amazon.aws.ec2_transit_gateway_vpc_attachment + ec2_transit_gateway_vpc_attachment_info: + redirect: amazon.aws.ec2_transit_gateway_vpc_attachment_info + elb_classic_lb_info: + redirect: amazon.aws.elb_classic_lb_info + ec2_vpc_nacl: + redirect: amazon.aws.ec2_vpc_nacl + ec2_vpc_nacl_info: + redirect: amazon.aws.ec2_vpc_nacl_info + ec2_vpc_peer: + redirect: amazon.aws.ec2_vpc_peer + ec2_vpc_peering_info: + redirect: amazon.aws.ec2_vpc_peering_info + ec2_placement_group: + redirect: amazon.aws.ec2_placement_group + ec2_placement_group_info: + redirect: amazon.aws.ec2_placement_group_info + ec2_launch_template: + redirect: amazon.aws.ec2_launch_template + ec2_vpc_vgw: + redirect: amazon.aws.ec2_vpc_vgw + ec2_vpc_vgw_info: + redirect: amazon.aws.ec2_vpc_vgw_info + ec2_vpc_vpn: + redirect: amazon.aws.ec2_vpc_vpn + ec2_vpc_vpn_info: + redirect: amazon.aws.ec2_vpc_vpn_info + autoscaling_instance_refresh: + redirect: amazon.aws.autoscaling_instance_refresh + autoscaling_instance_refresh_info: + redirect: amazon.aws.autoscaling_instance_refresh_info + ec2_transit_gateway_info: + redirect: amazon.aws.ec2_transit_gateway_info + ec2_transit_gateway: + redirect: amazon.aws.ec2_transit_gateway module_utils: route53: - redirect: amazon.aws.route53 \ No newline at end of file + redirect: amazon.aws.route53 diff --git a/plugins/module_utils/common.py b/plugins/module_utils/common.py index b21074bc278..b5afdf0ec96 100644 --- a/plugins/module_utils/common.py +++ b/plugins/module_utils/common.py @@ -5,4 +5,4 @@ COMMUNITY_AWS_COLLECTION_NAME = "community.aws" -COMMUNITY_AWS_COLLECTION_VERSION = "9.0.0-dev0" +COMMUNITY_AWS_COLLECTION_VERSION = "10.0.0-dev0" diff --git a/plugins/module_utils/transitgateway.py b/plugins/module_utils/transitgateway.py deleted file mode 100644 index 8a82a839ff1..00000000000 --- a/plugins/module_utils/transitgateway.py +++ /dev/null @@ -1,368 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -from copy import deepcopy - -from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list - -from ansible_collections.community.aws.plugins.module_utils.ec2 import BaseEc2Manager -from ansible_collections.community.aws.plugins.module_utils.ec2 import Boto3Mixin -from ansible_collections.community.aws.plugins.module_utils.ec2 import Ec2WaiterFactory - - -class TgwWaiterFactory(Ec2WaiterFactory): - @property - def _waiter_model_data(self): - data = super(TgwWaiterFactory, self)._waiter_model_data - # split the TGW waiters so we can keep them close to everything else. - tgw_data = dict( - tgw_attachment_available=dict( - operation="DescribeTransitGatewayAttachments", - delay=5, - maxAttempts=120, - acceptors=[ - dict( - state="success", - matcher="pathAll", - expected="available", - argument="TransitGatewayAttachments[].State", - ), - ], - ), - tgw_attachment_deleted=dict( - operation="DescribeTransitGatewayAttachments", - delay=5, - maxAttempts=120, - acceptors=[ - dict( - state="retry", - matcher="pathAll", - expected="deleting", - argument="TransitGatewayAttachments[].State", - ), - dict( - state="success", - matcher="pathAll", - expected="deleted", - argument="TransitGatewayAttachments[].State", - ), - dict( - state="success", - matcher="path", - expected=True, - argument="length(TransitGatewayAttachments[]) == `0`", - ), - dict(state="success", matcher="error", expected="InvalidRouteTableID.NotFound"), - ], - ), - ) - data.update(tgw_data) - return data - - -class TGWAttachmentBoto3Mixin(Boto3Mixin): - def __init__(self, module, **kwargs): - self.tgw_waiter_factory = TgwWaiterFactory(module) - super(TGWAttachmentBoto3Mixin, self).__init__(module, **kwargs) - - # Paginators can't be (easily) wrapped, so we wrap this method with the - # retry - retries the full fetch, but better than simply giving up. - @AWSRetry.jittered_backoff() - def _paginated_describe_transit_gateway_vpc_attachments(self, **params): - paginator = self.client.get_paginator("describe_transit_gateway_vpc_attachments") - return paginator.paginate(**params).build_full_result() - - @Boto3Mixin.aws_error_handler("describe transit gateway attachments") - def _describe_vpc_attachments(self, **params): - result = self._paginated_describe_transit_gateway_vpc_attachments(**params) - return result.get("TransitGatewayVpcAttachments", None) - - @Boto3Mixin.aws_error_handler("create transit gateway attachment") - def _create_vpc_attachment(self, **params): - result = self.client.create_transit_gateway_vpc_attachment(aws_retry=True, **params) - return result.get("TransitGatewayVpcAttachment", None) - - @Boto3Mixin.aws_error_handler("modify transit gateway attachment") - def _modify_vpc_attachment(self, **params): - result = self.client.modify_transit_gateway_vpc_attachment(aws_retry=True, **params) - return result.get("TransitGatewayVpcAttachment", None) - - @Boto3Mixin.aws_error_handler("delete transit gateway attachment") - def _delete_vpc_attachment(self, **params): - try: - result = self.client.delete_transit_gateway_vpc_attachment(aws_retry=True, **params) - except is_boto3_error_code("ResourceNotFoundException"): - return None - return result.get("TransitGatewayVpcAttachment", None) - - @Boto3Mixin.aws_error_handler("transit gateway attachment to finish deleting") - def _wait_tgw_attachment_deleted(self, **params): - waiter = self.tgw_waiter_factory.get_waiter("tgw_attachment_deleted") - waiter.wait(**params) - - @Boto3Mixin.aws_error_handler("transit gateway attachment to become available") - def _wait_tgw_attachment_available(self, **params): - waiter = self.tgw_waiter_factory.get_waiter("tgw_attachment_available") - waiter.wait(**params) - - def _normalize_tgw_attachment(self, rtb): - return self._normalize_boto3_resource(rtb) - - def _get_tgw_vpc_attachment(self, **params): - # Only for use with a single attachment, use _describe_vpc_attachments for - # multiple tables. - attachments = self._describe_vpc_attachments(**params) - - if not attachments: - return None - - attachment = attachments[0] - return attachment - - -class BaseTGWManager(BaseEc2Manager): - @Boto3Mixin.aws_error_handler("connect to AWS") - def _create_client(self, client_name="ec2"): - if client_name == "ec2": - error_codes = ["IncorrectState"] - else: - error_codes = [] - - retry_decorator = AWSRetry.jittered_backoff( - catch_extra_error_codes=error_codes, - ) - client = self.module.client(client_name, retry_decorator=retry_decorator) - return client - - -class TransitGatewayVpcAttachmentManager(TGWAttachmentBoto3Mixin, BaseTGWManager): - TAG_RESOURCE_TYPE = "transit-gateway-attachment" - - def __init__(self, module, id=None): - self._subnet_updates = dict() - super(TransitGatewayVpcAttachmentManager, self).__init__(module=module, id=id) - - def _get_id_params(self, id=None, id_list=False): - if not id: - id = self.resource_id - if not id: - # Users should never see this, but let's cover ourself - self.module.fail_json(msg="Attachment identifier parameter missing") - - if id_list: - return dict(TransitGatewayAttachmentIds=[id]) - return dict(TransitGatewayAttachmentId=id) - - def _extra_error_output(self): - output = super(TransitGatewayVpcAttachmentManager, self)._extra_error_output() - if self.resource_id: - output["TransitGatewayAttachmentId"] = self.resource_id - return output - - def _filter_immutable_resource_attributes(self, resource): - resource = super(TransitGatewayVpcAttachmentManager, self)._filter_immutable_resource_attributes(resource) - resource.pop("TransitGatewayId", None) - resource.pop("VpcId", None) - resource.pop("VpcOwnerId", None) - resource.pop("State", None) - resource.pop("SubnetIds", None) - resource.pop("CreationTime", None) - resource.pop("Tags", None) - return resource - - def _set_option(self, name, value): - if value is None: - return False - # For now VPC Attachment options are all enable/disable - if value: - value = "enable" - else: - value = "disable" - - options = deepcopy(self._preupdate_resource.get("Options", dict())) - options.update(self._resource_updates.get("Options", dict())) - options[name] = value - - return self._set_resource_value("Options", options) - - def set_dns_support(self, value): - return self._set_option("DnsSupport", value) - - def set_multicast_support(self, value): - return self._set_option("MulticastSupport", value) - - def set_ipv6_support(self, value): - return self._set_option("Ipv6Support", value) - - def set_appliance_mode_support(self, value): - return self._set_option("ApplianceModeSupport", value) - - def set_transit_gateway(self, tgw_id): - return self._set_resource_value("TransitGatewayId", tgw_id) - - def set_vpc(self, vpc_id): - return self._set_resource_value("VpcId", vpc_id) - - def set_subnets(self, subnets=None, purge=True): - if subnets is None: - return False - - current_subnets = set(self._preupdate_resource.get("SubnetIds", [])) - desired_subnets = set(subnets) - if not purge: - desired_subnets = desired_subnets.union(current_subnets) - - # We'll pull the VPC ID from the subnets, no point asking for - # information we 'know'. - subnet_details = self._describe_subnets(SubnetIds=list(desired_subnets)) - vpc_id = self.subnets_to_vpc(desired_subnets, subnet_details) - self._set_resource_value("VpcId", vpc_id, immutable=True) - - # Only one subnet per-AZ is permitted - azs = [s.get("AvailabilityZoneId") for s in subnet_details] - if len(azs) != len(set(azs)): - self.module.fail_json( - msg="Only one attachment subnet per availability zone may be set.", - availability_zones=azs, - subnets=subnet_details, - ) - - subnets_to_add = list(desired_subnets.difference(current_subnets)) - subnets_to_remove = list(current_subnets.difference(desired_subnets)) - if not subnets_to_remove and not subnets_to_add: - return False - self._subnet_updates = dict(add=subnets_to_add, remove=subnets_to_remove) - self._set_resource_value("SubnetIds", list(desired_subnets)) - return True - - def subnets_to_vpc(self, subnets, subnet_details=None): - if not subnets: - return None - - if subnet_details is None: - subnet_details = self._describe_subnets(SubnetIds=list(subnets)) - - vpcs = [s.get("VpcId") for s in subnet_details] - if len(set(vpcs)) > 1: - self.module.fail_json( - msg="Attachment subnets may only be in one VPC, multiple VPCs found", - vpcs=list(set(vpcs)), - subnets=subnet_details, - ) - - return vpcs[0] - - def _do_deletion_wait(self, id=None, **params): - all_params = self._get_id_params(id=id, id_list=True) - all_params.update(**params) - return self._wait_tgw_attachment_deleted(**all_params) - - def _do_creation_wait(self, id=None, **params): - all_params = self._get_id_params(id=id, id_list=True) - all_params.update(**params) - return self._wait_tgw_attachment_available(**all_params) - - def _do_update_wait(self, id=None, **params): - all_params = self._get_id_params(id=id, id_list=True) - all_params.update(**params) - return self._wait_tgw_attachment_available(**all_params) - - def _do_create_resource(self): - params = self._merge_resource_changes(filter_immutable=False, creation=True) - response = self._create_vpc_attachment(**params) - if response: - self.resource_id = response.get("TransitGatewayAttachmentId", None) - return response - - def _do_update_resource(self): - if self._preupdate_resource.get("State", None) == "pending": - # Resources generally don't like it if you try to update before creation - # is complete. If things are in a 'pending' state they'll often throw - # exceptions. - self._wait_for_creation() - elif self._preupdate_resource.get("State", None) == "deleting": - self.module.fail_json(msg="Deletion in progress, unable to update", route_tables=[self.original_resource]) - - updates = self._filter_immutable_resource_attributes(self._resource_updates) - subnets_to_add = self._subnet_updates.get("add", []) - subnets_to_remove = self._subnet_updates.get("remove", []) - if subnets_to_add: - updates["AddSubnetIds"] = subnets_to_add - if subnets_to_remove: - updates["RemoveSubnetIds"] = subnets_to_remove - - if not updates: - return False - - if self.module.check_mode: - return True - - updates.update(self._get_id_params(id_list=False)) - self._modify_vpc_attachment(**updates) - return True - - def get_resource(self): - return self.get_attachment() - - def delete(self, id=None): - if id: - id_params = self._get_id_params(id=id, id_list=True) - result = self._get_tgw_vpc_attachment(**id_params) - else: - result = self._preupdate_resource - - self.updated_resource = dict() - - if not result: - return False - - if result.get("State") == "deleting": - self._wait_for_deletion() - return False - - if self.module.check_mode: - self.changed = True - return True - - id_params = self._get_id_params(id=id, id_list=False) - - result = self._delete_vpc_attachment(**id_params) - - self.changed |= bool(result) - - self._wait_for_deletion() - return bool(result) - - def list(self, filters=None, id=None): - params = dict() - if id: - params["TransitGatewayAttachmentIds"] = [id] - if filters: - params["Filters"] = ansible_dict_to_boto3_filter_list(filters) - attachments = self._describe_vpc_attachments(**params) - if not attachments: - return list() - - return [self._normalize_tgw_attachment(a) for a in attachments] - - def get_attachment(self, id=None): - # RouteTable needs a list, Association/Propagation needs a single ID - id_params = self._get_id_params(id=id, id_list=True) - id_param = self._get_id_params(id=id, id_list=False) - result = self._get_tgw_vpc_attachment(**id_params) - - if not result: - return None - - if not id: - self._preupdate_resource = deepcopy(result) - - attachment = self._normalize_tgw_attachment(result) - return attachment - - def _normalize_resource(self, resource): - return self._normalize_tgw_attachment(resource) diff --git a/plugins/modules/autoscaling_instance_refresh.py b/plugins/modules/autoscaling_instance_refresh.py deleted file mode 100644 index b301fea9439..00000000000 --- a/plugins/modules/autoscaling_instance_refresh.py +++ /dev/null @@ -1,266 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: autoscaling_instance_refresh -version_added: 3.2.0 -short_description: Start or cancel an EC2 Auto Scaling Group (ASG) instance refresh in AWS -description: - - Start or cancel an EC2 Auto Scaling Group instance refresh in AWS. - - Can be used with M(community.aws.autoscaling_instance_refresh_info) to track the subsequent progress. - - Prior to release 5.0.0 this module was called C(community.aws.ec2_asg_instance_refresh). - The usage did not change. -author: - - "Dan Khersonsky (@danquixote)" -options: - state: - description: - - Desired state of the ASG. - type: str - required: true - choices: [ 'started', 'cancelled' ] - name: - description: - - The name of the auto scaling group you are searching for. - type: str - required: true - strategy: - description: - - The strategy to use for the instance refresh. The only valid value is C(Rolling). - - A rolling update is an update that is applied to all instances in an Auto Scaling group until all instances have been updated. - - A rolling update can fail due to failed health checks or if instances are on standby or are protected from scale in. - - If the rolling update process fails, any instances that were already replaced are not rolled back to their previous configuration. - type: str - default: 'Rolling' - preferences: - description: - - Set of preferences associated with the instance refresh request. - - If not provided, the default values are used. - - For I(min_healthy_percentage), the default value is C(90). - - For I(instance_warmup), the default is to use the value specified for the health check grace period for the Auto Scaling group. - - Can not be specified when I(state) is set to 'cancelled'. - required: false - suboptions: - min_healthy_percentage: - description: - - Total percent of capacity in ASG that must remain healthy during instance refresh to allow operation to continue. - - It is rounded up to the nearest integer. - type: int - default: 90 - instance_warmup: - description: - - The number of seconds until a newly launched instance is configured and ready to use. - - During this time, Amazon EC2 Auto Scaling does not immediately move on to the next replacement. - - The default is to use the value for the health check grace period defined for the group. - type: int - type: dict -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Note: These examples do not set authentication details, see the AWS Guide for details. - -- name: Start a refresh - community.aws.autoscaling_instance_refresh: - name: some-asg - state: started - -- name: Cancel a refresh - community.aws.autoscaling_instance_refresh: - name: some-asg - state: cancelled - -- name: Start a refresh and pass preferences - community.aws.autoscaling_instance_refresh: - name: some-asg - state: started - preferences: - min_healthy_percentage: 91 - instance_warmup: 60 -""" - -RETURN = r""" ---- -instance_refresh_id: - description: instance refresh id - returned: success - type: str - sample: "08b91cf7-8fa6-48af-b6a6-d227f40f1b9b" -auto_scaling_group_name: - description: Name of autoscaling group - returned: success - type: str - sample: "public-webapp-production-1" -status: - description: - - The current state of the group when DeleteAutoScalingGroup is in progress. - - The following are the possible statuses - - Pending -- The request was created, but the operation has not started. - - InProgress -- The operation is in progress. - - Successful -- The operation completed successfully. - - Failed -- The operation failed to complete. You can troubleshoot using the status reason and the scaling activities. - - Cancelling -- - - An ongoing operation is being cancelled. - - Cancellation does not roll back any replacements that have already been completed, - - but it prevents new replacements from being started. - - Cancelled -- The operation is cancelled. - returned: success - type: str - sample: "Pending" -start_time: - description: The date and time this ASG was created, in ISO 8601 format. - returned: success - type: str - sample: "2015-11-25T00:05:36.309Z" -end_time: - description: The date and time this ASG was created, in ISO 8601 format. - returned: success - type: str - sample: "2015-11-25T00:05:36.309Z" -percentage_complete: - description: the % of completeness - returned: success - type: int - sample: 100 -instances_to_update: - description: num. of instance to update - returned: success - type: int - sample: 5 -""" - -try: - from botocore.exceptions import BotoCoreError - from botocore.exceptions import ClientError -except ImportError: - pass # caught by AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict -from ansible.module_utils.common.dict_transformations import snake_dict_to_camel_dict - -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.transformation import scrub_none_parameters - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -def start_or_cancel_instance_refresh(conn, module): - """ - Args: - conn (boto3.AutoScaling.Client): Valid Boto3 ASG client. - module: AnsibleAWSModule object - - Returns: - { - "instance_refreshes": [ - { - 'auto_scaling_group_name': 'ansible-test-hermes-63642726-asg', - 'instance_refresh_id': '6507a3e5-4950-4503-8978-e9f2636efc09', - 'instances_to_update': 1, - 'percentage_complete': 0, - "preferences": { - "instance_warmup": 60, - "min_healthy_percentage": 90, - "skip_matching": false - }, - 'start_time': '2021-02-04T03:39:40+00:00', - 'status': 'Cancelling', - 'status_reason': 'Replacing instances before cancelling.', - } - ] - } - """ - - asg_state = module.params.get("state") - asg_name = module.params.get("name") - preferences = module.params.get("preferences") - - args = {} - args["AutoScalingGroupName"] = asg_name - if asg_state == "started": - args["Strategy"] = module.params.get("strategy") - if preferences: - if asg_state == "cancelled": - module.fail_json(msg="can not pass preferences dict when canceling a refresh") - _prefs = scrub_none_parameters(preferences) - args["Preferences"] = snake_dict_to_camel_dict(_prefs, capitalize_first=True) - cmd_invocations = { - "cancelled": conn.cancel_instance_refresh, - "started": conn.start_instance_refresh, - } - try: - if module.check_mode: - if asg_state == "started": - ongoing_refresh = conn.describe_instance_refreshes(AutoScalingGroupName=asg_name).get( - "InstanceRefreshes", "[]" - ) - if ongoing_refresh: - module.exit_json( - changed=False, - msg="In check_mode - Instance Refresh is already in progress, can not start new instance refresh.", - ) - else: - module.exit_json(changed=True, msg="Would have started instance refresh if not in check mode.") - elif asg_state == "cancelled": - ongoing_refresh = conn.describe_instance_refreshes(AutoScalingGroupName=asg_name).get( - "InstanceRefreshes", "[]" - )[0] - if ongoing_refresh.get("Status", "") in ["Cancelling", "Cancelled"]: - module.exit_json( - changed=False, - msg="In check_mode - Instance Refresh already cancelled or is pending cancellation.", - ) - elif not ongoing_refresh: - module.exit_json(chaned=False, msg="In check_mode - No active referesh found, nothing to cancel.") - else: - module.exit_json(changed=True, msg="Would have cancelled instance refresh if not in check mode.") - result = cmd_invocations[asg_state](aws_retry=True, **args) - instance_refreshes = conn.describe_instance_refreshes( - AutoScalingGroupName=asg_name, InstanceRefreshIds=[result["InstanceRefreshId"]] - ) - result = dict(instance_refreshes=camel_dict_to_snake_dict(instance_refreshes["InstanceRefreshes"][0])) - return module.exit_json(**result) - except (BotoCoreError, ClientError) as e: - module.fail_json_aws(e, msg=f"Failed to {asg_state.replace('ed', '')} InstanceRefresh") - - -def main(): - argument_spec = dict( - state=dict( - type="str", - required=True, - choices=["started", "cancelled"], - ), - name=dict(required=True), - strategy=dict(type="str", default="Rolling", required=False), - preferences=dict( - type="dict", - required=False, - options=dict( - min_healthy_percentage=dict(type="int", default=90), - instance_warmup=dict(type="int"), - ), - ), - ) - - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - ) - autoscaling = module.client( - "autoscaling", - retry_decorator=AWSRetry.jittered_backoff(retries=10, catch_extra_error_codes=["InstanceRefreshInProgress"]), - ) - - start_or_cancel_instance_refresh(autoscaling, module) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/autoscaling_instance_refresh_info.py b/plugins/modules/autoscaling_instance_refresh_info.py deleted file mode 100644 index 639940b1b77..00000000000 --- a/plugins/modules/autoscaling_instance_refresh_info.py +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: autoscaling_instance_refresh_info -version_added: 3.2.0 -short_description: Gather information about EC2 Auto Scaling Group (ASG) Instance Refreshes in AWS -description: - - Describes one or more instance refreshes. - - You can determine the status of a request by looking at the I(status) parameter. - - Prior to release 5.0.0 this module was called C(community.aws.ec2_asg_instance_refresh_info). - The usage did not change. -author: - - "Dan Khersonsky (@danquixote)" -options: - name: - description: - - The name of the Auto Scaling group. - type: str - required: true - ids: - description: - - One or more instance refresh IDs. - type: list - elements: str - default: [] - next_token: - description: - - The token for the next set of items to return. (You received this token from a previous call.) - type: str - max_records: - description: - - The maximum number of items to return with this call. The default value is 50 and the maximum value is 100. - type: int - required: false -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Note: These examples do not set authentication details, see the AWS Guide for details. - -- name: Find an refresh by ASG name - community.aws.autoscaling_instance_refresh_info: - name: somename-asg - -- name: Find an refresh by ASG name and one or more refresh-IDs - community.aws.autoscaling_instance_refresh_info: - name: somename-asg - ids: ['some-id-123'] - register: asgs - -- name: Find an refresh by ASG name and set max_records - community.aws.autoscaling_instance_refresh_info: - name: somename-asg - max_records: 4 - register: asgs - -- name: Find an refresh by ASG name and NextToken, if received from a previous call - community.aws.autoscaling_instance_refresh_info: - name: somename-asg - next_token: 'some-token-123' - register: asgs -""" - -RETURN = r""" ---- -instance_refresh_id: - description: instance refresh id - returned: success - type: str - sample: "08b91cf7-8fa6-48af-b6a6-d227f40f1b9b" -auto_scaling_group_name: - description: Name of autoscaling group - returned: success - type: str - sample: "public-webapp-production-1" -status: - description: - - The current state of the group when DeleteAutoScalingGroup is in progress. - - The following are the possible statuses - - C(Pending) - The request was created, but the operation has not started. - - C(InProgress) - The operation is in progress. - - C(Successful) - The operation completed successfully. - - C(Failed) - The operation failed to complete. - You can troubleshoot using the status reason and the scaling activities. - - C(Cancelling) - An ongoing operation is being cancelled. - Cancellation does not roll back any replacements that have already been - completed, but it prevents new replacements from being started. - - C(Cancelled) - The operation is cancelled.' - returned: success - type: str - sample: "Pending" -start_time: - description: The date and time this ASG was created, in ISO 8601 format. - returned: success - type: str - sample: "2015-11-25T00:05:36.309Z" -end_time: - description: The date and time this ASG was created, in ISO 8601 format. - returned: success - type: str - sample: "2015-11-25T00:05:36.309Z" -percentage_complete: - description: the % of completeness - returned: success - type: int - sample: 100 -instances_to_update: - description: num. of instance to update - returned: success - type: int - sample: 5 -""" - -try: - from botocore.exceptions import BotoCoreError - from botocore.exceptions import ClientError -except ImportError: - pass # caught by AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -def find_asg_instance_refreshes(conn, module): - """ - Args: - conn (boto3.AutoScaling.Client): Valid Boto3 ASG client. - module: AnsibleAWSModule object - - Returns: - { - "instance_refreshes": [ - { - 'auto_scaling_group_name': 'ansible-test-hermes-63642726-asg', - 'instance_refresh_id': '6507a3e5-4950-4503-8978-e9f2636efc09', - 'instances_to_update': 1, - 'percentage_complete': 0, - "preferences": { - "instance_warmup": 60, - "min_healthy_percentage": 90, - "skip_matching": false - }, - 'start_time': '2021-02-04T03:39:40+00:00', - 'status': 'Cancelled', - 'status_reason': 'Cancelled due to user request.', - } - ], - 'next_token': 'string' - } - """ - - asg_name = module.params.get("name") - asg_ids = module.params.get("ids") - asg_next_token = module.params.get("next_token") - asg_max_records = module.params.get("max_records") - - args = {} - args["AutoScalingGroupName"] = asg_name - if asg_ids: - args["InstanceRefreshIds"] = asg_ids - if asg_next_token: - args["NextToken"] = asg_next_token - if asg_max_records: - args["MaxRecords"] = asg_max_records - - try: - instance_refreshes_result = {} - response = conn.describe_instance_refreshes(**args) - if "InstanceRefreshes" in response: - instance_refreshes_dict = dict( - instance_refreshes=response["InstanceRefreshes"], next_token=response.get("next_token", "") - ) - instance_refreshes_result = camel_dict_to_snake_dict(instance_refreshes_dict) - - while "NextToken" in response: - args["NextToken"] = response["NextToken"] - response = conn.describe_instance_refreshes(**args) - if "InstanceRefreshes" in response: - instance_refreshes_dict = camel_dict_to_snake_dict( - dict(instance_refreshes=response["InstanceRefreshes"], next_token=response.get("next_token", "")) - ) - instance_refreshes_result.update(instance_refreshes_dict) - - return module.exit_json(**instance_refreshes_result) - except (BotoCoreError, ClientError) as e: - module.fail_json_aws(e, msg="Failed to describe InstanceRefreshes") - - -def main(): - argument_spec = dict( - name=dict(required=True, type="str"), - ids=dict(required=False, default=[], elements="str", type="list"), - next_token=dict(required=False, default=None, type="str", no_log=True), - max_records=dict(required=False, type="int"), - ) - - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - ) - - autoscaling = module.client("autoscaling", retry_decorator=AWSRetry.jittered_backoff(retries=10)) - find_asg_instance_refreshes(autoscaling, module) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_launch_template.py b/plugins/modules/ec2_launch_template.py deleted file mode 100644 index 9fd32711f91..00000000000 --- a/plugins/modules/ec2_launch_template.py +++ /dev/null @@ -1,844 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright (c) 2018 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: ec2_launch_template -version_added: 1.0.0 -short_description: Manage EC2 launch templates -description: -- Create, modify, and delete EC2 Launch Templates, which can be used to - create individual instances or with Autoscaling Groups. -- The M(amazon.aws.ec2_instance) and M(community.aws.autoscaling_group) modules can, instead of specifying all - parameters on those tasks, be passed a Launch Template which contains - settings like instance size, disk type, subnet, and more. -author: -- Ryan Scott Brown (@ryansb) -options: - template_id: - description: - - The ID for the launch template, can be used for all cases except creating a new Launch Template. - aliases: [id] - type: str - template_name: - description: - - The template name. This must be unique in the region-account combination you are using. - - If no launch template exists with the specified name, a new launch template is created. - - If a launch template with the specified name already exists and the configuration has not changed, - nothing happens. - - If a launch template with the specified name already exists and the configuration has changed, - a new version of the launch template is created. - aliases: [name] - type: str - default_version: - description: - - Which version should be the default when users spin up new instances based on this template? By default, the latest version will be made the default. - type: str - default: latest - version_description: - version_added: 5.5.0 - description: - - The description of a launch template version. - default: "" - type: str - state: - description: - - Whether the launch template should exist or not. - - Deleting specific versions of a launch template is not supported at this time. - choices: [present, absent] - default: present - type: str - block_device_mappings: - description: - - The block device mapping. Supplying both a snapshot ID and an encryption - value as arguments for block-device mapping results in an error. This is - because only blank volumes can be encrypted on start, and these are not - created from a snapshot. If a snapshot is the basis for the volume, it - contains data by definition and its encryption status cannot be changed - using this action. - type: list - elements: dict - suboptions: - device_name: - description: The device name (for example, /dev/sdh or xvdh). - type: str - no_device: - description: Suppresses the specified device included in the block device mapping of the AMI. - type: str - virtual_name: - description: > - The virtual device name (ephemeralN). Instance store volumes are - numbered starting from 0. An instance type with 2 available instance - store volumes can specify mappings for ephemeral0 and ephemeral1. The - number of available instance store volumes depends on the instance - type. After you connect to the instance, you must mount the volume. - type: str - ebs: - description: Parameters used to automatically set up EBS volumes when the instance is launched. - type: dict - suboptions: - delete_on_termination: - description: Indicates whether the EBS volume is deleted on instance termination. - type: bool - encrypted: - description: > - Indicates whether the EBS volume is encrypted. Encrypted volumes - can only be attached to instances that support Amazon EBS - encryption. If you are creating a volume from a snapshot, you - can't specify an encryption value. - type: bool - iops: - description: - - The number of I/O operations per second (IOPS) that the volume - supports. For io1, this represents the number of IOPS that are - provisioned for the volume. For gp2, this represents the baseline - performance of the volume and the rate at which the volume - accumulates I/O credits for bursting. For more information about - General Purpose SSD baseline performance, I/O credits, and - bursting, see Amazon EBS Volume Types in the Amazon Elastic - Compute Cloud User Guide. - - > - Condition: This parameter is required for requests to create io1 - volumes; it is not used in requests to create gp2, st1, sc1, or - standard volumes. - type: int - kms_key_id: - description: The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption. - type: str - snapshot_id: - description: The ID of the snapshot to create the volume from. - type: str - volume_size: - description: - - The size of the volume, in GiB. - - "Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size." - type: int - volume_type: - description: The volume type - type: str - cpu_options: - description: - - Choose CPU settings for the EC2 instances that will be created with this template. - - For more information, see U(http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) - type: dict - suboptions: - core_count: - description: The number of CPU cores for the instance. - type: int - threads_per_core: - description: > - The number of threads per CPU core. To disable Intel Hyper-Threading - Technology for the instance, specify a value of 1. Otherwise, specify - the default value of 2. - type: int - credit_specification: - description: The credit option for CPU usage of the instance. Valid for T2 or T3 instances only. - type: dict - suboptions: - cpu_credits: - description: > - The credit option for CPU usage of a T2 or T3 instance. Valid values - are C(standard) and C(unlimited). - type: str - disable_api_termination: - description: > - This helps protect instances from accidental termination. If set to true, - you can't terminate the instance using the Amazon EC2 console, CLI, or - API. To change this attribute to false after launch, use - I(ModifyInstanceAttribute). - type: bool - ebs_optimized: - description: > - Indicates whether the instance is optimized for Amazon EBS I/O. This - optimization provides dedicated throughput to Amazon EBS and an optimized - configuration stack to provide optimal Amazon EBS I/O performance. This - optimization isn't available with all instance types. Additional usage - charges apply when using an EBS-optimized instance. - type: bool - elastic_gpu_specifications: - type: list - elements: dict - description: Settings for Elastic GPU attachments. See U(https://aws.amazon.com/ec2/elastic-gpus/) for details. - suboptions: - type: - description: The type of Elastic GPU to attach - type: str - iam_instance_profile: - description: > - The name or ARN of an IAM instance profile. Requires permissions to - describe existing instance roles to confirm ARN is properly formed. - type: str - image_id: - description: > - The AMI ID to use for new instances launched with this template. This - value is region-dependent since AMIs are not global resources. - type: str - instance_initiated_shutdown_behavior: - description: > - Indicates whether an instance stops or terminates when you initiate - shutdown from the instance using the operating system shutdown command. - choices: [stop, terminate] - type: str - instance_market_options: - description: Options for alternative instance markets, currently only the spot market is supported. - type: dict - suboptions: - market_type: - description: The market type. This should always be 'spot'. - type: str - spot_options: - description: Spot-market specific settings. - type: dict - suboptions: - block_duration_minutes: - description: > - The required duration for the Spot Instances (also known as Spot - blocks), in minutes. This value must be a multiple of 60 (60, - 120, 180, 240, 300, or 360). - type: int - instance_interruption_behavior: - description: The behavior when a Spot Instance is interrupted. The default is C(terminate). - choices: [hibernate, stop, terminate] - type: str - max_price: - description: The highest hourly price you're willing to pay for this Spot Instance. - type: str - spot_instance_type: - description: The request type to send. - choices: [one-time, persistent] - type: str - instance_type: - description: > - The instance type, such as C(c5.2xlarge). For a full list of instance types, see - U(http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). - type: str - kernel_id: - description: > - The ID of the kernel. We recommend that you use PV-GRUB instead of - kernels and RAM disks. For more information, see - U(http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - type: str - key_name: - description: - - The name of the key pair. You can create a key pair using M(amazon.aws.ec2_key). - - If you do not specify a key pair, you can't connect to the instance - unless you choose an AMI that is configured to allow users another way to - log in. - type: str - monitoring: - description: Settings for instance monitoring. - type: dict - suboptions: - enabled: - type: bool - description: Whether to turn on detailed monitoring for new instances. This will incur extra charges. - network_interfaces: - description: One or more network interfaces. - type: list - elements: dict - suboptions: - associate_public_ip_address: - description: Associates a public IPv4 address with eth0 for a new network interface. - type: bool - delete_on_termination: - description: Indicates whether the network interface is deleted when the instance is terminated. - type: bool - description: - description: A description for the network interface. - type: str - device_index: - description: The device index for the network interface attachment. - type: int - groups: - description: List of security group IDs to include on this instance. - type: list - elements: str - ipv6_address_count: - description: > - The number of IPv6 addresses to assign to a network interface. Amazon - EC2 automatically selects the IPv6 addresses from the subnet range. - You can't use this option if specifying the I(ipv6_addresses) option. - type: int - ipv6_addresses: - description: > - A list of one or more specific IPv6 addresses from the IPv6 CIDR - block range of your subnet. You can't use this option if you're - specifying the I(ipv6_address_count) option. - type: list - elements: str - network_interface_id: - description: The eni ID of a network interface to attach. - type: str - private_ip_address: - description: The primary private IPv4 address of the network interface. - type: str - subnet_id: - description: The ID of the subnet for the network interface. - type: str - placement: - description: The placement group settings for the instance. - type: dict - suboptions: - affinity: - description: The affinity setting for an instance on a Dedicated Host. - type: str - availability_zone: - description: The Availability Zone for the instance. - type: str - group_name: - description: The name of the placement group for the instance. - type: str - host_id: - description: The ID of the Dedicated Host for the instance. - type: str - tenancy: - description: > - The tenancy of the instance (if the instance is running in a VPC). An - instance with a tenancy of dedicated runs on single-tenant hardware. - type: str - ram_disk_id: - description: > - The ID of the RAM disk to launch the instance with. We recommend that you - use PV-GRUB instead of kernels and RAM disks. For more information, see - U(http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - type: str - security_group_ids: - description: A list of security group IDs (VPC or EC2-Classic) that the new instances will be added to. - type: list - elements: str - security_groups: - description: > - A list of security group names (Default VPC or EC2-Classic) that the new instances will be added to. - For any VPC other than Default, you must use I(security_group_ids). - type: list - elements: str - source_version: - description: > - The version number of the launch template version on which to base the new version. - The new version inherits the same launch parameters as the source version, except for parameters that you explicity specify. - Snapshots applied to the block device mapping are ignored when creating a new version unless they are explicitly included. - type: str - default: latest - version_added: 4.1.0 - tags: - type: dict - description: - - A set of key-value pairs to be applied to resources when this Launch Template is used. - - "Tag key constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with I(aws:)" - - "Tag value constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters." - aliases: ['resource_tags'] - user_data: - description: > - The Base64-encoded user data to make available to the instance. For more information, see the Linux - U(http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) and Windows - U(http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) - documentation on user-data. - type: str - metadata_options: - description: - - Configure EC2 Metadata options. - - For more information see the IMDS documentation - U(https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html). - type: dict - version_added: 1.5.0 - suboptions: - http_endpoint: - type: str - description: > - This parameter enables or disables the HTTP metadata endpoint on your instances. - choices: [enabled, disabled] - default: 'enabled' - http_put_response_hop_limit: - type: int - description: > - The desired HTTP PUT response hop limit for instance metadata requests. - The larger the number, the further instance metadata requests can travel. - default: 1 - http_tokens: - type: str - description: > - The state of token usage for your instance metadata requests. - choices: [optional, required] - default: 'optional' - http_protocol_ipv6: - version_added: 3.1.0 - type: str - description: > - - Wether the instance metadata endpoint is available via IPv6 (C(enabled)) or not (C(disabled)). - choices: [enabled, disabled] - default: 'disabled' - instance_metadata_tags: - version_added: 3.1.0 - type: str - description: - - Wether the instance tags are availble (C(enabled)) via metadata endpoint or not (C(disabled)). - choices: [enabled, disabled] - default: 'disabled' -extends_documentation_fragment: -- amazon.aws.common.modules -- amazon.aws.region.modules -- amazon.aws.boto3 -""" - -EXAMPLES = r""" -- name: Create an ec2 launch template - community.aws.ec2_launch_template: - name: "my_template" - image_id: "ami-04b762b4289fba92b" - key_name: my_ssh_key - instance_type: t2.micro - iam_instance_profile: myTestProfile - disable_api_termination: true - -- name: > - Create a new version of an existing ec2 launch template with a different instance type, - while leaving an older version as the default version - community.aws.ec2_launch_template: - name: "my_template" - default_version: 1 - instance_type: c5.4xlarge - -- name: Delete an ec2 launch template - community.aws.ec2_launch_template: - name: "my_template" - state: absent - -# This module does not yet allow deletion of specific versions of launch templates -""" - -RETURN = r""" -latest_version: - description: Latest available version of the launch template - returned: when state=present - type: int -default_version: - description: The version that will be used if only the template name is specified. Often this is the same as the latest version, but not always. - returned: when state=present - type: int -""" - -from uuid import uuid4 - -try: - from botocore.exceptions import BotoCoreError - from botocore.exceptions import ClientError - from botocore.exceptions import WaiterError -except ImportError: - pass # caught by AnsibleAWSModule - -from ansible.module_utils._text import to_text -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict -from ansible.module_utils.common.dict_transformations import snake_dict_to_camel_dict - -from ansible_collections.amazon.aws.plugins.module_utils.arn import validate_aws_arn -from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.tagging import ansible_dict_to_boto3_tag_list -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.transformation import scrub_none_parameters - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -def determine_iam_role(module, name_or_arn): - if validate_aws_arn(name_or_arn, service="iam", resource_type="instance-profile"): - return {"arn": name_or_arn} - iam = module.client("iam", retry_decorator=AWSRetry.jittered_backoff()) - try: - role = iam.get_instance_profile(InstanceProfileName=name_or_arn, aws_retry=True) - return {"arn": role["InstanceProfile"]["Arn"]} - except is_boto3_error_code("NoSuchEntity") as e: - module.fail_json_aws(e, msg=f"Could not find instance_role {name_or_arn}") - except (BotoCoreError, ClientError) as e: # pylint: disable=duplicate-except - module.fail_json_aws( - e, - msg=f"An error occurred while searching for instance_role {name_or_arn}. Please try supplying the full ARN.", - ) - - -def existing_templates(module): - ec2 = module.client("ec2", retry_decorator=AWSRetry.jittered_backoff()) - matches = None - try: - if module.params.get("template_id"): - matches = ec2.describe_launch_templates( - LaunchTemplateIds=[module.params.get("template_id")], aws_retry=True - ) - elif module.params.get("template_name"): - matches = ec2.describe_launch_templates( - LaunchTemplateNames=[module.params.get("template_name")], aws_retry=True - ) - except is_boto3_error_code("InvalidLaunchTemplateName.NotFoundException") as e: - # no named template was found, return nothing/empty versions - return None, [] - except is_boto3_error_code("InvalidLaunchTemplateId.Malformed") as e: # pylint: disable=duplicate-except - module.fail_json_aws( - e, - msg=( - f"Launch template with ID {module.params.get('launch_template_id')} is not a valid ID. It should start" - " with `lt-....`" - ), - ) - except is_boto3_error_code("InvalidLaunchTemplateId.NotFoundException") as e: # pylint: disable=duplicate-except - module.fail_json_aws( - e, - msg=( - f"Launch template with ID {module.params.get('launch_template_id')} could not be found, please supply a" - " name instead so that a new template can be created" - ), - ) - except (ClientError, BotoCoreError, WaiterError) as e: # pylint: disable=duplicate-except - module.fail_json_aws(e, msg="Could not check existing launch templates. This may be an IAM permission problem.") - else: - template = matches["LaunchTemplates"][0] - template_id, template_version, template_default = ( - template["LaunchTemplateId"], - template["LatestVersionNumber"], - template["DefaultVersionNumber"], - ) - try: - return ( - template, - ec2.describe_launch_template_versions(LaunchTemplateId=template_id, aws_retry=True)[ - "LaunchTemplateVersions" - ], - ) - except (ClientError, BotoCoreError, WaiterError) as e: - module.fail_json_aws( - e, - msg=f"Could not find launch template versions for {template['LaunchTemplateName']} (ID: {template_id}).", - ) - - -def params_to_launch_data(module, template_params): - if template_params.get("tags"): - tag_list = ansible_dict_to_boto3_tag_list(template_params.get("tags")) - template_params["tag_specifications"] = [ - {"resource_type": r_type, "tags": tag_list} for r_type in ("instance", "volume") - ] - del template_params["tags"] - if module.params.get("iam_instance_profile"): - template_params["iam_instance_profile"] = determine_iam_role(module, module.params["iam_instance_profile"]) - params = snake_dict_to_camel_dict( - dict((k, v) for k, v in template_params.items() if v is not None), - capitalize_first=True, - ) - return params - - -def delete_template(module): - ec2 = module.client("ec2", retry_decorator=AWSRetry.jittered_backoff()) - template, template_versions = existing_templates(module) - deleted_versions = [] - if template or template_versions: - non_default_versions = [to_text(t["VersionNumber"]) for t in template_versions if not t["DefaultVersion"]] - if non_default_versions: - try: - v_resp = ec2.delete_launch_template_versions( - LaunchTemplateId=template["LaunchTemplateId"], - Versions=non_default_versions, - aws_retry=True, - ) - if v_resp["UnsuccessfullyDeletedLaunchTemplateVersions"]: - module.warn( - f"Failed to delete template versions {v_resp['UnsuccessfullyDeletedLaunchTemplateVersions']} on" - f" launch template {template['LaunchTemplateId']}" - ) - deleted_versions = [ - camel_dict_to_snake_dict(v) for v in v_resp["SuccessfullyDeletedLaunchTemplateVersions"] - ] - except (ClientError, BotoCoreError) as e: - module.fail_json_aws( - e, - msg=f"Could not delete existing versions of the launch template {template['LaunchTemplateId']}", - ) - try: - resp = ec2.delete_launch_template( - LaunchTemplateId=template["LaunchTemplateId"], - aws_retry=True, - ) - except (ClientError, BotoCoreError) as e: - module.fail_json_aws(e, msg=f"Could not delete launch template {template['LaunchTemplateId']}") - return { - "deleted_versions": deleted_versions, - "deleted_template": camel_dict_to_snake_dict(resp["LaunchTemplate"]), - "changed": True, - } - else: - return {"changed": False} - - -def create_or_update(module, template_options): - ec2 = module.client( - "ec2", retry_decorator=AWSRetry.jittered_backoff(catch_extra_error_codes=["InvalidLaunchTemplateId.NotFound"]) - ) - template, template_versions = existing_templates(module) - out = {} - lt_data = params_to_launch_data(module, dict((k, v) for k, v in module.params.items() if k in template_options)) - lt_data = scrub_none_parameters(lt_data, descend_into_lists=True) - - if not (template or template_versions): - # create a full new one - try: - resp = ec2.create_launch_template( - LaunchTemplateName=module.params["template_name"], - LaunchTemplateData=lt_data, - ClientToken=uuid4().hex, - aws_retry=True, - ) - except (ClientError, BotoCoreError) as e: - module.fail_json_aws(e, msg="Couldn't create launch template") - template, template_versions = existing_templates(module) - out["changed"] = True - elif template and template_versions: - most_recent = sorted(template_versions, key=lambda x: x["VersionNumber"])[-1] - if lt_data == most_recent["LaunchTemplateData"] and module.params["version_description"] == most_recent.get( - "VersionDescription", "" - ): - out["changed"] = False - return out - try: - if module.params.get("source_version") in (None, ""): - resp = ec2.create_launch_template_version( - LaunchTemplateId=template["LaunchTemplateId"], - LaunchTemplateData=lt_data, - ClientToken=uuid4().hex, - VersionDescription=str(module.params["version_description"]), - aws_retry=True, - ) - elif module.params.get("source_version") == "latest": - resp = ec2.create_launch_template_version( - LaunchTemplateId=template["LaunchTemplateId"], - LaunchTemplateData=lt_data, - ClientToken=uuid4().hex, - SourceVersion=str(most_recent["VersionNumber"]), - VersionDescription=str(module.params["version_description"]), - aws_retry=True, - ) - else: - try: - int(module.params.get("source_version")) - except ValueError: - module.fail_json( - msg=f"source_version param was not a valid integer, got \"{module.params.get('source_version')}\"" - ) - # get source template version - source_version = next( - (v for v in template_versions if v["VersionNumber"] == int(module.params.get("source_version"))), - None, - ) - if source_version is None: - module.fail_json( - msg=f"source_version does not exist, got \"{module.params.get('source_version')}\"" - ) - resp = ec2.create_launch_template_version( - LaunchTemplateId=template["LaunchTemplateId"], - LaunchTemplateData=lt_data, - ClientToken=uuid4().hex, - SourceVersion=str(source_version["VersionNumber"]), - VersionDescription=str(module.params["version_description"]), - aws_retry=True, - ) - - if module.params.get("default_version") in (None, ""): - # no need to do anything, leave the existing version as default - pass - elif module.params.get("default_version") == "latest": - set_default = ec2.modify_launch_template( - LaunchTemplateId=template["LaunchTemplateId"], - DefaultVersion=to_text(resp["LaunchTemplateVersion"]["VersionNumber"]), - ClientToken=uuid4().hex, - aws_retry=True, - ) - else: - try: - int(module.params.get("default_version")) - except ValueError: - module.fail_json( - msg=f"default_version param was not a valid integer, got \"{module.params.get('default_version')}\"" - ) - set_default = ec2.modify_launch_template( - LaunchTemplateId=template["LaunchTemplateId"], - DefaultVersion=to_text(int(module.params.get("default_version"))), - ClientToken=uuid4().hex, - aws_retry=True, - ) - except (ClientError, BotoCoreError) as e: - module.fail_json_aws(e, msg="Couldn't create subsequent launch template version") - template, template_versions = existing_templates(module) - out["changed"] = True - return out - - -def format_module_output(module): - output = {} - template, template_versions = existing_templates(module) - template = camel_dict_to_snake_dict(template) - template_versions = [camel_dict_to_snake_dict(v) for v in template_versions] - for v in template_versions: - for ts in v["launch_template_data"].get("tag_specifications") or []: - ts["tags"] = boto3_tag_list_to_ansible_dict(ts.pop("tags")) - output.update(dict(template=template, versions=template_versions)) - output["default_template"] = [v for v in template_versions if v.get("default_version")][0] - output["latest_template"] = [ - v - for v in template_versions - if (v.get("version_number") and int(v["version_number"]) == int(template["latest_version_number"])) - ][0] - if "version_number" in output["default_template"]: - output["default_version"] = output["default_template"]["version_number"] - if "version_number" in output["latest_template"]: - output["latest_version"] = output["latest_template"]["version_number"] - return output - - -def main(): - template_options = dict( - block_device_mappings=dict( - type="list", - elements="dict", - options=dict( - device_name=dict(), - ebs=dict( - type="dict", - options=dict( - delete_on_termination=dict(type="bool"), - encrypted=dict(type="bool"), - iops=dict(type="int"), - kms_key_id=dict(), - snapshot_id=dict(), - volume_size=dict(type="int"), - volume_type=dict(), - ), - ), - no_device=dict(), - virtual_name=dict(), - ), - ), - cpu_options=dict( - type="dict", - options=dict( - core_count=dict(type="int"), - threads_per_core=dict(type="int"), - ), - ), - credit_specification=dict( - dict(type="dict"), - options=dict( - cpu_credits=dict(), - ), - ), - disable_api_termination=dict(type="bool"), - ebs_optimized=dict(type="bool"), - elastic_gpu_specifications=dict( - options=dict(type=dict()), - type="list", - elements="dict", - ), - iam_instance_profile=dict(), - image_id=dict(), - instance_initiated_shutdown_behavior=dict(choices=["stop", "terminate"]), - instance_market_options=dict( - type="dict", - options=dict( - market_type=dict(), - spot_options=dict( - type="dict", - options=dict( - block_duration_minutes=dict(type="int"), - instance_interruption_behavior=dict(choices=["hibernate", "stop", "terminate"]), - max_price=dict(), - spot_instance_type=dict(choices=["one-time", "persistent"]), - ), - ), - ), - ), - instance_type=dict(), - kernel_id=dict(), - key_name=dict(), - monitoring=dict( - type="dict", - options=dict(enabled=dict(type="bool")), - ), - metadata_options=dict( - type="dict", - options=dict( - http_endpoint=dict(choices=["enabled", "disabled"], default="enabled"), - http_put_response_hop_limit=dict(type="int", default=1), - http_tokens=dict(choices=["optional", "required"], default="optional"), - http_protocol_ipv6=dict(choices=["disabled", "enabled"], default="disabled"), - instance_metadata_tags=dict(choices=["disabled", "enabled"], default="disabled"), - ), - ), - network_interfaces=dict( - type="list", - elements="dict", - options=dict( - associate_public_ip_address=dict(type="bool"), - delete_on_termination=dict(type="bool"), - description=dict(), - device_index=dict(type="int"), - groups=dict(type="list", elements="str"), - ipv6_address_count=dict(type="int"), - ipv6_addresses=dict(type="list", elements="str"), - network_interface_id=dict(), - private_ip_address=dict(), - subnet_id=dict(), - ), - ), - placement=dict( - options=dict( - affinity=dict(), - availability_zone=dict(), - group_name=dict(), - host_id=dict(), - tenancy=dict(), - ), - type="dict", - ), - ram_disk_id=dict(), - security_group_ids=dict(type="list", elements="str"), - security_groups=dict(type="list", elements="str"), - tags=dict(type="dict", aliases=["resource_tags"]), - user_data=dict(), - ) - - arg_spec = dict( - state=dict(choices=["present", "absent"], default="present"), - template_name=dict(aliases=["name"]), - template_id=dict(aliases=["id"]), - default_version=dict(default="latest"), - source_version=dict(default="latest"), - version_description=dict(default=""), - ) - - arg_spec.update(template_options) - - module = AnsibleAWSModule( - argument_spec=arg_spec, - required_one_of=[ - ("template_name", "template_id"), - ], - supports_check_mode=True, - ) - - for interface in module.params.get("network_interfaces") or []: - if interface.get("ipv6_addresses"): - interface["ipv6_addresses"] = [{"ipv6_address": x} for x in interface["ipv6_addresses"]] - - if module.params.get("state") == "present": - out = create_or_update(module, template_options) - out.update(format_module_output(module)) - elif module.params.get("state") == "absent": - out = delete_template(module) - else: - module.fail_json(msg=f"Unsupported value \"{module.params.get('state')}\" for `state` parameter") - - module.exit_json(**out) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_placement_group.py b/plugins/modules/ec2_placement_group.py deleted file mode 100644 index 3cdb5be219e..00000000000 --- a/plugins/modules/ec2_placement_group.py +++ /dev/null @@ -1,232 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: ec2_placement_group -version_added: 1.0.0 -short_description: Create or delete an EC2 Placement Group -description: - - Create an EC2 Placement Group; if the placement group already exists, - nothing is done. Or, delete an existing placement group. If the placement - group is absent, do nothing. See also - U(https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -author: - - "Brad Macpherson (@iiibrad)" -options: - name: - description: - - The name for the placement group. - required: true - type: str - partition_count: - description: - - The number of partitions. - - Valid only when I(Strategy) is set to C(partition). - - Must be a value between C(1) and C(7). - type: int - version_added: 3.1.0 - state: - description: - - Create or delete placement group. - default: present - choices: [ 'present', 'absent' ] - type: str - strategy: - description: - - Placement group strategy. Cluster will cluster instances into a - low-latency group in a single Availability Zone, while Spread spreads - instances across underlying hardware. - default: cluster - choices: [ 'cluster', 'spread', 'partition' ] - type: str -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Note: These examples do not set authentication details, see the AWS Guide -# for details. - -- name: Create a placement group. - community.aws.ec2_placement_group: - name: my-cluster - state: present - -- name: Create a Spread placement group. - community.aws.ec2_placement_group: - name: my-cluster - state: present - strategy: spread - -- name: Create a Partition strategy placement group. - community.aws.ec2_placement_group: - name: my-cluster - state: present - strategy: partition - partition_count: 3 - -- name: Delete a placement group. - community.aws.ec2_placement_group: - name: my-cluster - state: absent -""" - -RETURN = r""" -placement_group: - description: Placement group attributes - returned: when state != absent - type: complex - contains: - name: - description: PG name - type: str - sample: my-cluster - state: - description: PG state - type: str - sample: "available" - strategy: - description: PG strategy - type: str - sample: "cluster" -""" - -try: - import botocore -except ImportError: - pass # caught by AnsibleAWSModule - -from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -@AWSRetry.exponential_backoff() -def search_placement_group(connection, module): - """ - Check if a placement group exists. - """ - name = module.params.get("name") - try: - response = connection.describe_placement_groups(Filters=[{"Name": "group-name", "Values": [name]}]) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg=f"Couldn't find placement group named [{name}]") - - if len(response["PlacementGroups"]) != 1: - return None - else: - placement_group = response["PlacementGroups"][0] - return { - "name": placement_group["GroupName"], - "state": placement_group["State"], - "strategy": placement_group["Strategy"], - } - - -@AWSRetry.exponential_backoff(catch_extra_error_codes=["InvalidPlacementGroup.Unknown"]) -def get_placement_group_information(connection, name): - """ - Retrieve information about a placement group. - """ - response = connection.describe_placement_groups(GroupNames=[name]) - placement_group = response["PlacementGroups"][0] - return { - "name": placement_group["GroupName"], - "state": placement_group["State"], - "strategy": placement_group["Strategy"], - } - - -@AWSRetry.exponential_backoff() -def create_placement_group(connection, module): - name = module.params.get("name") - strategy = module.params.get("strategy") - partition_count = module.params.get("partition_count") - - if strategy != "partition" and partition_count: - module.fail_json(msg="'partition_count' can only be set when strategy is set to 'partition'.") - - params = {} - params["GroupName"] = name - params["Strategy"] = strategy - if partition_count: - params["PartitionCount"] = partition_count - params["DryRun"] = module.check_mode - - try: - connection.create_placement_group(**params) - except is_boto3_error_code("DryRunOperation"): - module.exit_json( - changed=True, - placement_group={ - "name": name, - "state": "DryRun", - "strategy": strategy, - }, - ) - except ( - botocore.exceptions.ClientError, - botocore.exceptions.BotoCoreError, - ) as e: # pylint: disable=duplicate-except - module.fail_json_aws(e, msg=f"Couldn't create placement group [{name}]") - - module.exit_json(changed=True, placement_group=get_placement_group_information(connection, name)) - - -@AWSRetry.exponential_backoff() -def delete_placement_group(connection, module): - name = module.params.get("name") - - try: - connection.delete_placement_group(GroupName=name, DryRun=module.check_mode) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg=f"Couldn't delete placement group [{name}]") - - module.exit_json(changed=True) - - -def main(): - argument_spec = dict( - name=dict(required=True, type="str"), - partition_count=dict(type="int"), - state=dict(default="present", choices=["present", "absent"]), - strategy=dict(default="cluster", choices=["cluster", "spread", "partition"]), - ) - - module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True) - - connection = module.client("ec2") - - state = module.params.get("state") - - if state == "present": - placement_group = search_placement_group(connection, module) - if placement_group is None: - create_placement_group(connection, module) - else: - strategy = module.params.get("strategy") - if placement_group["strategy"] == strategy: - module.exit_json(changed=False, placement_group=placement_group) - else: - name = module.params.get("name") - module.fail_json( - msg=f"Placement group '{name}' exists, can't change strategy from '{placement_group['strategy']}' to '{strategy}'" - ) - - elif state == "absent": - placement_group = search_placement_group(connection, module) - if placement_group is None: - module.exit_json(changed=False) - else: - delete_placement_group(connection, module) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_placement_group_info.py b/plugins/modules/ec2_placement_group_info.py deleted file mode 100644 index 05b37488cfe..00000000000 --- a/plugins/modules/ec2_placement_group_info.py +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: ec2_placement_group_info -version_added: 1.0.0 -short_description: List EC2 Placement Group(s) details -description: - - List details of EC2 Placement Group(s). -author: - - "Brad Macpherson (@iiibrad)" -options: - names: - description: - - A list of names to filter on. If a listed group does not exist, there - will be no corresponding entry in the result; no error will be raised. - type: list - elements: str - required: false - default: [] -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Note: These examples do not set authentication details or the AWS region, -# see the AWS Guide for details. - -- name: List all placement groups. - community.aws.ec2_placement_group_info: - register: all_ec2_placement_groups - -- name: List two placement groups. - community.aws.ec2_placement_group_info: - names: - - my-cluster - - my-other-cluster - register: specific_ec2_placement_groups - -- ansible.builtin.debug: - msg: > - {{ specific_ec2_placement_groups | json_query("[?name=='my-cluster']") }} -""" - - -RETURN = r""" -placement_groups: - description: Placement group attributes - returned: always - type: complex - contains: - name: - description: PG name - type: str - sample: my-cluster - state: - description: PG state - type: str - sample: "available" - strategy: - description: PG strategy - type: str - sample: "cluster" -""" - -try: - from botocore.exceptions import BotoCoreError - from botocore.exceptions import ClientError -except ImportError: - pass # caught by AnsibleAWSModule - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -def get_placement_groups_details(connection, module): - names = module.params.get("names") - try: - if len(names) > 0: - response = connection.describe_placement_groups( - Filters=[ - { - "Name": "group-name", - "Values": names, - } - ] - ) - else: - response = connection.describe_placement_groups() - except (BotoCoreError, ClientError) as e: - module.fail_json_aws(e, msg=f"Couldn't find placement groups named [{names}]") - - results = [] - for placement_group in response["PlacementGroups"]: - results.append( - { - "name": placement_group["GroupName"], - "state": placement_group["State"], - "strategy": placement_group["Strategy"], - } - ) - return results - - -def main(): - argument_spec = dict( - names=dict(type="list", default=[], elements="str"), - ) - - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - ) - - connection = module.client("ec2") - - placement_groups = get_placement_groups_details(connection, module) - module.exit_json(changed=False, placement_groups=placement_groups) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_transit_gateway.py b/plugins/modules/ec2_transit_gateway.py deleted file mode 100644 index c3a1079e5c9..00000000000 --- a/plugins/modules/ec2_transit_gateway.py +++ /dev/null @@ -1,530 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" -module: ec2_transit_gateway -short_description: Create and delete AWS Transit Gateways -version_added: 1.0.0 -description: - - Creates AWS Transit Gateways. - - Deletes AWS Transit Gateways. - - Updates tags on existing transit gateways. -options: - asn: - description: - - A private Autonomous System Number (ASN) for the Amazon side of a BGP session. - - The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs. - type: int - auto_associate: - description: - - Enable or disable automatic association with the default association route table. - default: true - type: bool - auto_attach: - description: - - Enable or disable automatic acceptance of attachment requests. - default: false - type: bool - auto_propagate: - description: - - Enable or disable automatic propagation of routes to the default propagation route table. - default: true - type: bool - description: - description: - - The description of the transit gateway. - type: str - dns_support: - description: - - Whether to enable AWS DNS support. - default: true - type: bool - multicast_support: - description: - - Whether to enable AWS Multicast support. Valid only at the time of creation of the Transit Gateway. - type: bool - version_added: 8.1.0 - state: - description: - - C(present) to ensure resource is created. - - C(absent) to remove resource. - default: present - choices: [ "present", "absent"] - type: str - transit_gateway_id: - description: - - The ID of the transit gateway. - type: str - vpn_ecmp_support: - description: - - Enable or disable Equal Cost Multipath Protocol support. - default: true - type: bool - wait: - description: - - Whether to wait for status - default: true - type: bool - wait_timeout: - description: - - number of seconds to wait for status - default: 300 - type: int - -author: - - "Bob Boldin (@BobBoldin)" -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 - - amazon.aws.tags -""" - -EXAMPLES = r""" -- name: Create a new transit gateway using defaults - community.aws.ec2_transit_gateway: - state: present - region: us-east-1 - description: personal-testing - register: created_tgw - -- name: Create a new transit gateway with options - community.aws.ec2_transit_gateway: - asn: 64514 - auto_associate: false - auto_propagate: false - multicast_support: true - dns_support: true - description: "nonprod transit gateway" - purge_tags: false - state: present - region: us-east-1 - tags: - Name: nonprod transit gateway - status: testing - -- name: Remove a transit gateway by description - community.aws.ec2_transit_gateway: - state: absent - region: us-east-1 - description: personal-testing - -- name: Remove a transit gateway by id - community.aws.ec2_transit_gateway: - state: absent - region: ap-southeast-2 - transit_gateway_id: tgw-3a9aa123 - register: deleted_tgw -""" - -RETURN = r""" -transit_gateway: - description: The attributes of the transit gateway. - type: complex - returned: I(state=present) - contains: - creation_time: - description: The creation time of the transit gateway. - returned: always - type: str - sample: "2019-03-06T17:13:51+00:00" - description: - description: The description of the transit gateway. - returned: always - type: str - sample: my test tgw - options: - description: The options attributes of the transit gateway - returned: always - type: complex - contains: - amazon_side_asn: - description: - - A private Autonomous System Number (ASN) for the Amazon side of a BGP session. - The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs. - returned: always - type: str - sample: 64512 - auto_accept_shared_attachements: - description: Indicates whether attachment requests are automatically accepted. - returned: always - type: str - sample: disable - default_route_table_association: - description: - - Indicates whether resource attachments are automatically - associated with the default association route table. - returned: always - type: str - sample: enable - association_default_route_table_id: - description: The ID of the default association route table. - returned: Iwhen exists - type: str - sample: tgw-rtb-abc123444 - default_route_table_propagation: - description: - - Indicates whether resource attachments automatically - propagate routes to the default propagation route table. - returned: always - type: str - sample: disable - propagation_default_route_table_id: - description: The ID of the default propagation route table. - returned: when exists - type: str - sample: tgw-rtb-def456777 - vpn_ecmp_support: - description: Indicates whether Equal Cost Multipath Protocol support is enabled. - returned: always - type: str - sample: enable - dns_support: - description: Indicates whether DNS support is enabled. - returned: always - type: str - sample: enable - multicast_support: - description: Indicates whether Multicast support is enabled. - returned: always - type: str - sample: enable - version_added: 7.3.0 - owner_id: - description: The account that owns the transit gateway. - returned: always - type: str - sample: '123456789012' - state: - description: The state of the transit gateway. - returned: always - type: str - sample: pending - tags: - description: A dictionary of resource tags - returned: always - type: dict - sample: - tags: - Name: nonprod_tgw - transit_gateway_arn: - description: The ID of the transit_gateway. - returned: always - type: str - sample: tgw-3a9aa123 - transit_gateway_id: - description: The ID of the transit_gateway. - returned: always - type: str - sample: tgw-3a9aa123 -""" - -from time import sleep -from time import time - -try: - from botocore.exceptions import BotoCoreError - from botocore.exceptions import ClientError -except ImportError: - pass # handled by imported AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ensure_ec2_tags -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -class AnsibleEc2Tgw(object): - def __init__(self, module, results): - self._module = module - self._results = results - retry_decorator = AWSRetry.jittered_backoff( - catch_extra_error_codes=["IncorrectState"], - ) - connection = module.client("ec2", retry_decorator=retry_decorator) - self._connection = connection - self._check_mode = self._module.check_mode - - def process(self): - """Process the request based on state parameter . - state = present will search for an existing tgw based and return the object data. - if no object is found it will be created - - state = absent will attempt to remove the tgw however will fail if it still has - attachments or associations - """ - description = self._module.params.get("description") - state = self._module.params.get("state", "present") - tgw_id = self._module.params.get("transit_gateway_id") - - if state == "present": - self.ensure_tgw_present(tgw_id, description) - elif state == "absent": - self.ensure_tgw_absent(tgw_id, description) - - def wait_for_status(self, wait_timeout, tgw_id, status, skip_deleted=True): - """ - Wait for the Transit Gateway to reach the specified status - :param wait_timeout: Number of seconds to wait, until this timeout is reached. - :param tgw_id: The Amazon nat id. - :param status: The status to wait for. - examples. status=available, status=deleted - :param skip_deleted: ignore deleted transit gateways - :return dict: transit gateway object - """ - polling_increment_secs = 5 - wait_timeout = time() + wait_timeout - status_achieved = False - transit_gateway = dict() - - while wait_timeout > time(): - try: - transit_gateway = self.get_matching_tgw(tgw_id=tgw_id, skip_deleted=skip_deleted) - - if transit_gateway: - if self._check_mode: - transit_gateway["state"] = status - - if transit_gateway.get("state") == status: - status_achieved = True - break - - elif transit_gateway.get("state") == "failed": - break - - else: - sleep(polling_increment_secs) - - except ClientError as e: - self._module.fail_json_aws(e) - - if not status_achieved: - self._module.fail_json(msg="Wait time out reached, while waiting for results") - - return transit_gateway - - def get_matching_tgw(self, tgw_id, description=None, skip_deleted=True): - """search for an existing tgw by either tgw_id or description - :param tgw_id: The AWS id of the transit gateway - :param description: The description of the transit gateway. - :param skip_deleted: ignore deleted transit gateways - :return dict: transit gateway object - """ - filters = [] - if tgw_id: - filters = ansible_dict_to_boto3_filter_list({"transit-gateway-id": tgw_id}) - - try: - response = AWSRetry.exponential_backoff()(self._connection.describe_transit_gateways)(Filters=filters) - except (ClientError, BotoCoreError) as e: - self._module.fail_json_aws(e) - - tgw = None - tgws = [] - - if len(response.get("TransitGateways", [])) == 1 and tgw_id: - if (response["TransitGateways"][0]["State"] != "deleted") or not skip_deleted: - tgws.extend(response["TransitGateways"]) - - for gateway in response.get("TransitGateways", []): - if description == gateway["Description"] and gateway["State"] != "deleted": - tgws.append(gateway) - - if len(tgws) > 1: - self._module.fail_json( - msg=f"EC2 returned more than one transit Gateway for description {description}, aborting" - ) - elif tgws: - tgw = camel_dict_to_snake_dict(tgws[0], ignore_list=["Tags"]) - tgw["tags"] = boto3_tag_list_to_ansible_dict(tgws[0]["Tags"]) - - return tgw - - @staticmethod - def enable_option_flag(flag): - disabled = "disable" - enabled = "enable" - if flag: - return enabled - return disabled - - def create_tgw(self, description): - """ - Create a transit gateway and optionally wait for status to become available. - - :param description: The description of the transit gateway. - :return dict: transit gateway object - """ - options = dict() - wait = self._module.params.get("wait") - wait_timeout = self._module.params.get("wait_timeout") - - if self._module.params.get("asn"): - options["AmazonSideAsn"] = self._module.params.get("asn") - - options["AutoAcceptSharedAttachments"] = self.enable_option_flag(self._module.params.get("auto_attach")) - options["DefaultRouteTableAssociation"] = self.enable_option_flag(self._module.params.get("auto_associate")) - options["DefaultRouteTablePropagation"] = self.enable_option_flag(self._module.params.get("auto_propagate")) - options["VpnEcmpSupport"] = self.enable_option_flag(self._module.params.get("vpn_ecmp_support")) - options["DnsSupport"] = self.enable_option_flag(self._module.params.get("dns_support")) - options["MulticastSupport"] = self.enable_option_flag(self._module.params.get("multicast_support")) - - try: - response = self._connection.create_transit_gateway(Description=description, Options=options) - except (ClientError, BotoCoreError) as e: - self._module.fail_json_aws(e) - - tgw_id = response["TransitGateway"]["TransitGatewayId"] - - if wait: - result = self.wait_for_status(wait_timeout=wait_timeout, tgw_id=tgw_id, status="available") - else: - result = self.get_matching_tgw(tgw_id=tgw_id) - - self._results["msg"] = f" Transit gateway {result['transit_gateway_id']} created" - - return result - - def delete_tgw(self, tgw_id): - """ - De;lete the transit gateway and optionally wait for status to become deleted - - :param tgw_id: The id of the transit gateway - :return dict: transit gateway object - """ - wait = self._module.params.get("wait") - wait_timeout = self._module.params.get("wait_timeout") - - try: - response = self._connection.delete_transit_gateway(TransitGatewayId=tgw_id) - except (ClientError, BotoCoreError) as e: - self._module.fail_json_aws(e) - - if wait: - result = self.wait_for_status( - wait_timeout=wait_timeout, tgw_id=tgw_id, status="deleted", skip_deleted=False - ) - else: - result = self.get_matching_tgw(tgw_id=tgw_id, skip_deleted=False) - - self._results["msg"] = f" Transit gateway {tgw_id} deleted" - - return result - - def ensure_tgw_present(self, tgw_id=None, description=None): - """ - Will create a tgw if no match to the tgw_id or description are found - Will update the tgw tags if matching one found but tags are not synced - - :param tgw_id: The AWS id of the transit gateway - :param description: The description of the transit gateway. - :return dict: transit gateway object - """ - tgw = self.get_matching_tgw(tgw_id, description) - - if tgw is None: - if self._check_mode: - self._results["changed"] = True - self._results["transit_gateway_id"] = None - return self._results - - try: - if not description: - self._module.fail_json(msg="Failed to create Transit Gateway: description argument required") - tgw = self.create_tgw(description) - self._results["changed"] = True - except (BotoCoreError, ClientError) as e: - self._module.fail_json_aws(e, msg="Unable to create Transit Gateway") - - self._results["changed"] |= ensure_ec2_tags( - self._connection, - self._module, - tgw["transit_gateway_id"], - tags=self._module.params.get("tags"), - purge_tags=self._module.params.get("purge_tags"), - ) - - self._results["transit_gateway"] = self.get_matching_tgw(tgw_id=tgw["transit_gateway_id"]) - - return self._results - - def ensure_tgw_absent(self, tgw_id=None, description=None): - """ - Will delete the tgw if a single tgw is found not yet in deleted status - - :param tgw_id: The AWS id of the transit gateway - :param description: The description of the transit gateway. - :return doct: transit gateway object - """ - self._results["transit_gateway_id"] = None - tgw = self.get_matching_tgw(tgw_id, description) - - if tgw is not None: - if self._check_mode: - self._results["changed"] = True - return self._results - - try: - tgw = self.delete_tgw(tgw_id=tgw["transit_gateway_id"]) - self._results["changed"] = True - self._results["transit_gateway"] = self.get_matching_tgw( - tgw_id=tgw["transit_gateway_id"], skip_deleted=False - ) - except (BotoCoreError, ClientError) as e: - self._module.fail_json_aws(e, msg="Unable to delete Transit Gateway") - - return self._results - - -def setup_module_object(): - """ - merge argument spec and create Ansible module object - :return: Ansible module object - """ - - argument_spec = dict( - asn=dict(type="int"), - auto_associate=dict(type="bool", default=True), - auto_attach=dict(type="bool", default=False), - auto_propagate=dict(type="bool", default=True), - description=dict(type="str"), - multicast_support=dict(type="bool"), - dns_support=dict(type="bool", default=True), - purge_tags=dict(type="bool", default=True), - state=dict(default="present", choices=["present", "absent"]), - tags=dict(type="dict", aliases=["resource_tags"]), - transit_gateway_id=dict(type="str"), - vpn_ecmp_support=dict(type="bool", default=True), - wait=dict(type="bool", default=True), - wait_timeout=dict(type="int", default=300), - ) - - module = AnsibleAWSModule( - argument_spec=argument_spec, - required_one_of=[("description", "transit_gateway_id")], - supports_check_mode=True, - ) - - return module - - -def main(): - module = setup_module_object() - - results = dict(changed=False) - - tgw_manager = AnsibleEc2Tgw(module=module, results=results) - tgw_manager.process() - - module.exit_json(**results) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_transit_gateway_info.py b/plugins/modules/ec2_transit_gateway_info.py deleted file mode 100644 index 014c875b6a0..00000000000 --- a/plugins/modules/ec2_transit_gateway_info.py +++ /dev/null @@ -1,260 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" -module: ec2_transit_gateway_info -short_description: Gather information about ec2 transit gateways in AWS -version_added: 1.0.0 -description: - - Gather information about ec2 transit gateways in AWS -author: - - "Bob Boldin (@BobBoldin)" -options: - transit_gateway_ids: - description: - - A list of transit gateway IDs to gather information for. - aliases: [transit_gateway_id] - type: list - elements: str - default: [] - filters: - description: - - A dict of filters to apply. Each dict item consists of a filter key and a filter value. - See U(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGateways.html) for filters. - type: dict - default: {} -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Note: These examples do not set authentication details, see the AWS Guide for details. - -- name: Gather info about all transit gateways - community.aws.ec2_transit_gateway_info: - -- name: Gather info about a particular transit gateway using filter transit gateway ID - community.aws.ec2_transit_gateway_info: - filters: - transit-gateway-id: tgw-02c42332e6b7da829 - -- name: Gather info about a particular transit gateway using multiple option filters - community.aws.ec2_transit_gateway_info: - filters: - options.dns-support: enable - options.vpn-ecmp-support: enable - -- name: Gather info about multiple transit gateways using module param - community.aws.ec2_transit_gateway_info: - transit_gateway_ids: - - tgw-02c42332e6b7da829 - - tgw-03c53443d5a8cb716 -""" - -RETURN = r""" -transit_gateways: - description: > - Transit gateways that match the provided filters. Each element consists of a dict with all the information - related to that transit gateway. - returned: on success - type: complex - contains: - creation_time: - description: The creation time. - returned: always - type: str - sample: "2019-02-05T16:19:58+00:00" - description: - description: The description of the transit gateway. - returned: always - type: str - sample: "A transit gateway" - options: - description: A dictionary of the transit gateway options. - returned: always - type: complex - contains: - amazon_side_asn: - description: - - A private Autonomous System Number (ASN) for the Amazon - side of a BGP session. The range is 64512 to 65534 for - 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs. - returned: always - type: int - sample: 64512 - auto_accept_shared_attachments: - description: - - Indicates whether attachment requests are automatically accepted. - returned: always - type: str - sample: "enable" - default_route_table_association: - description: - - Indicates whether resource attachments are automatically - associated with the default association route table. - returned: always - type: str - sample: "disable" - association_default_route_table_id: - description: - - The ID of the default association route table. - returned: when present - type: str - sample: "rtb-11223344" - default_route_table_propagation: - description: - - Indicates whether resource attachments automatically - propagate routes to the default propagation route table. - returned: always - type: str - sample: "disable" - dns_support: - description: - - Indicates whether DNS support is enabled. - returned: always - type: str - sample: "enable" - multicast_support: - description: - - Indicates whether Multicast support is enabled. - returned: always - type: str - sample: "enable" - version_added: 7.3.0 - propagation_default_route_table_id: - description: - - The ID of the default propagation route table. - returned: when present - type: str - sample: "rtb-11223344" - vpn_ecmp_support: - description: - - Indicates whether Equal Cost Multipath Protocol support - is enabled. - returned: always - type: str - sample: "enable" - owner_id: - description: The AWS account number ID which owns the transit gateway. - returned: always - type: str - sample: "123456789012" - state: - description: The state of the transit gateway. - returned: always - type: str - sample: "available" - tags: - description: A dict of tags associated with the transit gateway. - returned: always - type: dict - sample: '{ - "Name": "A sample TGW" - }' - transit_gateway_arn: - description: The Amazon Resource Name (ARN) of the transit gateway. - returned: always - type: str - sample: "arn:aws:ec2:us-west-2:123456789012:transit-gateway/tgw-02c42332e6b7da829" - transit_gateway_id: - description: The ID of the transit gateway. - returned: always - type: str - sample: "tgw-02c42332e6b7da829" -""" - -try: - import botocore -except ImportError: - pass # handled by imported AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -class AnsibleEc2TgwInfo(object): - def __init__(self, module, results): - self._module = module - self._results = results - self._connection = self._module.client("ec2") - self._check_mode = self._module.check_mode - - @AWSRetry.exponential_backoff() - def describe_transit_gateways(self): - """ - Describe transit gateways. - - module : AnsibleAWSModule object - connection : boto3 client connection object - """ - # collect parameters - filters = ansible_dict_to_boto3_filter_list(self._module.params["filters"]) - transit_gateway_ids = self._module.params["transit_gateway_ids"] - - # init empty list for return vars - transit_gateway_info = list() - - # Get the basic transit gateway info - try: - response = self._connection.describe_transit_gateways( - TransitGatewayIds=transit_gateway_ids, Filters=filters - ) - except is_boto3_error_code("InvalidTransitGatewayID.NotFound"): - self._results["transit_gateways"] = [] - return - - for transit_gateway in response["TransitGateways"]: - transit_gateway_info.append(camel_dict_to_snake_dict(transit_gateway, ignore_list=["Tags"])) - # convert tag list to ansible dict - transit_gateway_info[-1]["tags"] = boto3_tag_list_to_ansible_dict(transit_gateway.get("Tags", [])) - - self._results["transit_gateways"] = transit_gateway_info - return - - -def setup_module_object(): - """ - merge argument spec and create Ansible module object - :return: Ansible module object - """ - - argument_spec = dict( - transit_gateway_ids=dict(type="list", default=[], elements="str", aliases=["transit_gateway_id"]), - filters=dict(type="dict", default={}), - ) - - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - ) - - return module - - -def main(): - module = setup_module_object() - - results = dict(changed=False) - - tgwf_manager = AnsibleEc2TgwInfo(module=module, results=results) - try: - tgwf_manager.describe_transit_gateways() - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e) - - module.exit_json(**results) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_transit_gateway_vpc_attachment.py b/plugins/modules/ec2_transit_gateway_vpc_attachment.py deleted file mode 100644 index cfb6809a803..00000000000 --- a/plugins/modules/ec2_transit_gateway_vpc_attachment.py +++ /dev/null @@ -1,344 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" -module: ec2_transit_gateway_vpc_attachment -short_description: Create and delete AWS Transit Gateway VPC attachments -version_added: 4.0.0 -description: - - Creates, Deletes and Updates AWS Transit Gateway VPC Attachments. -options: - transit_gateway: - description: - - The ID of the Transit Gateway that the attachment belongs to. - - When creating a new attachment, I(transit_gateway) must be provided. - - At least one of I(name), I(transit_gateway) and I(id) must be provided. - - I(transit_gateway) is an immutable setting and can not be updated on an - existing attachment. - type: str - required: false - aliases: ['transit_gateway_id'] - id: - description: - - The ID of the Transit Gateway Attachment. - - When I(id) is not set, a search using I(transit_gateway) and I(name) will be - performed. If multiple results are returned, the module will fail. - - At least one of I(name), I(transit_gateway) and I(id) must be provided. - type: str - required: false - aliases: ['attachment_id'] - name: - description: - - The C(Name) tag of the Transit Gateway attachment. - - Providing both I(id) and I(name) will set the C(Name) tag on an existing - attachment the matching I(id). - - Setting the C(Name) tag in I(tags) will also result in the C(Name) tag being - updated. - - At least one of I(name), I(transit_gateway) and I(id) must be provided. - type: str - required: false - state: - description: - - Create or remove the Transit Gateway attachment. - type: str - required: false - choices: ['present', 'absent'] - default: 'present' - subnets: - description: - - The ID of the subnets in which to create the transit gateway VPC attachment. - - Required when creating a new attachment. - type: list - elements: str - required: false - purge_subnets: - description: - - If I(purge_subnets=true), existing subnets will be removed from the - attachment as necessary to match exactly what is defined by I(subnets). - type: bool - required: false - default: true - dns_support: - description: - - Whether DNS support is enabled. - type: bool - required: false - ipv6_support: - description: - - Whether IPv6 support is enabled. - type: bool - required: false - appliance_mode_support: - description: - - Whether the attachment is configured for appliance mode. - - When appliance mode is enabled, Transit Gateway, using 4-tuples of an - IP packet, selects a single Transit Gateway ENI in the Appliance VPC - for the life of a flow to send traffic to. - type: bool - required: false - wait: - description: - - Whether to wait for the Transit Gateway attachment to reach the - C(Available) or C(Deleted) state before the module returns. - type: bool - required: false - default: true - wait_timeout: - description: - - Maximum time, in seconds, to wait for the Transit Gateway attachment - to reach the expected state. - - Defaults to 600 seconds. - type: int - required: false -author: - - "Mark Chappell (@tremble)" -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.tags - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Create a Transit Gateway attachment -- community.aws.ec2_transit_gateway_vpc_attachment: - state: present - transit_gateway: 'tgw-123456789abcdef01' - name: AnsibleTest-1 - subnets: - - subnet-00000000000000000 - - subnet-11111111111111111 - - subnet-22222222222222222 - ipv6_support: true - purge_subnets: true - dns_support: true - appliance_mode_support: true - tags: - TestTag: changed data in Test Tag - -# Set sub options on a Transit Gateway attachment -- community.aws.ec2_transit_gateway_vpc_attachment: - state: present - id: 'tgw-attach-0c0c5fd0b0f01d1c9' - name: AnsibleTest-1 - ipv6_support: true - purge_subnets: false - dns_support: false - appliance_mode_support: true - -# Delete the transit gateway -- community.aws.ec2_transit_gateway_vpc_attachment: - state: absent - id: 'tgw-attach-0c0c5fd0b0f01d1c9' -""" - -RETURN = r""" -transit_gateway_attachments: - description: The attributes of the Transit Gateway attachments. - type: list - elements: dict - returned: success - contains: - creation_time: - description: - - An ISO 8601 date time stamp of when the attachment was created. - type: str - returned: success - example: '2022-03-10T16:40:26+00:00' - options: - description: - - Additional VPC attachment options. - type: dict - returned: success - contains: - appliance_mode_support: - description: - - Indicates whether appliance mode support is enabled. - type: str - returned: success - example: 'enable' - dns_support: - description: - - Indicates whether DNS support is enabled. - type: str - returned: success - example: 'disable' - ipv6_support: - description: - - Indicates whether IPv6 support is disabled. - type: str - returned: success - example: 'disable' - state: - description: - - The state of the attachment. - type: str - returned: success - example: 'deleting' - subnet_ids: - description: - - The IDs of the subnets in use by the attachment. - type: list - elements: str - returned: success - example: ['subnet-0123456789abcdef0', 'subnet-11111111111111111'] - tags: - description: - - A dictionary representing the resource tags. - type: dict - returned: success - transit_gateway_attachment_id: - description: - - The ID of the attachment. - type: str - returned: success - example: 'tgw-attach-0c0c5fd0b0f01d1c9' - transit_gateway_id: - description: - - The ID of the transit gateway that the attachment is connected to. - type: str - returned: success - example: 'tgw-0123456789abcdef0' - vpc_id: - description: - - The ID of the VPC that the attachment is connected to. - type: str - returned: success - example: 'vpc-0123456789abcdef0' - vpc_owner_id: - description: - - The ID of the account that the VPC belongs to. - type: str - returned: success - example: '123456789012' -""" - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule -from ansible_collections.community.aws.plugins.module_utils.transitgateway import TransitGatewayVpcAttachmentManager - - -def main(): - argument_spec = dict( - state=dict(type="str", required=False, default="present", choices=["absent", "present"]), - transit_gateway=dict(type="str", required=False, aliases=["transit_gateway_id"]), - id=dict(type="str", required=False, aliases=["attachment_id"]), - name=dict(type="str", required=False), - subnets=dict(type="list", elements="str", required=False), - purge_subnets=dict(type="bool", required=False, default=True), - tags=dict(type="dict", required=False, aliases=["resource_tags"]), - purge_tags=dict(type="bool", required=False, default=True), - appliance_mode_support=dict(type="bool", required=False), - dns_support=dict(type="bool", required=False), - ipv6_support=dict(type="bool", required=False), - wait=dict(type="bool", required=False, default=True), - wait_timeout=dict(type="int", required=False), - ) - - one_of = [ - ["id", "transit_gateway", "name"], - ] - - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - required_one_of=one_of, - ) - - attach_id = module.params.get("id", None) - tgw = module.params.get("transit_gateway", None) - name = module.params.get("name", None) - tags = module.params.get("tags", None) - purge_tags = module.params.get("purge_tags") - state = module.params.get("state") - subnets = module.params.get("subnets", None) - purge_subnets = module.params.get("purge_subnets") - - # When not provided with an ID see if one exists. - if not attach_id: - search_manager = TransitGatewayVpcAttachmentManager(module=module) - filters = dict() - if tgw: - filters["transit-gateway-id"] = tgw - if name: - filters["tag:Name"] = name - if subnets: - vpc_id = search_manager.subnets_to_vpc(subnets) - filters["vpc-id"] = vpc_id - - # Attachments lurk in a 'deleted' state, for a while, ignore them so we - # can reuse the names - filters["state"] = [ - "available", - "deleting", - "failed", - "failing", - "initiatingRequest", - "modifying", - "pendingAcceptance", - "pending", - "rollingBack", - "rejected", - "rejecting", - ] - attachments = search_manager.list(filters=filters) - if len(attachments) > 1: - module.fail_json("Multiple matching attachments found, provide an ID", attachments=attachments) - # If we find a match then we'll modify it by ID, otherwise we'll be - # creating a new RTB. - if attachments: - attach_id = attachments[0]["transit_gateway_attachment_id"] - - manager = TransitGatewayVpcAttachmentManager(module=module, id=attach_id) - manager.set_wait(module.params.get("wait", None)) - manager.set_wait_timeout(module.params.get("wait_timeout", None)) - - if state == "absent": - manager.delete() - else: - if not attach_id: - if not tgw: - module.fail_json( - "No existing attachment found. To create a new attachment" - " the `transit_gateway` parameter must be provided." - ) - if not subnets: - module.fail_json( - "No existing attachment found. To create a new attachment" - " the `subnets` parameter must be provided." - ) - - # name is just a special case of tags. - if name: - new_tags = dict(Name=name) - if tags is None: - purge_tags = False - else: - new_tags.update(tags) - tags = new_tags - - manager.set_transit_gateway(tgw) - manager.set_subnets(subnets, purge_subnets) - manager.set_tags(tags, purge_tags) - manager.set_dns_support(module.params.get("dns_support", None)) - manager.set_ipv6_support(module.params.get("ipv6_support", None)) - manager.set_appliance_mode_support(module.params.get("appliance_mode_support", None)) - manager.flush_changes() - - results = dict( - changed=manager.changed, - attachments=[manager.updated_resource], - ) - if manager.changed: - results["diff"] = dict( - before=manager.original_resource, - after=manager.updated_resource, - ) - - module.exit_json(**results) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_transit_gateway_vpc_attachment_info.py b/plugins/modules/ec2_transit_gateway_vpc_attachment_info.py deleted file mode 100644 index a665e4080cc..00000000000 --- a/plugins/modules/ec2_transit_gateway_vpc_attachment_info.py +++ /dev/null @@ -1,203 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" -module: ec2_transit_gateway_vpc_attachment_info -short_description: describes AWS Transit Gateway VPC attachments -version_added: 4.0.0 -description: - - Describes AWS Transit Gateway VPC Attachments. -options: - id: - description: - - The ID of the Transit Gateway Attachment. - - Mutually exclusive with I(name) and I(filters) - type: str - required: false - aliases: ['attachment_id'] - name: - description: - - The C(Name) tag of the Transit Gateway attachment. - type: str - required: false - filters: - description: - - A dictionary of filters to apply. Each dict item consists of a filter key and a filter value. - - Setting a C(tag:Name) filter will override the I(name) parameter. - type: dict - required: false - include_deleted: - description: - - If I(include_deleted=True), then attachments in a deleted state will - also be returned. - - Setting a C(state) filter will override the I(include_deleted) parameter. - type: bool - required: false - default: false -author: - - "Mark Chappell (@tremble)" -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Describe a specific Transit Gateway attachment. -- community.aws.ec2_transit_gateway_vpc_attachment_info: - id: 'tgw-attach-0123456789abcdef0' - -# Describe all attachments attached to a transit gateway. -- community.aws.ec2_transit_gateway_vpc_attachment_info: - filters: - transit-gateway-id: tgw-0fedcba9876543210' - -# Describe all attachments in an account. -- community.aws.ec2_transit_gateway_vpc_attachment_info: - filters: - transit-gateway-id: tgw-0fedcba9876543210' -""" - -RETURN = r""" -transit_gateway_attachments: - description: The attributes of the Transit Gateway attachments. - type: list - elements: dict - returned: success - contains: - creation_time: - description: - - An ISO 8601 date time stamp of when the attachment was created. - type: str - returned: success - example: '2022-03-10T16:40:26+00:00' - options: - description: - - Additional VPC attachment options. - type: dict - returned: success - contains: - appliance_mode_support: - description: - - Indicates whether appliance mode support is enabled. - type: str - returned: success - example: 'enable' - dns_support: - description: - - Indicates whether DNS support is enabled. - type: str - returned: success - example: 'disable' - ipv6_support: - description: - - Indicates whether IPv6 support is disabled. - type: str - returned: success - example: 'disable' - state: - description: - - The state of the attachment. - type: str - returned: success - example: 'deleting' - subnet_ids: - description: - - The IDs of the subnets in use by the attachment. - type: list - elements: str - returned: success - example: ['subnet-0123456789abcdef0', 'subnet-11111111111111111'] - tags: - description: - - A dictionary representing the resource tags. - type: dict - returned: success - transit_gateway_attachment_id: - description: - - The ID of the attachment. - type: str - returned: success - example: 'tgw-attach-0c0c5fd0b0f01d1c9' - transit_gateway_id: - description: - - The ID of the transit gateway that the attachment is connected to. - type: str - returned: success - example: 'tgw-0123456789abcdef0' - vpc_id: - description: - - The ID of the VPC that the attachment is connected to. - type: str - returned: success - example: 'vpc-0123456789abcdef0' - vpc_owner_id: - description: - - The ID of the account that the VPC belongs to. - type: str - returned: success - example: '123456789012' -""" - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule -from ansible_collections.community.aws.plugins.module_utils.transitgateway import TransitGatewayVpcAttachmentManager - - -def main(): - argument_spec = dict( - id=dict(type="str", required=False, aliases=["attachment_id"]), - name=dict(type="str", required=False), - filters=dict(type="dict", required=False), - include_deleted=dict(type="bool", required=False, default=False), - ) - - mutually_exclusive = [ - ["id", "name"], - ["id", "filters"], - ] - - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - ) - - name = module.params.get("name", None) - id = module.params.get("id", None) - opt_filters = module.params.get("filters", None) - - search_manager = TransitGatewayVpcAttachmentManager(module=module) - filters = dict() - - if name: - filters["tag:Name"] = name - - if not module.params.get("include_deleted"): - # Attachments lurk in a 'deleted' state, for a while, ignore them so we - # can reuse the names - filters["state"] = [ - "available", - "deleting", - "failed", - "failing", - "initiatingRequest", - "modifying", - "pendingAcceptance", - "pending", - "rollingBack", - "rejected", - "rejecting", - ] - - if opt_filters: - filters.update(opt_filters) - - attachments = search_manager.list(filters=filters, id=id) - - module.exit_json(changed=False, attachments=attachments, filters=filters) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_vpc_egress_igw.py b/plugins/modules/ec2_vpc_egress_igw.py deleted file mode 100644 index 1bd65f501c8..00000000000 --- a/plugins/modules/ec2_vpc_egress_igw.py +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: ec2_vpc_egress_igw -version_added: 1.0.0 -short_description: Manage an AWS VPC Egress Only Internet gateway -description: - - Manage an AWS VPC Egress Only Internet gateway -author: - - Daniel Shepherd (@shepdelacreme) -options: - vpc_id: - description: - - The VPC ID for the VPC that this Egress Only Internet Gateway should be attached. - required: true - type: str - state: - description: - - Create or delete the EIGW. - default: present - choices: [ 'present', 'absent' ] - type: str -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Note: These examples do not set authentication details, see the AWS Guide for details. - -# Ensure that the VPC has an Internet Gateway. -# The Internet Gateway ID is can be accessed via {{eigw.gateway_id}} for use in setting up NATs etc. -- community.aws.ec2_vpc_egress_igw: - vpc_id: vpc-abcdefgh - state: present - register: eigw -""" - -RETURN = r""" -gateway_id: - description: The ID of the Egress Only Internet Gateway or Null. - returned: always - type: str - sample: eigw-0e00cf111ba5bc11e -vpc_id: - description: The ID of the VPC to attach or detach gateway from. - returned: always - type: str - sample: vpc-012345678 -""" - -try: - import botocore -except ImportError: - pass # caught by AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -def delete_eigw(module, connection, eigw_id): - """ - Delete EIGW. - - module : AnsibleAWSModule object - connection : boto3 client connection object - eigw_id : ID of the EIGW to delete - """ - changed = False - - try: - response = connection.delete_egress_only_internet_gateway( - aws_retry=True, DryRun=module.check_mode, EgressOnlyInternetGatewayId=eigw_id - ) - except is_boto3_error_code("DryRunOperation"): - changed = True - except ( - botocore.exceptions.ClientError, - botocore.exceptions.BotoCoreError, - ) as e: # pylint: disable=duplicate-except - module.fail_json_aws(e, msg=f"Could not delete Egress-Only Internet Gateway {eigw_id} from VPC {module.vpc_id}") - - if not module.check_mode: - changed = response.get("ReturnCode", False) - - return changed - - -def create_eigw(module, connection, vpc_id): - """ - Create EIGW. - - module : AnsibleAWSModule object - connection : boto3 client connection object - vpc_id : ID of the VPC we are operating on - """ - gateway_id = None - changed = False - - try: - response = connection.create_egress_only_internet_gateway( - aws_retry=True, DryRun=module.check_mode, VpcId=vpc_id - ) - except is_boto3_error_code("DryRunOperation"): - # When boto3 method is run with DryRun=True it returns an error on success - # We need to catch the error and return something valid - changed = True - except is_boto3_error_code("InvalidVpcID.NotFound") as e: # pylint: disable=duplicate-except - module.fail_json_aws(e, msg=f"invalid vpc ID '{vpc_id}' provided") - except ( - botocore.exceptions.ClientError, - botocore.exceptions.BotoCoreError, - ) as e: # pylint: disable=duplicate-except - module.fail_json_aws(e, msg=f"Could not create Egress-Only Internet Gateway for vpc ID {vpc_id}") - - if not module.check_mode: - gateway = response.get("EgressOnlyInternetGateway", {}) - state = gateway.get("Attachments", [{}])[0].get("State") - gateway_id = gateway.get("EgressOnlyInternetGatewayId") - - if gateway_id and state in ("attached", "attaching"): - changed = True - else: - # EIGW gave back a bad attachment state or an invalid response so we error out - module.fail_json( - msg=f"Unable to create and attach Egress Only Internet Gateway to VPCId: {vpc_id}. Bad or no state in response", - **camel_dict_to_snake_dict(response), - ) - - return changed, gateway_id - - -def describe_eigws(module, connection, vpc_id): - """ - Describe EIGWs. - - module : AnsibleAWSModule object - connection : boto3 client connection object - vpc_id : ID of the VPC we are operating on - """ - gateway_id = None - - try: - response = connection.describe_egress_only_internet_gateways(aws_retry=True) - except (botocore.exceptions.BotoCoreError, botocore.exceptions.ClientError) as e: - module.fail_json_aws(e, msg="Could not get list of existing Egress-Only Internet Gateways") - - for eigw in response.get("EgressOnlyInternetGateways", []): - for attachment in eigw.get("Attachments", []): - if attachment.get("VpcId") == vpc_id and attachment.get("State") in ("attached", "attaching"): - gateway_id = eigw.get("EgressOnlyInternetGatewayId") - - return gateway_id - - -def main(): - argument_spec = dict(vpc_id=dict(required=True), state=dict(default="present", choices=["present", "absent"])) - - module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True) - - retry_decorator = AWSRetry.jittered_backoff(retries=10) - connection = module.client("ec2", retry_decorator=retry_decorator) - - vpc_id = module.params.get("vpc_id") - state = module.params.get("state") - - eigw_id = describe_eigws(module, connection, vpc_id) - - result = dict(gateway_id=eigw_id, vpc_id=vpc_id) - changed = False - - if state == "present" and not eigw_id: - changed, result["gateway_id"] = create_eigw(module, connection, vpc_id) - elif state == "absent" and eigw_id: - changed = delete_eigw(module, connection, eigw_id) - - module.exit_json(changed=changed, **result) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_vpc_nacl.py b/plugins/modules/ec2_vpc_nacl.py deleted file mode 100644 index cf109de1c8b..00000000000 --- a/plugins/modules/ec2_vpc_nacl.py +++ /dev/null @@ -1,606 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" -module: ec2_vpc_nacl -short_description: create and delete Network ACLs -version_added: 1.0.0 -description: - - Read the AWS documentation for Network ACLS - U(https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) -options: - name: - description: - - Tagged name identifying a network ACL. - - One and only one of the I(name) or I(nacl_id) is required. - required: false - type: str - nacl_id: - description: - - NACL id identifying a network ACL. - - One and only one of the I(name) or I(nacl_id) is required. - required: false - type: str - vpc_id: - description: - - VPC id of the requesting VPC. - - Required when state present. - required: false - type: str - subnets: - description: - - The list of subnets that should be associated with the network ACL. - - Must be specified as a list - - Each subnet can be specified as subnet ID, or its tagged name. - required: false - type: list - elements: str - default: [] - egress: - description: - - A list of rules for outgoing traffic. Each rule must be specified as a list. - Each rule may contain the rule number (integer 1-32766), protocol (one of ['tcp', 'udp', 'icmp', 'ipv6-icmp', '-1', 'all']), - the rule action ('allow' or 'deny') the CIDR of the IPv4 or IPv6 network range to allow or deny, - the ICMP type (-1 means all types), the ICMP code (-1 means all codes), the last port in the range for - TCP or UDP protocols, and the first port in the range for TCP or UDP protocols. - See examples. - default: [] - required: false - type: list - elements: list - ingress: - description: - - List of rules for incoming traffic. Each rule must be specified as a list. - Each rule may contain the rule number (integer 1-32766), protocol (one of ['tcp', 'udp', 'icmp', 'ipv6-icmp', '-1', 'all']), - the rule action ('allow' or 'deny') the CIDR of the IPv4 or IPv6 network range to allow or deny, - the ICMP type (-1 means all types), the ICMP code (-1 means all codes), the last port in the range for - TCP or UDP protocols, and the first port in the range for TCP or UDP protocols. - See examples. - default: [] - required: false - type: list - elements: list - state: - description: - - Creates or modifies an existing NACL - - Deletes a NACL and reassociates subnets to the default NACL - required: false - type: str - choices: ['present', 'absent'] - default: present -author: - - Mike Mochan (@mmochan) -notes: - - Support for I(purge_tags) was added in release 4.0.0. -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 - - amazon.aws.tags -""" - -EXAMPLES = r""" -# Complete example to create and delete a network ACL -# that allows SSH, HTTP and ICMP in, and all traffic out. -- name: "Create and associate production DMZ network ACL with DMZ subnets" - community.aws.ec2_vpc_nacl: - vpc_id: vpc-12345678 - name: prod-dmz-nacl - region: ap-southeast-2 - subnets: ['prod-dmz-1', 'prod-dmz-2'] - tags: - CostCode: CC1234 - Project: phoenix - Description: production DMZ - ingress: - # rule no, protocol, allow/deny, cidr, icmp_type, icmp_code, - # port from, port to - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - - [205, 'tcp', 'allow', '::/0', null, null, 80, 80] - - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] - - [305, 'ipv6-icmp', 'allow', '::/0', 0, 8] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - - [105, 'all', 'allow', '::/0', null, null, null, null] - state: 'present' - -- name: "Remove the ingress and egress rules - defaults to deny all" - community.aws.ec2_vpc_nacl: - vpc_id: vpc-12345678 - name: prod-dmz-nacl - region: ap-southeast-2 - subnets: - - prod-dmz-1 - - prod-dmz-2 - tags: - CostCode: CC1234 - Project: phoenix - Description: production DMZ - state: present - -- name: "Remove the NACL subnet associations and tags" - community.aws.ec2_vpc_nacl: - vpc_id: 'vpc-12345678' - name: prod-dmz-nacl - region: ap-southeast-2 - state: present - -- name: "Delete nacl and subnet associations" - community.aws.ec2_vpc_nacl: - vpc_id: vpc-12345678 - name: prod-dmz-nacl - state: absent - -- name: "Delete nacl by its id" - community.aws.ec2_vpc_nacl: - nacl_id: acl-33b4ee5b - state: absent -""" - -RETURN = r""" -task: - description: The result of the create, or delete action. - returned: success - type: dict -nacl_id: - description: The id of the NACL (when creating or updating an ACL) - returned: success - type: str - sample: acl-123456789abcdef01 -""" - -try: - import botocore -except ImportError: - pass # Handled by AnsibleAWSModule - -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ensure_ec2_tags -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_specifications - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - -# VPC-supported IANA protocol numbers -# http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml -PROTOCOL_NUMBERS = {"all": -1, "icmp": 1, "tcp": 6, "udp": 17, "ipv6-icmp": 58} - - -# Utility methods -def icmp_present(entry): - if len(entry) == 6 and entry[1] in ["icmp", "ipv6-icmp"] or entry[1] in [1, 58]: - return True - - -def subnets_removed(nacl_id, subnets, client, module): - results = find_acl_by_id(nacl_id, client, module) - associations = results["NetworkAcls"][0]["Associations"] - subnet_ids = [assoc["SubnetId"] for assoc in associations] - return [subnet for subnet in subnet_ids if subnet not in subnets] - - -def subnets_added(nacl_id, subnets, client, module): - results = find_acl_by_id(nacl_id, client, module) - associations = results["NetworkAcls"][0]["Associations"] - subnet_ids = [assoc["SubnetId"] for assoc in associations] - return [subnet for subnet in subnets if subnet not in subnet_ids] - - -def subnets_changed(nacl, client, module): - changed = False - vpc_id = module.params.get("vpc_id") - nacl_id = nacl["NetworkAcls"][0]["NetworkAclId"] - subnets = subnets_to_associate(nacl, client, module) - if not subnets: - default_nacl_id = find_default_vpc_nacl(vpc_id, client, module)[0] - subnets = find_subnet_ids_by_nacl_id(nacl_id, client, module) - if subnets: - replace_network_acl_association(default_nacl_id, subnets, client, module) - changed = True - return changed - changed = False - return changed - subs_added = subnets_added(nacl_id, subnets, client, module) - if subs_added: - replace_network_acl_association(nacl_id, subs_added, client, module) - changed = True - subs_removed = subnets_removed(nacl_id, subnets, client, module) - if subs_removed: - default_nacl_id = find_default_vpc_nacl(vpc_id, client, module)[0] - replace_network_acl_association(default_nacl_id, subs_removed, client, module) - changed = True - return changed - - -def nacls_changed(nacl, client, module): - changed = False - params = dict() - params["egress"] = module.params.get("egress") - params["ingress"] = module.params.get("ingress") - - nacl_id = nacl["NetworkAcls"][0]["NetworkAclId"] - nacl = describe_network_acl(client, module) - entries = nacl["NetworkAcls"][0]["Entries"] - egress = [rule for rule in entries if rule["Egress"] is True and rule["RuleNumber"] < 32767] - ingress = [rule for rule in entries if rule["Egress"] is False and rule["RuleNumber"] < 32767] - if rules_changed(egress, params["egress"], True, nacl_id, client, module): - changed = True - if rules_changed(ingress, params["ingress"], False, nacl_id, client, module): - changed = True - return changed - - -def tags_changed(nacl_id, client, module): - tags = module.params.get("tags") - name = module.params.get("name") - purge_tags = module.params.get("purge_tags") - - if name is None and tags is None: - return False - - if module.params.get("tags") is None: - # Only purge tags if tags is explicitly set to {} and purge_tags is True - purge_tags = False - - new_tags = dict() - if module.params.get("name") is not None: - new_tags["Name"] = module.params.get("name") - new_tags.update(module.params.get("tags") or {}) - - return ensure_ec2_tags( - client, module, nacl_id, tags=new_tags, purge_tags=purge_tags, retry_codes=["InvalidNetworkAclID.NotFound"] - ) - - -def rules_changed(aws_rules, param_rules, Egress, nacl_id, client, module): - changed = False - rules = list() - for entry in param_rules: - rules.append(process_rule_entry(entry, Egress)) - if rules == aws_rules: - return changed - else: - removed_rules = [x for x in aws_rules if x not in rules] - if removed_rules: - params = dict() - for rule in removed_rules: - params["NetworkAclId"] = nacl_id - params["RuleNumber"] = rule["RuleNumber"] - params["Egress"] = Egress - delete_network_acl_entry(params, client, module) - changed = True - added_rules = [x for x in rules if x not in aws_rules] - if added_rules: - for rule in added_rules: - rule["NetworkAclId"] = nacl_id - create_network_acl_entry(rule, client, module) - changed = True - return changed - - -def is_ipv6(cidr): - return ":" in cidr - - -def process_rule_entry(entry, Egress): - params = dict() - params["RuleNumber"] = entry[0] - params["Protocol"] = str(PROTOCOL_NUMBERS[entry[1]]) - params["RuleAction"] = entry[2] - params["Egress"] = Egress - if is_ipv6(entry[3]): - params["Ipv6CidrBlock"] = entry[3] - else: - params["CidrBlock"] = entry[3] - if icmp_present(entry): - params["IcmpTypeCode"] = {"Type": int(entry[4]), "Code": int(entry[5])} - else: - if entry[6] or entry[7]: - params["PortRange"] = {"From": entry[6], "To": entry[7]} - return params - - -def restore_default_associations(assoc_ids, default_nacl_id, client, module): - if assoc_ids: - params = dict() - params["NetworkAclId"] = default_nacl_id[0] - for assoc_id in assoc_ids: - params["AssociationId"] = assoc_id - restore_default_acl_association(params, client, module) - return True - - -def construct_acl_entries(nacl, client, module): - for entry in module.params.get("ingress"): - params = process_rule_entry(entry, Egress=False) - params["NetworkAclId"] = nacl["NetworkAcl"]["NetworkAclId"] - create_network_acl_entry(params, client, module) - for rule in module.params.get("egress"): - params = process_rule_entry(rule, Egress=True) - params["NetworkAclId"] = nacl["NetworkAcl"]["NetworkAclId"] - create_network_acl_entry(params, client, module) - - -# Module invocations -def setup_network_acl(client, module): - changed = False - nacl = describe_network_acl(client, module) - if not nacl["NetworkAcls"]: - tags = {} - if module.params.get("name"): - tags["Name"] = module.params.get("name") - tags.update(module.params.get("tags") or {}) - nacl = create_network_acl(module.params.get("vpc_id"), client, module, tags) - nacl_id = nacl["NetworkAcl"]["NetworkAclId"] - subnets = subnets_to_associate(nacl, client, module) - replace_network_acl_association(nacl_id, subnets, client, module) - construct_acl_entries(nacl, client, module) - changed = True - return changed, nacl["NetworkAcl"]["NetworkAclId"] - else: - changed = False - nacl_id = nacl["NetworkAcls"][0]["NetworkAclId"] - changed |= subnets_changed(nacl, client, module) - changed |= nacls_changed(nacl, client, module) - changed |= tags_changed(nacl_id, client, module) - return changed, nacl_id - - -def remove_network_acl(client, module): - changed = False - result = dict() - nacl = describe_network_acl(client, module) - if nacl["NetworkAcls"]: - nacl_id = nacl["NetworkAcls"][0]["NetworkAclId"] - vpc_id = nacl["NetworkAcls"][0]["VpcId"] - associations = nacl["NetworkAcls"][0]["Associations"] - assoc_ids = [a["NetworkAclAssociationId"] for a in associations] - default_nacl_id = find_default_vpc_nacl(vpc_id, client, module) - if not default_nacl_id: - result = {vpc_id: "Default NACL ID not found - Check the VPC ID"} - return changed, result - if restore_default_associations(assoc_ids, default_nacl_id, client, module): - delete_network_acl(nacl_id, client, module) - changed = True - result[nacl_id] = "Successfully deleted" - return changed, result - if not assoc_ids: - delete_network_acl(nacl_id, client, module) - changed = True - result[nacl_id] = "Successfully deleted" - return changed, result - return changed, result - - -# Boto3 client methods -@AWSRetry.jittered_backoff() -def _create_network_acl(client, *args, **kwargs): - return client.create_network_acl(*args, **kwargs) - - -def create_network_acl(vpc_id, client, module, tags): - params = dict(VpcId=vpc_id) - if tags: - params["TagSpecifications"] = boto3_tag_specifications(tags, ["network-acl"]) - try: - if module.check_mode: - nacl = dict(NetworkAcl=dict(NetworkAclId="nacl-00000000")) - else: - nacl = _create_network_acl(client, **params) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - return nacl - - -@AWSRetry.jittered_backoff(catch_extra_error_codes=["InvalidNetworkAclID.NotFound"]) -def _create_network_acl_entry(client, *args, **kwargs): - return client.create_network_acl_entry(*args, **kwargs) - - -def create_network_acl_entry(params, client, module): - try: - if not module.check_mode: - _create_network_acl_entry(client, **params) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - - -@AWSRetry.jittered_backoff() -def _delete_network_acl(client, *args, **kwargs): - return client.delete_network_acl(*args, **kwargs) - - -def delete_network_acl(nacl_id, client, module): - try: - if not module.check_mode: - _delete_network_acl(client, NetworkAclId=nacl_id) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - - -@AWSRetry.jittered_backoff(catch_extra_error_codes=["InvalidNetworkAclID.NotFound"]) -def _delete_network_acl_entry(client, *args, **kwargs): - return client.delete_network_acl_entry(*args, **kwargs) - - -def delete_network_acl_entry(params, client, module): - try: - if not module.check_mode: - _delete_network_acl_entry(client, **params) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - - -@AWSRetry.jittered_backoff() -def _describe_network_acls(client, **kwargs): - return client.describe_network_acls(**kwargs) - - -@AWSRetry.jittered_backoff(catch_extra_error_codes=["InvalidNetworkAclID.NotFound"]) -def _describe_network_acls_retry_missing(client, **kwargs): - return client.describe_network_acls(**kwargs) - - -def describe_acl_associations(subnets, client, module): - if not subnets: - return [] - try: - results = _describe_network_acls_retry_missing( - client, Filters=[{"Name": "association.subnet-id", "Values": subnets}] - ) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - associations = results["NetworkAcls"][0]["Associations"] - return [a["NetworkAclAssociationId"] for a in associations if a["SubnetId"] in subnets] - - -def describe_network_acl(client, module): - try: - if module.params.get("nacl_id"): - nacl = _describe_network_acls( - client, Filters=[{"Name": "network-acl-id", "Values": [module.params.get("nacl_id")]}] - ) - else: - nacl = _describe_network_acls(client, Filters=[{"Name": "tag:Name", "Values": [module.params.get("name")]}]) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - return nacl - - -def find_acl_by_id(nacl_id, client, module): - try: - return _describe_network_acls_retry_missing(client, NetworkAclIds=[nacl_id]) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - - -def find_default_vpc_nacl(vpc_id, client, module): - try: - response = _describe_network_acls_retry_missing(client, Filters=[{"Name": "vpc-id", "Values": [vpc_id]}]) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - nacls = response["NetworkAcls"] - return [n["NetworkAclId"] for n in nacls if n["IsDefault"] is True] - - -def find_subnet_ids_by_nacl_id(nacl_id, client, module): - try: - results = _describe_network_acls_retry_missing( - client, Filters=[{"Name": "association.network-acl-id", "Values": [nacl_id]}] - ) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - if results["NetworkAcls"]: - associations = results["NetworkAcls"][0]["Associations"] - return [s["SubnetId"] for s in associations if s["SubnetId"]] - else: - return [] - - -@AWSRetry.jittered_backoff(catch_extra_error_codes=["InvalidNetworkAclID.NotFound"]) -def _replace_network_acl_association(client, *args, **kwargs): - return client.replace_network_acl_association(*args, **kwargs) - - -def replace_network_acl_association(nacl_id, subnets, client, module): - params = dict() - params["NetworkAclId"] = nacl_id - for association in describe_acl_associations(subnets, client, module): - params["AssociationId"] = association - try: - if not module.check_mode: - _replace_network_acl_association(client, **params) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - - -@AWSRetry.jittered_backoff(catch_extra_error_codes=["InvalidNetworkAclID.NotFound"]) -def _replace_network_acl_entry(client, *args, **kwargs): - return client.replace_network_acl_entry(*args, **kwargs) - - -def replace_network_acl_entry(entries, Egress, nacl_id, client, module): - for entry in entries: - params = entry - params["NetworkAclId"] = nacl_id - try: - if not module.check_mode: - _replace_network_acl_entry(client, **params) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - - -@AWSRetry.jittered_backoff(catch_extra_error_codes=["InvalidNetworkAclID.NotFound"]) -def _replace_network_acl_association(client, *args, **kwargs): - return client.replace_network_acl_association(*args, **kwargs) - - -def restore_default_acl_association(params, client, module): - try: - if not module.check_mode: - _replace_network_acl_association(client, **params) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - - -@AWSRetry.jittered_backoff() -def _describe_subnets(client, *args, **kwargs): - return client.describe_subnets(*args, **kwargs) - - -def subnets_to_associate(nacl, client, module): - params = list(module.params.get("subnets")) - if not params: - return [] - all_found = [] - if any(x.startswith("subnet-") for x in params): - try: - subnets = _describe_subnets(client, Filters=[{"Name": "subnet-id", "Values": params}]) - all_found.extend(subnets.get("Subnets", [])) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - if len(params) != len(all_found): - try: - subnets = _describe_subnets(client, Filters=[{"Name": "tag:Name", "Values": params}]) - all_found.extend(subnets.get("Subnets", [])) - except botocore.exceptions.ClientError as e: - module.fail_json_aws(e) - return list(set(s["SubnetId"] for s in all_found if s.get("SubnetId"))) - - -def main(): - argument_spec = dict( - vpc_id=dict(), - name=dict(), - nacl_id=dict(), - subnets=dict(required=False, type="list", default=list(), elements="str"), - tags=dict(required=False, type="dict", aliases=["resource_tags"]), - purge_tags=dict(required=False, type="bool", default=True), - ingress=dict(required=False, type="list", default=list(), elements="list"), - egress=dict(required=False, type="list", default=list(), elements="list"), - state=dict(default="present", choices=["present", "absent"]), - ) - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - required_one_of=[["name", "nacl_id"]], - required_if=[["state", "present", ["vpc_id"]]], - ) - - state = module.params.get("state").lower() - - client = module.client("ec2") - - invocations = { - "present": setup_network_acl, - "absent": remove_network_acl, - } - (changed, results) = invocations[state](client, module) - module.exit_json(changed=changed, nacl_id=results) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_vpc_nacl_info.py b/plugins/modules/ec2_vpc_nacl_info.py deleted file mode 100644 index d95508a894e..00000000000 --- a/plugins/modules/ec2_vpc_nacl_info.py +++ /dev/null @@ -1,226 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Contributors to the Ansible project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: ec2_vpc_nacl_info -version_added: 1.0.0 -short_description: Gather information about Network ACLs in an AWS VPC -description: - - Gather information about Network ACLs in an AWS VPC -author: - - "Brad Davidson (@brandond)" -options: - nacl_ids: - description: - - A list of Network ACL IDs to retrieve information about. - required: false - default: [] - aliases: [nacl_id] - type: list - elements: str - filters: - description: - - A dict of filters to apply. Each dict item consists of a filter key and a filter value. See - U(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeNetworkAcls.html) for possible filters. Filter - names and values are case sensitive. - required: false - default: {} - type: dict -notes: - - By default, the module will return all Network ACLs. - -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Note: These examples do not set authentication details, see the AWS Guide for details. - -# Gather information about all Network ACLs: -- name: Get All NACLs - community.aws.ec2_vpc_nacl_info: - region: us-west-2 - register: all_nacls - -# Retrieve default Network ACLs: -- name: Get Default NACLs - community.aws.ec2_vpc_nacl_info: - region: us-west-2 - filters: - 'default': 'true' - register: default_nacls -""" - -RETURN = r""" -nacls: - description: Returns an array of complex objects as described below. - returned: success - type: complex - contains: - nacl_id: - description: The ID of the Network Access Control List. - returned: always - type: str - vpc_id: - description: The ID of the VPC that the NACL is attached to. - returned: always - type: str - is_default: - description: True if the NACL is the default for its VPC. - returned: always - type: bool - tags: - description: A dict of tags associated with the NACL. - returned: always - type: dict - subnets: - description: A list of subnet IDs that are associated with the NACL. - returned: always - type: list - elements: str - ingress: - description: - - A list of NACL ingress rules with the following format. - - "C([rule no, protocol, allow/deny, v4 or v6 cidr, icmp_type, icmp_code, port from, port to])" - returned: always - type: list - elements: list - sample: [[100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22]] - egress: - description: - - A list of NACL egress rules with the following format. - - "C([rule no, protocol, allow/deny, v4 or v6 cidr, icmp_type, icmp_code, port from, port to])" - returned: always - type: list - elements: list - sample: [[100, 'all', 'allow', '0.0.0.0/0', null, null, null, null]] -""" - -try: - import botocore -except ImportError: - pass # caught by AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - -# VPC-supported IANA protocol numbers -# http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml -PROTOCOL_NAMES = {"-1": "all", "1": "icmp", "6": "tcp", "17": "udp"} - - -def list_ec2_vpc_nacls(connection, module): - nacl_ids = module.params.get("nacl_ids") - filters = ansible_dict_to_boto3_filter_list(module.params.get("filters")) - - if nacl_ids is None: - nacl_ids = [] - - try: - nacls = connection.describe_network_acls(aws_retry=True, NetworkAclIds=nacl_ids, Filters=filters) - except is_boto3_error_code("InvalidNetworkAclID.NotFound"): - module.fail_json(msg="Unable to describe ACL. NetworkAcl does not exist") - except ( - botocore.exceptions.ClientError, - botocore.exceptions.BotoCoreError, - ) as e: # pylint: disable=duplicate-except - module.fail_json_aws(e, msg=f"Unable to describe network ACLs {nacl_ids}") - - # Turn the boto3 result in to ansible_friendly_snaked_names - snaked_nacls = [] - for nacl in nacls["NetworkAcls"]: - snaked_nacls.append(camel_dict_to_snake_dict(nacl)) - - # Turn the boto3 result in to ansible friendly tag dictionary - for nacl in snaked_nacls: - if "tags" in nacl: - nacl["tags"] = boto3_tag_list_to_ansible_dict(nacl["tags"], "key", "value") - if "entries" in nacl: - nacl["egress"] = [ - nacl_entry_to_list(entry) - for entry in nacl["entries"] - if entry["rule_number"] < 32767 and entry["egress"] - ] - nacl["ingress"] = [ - nacl_entry_to_list(entry) - for entry in nacl["entries"] - if entry["rule_number"] < 32767 and not entry["egress"] - ] - del nacl["entries"] - if "associations" in nacl: - nacl["subnets"] = [a["subnet_id"] for a in nacl["associations"]] - del nacl["associations"] - if "network_acl_id" in nacl: - nacl["nacl_id"] = nacl["network_acl_id"] - del nacl["network_acl_id"] - - module.exit_json(nacls=snaked_nacls) - - -def nacl_entry_to_list(entry): - # entry list format - # [ rule_num, protocol name or number, allow or deny, ipv4/6 cidr, icmp type, icmp code, port from, port to] - elist = [] - - elist.append(entry["rule_number"]) - - if entry.get("protocol") in PROTOCOL_NAMES: - elist.append(PROTOCOL_NAMES[entry["protocol"]]) - else: - elist.append(entry.get("protocol")) - - elist.append(entry["rule_action"]) - - if entry.get("cidr_block"): - elist.append(entry["cidr_block"]) - elif entry.get("ipv6_cidr_block"): - elist.append(entry["ipv6_cidr_block"]) - else: - elist.append(None) - - elist = elist + [None, None, None, None] - - if entry["protocol"] in ("1", "58"): - elist[4] = entry.get("icmp_type_code", {}).get("type") - elist[5] = entry.get("icmp_type_code", {}).get("code") - - if entry["protocol"] not in ("1", "6", "17", "58"): - elist[6] = 0 - elist[7] = 65535 - elif "port_range" in entry: - elist[6] = entry["port_range"]["from"] - elist[7] = entry["port_range"]["to"] - - return elist - - -def main(): - argument_spec = dict( - nacl_ids=dict(default=[], type="list", aliases=["nacl_id"], elements="str"), - filters=dict(default={}, type="dict"), - ) - - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - ) - - connection = module.client("ec2", retry_decorator=AWSRetry.jittered_backoff()) - - list_ec2_vpc_nacls(connection, module) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_vpc_peer.py b/plugins/modules/ec2_vpc_peer.py deleted file mode 100644 index 2a731bf23e4..00000000000 --- a/plugins/modules/ec2_vpc_peer.py +++ /dev/null @@ -1,611 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" -module: ec2_vpc_peer -short_description: create, delete, accept, and reject VPC peering connections between two VPCs. -version_added: 1.0.0 -description: - - Read the AWS documentation for VPC Peering Connections - U(https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-peering.html). -options: - vpc_id: - description: - - VPC id of the requesting VPC. - required: false - type: str - peering_id: - description: - - Peering connection id. - required: false - type: str - peer_region: - description: - - Region of the accepting VPC. - required: false - type: str - peer_vpc_id: - description: - - VPC id of the accepting VPC. - required: false - type: str - peer_owner_id: - description: - - The AWS account number for cross account peering. - required: false - type: str - state: - description: - - Create, delete, accept, reject a peering connection. - required: false - default: present - choices: ['present', 'absent', 'accept', 'reject'] - type: str - wait: - description: - - Wait for peering state changes to complete. - required: false - default: false - type: bool -notes: - - Support for I(purge_tags) was added in release 2.0.0. -author: - - Mike Mochan (@mmochan) -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.tags - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Complete example to create and accept a local peering connection. -- name: Create local account VPC peering Connection - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - vpc_id: vpc-12345678 - peer_vpc_id: vpc-87654321 - state: present - tags: - Name: Peering connection for VPC 21 to VPC 22 - CostCode: CC1234 - Project: phoenix - register: vpc_peer - -- name: Accept local VPC peering request - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - peering_id: "{{ vpc_peer.peering_id }}" - state: accept - register: action_peer - -# Complete example to delete a local peering connection. -- name: Create local account VPC peering Connection - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - vpc_id: vpc-12345678 - peer_vpc_id: vpc-87654321 - state: present - tags: - Name: Peering connection for VPC 21 to VPC 22 - CostCode: CC1234 - Project: phoenix - register: vpc_peer - -- name: delete a local VPC peering Connection - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - peering_id: "{{ vpc_peer.peering_id }}" - state: absent - register: vpc_peer - - # Complete example to create and accept a cross account peering connection. -- name: Create cross account VPC peering Connection - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - vpc_id: vpc-12345678 - peer_vpc_id: vpc-12345678 - peer_owner_id: 123456789012 - state: present - tags: - Name: Peering connection for VPC 21 to VPC 22 - CostCode: CC1234 - Project: phoenix - register: vpc_peer - -- name: Accept peering connection from remote account - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - peering_id: "{{ vpc_peer.peering_id }}" - profile: bot03_profile_for_cross_account - state: accept - register: vpc_peer - -# Complete example to create and accept an intra-region peering connection. -- name: Create intra-region VPC peering Connection - community.aws.ec2_vpc_peer: - region: us-east-1 - vpc_id: vpc-12345678 - peer_vpc_id: vpc-87654321 - peer_region: us-west-2 - state: present - tags: - Name: Peering connection for us-east-1 VPC to us-west-2 VPC - CostCode: CC1234 - Project: phoenix - register: vpc_peer - -- name: Accept peering connection from peer region - community.aws.ec2_vpc_peer: - region: us-west-2 - peering_id: "{{ vpc_peer.peering_id }}" - state: accept - register: vpc_peer - -# Complete example to create and reject a local peering connection. -- name: Create local account VPC peering Connection - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - vpc_id: vpc-12345678 - peer_vpc_id: vpc-87654321 - state: present - tags: - Name: Peering connection for VPC 21 to VPC 22 - CostCode: CC1234 - Project: phoenix - register: vpc_peer - -- name: Reject a local VPC peering Connection - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - peering_id: "{{ vpc_peer.peering_id }}" - state: reject - -# Complete example to create and accept a cross account peering connection. -- name: Create cross account VPC peering Connection - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - vpc_id: vpc-12345678 - peer_vpc_id: vpc-12345678 - peer_owner_id: 123456789012 - state: present - tags: - Name: Peering connection for VPC 21 to VPC 22 - CostCode: CC1234 - Project: phoenix - register: vpc_peer - -- name: Accept a cross account VPC peering connection request - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - peering_id: "{{ vpc_peer.peering_id }}" - profile: bot03_profile_for_cross_account - state: accept - tags: - Name: Peering connection for VPC 21 to VPC 22 - CostCode: CC1234 - Project: phoenix - -# Complete example to create and reject a cross account peering connection. -- name: Create cross account VPC peering Connection - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - vpc_id: vpc-12345678 - peer_vpc_id: vpc-12345678 - peer_owner_id: 123456789012 - state: present - tags: - Name: Peering connection for VPC 21 to VPC 22 - CostCode: CC1234 - Project: phoenix - register: vpc_peer - -- name: Reject a cross account VPC peering Connection - community.aws.ec2_vpc_peer: - region: ap-southeast-2 - peering_id: "{{ vpc_peer.peering_id }}" - profile: bot03_profile_for_cross_account - state: reject -""" - -RETURN = r""" -peering_id: - description: The id of the VPC peering connection created/deleted. - returned: always - type: str - sample: pcx-034223d7c0aec3cde -vpc_peering_connection: - description: The details of the VPC peering connection as returned by Boto3 (snake cased). - returned: success - type: complex - contains: - accepter_vpc_info: - description: Information about the VPC which accepted the connection. - returned: success - type: complex - contains: - cidr_block: - description: The primary CIDR for the VPC. - returned: when connection is in the accepted state. - type: str - example: '10.10.10.0/23' - cidr_block_set: - description: A list of all CIDRs for the VPC. - returned: when connection is in the accepted state. - type: complex - contains: - cidr_block: - description: A CIDR block used by the VPC. - returned: success - type: str - example: '10.10.10.0/23' - owner_id: - description: The AWS account that owns the VPC. - returned: success - type: str - example: 123456789012 - peering_options: - description: Additional peering configuration. - returned: when connection is in the accepted state. - type: dict - contains: - allow_dns_resolution_from_remote_vpc: - description: Indicates whether a VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC. - returned: success - type: bool - allow_egress_from_local_classic_link_to_remote_vpc: - description: Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection. - returned: success - type: bool - allow_egress_from_local_vpc_to_remote_classic_link: - description: Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection. - returned: success - type: bool - region: - description: The AWS region that the VPC is in. - returned: success - type: str - example: us-east-1 - vpc_id: - description: The ID of the VPC - returned: success - type: str - example: vpc-0123456789abcdef0 - requester_vpc_info: - description: Information about the VPC which requested the connection. - returned: success - type: complex - contains: - cidr_block: - description: The primary CIDR for the VPC. - returned: when connection is not in the deleted state. - type: str - example: '10.10.10.0/23' - cidr_block_set: - description: A list of all CIDRs for the VPC. - returned: when connection is not in the deleted state. - type: complex - contains: - cidr_block: - description: A CIDR block used by the VPC - returned: success - type: str - example: '10.10.10.0/23' - owner_id: - description: The AWS account that owns the VPC. - returned: success - type: str - example: 123456789012 - peering_options: - description: Additional peering configuration. - returned: when connection is not in the deleted state. - type: dict - contains: - allow_dns_resolution_from_remote_vpc: - description: Indicates whether a VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC. - returned: success - type: bool - allow_egress_from_local_classic_link_to_remote_vpc: - description: Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection. - returned: success - type: bool - allow_egress_from_local_vpc_to_remote_classic_link: - description: Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection. - returned: success - type: bool - region: - description: The AWS region that the VPC is in. - returned: success - type: str - example: us-east-1 - vpc_id: - description: The ID of the VPC - returned: success - type: str - example: vpc-0123456789abcdef0 - status: - description: Details of the current status of the connection. - returned: success - type: complex - contains: - code: - description: A short code describing the status of the connection. - returned: success - type: str - example: active - message: - description: Additional information about the status of the connection. - returned: success - type: str - example: Pending Acceptance by 123456789012 - tags: - description: Tags applied to the connection. - returned: success - type: dict - vpc_peering_connection_id: - description: The ID of the VPC peering connection. - returned: success - type: str - example: "pcx-0123456789abcdef0" -""" - -try: - import botocore -except ImportError: - pass # Handled by AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import add_ec2_tags -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ensure_ec2_tags -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -def wait_for_state(client, module, state, pcx_id): - waiter = client.get_waiter("vpc_peering_connection_exists") - peer_filter = { - "vpc-peering-connection-id": pcx_id, - "status-code": state, - } - try: - waiter.wait(Filters=ansible_dict_to_boto3_filter_list(peer_filter)) - except botocore.exceptions.WaiterError as e: - module.fail_json_aws(e, "Failed to wait for state change") - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, "Enable to describe Peerig Connection while waiting for state to change") - - -def describe_peering_connections(params, client): - peer_filter = { - "requester-vpc-info.vpc-id": params["VpcId"], - "accepter-vpc-info.vpc-id": params["PeerVpcId"], - } - result = client.describe_vpc_peering_connections( - aws_retry=True, - Filters=ansible_dict_to_boto3_filter_list(peer_filter), - ) - if result["VpcPeeringConnections"] == []: - # Try again with the VPC/Peer relationship reversed - peer_filter = { - "requester-vpc-info.vpc-id": params["PeerVpcId"], - "accepter-vpc-info.vpc-id": params["VpcId"], - } - result = client.describe_vpc_peering_connections( - aws_retry=True, - Filters=ansible_dict_to_boto3_filter_list(peer_filter), - ) - - return result - - -def is_active(peering_conn): - return peering_conn["Status"]["Code"] == "active" - - -def is_pending(peering_conn): - return peering_conn["Status"]["Code"] == "pending-acceptance" - - -def create_peer_connection(client, module): - changed = False - params = dict() - params["VpcId"] = module.params.get("vpc_id") - params["PeerVpcId"] = module.params.get("peer_vpc_id") - if module.params.get("peer_region"): - params["PeerRegion"] = module.params.get("peer_region") - if module.params.get("peer_owner_id"): - params["PeerOwnerId"] = str(module.params.get("peer_owner_id")) - peering_conns = describe_peering_connections(params, client) - for peering_conn in peering_conns["VpcPeeringConnections"]: - pcx_id = peering_conn["VpcPeeringConnectionId"] - if ensure_ec2_tags( - client, - module, - pcx_id, - purge_tags=module.params.get("purge_tags"), - tags=module.params.get("tags"), - ): - changed = True - if is_active(peering_conn): - return (changed, peering_conn) - if is_pending(peering_conn): - return (changed, peering_conn) - try: - peering_conn = client.create_vpc_peering_connection(aws_retry=True, **params) - pcx_id = peering_conn["VpcPeeringConnection"]["VpcPeeringConnectionId"] - if module.params.get("tags"): - # Once the minimum botocore version is bumped to > 1.17.24 - # (hopefully community.aws 3.0.0) we can add the tags to the - # creation parameters - add_ec2_tags( - client, - module, - pcx_id, - module.params.get("tags"), - retry_codes=["InvalidVpcPeeringConnectionID.NotFound"], - ) - if module.params.get("wait"): - wait_for_state(client, module, "pending-acceptance", pcx_id) - changed = True - return (changed, peering_conn["VpcPeeringConnection"]) - except botocore.exceptions.ClientError as e: - module.fail_json(msg=str(e)) - - -def remove_peer_connection(client, module): - pcx_id = module.params.get("peering_id") - if pcx_id: - peering_conn = get_peering_connection_by_id(pcx_id, client, module) - else: - params = dict() - params["VpcId"] = module.params.get("vpc_id") - params["PeerVpcId"] = module.params.get("peer_vpc_id") - params["PeerRegion"] = module.params.get("peer_region") - if module.params.get("peer_owner_id"): - params["PeerOwnerId"] = str(module.params.get("peer_owner_id")) - peering_conn = describe_peering_connections(params, client)["VpcPeeringConnections"][0] - - if not peering_conn: - module.exit_json(changed=False) - else: - pcx_id = pcx_id or peering_conn["VpcPeeringConnectionId"] - - if peering_conn["Status"]["Code"] == "deleted": - module.exit_json(msg="Connection in deleted state.", changed=False, peering_id=pcx_id) - if peering_conn["Status"]["Code"] == "rejected": - module.exit_json( - msg="Connection has been rejected. State cannot be changed and will be removed automatically by AWS", - changed=False, - peering_id=pcx_id, - ) - - try: - params = dict() - params["VpcPeeringConnectionId"] = pcx_id - client.delete_vpc_peering_connection(aws_retry=True, **params) - if module.params.get("wait"): - wait_for_state(client, module, "deleted", pcx_id) - module.exit_json(changed=True, peering_id=pcx_id) - except botocore.exceptions.ClientError as e: - module.fail_json(msg=str(e)) - - -def get_peering_connection_by_id(peering_id, client, module): - params = dict() - params["VpcPeeringConnectionIds"] = [peering_id] - try: - vpc_peering_connection = client.describe_vpc_peering_connections(aws_retry=True, **params) - return vpc_peering_connection["VpcPeeringConnections"][0] - except is_boto3_error_code("InvalidVpcPeeringConnectionId.Malformed") as e: - module.fail_json_aws(e, msg="Malformed connection ID") - except ( - botocore.exceptions.ClientError, - botocore.exceptions.BotoCoreError, - ) as e: # pylint: disable=duplicate-except - module.fail_json_aws(e, msg="Error while describing peering connection by peering_id") - - -def accept_reject(state, client, module): - changed = False - params = dict() - peering_id = module.params.get("peering_id") - params["VpcPeeringConnectionId"] = peering_id - vpc_peering_connection = get_peering_connection_by_id(peering_id, client, module) - peering_status = vpc_peering_connection["Status"]["Code"] - - if peering_status not in ["active", "rejected"]: - try: - if state == "accept": - client.accept_vpc_peering_connection(aws_retry=True, **params) - target_state = "active" - else: - client.reject_vpc_peering_connection(aws_retry=True, **params) - target_state = "rejected" - if module.params.get("tags"): - add_ec2_tags( - client, - module, - peering_id, - module.params.get("tags"), - retry_codes=["InvalidVpcPeeringConnectionID.NotFound"], - ) - changed = True - if module.params.get("wait"): - wait_for_state(client, module, target_state, peering_id) - except botocore.exceptions.ClientError as e: - module.fail_json(msg=str(e)) - if ensure_ec2_tags( - client, - module, - peering_id, - purge_tags=module.params.get("purge_tags"), - tags=module.params.get("tags"), - ): - changed = True - - # Relaod peering conection infos to return latest state/params - vpc_peering_connection = get_peering_connection_by_id(peering_id, client, module) - return (changed, vpc_peering_connection) - - -def main(): - argument_spec = dict( - vpc_id=dict(), - peer_vpc_id=dict(), - peer_region=dict(), - peering_id=dict(), - peer_owner_id=dict(), - tags=dict(required=False, type="dict", aliases=["resource_tags"]), - purge_tags=dict(default=True, type="bool"), - state=dict(default="present", choices=["present", "absent", "accept", "reject"]), - wait=dict(default=False, type="bool"), - ) - required_if = [ - ("state", "present", ["vpc_id", "peer_vpc_id"]), - ("state", "accept", ["peering_id"]), - ("state", "reject", ["peering_id"]), - ] - - module = AnsibleAWSModule(argument_spec=argument_spec, required_if=required_if) - - state = module.params.get("state") - peering_id = module.params.get("peering_id") - vpc_id = module.params.get("vpc_id") - peer_vpc_id = module.params.get("peer_vpc_id") - - try: - client = module.client("ec2", retry_decorator=AWSRetry.jittered_backoff()) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failed to connect to AWS") - - if state == "present": - (changed, results) = create_peer_connection(client, module) - elif state == "absent": - if not peering_id and (not vpc_id or not peer_vpc_id): - module.fail_json( - msg="state is absent but one of the following is missing: peering_id or [vpc_id, peer_vpc_id]" - ) - - remove_peer_connection(client, module) - else: - (changed, results) = accept_reject(state, client, module) - - formatted_results = camel_dict_to_snake_dict(results) - # Turn the resource tags from boto3 into an ansible friendly tag dictionary - formatted_results["tags"] = boto3_tag_list_to_ansible_dict(formatted_results.get("tags", [])) - - module.exit_json( - changed=changed, vpc_peering_connection=formatted_results, peering_id=results["VpcPeeringConnectionId"] - ) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_vpc_peering_info.py b/plugins/modules/ec2_vpc_peering_info.py deleted file mode 100644 index badc9f8fd80..00000000000 --- a/plugins/modules/ec2_vpc_peering_info.py +++ /dev/null @@ -1,258 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" -module: ec2_vpc_peering_info -short_description: Retrieves AWS VPC Peering details using AWS methods. -version_added: 1.0.0 -description: - - Gets various details related to AWS VPC Peers -options: - peer_connection_ids: - description: - - List of specific VPC peer IDs to get details for. - type: list - elements: str - filters: - description: - - A dict of filters to apply. Each dict item consists of a filter key and a filter value. - See U(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcPeeringConnections.html) - for possible filters. - type: dict - default: {} -author: - - Karen Cheng (@Etherdaemon) -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Simple example of listing all VPC Peers -- name: List all vpc peers - community.aws.ec2_vpc_peering_info: - region: ap-southeast-2 - register: all_vpc_peers - -- name: Debugging the result - ansible.builtin.debug: - msg: "{{ all_vpc_peers.result }}" - -- name: Get details on specific VPC peer - community.aws.ec2_vpc_peering_info: - peer_connection_ids: - - pcx-12345678 - - pcx-87654321 - region: ap-southeast-2 - register: all_vpc_peers - -- name: Get all vpc peers with specific filters - community.aws.ec2_vpc_peering_info: - region: ap-southeast-2 - filters: - status-code: ['pending-acceptance'] - register: pending_vpc_peers -""" - -RETURN = r""" -vpc_peering_connections: - description: Details of the matching VPC peering connections. - returned: success - type: list - contains: - accepter_vpc_info: - description: Information about the VPC which accepted the connection. - returned: success - type: complex - contains: - cidr_block: - description: The primary CIDR for the VPC. - returned: when connection is in the accepted state. - type: str - example: '10.10.10.0/23' - cidr_block_set: - description: A list of all CIDRs for the VPC. - returned: when connection is in the accepted state. - type: complex - contains: - cidr_block: - description: A CIDR block used by the VPC. - returned: success - type: str - example: '10.10.10.0/23' - owner_id: - description: The AWS account that owns the VPC. - returned: success - type: str - example: 123456789012 - peering_options: - description: Additional peering configuration. - returned: when connection is in the accepted state. - type: dict - contains: - allow_dns_resolution_from_remote_vpc: - description: Indicates whether a VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC. - returned: success - type: bool - allow_egress_from_local_classic_link_to_remote_vpc: - description: Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection. - returned: success - type: bool - allow_egress_from_local_vpc_to_remote_classic_link: - description: Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection. - returned: success - type: bool - region: - description: The AWS region that the VPC is in. - returned: success - type: str - example: us-east-1 - vpc_id: - description: The ID of the VPC - returned: success - type: str - example: vpc-0123456789abcdef0 - requester_vpc_info: - description: Information about the VPC which requested the connection. - returned: success - type: complex - contains: - cidr_block: - description: The primary CIDR for the VPC. - returned: when connection is not in the deleted state. - type: str - example: '10.10.10.0/23' - cidr_block_set: - description: A list of all CIDRs for the VPC. - returned: when connection is not in the deleted state. - type: complex - contains: - cidr_block: - description: A CIDR block used by the VPC - returned: success - type: str - example: '10.10.10.0/23' - owner_id: - description: The AWS account that owns the VPC. - returned: success - type: str - example: 123456789012 - peering_options: - description: Additional peering configuration. - returned: when connection is not in the deleted state. - type: dict - contains: - allow_dns_resolution_from_remote_vpc: - description: Indicates whether a VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC. - returned: success - type: bool - allow_egress_from_local_classic_link_to_remote_vpc: - description: Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection. - returned: success - type: bool - allow_egress_from_local_vpc_to_remote_classic_link: - description: Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection. - returned: success - type: bool - region: - description: The AWS region that the VPC is in. - returned: success - type: str - example: us-east-1 - vpc_id: - description: The ID of the VPC - returned: success - type: str - example: vpc-0123456789abcdef0 - status: - description: Details of the current status of the connection. - returned: success - type: complex - contains: - code: - description: A short code describing the status of the connection. - returned: success - type: str - example: active - message: - description: Additional information about the status of the connection. - returned: success - type: str - example: Pending Acceptance by 123456789012 - tags: - description: Tags applied to the connection. - returned: success - type: dict - vpc_peering_connection_id: - description: The ID of the VPC peering connection. - returned: success - type: str - example: "pcx-0123456789abcdef0" - -result: - description: The result of the describe. - returned: success - type: list -""" - -try: - import botocore -except ImportError: - pass # Handled by AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.botocore import normalize_boto3_result -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -def get_vpc_peers(client, module): - params = dict() - params["Filters"] = ansible_dict_to_boto3_filter_list(module.params.get("filters")) - if module.params.get("peer_connection_ids"): - params["VpcPeeringConnectionIds"] = module.params.get("peer_connection_ids") - try: - result = client.describe_vpc_peering_connections(aws_retry=True, **params) - result = normalize_boto3_result(result) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failed to describe peering connections") - - return result["VpcPeeringConnections"] - - -def main(): - argument_spec = dict( - filters=dict(default=dict(), type="dict"), - peer_connection_ids=dict(default=None, type="list", elements="str"), - ) - - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - ) - - try: - ec2 = module.client("ec2", retry_decorator=AWSRetry.jittered_backoff()) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failed to connect to AWS") - - # Turn the boto3 result in to ansible friendly_snaked_names - results = [camel_dict_to_snake_dict(peer) for peer in get_vpc_peers(ec2, module)] - - # Turn the boto3 result in to ansible friendly tag dictionary - for peer in results: - peer["tags"] = boto3_tag_list_to_ansible_dict(peer.get("tags", [])) - - module.exit_json(result=results, vpc_peering_connections=results) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_vpc_vgw.py b/plugins/modules/ec2_vpc_vgw.py deleted file mode 100644 index 135658f7639..00000000000 --- a/plugins/modules/ec2_vpc_vgw.py +++ /dev/null @@ -1,534 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" -module: ec2_vpc_vgw -short_description: Create and delete AWS VPN Virtual Gateways -version_added: 1.0.0 -description: - - Creates AWS VPN Virtual Gateways - - Deletes AWS VPN Virtual Gateways - - Attaches Virtual Gateways to VPCs - - Detaches Virtual Gateways from VPCs -options: - state: - description: - - C(present) to ensure resource is created. - - C(absent) to remove resource. - default: present - choices: [ "present", "absent"] - type: str - name: - description: - - Name of the VGW to be created or deleted. - type: str - type: - description: - - Type of the virtual gateway to be created. - choices: [ "ipsec.1" ] - default: "ipsec.1" - type: str - vpn_gateway_id: - description: - - VPN gateway ID of an existing virtual gateway. - type: str - vpc_id: - description: - - The ID of a VPC to attach or detach to the VGW. - type: str - asn: - description: - - The BGP ASN on the Amazon side. - type: int - wait_timeout: - description: - - Number of seconds to wait for status during VPC attach and detach. - default: 320 - type: int -notes: - - Support for I(purge_tags) was added in release 4.0.0. -author: - - Nick Aslanidis (@naslanidis) -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.tags - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -- name: Create a new VGW attached to a specific VPC - community.aws.ec2_vpc_vgw: - state: present - region: ap-southeast-2 - profile: personal - vpc_id: vpc-12345678 - name: personal-testing - type: ipsec.1 - register: created_vgw - -- name: Create a new unattached VGW - community.aws.ec2_vpc_vgw: - state: present - region: ap-southeast-2 - profile: personal - name: personal-testing - type: ipsec.1 - tags: - environment: production - owner: ABC - register: created_vgw - -- name: Remove a new VGW using the name - community.aws.ec2_vpc_vgw: - state: absent - region: ap-southeast-2 - profile: personal - name: personal-testing - type: ipsec.1 - register: deleted_vgw - -- name: Remove a new VGW using the vpn_gateway_id - community.aws.ec2_vpc_vgw: - state: absent - region: ap-southeast-2 - profile: personal - vpn_gateway_id: vgw-3a9aa123 - register: deleted_vgw -""" - -RETURN = r""" -vgw: - description: A description of the VGW - returned: success - type: dict - contains: - id: - description: The ID of the VGW. - type: str - returned: success - example: "vgw-0123456789abcdef0" - state: - description: The state of the VGW. - type: str - returned: success - example: "available" - tags: - description: A dictionary representing the tags attached to the VGW - type: dict - returned: success - example: { "Name": "ansible-test-ec2-vpc-vgw" } - type: - description: The type of VPN connection the virtual private gateway supports. - type: str - returned: success - example: "ipsec.1" - vpc_id: - description: The ID of the VPC to which the VGW is attached. - type: str - returned: success - example: vpc-123456789abcdef01 -""" - -import time - -try: - import botocore -except ImportError: - pass # Handled by AnsibleAWSModule - -from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ensure_ec2_tags -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_specifications -from ansible_collections.amazon.aws.plugins.module_utils.waiters import get_waiter - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -# AWS uses VpnGatewayLimitExceeded for both 'Too many VGWs' and 'Too many concurrent changes' -# we need to look at the mesage to tell the difference. -class VGWRetry(AWSRetry): - @staticmethod - def status_code_from_exception(error): - return ( - error.response["Error"]["Code"], - error.response["Error"]["Message"], - ) - - @staticmethod - def found(response_code, catch_extra_error_codes=None): - retry_on = ["The maximum number of mutating objects has been reached."] - - if catch_extra_error_codes: - retry_on.extend(catch_extra_error_codes) - if not isinstance(response_code, tuple): - response_code = (response_code,) - - for code in response_code: - if super().found(response_code, catch_extra_error_codes): - return True - - return False - - -def get_vgw_info(vgws): - if not isinstance(vgws, list): - return - - for vgw in vgws: - vgw_info = { - "id": vgw["VpnGatewayId"], - "type": vgw["Type"], - "state": vgw["State"], - "vpc_id": None, - "tags": dict(), - } - - if vgw["Tags"]: - vgw_info["tags"] = boto3_tag_list_to_ansible_dict(vgw["Tags"]) - - if len(vgw["VpcAttachments"]) != 0 and vgw["VpcAttachments"][0]["State"] == "attached": - vgw_info["vpc_id"] = vgw["VpcAttachments"][0]["VpcId"] - - return vgw_info - - -def wait_for_status(client, module, vpn_gateway_id, status): - polling_increment_secs = 15 - max_retries = module.params.get("wait_timeout") // polling_increment_secs - status_achieved = False - - for x in range(0, max_retries): - try: - response = find_vgw(client, module, vpn_gateway_id) - if response[0]["VpcAttachments"][0]["State"] == status: - status_achieved = True - break - else: - time.sleep(polling_increment_secs) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failure while waiting for status update") - - result = response - return status_achieved, result - - -def attach_vgw(client, module, vpn_gateway_id): - params = dict() - params["VpcId"] = module.params.get("vpc_id") - - try: - # Immediately after a detachment, the EC2 API sometimes will report the VpnGateways[0].State - # as available several seconds before actually permitting a new attachment. - # So we catch and retry that error. See https://github.com/ansible/ansible/issues/53185 - response = VGWRetry.jittered_backoff(retries=5, catch_extra_error_codes=["InvalidParameterValue"])( - client.attach_vpn_gateway - )(VpnGatewayId=vpn_gateway_id, VpcId=params["VpcId"]) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failed to attach VPC") - - status_achieved, vgw = wait_for_status(client, module, [vpn_gateway_id], "attached") - if not status_achieved: - module.fail_json(msg="Error waiting for vpc to attach to vgw - please check the AWS console") - - result = response - return result - - -def detach_vgw(client, module, vpn_gateway_id, vpc_id=None): - params = dict() - params["VpcId"] = module.params.get("vpc_id") - - try: - if vpc_id: - response = client.detach_vpn_gateway(VpnGatewayId=vpn_gateway_id, VpcId=vpc_id, aws_retry=True) - else: - response = client.detach_vpn_gateway(VpnGatewayId=vpn_gateway_id, VpcId=params["VpcId"], aws_retry=True) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, "Failed to detach gateway") - - status_achieved, vgw = wait_for_status(client, module, [vpn_gateway_id], "detached") - if not status_achieved: - module.fail_json(msg="Error waiting for vpc to detach from vgw - please check the AWS console") - - result = response - return result - - -def create_vgw(client, module): - params = dict() - params["Type"] = module.params.get("type") - tags = module.params.get("tags") or {} - tags["Name"] = module.params.get("name") - params["TagSpecifications"] = boto3_tag_specifications(tags, ["vpn-gateway"]) - if module.params.get("asn"): - params["AmazonSideAsn"] = module.params.get("asn") - - try: - response = client.create_vpn_gateway(aws_retry=True, **params) - get_waiter(client, "vpn_gateway_exists").wait(VpnGatewayIds=[response["VpnGateway"]["VpnGatewayId"]]) - except botocore.exceptions.WaiterError as e: - module.fail_json_aws( - e, msg=f"Failed to wait for Vpn Gateway {response['VpnGateway']['VpnGatewayId']} to be available" - ) - except is_boto3_error_code("VpnGatewayLimitExceeded") as e: - module.fail_json_aws(e, msg="Too many VPN gateways exist in this account.") - except ( - botocore.exceptions.ClientError, - botocore.exceptions.BotoCoreError, - ) as e: # pylint: disable=duplicate-except - module.fail_json_aws(e, msg="Failed to create gateway") - - result = response - return result - - -def delete_vgw(client, module, vpn_gateway_id): - try: - response = client.delete_vpn_gateway(VpnGatewayId=vpn_gateway_id, aws_retry=True) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failed to delete gateway") - - # return the deleted VpnGatewayId as this is not included in the above response - result = vpn_gateway_id - return result - - -def find_vpc(client, module): - params = dict() - params["vpc_id"] = module.params.get("vpc_id") - - if params["vpc_id"]: - try: - response = client.describe_vpcs(VpcIds=[params["vpc_id"]], aws_retry=True) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failed to describe VPC") - - result = response - return result - - -def find_vgw(client, module, vpn_gateway_id=None): - params = dict() - if vpn_gateway_id: - params["VpnGatewayIds"] = vpn_gateway_id - else: - params["Filters"] = [ - {"Name": "type", "Values": [module.params.get("type")]}, - {"Name": "tag:Name", "Values": [module.params.get("name")]}, - ] - if module.params.get("state") == "present": - params["Filters"].append({"Name": "state", "Values": ["pending", "available"]}) - try: - response = client.describe_vpn_gateways(aws_retry=True, **params) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failed to describe gateway using filters") - - return sorted(response["VpnGateways"], key=lambda k: k["VpnGatewayId"]) - - -def ensure_vgw_present(client, module): - # If an existing vgw name and type matches our args, then a match is considered to have been - # found and we will not create another vgw. - - changed = False - params = dict() - result = dict() - params["Name"] = module.params.get("name") - params["VpcId"] = module.params.get("vpc_id") - params["Type"] = module.params.get("type") - params["Tags"] = module.params.get("tags") - params["VpnGatewayIds"] = module.params.get("vpn_gateway_id") - - # check that the vpc_id exists. If not, an exception is thrown - if params["VpcId"]: - vpc = find_vpc(client, module) - - # check if a gateway matching our module args already exists - existing_vgw = find_vgw(client, module) - - if existing_vgw != []: - vpn_gateway_id = existing_vgw[0]["VpnGatewayId"] - desired_tags = module.params.get("tags") - purge_tags = module.params.get("purge_tags") - if desired_tags is None: - desired_tags = dict() - purge_tags = False - tags = dict(Name=module.params.get("name")) - tags.update(desired_tags) - changed = ensure_ec2_tags( - client, module, vpn_gateway_id, resource_type="vpn-gateway", tags=tags, purge_tags=purge_tags - ) - - # if a vpc_id was provided, check if it exists and if it's attached - if params["VpcId"]: - current_vpc_attachments = existing_vgw[0]["VpcAttachments"] - - if current_vpc_attachments != [] and current_vpc_attachments[0]["State"] == "attached": - if ( - current_vpc_attachments[0]["VpcId"] != params["VpcId"] - or current_vpc_attachments[0]["State"] != "attached" - ): - # detach the existing vpc from the virtual gateway - vpc_to_detach = current_vpc_attachments[0]["VpcId"] - detach_vgw(client, module, vpn_gateway_id, vpc_to_detach) - get_waiter(client, "vpn_gateway_detached").wait(VpnGatewayIds=[vpn_gateway_id]) - attached_vgw = attach_vgw(client, module, vpn_gateway_id) - changed = True - else: - # attach the vgw to the supplied vpc - attached_vgw = attach_vgw(client, module, vpn_gateway_id) - changed = True - - # if params['VpcId'] is not provided, check the vgw is attached to a vpc. if so, detach it. - else: - existing_vgw = find_vgw(client, module, [vpn_gateway_id]) - - if existing_vgw[0]["VpcAttachments"] != []: - if existing_vgw[0]["VpcAttachments"][0]["State"] == "attached": - # detach the vpc from the vgw - vpc_to_detach = existing_vgw[0]["VpcAttachments"][0]["VpcId"] - detach_vgw(client, module, vpn_gateway_id, vpc_to_detach) - changed = True - - else: - # create a new vgw - new_vgw = create_vgw(client, module) - changed = True - vpn_gateway_id = new_vgw["VpnGateway"]["VpnGatewayId"] - - # if a vpc-id was supplied, attempt to attach it to the vgw - if params["VpcId"]: - attached_vgw = attach_vgw(client, module, vpn_gateway_id) - changed = True - - # return current state of the vgw - vgw = find_vgw(client, module, [vpn_gateway_id]) - result = get_vgw_info(vgw) - return changed, result - - -def ensure_vgw_absent(client, module): - # If an existing vgw name and type matches our args, then a match is considered to have been - # found and we will take steps to delete it. - - changed = False - params = dict() - result = dict() - params["Name"] = module.params.get("name") - params["VpcId"] = module.params.get("vpc_id") - params["Type"] = module.params.get("type") - params["Tags"] = module.params.get("tags") - params["VpnGatewayIds"] = module.params.get("vpn_gateway_id") - - # check if a gateway matching our module args already exists - if params["VpnGatewayIds"]: - existing_vgw_with_id = find_vgw(client, module, [params["VpnGatewayIds"]]) - if existing_vgw_with_id != [] and existing_vgw_with_id[0]["State"] != "deleted": - existing_vgw = existing_vgw_with_id - if existing_vgw[0]["VpcAttachments"] != [] and existing_vgw[0]["VpcAttachments"][0]["State"] == "attached": - if params["VpcId"]: - if params["VpcId"] != existing_vgw[0]["VpcAttachments"][0]["VpcId"]: - module.fail_json( - msg="The vpc-id provided does not match the vpc-id currently attached - please check the AWS console" - ) - - else: - # detach the vpc from the vgw - detach_vgw(client, module, params["VpnGatewayIds"], params["VpcId"]) - deleted_vgw = delete_vgw(client, module, params["VpnGatewayIds"]) - changed = True - - else: - # attempt to detach any attached vpcs - vpc_to_detach = existing_vgw[0]["VpcAttachments"][0]["VpcId"] - detach_vgw(client, module, params["VpnGatewayIds"], vpc_to_detach) - deleted_vgw = delete_vgw(client, module, params["VpnGatewayIds"]) - changed = True - - else: - # no vpc's are attached so attempt to delete the vgw - deleted_vgw = delete_vgw(client, module, params["VpnGatewayIds"]) - changed = True - - else: - changed = False - deleted_vgw = "Nothing to do" - - else: - # Check that a name and type argument has been supplied if no vgw-id - if not module.params.get("name") or not module.params.get("type"): - module.fail_json(msg="A name and type is required when no vgw-id and a status of 'absent' is supplied") - - existing_vgw = find_vgw(client, module) - if existing_vgw != [] and existing_vgw[0]["State"] != "deleted": - vpn_gateway_id = existing_vgw[0]["VpnGatewayId"] - if existing_vgw[0]["VpcAttachments"] != [] and existing_vgw[0]["VpcAttachments"][0]["State"] == "attached": - if params["VpcId"]: - if params["VpcId"] != existing_vgw[0]["VpcAttachments"][0]["VpcId"]: - module.fail_json( - msg="The vpc-id provided does not match the vpc-id currently attached - please check the AWS console" - ) - - else: - # detach the vpc from the vgw - detach_vgw(client, module, vpn_gateway_id, params["VpcId"]) - - # now that the vpc has been detached, delete the vgw - deleted_vgw = delete_vgw(client, module, vpn_gateway_id) - changed = True - - else: - # attempt to detach any attached vpcs - vpc_to_detach = existing_vgw[0]["VpcAttachments"][0]["VpcId"] - detach_vgw(client, module, vpn_gateway_id, vpc_to_detach) - changed = True - - # now that the vpc has been detached, delete the vgw - deleted_vgw = delete_vgw(client, module, vpn_gateway_id) - - else: - # no vpc's are attached so attempt to delete the vgw - deleted_vgw = delete_vgw(client, module, vpn_gateway_id) - changed = True - - else: - changed = False - deleted_vgw = None - - result = deleted_vgw - return changed, result - - -def main(): - argument_spec = dict( - state=dict(default="present", choices=["present", "absent"]), - name=dict(), - vpn_gateway_id=dict(), - vpc_id=dict(), - asn=dict(type="int"), - wait_timeout=dict(type="int", default=320), - type=dict(default="ipsec.1", choices=["ipsec.1"]), - tags=dict(default=None, required=False, type="dict", aliases=["resource_tags"]), - purge_tags=dict(default=True, type="bool"), - ) - module = AnsibleAWSModule(argument_spec=argument_spec, required_if=[["state", "present", ["name"]]]) - - state = module.params.get("state").lower() - - client = module.client("ec2", retry_decorator=VGWRetry.jittered_backoff(retries=10)) - - if state == "present": - (changed, results) = ensure_vgw_present(client, module) - else: - (changed, results) = ensure_vgw_absent(client, module) - module.exit_json(changed=changed, vgw=results) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_vpc_vgw_info.py b/plugins/modules/ec2_vpc_vgw_info.py deleted file mode 100644 index 6ab311c038f..00000000000 --- a/plugins/modules/ec2_vpc_vgw_info.py +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: ec2_vpc_vgw_info -version_added: 1.0.0 -short_description: Gather information about virtual gateways in AWS -description: - - Gather information about virtual gateways (VGWs) in AWS. -options: - filters: - description: - - A dict of filters to apply. Each dict item consists of a filter key and a filter value. - See U(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpnGateways.html) for possible filters. - type: dict - default: {} - vpn_gateway_ids: - description: - - Get details of a specific Virtual Gateway ID. - type: list - elements: str -author: - - "Nick Aslanidis (@naslanidis)" -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# # Note: These examples do not set authentication details, see the AWS Guide for details. - -- name: Gather information about all virtual gateways for an account or profile - community.aws.ec2_vpc_vgw_info: - region: ap-southeast-2 - profile: production - register: vgw_info - -- name: Gather information about a filtered list of Virtual Gateways - community.aws.ec2_vpc_vgw_info: - region: ap-southeast-2 - profile: production - filters: - "tag:Name": "main-virt-gateway" - register: vgw_info - -- name: Gather information about a specific virtual gateway by VpnGatewayIds - community.aws.ec2_vpc_vgw_info: - region: ap-southeast-2 - profile: production - vpn_gateway_ids: vgw-c432f6a7 - register: vgw_info -""" - -RETURN = r""" -virtual_gateways: - description: The virtual gateways for the account. - returned: always - type: list - elements: dict - contains: - vpn_gateway_id: - description: The ID of the VGW. - type: str - returned: success - example: "vgw-0123456789abcdef0" - state: - description: The current state of the VGW. - type: str - returned: success - example: "available" - type: - description: The type of VPN connection the VGW supports. - type: str - returned: success - example: "ipsec.1" - vpc_attachments: - description: A description of the attachment of VPCs to the VGW. - type: list - elements: dict - returned: success - contains: - state: - description: The current state of the attachment. - type: str - returned: success - example: available - vpc_id: - description: The ID of the VPC. - type: str - returned: success - example: vpc-12345678901234567 - tags: - description: - - A list of dictionaries representing the tags attached to the VGW. - - Represents the same details as I(resource_tags). - type: list - elements: dict - returned: success - contains: - key: - description: The key of the tag. - type: str - returned: success - example: MyKey - value: - description: The value of the tag. - type: str - returned: success - example: MyValue - resource_tags: - description: - - A dictionary representing the tags attached to the VGW. - - Represents the same details as I(tags). - type: dict - returned: success - example: {"MyKey": "MyValue"} -""" - -try: - import botocore -except ImportError: - pass # Handled by AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -def get_virtual_gateway_info(virtual_gateway): - tags = virtual_gateway.get("Tags", []) - resource_tags = boto3_tag_list_to_ansible_dict(tags) - virtual_gateway_info = dict( - VpnGatewayId=virtual_gateway["VpnGatewayId"], - State=virtual_gateway["State"], - Type=virtual_gateway["Type"], - VpcAttachments=virtual_gateway["VpcAttachments"], - Tags=tags, - ResourceTags=resource_tags, - ) - return virtual_gateway_info - - -def list_virtual_gateways(client, module): - params = dict() - - params["Filters"] = ansible_dict_to_boto3_filter_list(module.params.get("filters")) - - if module.params.get("vpn_gateway_ids"): - params["VpnGatewayIds"] = module.params.get("vpn_gateway_ids") - - try: - all_virtual_gateways = client.describe_vpn_gateways(**params) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failed to list gateways") - - return [ - camel_dict_to_snake_dict(get_virtual_gateway_info(vgw), ignore_list=["ResourceTags"]) - for vgw in all_virtual_gateways["VpnGateways"] - ] - - -def main(): - argument_spec = dict( - filters=dict(type="dict", default=dict()), - vpn_gateway_ids=dict(type="list", default=None, elements="str"), - ) - - module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True) - - try: - connection = module.client("ec2") - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failed to connect to AWS") - - # call your function here - results = list_virtual_gateways(connection, module) - - module.exit_json(virtual_gateways=results) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py deleted file mode 100644 index abc97f796b7..00000000000 --- a/plugins/modules/ec2_vpc_vpn.py +++ /dev/null @@ -1,866 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright (c) 2017 Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: ec2_vpc_vpn -version_added: 1.0.0 -short_description: Create, modify, and delete EC2 VPN connections -description: - - This module creates, modifies, and deletes VPN connections. Idempotence is achieved by using the filters - option or specifying the VPN connection identifier. -author: - - "Sloane Hertel (@s-hertel)" -options: - state: - description: - - The desired state of the VPN connection. - choices: ['present', 'absent'] - default: present - required: false - type: str - customer_gateway_id: - description: - - The ID of the customer gateway. - type: str - connection_type: - description: - - The type of VPN connection. - - At this time only C(ipsec.1) is supported. - default: ipsec.1 - type: str - vpn_gateway_id: - description: - - The ID of the virtual private gateway. - - Mutually exclusive with I(transit_gateway_id). - type: str - vpn_connection_id: - description: - - The ID of the VPN connection. Required to modify or delete a connection if the filters option does not provide a unique match. - type: str - static_only: - description: - - Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP. - default: False - type: bool - required: false - transit_gateway_id: - description: - - The ID of the transit gateway. - - Mutually exclusive with I(vpn_gateway_id). - type: str - version_added: 6.2.0 - tunnel_options: - description: - - An optional list object containing no more than two dict members, each of which may contain I(TunnelInsideCidr) - and/or I(PreSharedKey) keys with appropriate string values. AWS defaults will apply in absence of either of - the aforementioned keys. - required: false - type: list - elements: dict - default: [] - suboptions: - TunnelInsideCidr: - type: str - description: The range of inside IP addresses for the tunnel. - PreSharedKey: - type: str - description: The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway. - filters: - description: - - An alternative to using I(vpn_connection_id). If multiple matches are found, vpn_connection_id is required. - If one of the following suboptions is a list of items to filter by, only one item needs to match to find the VPN - that correlates. e.g. if the filter I(cidr) is C(['194.168.2.0/24', '192.168.2.0/24']) and the VPN route only has the - destination cidr block of C(192.168.2.0/24) it will be found with this filter (assuming there are not multiple - VPNs that are matched). Another example, if the filter I(vpn) is equal to C(['vpn-ccf7e7ad', 'vpn-cb0ae2a2']) and one - of of the VPNs has the state deleted (exists but is unmodifiable) and the other exists and is not deleted, - it will be found via this filter. See examples. - suboptions: - cgw-config: - description: - - The customer gateway configuration of the VPN as a string (in the format of the return value) or a list of those strings. - static-routes-only: - description: - - The type of routing; C(true) or C(false). - cidr: - description: - - The destination cidr of the VPN's route as a string or a list of those strings. - bgp: - description: - - The BGP ASN number associated with a BGP device. Only works if the connection is attached. - This filtering option is currently not working. - vpn: - description: - - The VPN connection id as a string or a list of those strings. - vgw: - description: - - The virtual private gateway as a string or a list of those strings. - tag-keys: - description: - - The key of a tag as a string or a list of those strings. - tag-values: - description: - - The value of a tag as a string or a list of those strings. - tags: - description: - - A dict of key value pairs. - cgw: - description: - - The customer gateway id as a string or a list of those strings. - type: dict - default: {} - routes: - description: - - Routes to add to the connection. - type: list - elements: str - default: [] - purge_routes: - description: - - Whether or not to delete VPN connections routes that are not specified in the task. - type: bool - default: false - wait_timeout: - description: - - How long, in seconds, before wait gives up. - default: 600 - type: int - required: false - delay: - description: - - The time, in seconds, to wait before checking operation again. - required: false - type: int - default: 15 -extends_documentation_fragment: - - amazon.aws.region.modules - - amazon.aws.common.modules - - amazon.aws.tags - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Note: These examples do not set authentication details, see the AWS Guide for details. - -- name: create a VPN connection with vpn_gateway_id - community.aws.ec2_vpc_vpn: - state: present - vpn_gateway_id: vgw-XXXXXXXX - customer_gateway_id: cgw-XXXXXXXX - -- name: Attach a vpn connection to transit gateway - community.aws.ec2_vpc_vpn: - state: present - transit_gateway_id: tgw-XXXXXXXX - customer_gateway_id: cgw-XXXXXXXX - -- name: modify VPN connection tags - community.aws.ec2_vpc_vpn: - state: present - vpn_connection_id: vpn-XXXXXXXX - tags: - Name: ansible-tag-1 - Other: ansible-tag-2 - -- name: delete a connection - community.aws.ec2_vpc_vpn: - vpn_connection_id: vpn-XXXXXXXX - state: absent - -- name: modify VPN tags (identifying VPN by filters) - community.aws.ec2_vpc_vpn: - state: present - filters: - cidr: 194.168.1.0/24 - tag-keys: - - Ansible - - Other - tags: - New: Tag - purge_tags: true - static_only: true - -- name: set up VPN with tunnel options utilizing 'TunnelInsideCidr' only - community.aws.ec2_vpc_vpn: - state: present - filters: - vpn: vpn-XXXXXXXX - static_only: true - tunnel_options: - - - TunnelInsideCidr: '169.254.100.1/30' - - - TunnelInsideCidr: '169.254.100.5/30' - -- name: add routes and remove any preexisting ones - community.aws.ec2_vpc_vpn: - state: present - filters: - vpn: vpn-XXXXXXXX - routes: - - 195.168.2.0/24 - - 196.168.2.0/24 - purge_routes: true - -- name: remove all routes - community.aws.ec2_vpc_vpn: - state: present - vpn_connection_id: vpn-XXXXXXXX - routes: [] - purge_routes: true - -- name: delete a VPN identified by filters - community.aws.ec2_vpc_vpn: - state: absent - filters: - tags: - Ansible: Tag -""" - -RETURN = r""" -changed: - description: If the VPN connection has changed. - type: bool - returned: always - sample: - changed: true -customer_gateway_configuration: - description: The configuration of the VPN connection. - returned: I(state=present) - type: str -customer_gateway_id: - description: The customer gateway connected via the connection. - type: str - returned: I(state=present) - sample: - customer_gateway_id: cgw-1220c87b -vpn_gateway_id: - description: The virtual private gateway connected via the connection. - type: str - returned: I(state=present) - sample: - vpn_gateway_id: vgw-cb0ae2a2 -transit_gateway_id: - description: The transit gateway id to which the vpn connection can be attached. - type: str - returned: I(state=present) - sample: - transit_gateway_id: tgw-cb0ae2a2 -options: - description: The VPN connection options (currently only containing static_routes_only). - type: complex - returned: I(state=present) - contains: - static_routes_only: - description: If the VPN connection only allows static routes. - returned: I(state=present) - type: str - sample: - static_routes_only: true -routes: - description: The routes of the VPN connection. - type: list - returned: I(state=present) - sample: - routes: [{ - 'destination_cidr_block': '192.168.1.0/24', - 'state': 'available' - }] -state: - description: The status of the VPN connection. - type: str - returned: I(state=present) - sample: - state: available -tags: - description: The tags associated with the connection. - type: dict - returned: I(state=present) - sample: - tags: - name: ansible-test - other: tag -type: - description: The type of VPN connection (currently only ipsec.1 is available). - type: str - returned: I(state=present) - sample: - type: "ipsec.1" -vgw_telemetry: - type: list - returned: I(state=present) - description: The telemetry for the VPN tunnel. - sample: - vgw_telemetry: [{ - 'outside_ip_address': 'string', - 'status': 'up', - 'last_status_change': 'datetime(2015, 1, 1)', - 'status_message': 'string', - 'accepted_route_count': 123 - }] -vpn_connection_id: - description: The identifier for the VPN connection. - type: str - returned: I(state=present) - sample: - vpn_connection_id: vpn-781e0e19 -""" - -try: - from botocore.exceptions import BotoCoreError - from botocore.exceptions import ClientError - from botocore.exceptions import WaiterError -except ImportError: - pass # Handled by AnsibleAWSModule - -from ansible.module_utils._text import to_text -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.tagging import ansible_dict_to_boto3_tag_list -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.tagging import compare_aws_tags - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -class VPNConnectionException(Exception): - def __init__(self, msg, exception=None): - super(VPNConnectionException, self).__init__(msg) - self.msg = msg - self.exception = exception - - -# AWS uses VpnGatewayLimitExceeded for both 'Too many VGWs' and 'Too many concurrent changes' -# we need to look at the mesage to tell the difference. -class VPNRetry(AWSRetry): - @staticmethod - def status_code_from_exception(error): - return ( - error.response["Error"]["Code"], - error.response["Error"]["Message"], - ) - - @staticmethod - def found(response_code, catch_extra_error_codes=None): - retry_on = ["The maximum number of mutating objects has been reached."] - - if catch_extra_error_codes: - retry_on.extend(catch_extra_error_codes) - if not isinstance(response_code, tuple): - response_code = (response_code,) - - for code in response_code: - if super().found(response_code, catch_extra_error_codes): - return True - - return False - - -def find_connection(connection, module_params, vpn_connection_id=None): - """Looks for a unique VPN connection. Uses find_connection_response() to return the connection found, None, - or raise an error if there were multiple viable connections.""" - - filters = module_params.get("filters") - - # vpn_connection_id may be provided via module option; takes precedence over any filter values - if not vpn_connection_id and module_params.get("vpn_connection_id"): - vpn_connection_id = module_params.get("vpn_connection_id") - - if not isinstance(vpn_connection_id, list) and vpn_connection_id: - vpn_connection_id = [to_text(vpn_connection_id)] - elif isinstance(vpn_connection_id, list): - vpn_connection_id = [to_text(connection) for connection in vpn_connection_id] - - formatted_filter = [] - # if vpn_connection_id is provided it will take precedence over any filters since it is a unique identifier - if not vpn_connection_id: - formatted_filter = create_filter(module_params, provided_filters=filters) - - # see if there is a unique matching connection - try: - if vpn_connection_id: - existing_conn = connection.describe_vpn_connections( - aws_retry=True, VpnConnectionIds=vpn_connection_id, Filters=formatted_filter - ) - else: - existing_conn = connection.describe_vpn_connections(aws_retry=True, Filters=formatted_filter) - except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed while describing VPN connection.", exception=e) - - return find_connection_response(connections=existing_conn) - - -def add_routes(connection, vpn_connection_id, routes_to_add): - for route in routes_to_add: - try: - connection.create_vpn_connection_route( - aws_retry=True, VpnConnectionId=vpn_connection_id, DestinationCidrBlock=route - ) - except (BotoCoreError, ClientError) as e: - raise VPNConnectionException( - msg=f"Failed while adding route {route} to the VPN connection {vpn_connection_id}.", - exception=e, - ) - - -def remove_routes(connection, vpn_connection_id, routes_to_remove): - for route in routes_to_remove: - try: - connection.delete_vpn_connection_route( - aws_retry=True, VpnConnectionId=vpn_connection_id, DestinationCidrBlock=route - ) - except (BotoCoreError, ClientError) as e: - raise VPNConnectionException( - msg=f"Failed to remove route {route} from the VPN connection {vpn_connection_id}.", - exception=e, - ) - - -def create_filter(module_params, provided_filters): - """Creates a filter using the user-specified parameters and unmodifiable options that may have been specified in the task""" - boto3ify_filter = { - "cgw-config": "customer-gateway-configuration", - "static-routes-only": "option.static-routes-only", - "cidr": "route.destination-cidr-block", - "bgp": "bgp-asn", - "vpn": "vpn-connection-id", - "vgw": "vpn-gateway-id", - "tag-keys": "tag-key", - "tag-values": "tag-value", - "tags": "tag", - "cgw": "customer-gateway-id", - } - - # unmodifiable options and their filter name counterpart - param_to_filter = { - "customer_gateway_id": "customer-gateway-id", - "vpn_gateway_id": "vpn-gateway-id", - "transit_gateway_id": "transit-gateway-id", - "vpn_connection_id": "vpn-connection-id", - } - - flat_filter_dict = {} - formatted_filter = [] - - for raw_param in dict(provided_filters): - # fix filter names to be recognized by boto3 - if raw_param in boto3ify_filter: - param = boto3ify_filter[raw_param] - provided_filters[param] = provided_filters.pop(raw_param) - elif raw_param in list(boto3ify_filter.items()): - param = raw_param - else: - raise VPNConnectionException(msg=f"{raw_param} is not a valid filter.") - - # reformat filters with special formats - if param == "tag": - for key in provided_filters[param]: - formatted_key = "tag:" + key - if isinstance(provided_filters[param][key], list): - flat_filter_dict[formatted_key] = str(provided_filters[param][key]) - else: - flat_filter_dict[formatted_key] = [str(provided_filters[param][key])] - elif param == "option.static-routes-only": - flat_filter_dict[param] = [str(provided_filters[param]).lower()] - else: - if isinstance(provided_filters[param], list): - flat_filter_dict[param] = provided_filters[param] - else: - flat_filter_dict[param] = [str(provided_filters[param])] - - # if customer_gateway, vpn_gateway, or vpn_connection was specified in the task but not the filter, add it - for param in param_to_filter: - if param_to_filter[param] not in flat_filter_dict and module_params.get(param): - flat_filter_dict[param_to_filter[param]] = [module_params.get(param)] - - # change the flat dict into something boto3 will understand - formatted_filter = [{"Name": key, "Values": value} for key, value in flat_filter_dict.items()] - - return formatted_filter - - -def find_connection_response(connections=None): - """Determine if there is a viable unique match in the connections described. Returns the unique VPN connection if one is found, - returns None if the connection does not exist, raise an error if multiple matches are found.""" - - # Found no connections - if not connections or "VpnConnections" not in connections: - return None - - # Too many results - elif connections and len(connections["VpnConnections"]) > 1: - viable = [] - for each in connections["VpnConnections"]: - # deleted connections are not modifiable - if each["State"] not in ("deleted", "deleting"): - viable.append(each) - if len(viable) == 1: - # Found one viable result; return unique match - return viable[0] - elif len(viable) == 0: - # Found a result but it was deleted already; since there was only one viable result create a new one - return None - else: - raise VPNConnectionException( - msg=( - "More than one matching VPN connection was found. " - "To modify or delete a VPN please specify vpn_connection_id or add filters." - ) - ) - - # Found unique match - elif connections and len(connections["VpnConnections"]) == 1: - # deleted connections are not modifiable - if connections["VpnConnections"][0]["State"] not in ("deleted", "deleting"): - return connections["VpnConnections"][0] - - -def create_connection( - connection, - customer_gateway_id, - static_only, - vpn_gateway_id, - transit_gateway_id, - connection_type, - max_attempts, - delay, - tunnel_options=None, -): - """Creates a VPN connection""" - - options = {"StaticRoutesOnly": static_only} - if tunnel_options and len(tunnel_options) <= 2: - t_opt = [] - for m in tunnel_options: - # See Boto3 docs regarding 'create_vpn_connection' - # tunnel options for allowed 'TunnelOptions' keys. - if not isinstance(m, dict): - raise TypeError("non-dict list member") - t_opt.append(m) - if t_opt: - options["TunnelOptions"] = t_opt - - if not (customer_gateway_id and (vpn_gateway_id or transit_gateway_id)): - raise VPNConnectionException( - msg=( - "No matching connection was found. To create a new connection you must provide " - "customer_gateway_id and one of either transit_gateway_id or vpn_gateway_id." - ) - ) - vpn_connection_params = {"Type": connection_type, "CustomerGatewayId": customer_gateway_id, "Options": options} - if vpn_gateway_id: - vpn_connection_params["VpnGatewayId"] = vpn_gateway_id - if transit_gateway_id: - vpn_connection_params["TransitGatewayId"] = transit_gateway_id - - try: - vpn = connection.create_vpn_connection(**vpn_connection_params) - connection.get_waiter("vpn_connection_available").wait( - VpnConnectionIds=[vpn["VpnConnection"]["VpnConnectionId"]], - WaiterConfig={"Delay": delay, "MaxAttempts": max_attempts}, - ) - except WaiterError as e: - raise VPNConnectionException( - msg=f"Failed to wait for VPN connection {vpn['VpnConnection']['VpnConnectionId']} to be available", - exception=e, - ) - except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed to create VPN connection", exception=e) - - return vpn["VpnConnection"] - - -def delete_connection(connection, vpn_connection_id, delay, max_attempts): - """Deletes a VPN connection""" - try: - connection.delete_vpn_connection(aws_retry=True, VpnConnectionId=vpn_connection_id) - connection.get_waiter("vpn_connection_deleted").wait( - VpnConnectionIds=[vpn_connection_id], WaiterConfig={"Delay": delay, "MaxAttempts": max_attempts} - ) - except WaiterError as e: - raise VPNConnectionException( - msg=f"Failed to wait for VPN connection {vpn_connection_id} to be removed", exception=e - ) - except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg=f"Failed to delete the VPN connection: {vpn_connection_id}", exception=e) - - -def add_tags(connection, vpn_connection_id, add): - try: - connection.create_tags(aws_retry=True, Resources=[vpn_connection_id], Tags=add) - except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg=f"Failed to add the tags: {add}.", exception=e) - - -def remove_tags(connection, vpn_connection_id, remove): - # format tags since they are a list in the format ['tag1', 'tag2', 'tag3'] - key_dict_list = [{"Key": tag} for tag in remove] - try: - connection.delete_tags(aws_retry=True, Resources=[vpn_connection_id], Tags=key_dict_list) - except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg=f"Failed to remove the tags: {remove}.", exception=e) - - -def check_for_update(connection, module_params, vpn_connection_id): - """Determines if there are any tags or routes that need to be updated. Ensures non-modifiable attributes aren't expected to change.""" - tags = module_params.get("tags") - routes = module_params.get("routes") - purge_tags = module_params.get("purge_tags") - purge_routes = module_params.get("purge_routes") - - vpn_connection = find_connection(connection, module_params, vpn_connection_id=vpn_connection_id) - current_attrs = camel_dict_to_snake_dict(vpn_connection) - - # Initialize changes dict - changes = {"tags_to_add": [], "tags_to_remove": [], "routes_to_add": [], "routes_to_remove": []} - - # Get changes to tags - current_tags = boto3_tag_list_to_ansible_dict(current_attrs.get("tags", []), "key", "value") - if tags is None: - changes["tags_to_remove"] = [] - changes["tags_to_add"] = [] - else: - tags_to_add, changes["tags_to_remove"] = compare_aws_tags(current_tags, tags, purge_tags) - changes["tags_to_add"] = ansible_dict_to_boto3_tag_list(tags_to_add) - # Get changes to routes - if "Routes" in vpn_connection: - current_routes = [route["DestinationCidrBlock"] for route in vpn_connection["Routes"]] - if purge_routes: - changes["routes_to_remove"] = [old_route for old_route in current_routes if old_route not in routes] - changes["routes_to_add"] = [new_route for new_route in routes if new_route not in current_routes] - - # Check if nonmodifiable attributes are attempted to be modified - for attribute in current_attrs: - if attribute in ("tags", "routes", "state"): - continue - elif attribute == "options": - will_be = module_params.get("static_only", None) - is_now = bool(current_attrs[attribute]["static_routes_only"]) - attribute = "static_only" - elif attribute == "type": - will_be = module_params.get("connection_type", None) - is_now = current_attrs[attribute] - else: - is_now = current_attrs[attribute] - will_be = module_params.get(attribute, None) - - if will_be is not None and to_text(will_be) != to_text(is_now): - raise VPNConnectionException( - msg=( - f"You cannot modify {attribute}, the current value of which is {is_now}. Modifiable VPN connection" - f" attributes are tags and routes. The value you tried to change it to is {will_be}." - ) - ) - - return changes - - -def make_changes(connection, vpn_connection_id, changes): - """changes is a dict with the keys 'tags_to_add', 'tags_to_remove', 'routes_to_add', 'routes_to_remove', - the values of which are lists (generated by check_for_update()). - """ - changed = False - - if changes["tags_to_add"]: - changed = True - add_tags(connection, vpn_connection_id, changes["tags_to_add"]) - - if changes["tags_to_remove"]: - changed = True - remove_tags(connection, vpn_connection_id, changes["tags_to_remove"]) - - if changes["routes_to_add"]: - changed = True - add_routes(connection, vpn_connection_id, changes["routes_to_add"]) - - if changes["routes_to_remove"]: - changed = True - remove_routes(connection, vpn_connection_id, changes["routes_to_remove"]) - - return changed - - -def get_check_mode_results(connection, module_params, vpn_connection_id=None, current_state=None): - """Returns the changes that would be made to a VPN Connection""" - state = module_params.get("state") - if state == "absent": - if vpn_connection_id: - return True, {} - else: - return False, {} - - changed = False - results = { - "customer_gateway_configuration": "", - "customer_gateway_id": module_params.get("customer_gateway_id"), - "vpn_gateway_id": module_params.get("vpn_gateway_id"), - "transit_gateway_id": module_params.get("transit_gateway_id"), - "options": {"static_routes_only": module_params.get("static_only")}, - "routes": [module_params.get("routes")], - } - - # get combined current tags and tags to set - present_tags = module_params.get("tags") - if present_tags is None: - pass - elif current_state and "Tags" in current_state: - current_tags = boto3_tag_list_to_ansible_dict(current_state["Tags"]) - tags_to_add, tags_to_remove = compare_aws_tags(current_tags, present_tags, module_params.get("purge_tags")) - changed |= bool(tags_to_remove) or bool(tags_to_add) - if module_params.get("purge_tags"): - current_tags = {} - current_tags.update(present_tags) - results["tags"] = current_tags - elif module_params.get("tags"): - changed = True - if present_tags: - results["tags"] = present_tags - - # get combined current routes and routes to add - present_routes = module_params.get("routes") - if current_state and "Routes" in current_state: - current_routes = [route["DestinationCidrBlock"] for route in current_state["Routes"]] - if module_params.get("purge_routes"): - if set(current_routes) != set(present_routes): - changed = True - elif set(present_routes) != set(current_routes): - if not set(present_routes) < set(current_routes): - changed = True - present_routes.extend([route for route in current_routes if route not in present_routes]) - elif module_params.get("routes"): - changed = True - results["routes"] = [{"destination_cidr_block": cidr, "state": "available"} for cidr in present_routes] - - # return the vpn_connection_id if it's known - if vpn_connection_id: - results["vpn_connection_id"] = vpn_connection_id - else: - changed = True - results["vpn_connection_id"] = "vpn-XXXXXXXX" - - return changed, results - - -def ensure_present(connection, module_params, check_mode=False): - """Creates and adds tags to a VPN connection. If the connection already exists update tags.""" - vpn_connection = find_connection(connection, module_params) - changed = False - delay = module_params.get("delay") - max_attempts = module_params.get("wait_timeout") // delay - - # No match but vpn_connection_id was specified. - if not vpn_connection and module_params.get("vpn_connection_id"): - raise VPNConnectionException( - msg="There is no VPN connection available or pending with that id. Did you delete it?" - ) - - # Unique match was found. Check if attributes provided differ. - elif vpn_connection: - vpn_connection_id = vpn_connection["VpnConnectionId"] - # check_for_update returns a dict with the keys tags_to_add, tags_to_remove, routes_to_add, routes_to_remove - changes = check_for_update(connection, module_params, vpn_connection_id) - if check_mode: - return get_check_mode_results(connection, module_params, vpn_connection_id, current_state=vpn_connection) - changed = make_changes(connection, vpn_connection_id, changes) - - # No match was found. Create and tag a connection and add routes. - else: - changed = True - if check_mode: - return get_check_mode_results(connection, module_params) - vpn_connection = create_connection( - connection, - customer_gateway_id=module_params.get("customer_gateway_id"), - static_only=module_params.get("static_only"), - vpn_gateway_id=module_params.get("vpn_gateway_id"), - transit_gateway_id=module_params.get("transit_gateway_id"), - connection_type=module_params.get("connection_type"), - tunnel_options=module_params.get("tunnel_options"), - max_attempts=max_attempts, - delay=delay, - ) - changes = check_for_update(connection, module_params, vpn_connection["VpnConnectionId"]) - make_changes(connection, vpn_connection["VpnConnectionId"], changes) - - # get latest version if a change has been made and make tags output nice before returning it - if vpn_connection: - vpn_connection = find_connection(connection, module_params, vpn_connection["VpnConnectionId"]) - if "Tags" in vpn_connection: - vpn_connection["Tags"] = boto3_tag_list_to_ansible_dict(vpn_connection["Tags"]) - - return changed, vpn_connection - - -def ensure_absent(connection, module_params, check_mode=False): - """Deletes a VPN connection if it exists.""" - vpn_connection = find_connection(connection, module_params) - - if check_mode: - return get_check_mode_results( - connection, module_params, vpn_connection["VpnConnectionId"] if vpn_connection else None - ) - - delay = module_params.get("delay") - max_attempts = module_params.get("wait_timeout") // delay - - if vpn_connection: - delete_connection(connection, vpn_connection["VpnConnectionId"], delay=delay, max_attempts=max_attempts) - changed = True - else: - changed = False - - return changed, {} - - -def main(): - argument_spec = dict( - state=dict(type="str", default="present", choices=["present", "absent"]), - filters=dict(type="dict", default={}), - vpn_gateway_id=dict(type="str"), - tags=dict(type="dict", aliases=["resource_tags"]), - connection_type=dict(default="ipsec.1", type="str"), - transit_gateway_id=dict(type="str"), - tunnel_options=dict(no_log=True, type="list", default=[], elements="dict"), - static_only=dict(default=False, type="bool"), - customer_gateway_id=dict(type="str"), - vpn_connection_id=dict(type="str"), - purge_tags=dict(type="bool", default=True), - routes=dict(type="list", default=[], elements="str"), - purge_routes=dict(type="bool", default=False), - wait_timeout=dict(type="int", default=600), - delay=dict(type="int", default=15), - ) - mutually_exclusive = [ - ["vpn_gateway_id", "transit_gateway_id"], - ] - - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - mutually_exclusive=mutually_exclusive, - ) - connection = module.client("ec2", retry_decorator=VPNRetry.jittered_backoff(retries=10)) - - state = module.params.get("state") - parameters = dict(module.params) - - try: - if state == "present": - changed, response = ensure_present(connection, parameters, module.check_mode) - elif state == "absent": - changed, response = ensure_absent(connection, parameters, module.check_mode) - except VPNConnectionException as e: - if e.exception: - module.fail_json_aws(e.exception, msg=e.msg) - else: - module.fail_json(msg=e.msg) - - module.exit_json(changed=changed, **camel_dict_to_snake_dict(response)) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py deleted file mode 100644 index d304e456833..00000000000 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: ec2_vpc_vpn_info -version_added: 1.0.0 -short_description: Gather information about VPN Connections in AWS. -description: - - Gather information about VPN Connections in AWS. -author: - - Madhura Naniwadekar (@Madhura-CSI) -options: - filters: - description: - - A dict of filters to apply. Each dict item consists of a filter key and a filter value. - See U(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpnConnections.html) for possible filters. - required: false - type: dict - default: {} - vpn_connection_ids: - description: - - Get details of a specific VPN connections using vpn connection ID/IDs. This value should be provided as a list. - required: false - type: list - elements: str - default: [] -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# # Note: These examples do not set authentication details, see the AWS Guide for details. -- name: Gather information about all vpn connections - community.aws.ec2_vpc_vpn_info: - -- name: Gather information about a filtered list of vpn connections, based on tags - community.aws.ec2_vpc_vpn_info: - filters: - "tag:Name": test-connection - register: vpn_conn_info - -- name: Gather information about vpn connections by specifying connection IDs. - community.aws.ec2_vpc_vpn_info: - filters: - vpn-gateway-id: vgw-cbe66beb - register: vpn_conn_info -""" - -RETURN = r""" -vpn_connections: - description: List of one or more VPN Connections. - returned: always - type: complex - contains: - category: - description: The category of the VPN connection. - returned: always - type: str - sample: VPN - customer_gatway_configuration: - description: The configuration information for the VPN connection's customer gateway (in the native XML format). - returned: always - type: str - customer_gateway_id: - description: The ID of the customer gateway at your end of the VPN connection. - returned: always - type: str - sample: cgw-17a53c37 - options: - description: The VPN connection options. - returned: always - type: dict - sample: { - "static_routes_only": false - } - routes: - description: List of static routes associated with the VPN connection. - returned: always - type: complex - contains: - destination_cidr_block: - description: The CIDR block associated with the local subnet of the customer data center. - returned: always - type: str - sample: 10.0.0.0/16 - state: - description: The current state of the static route. - returned: always - type: str - sample: available - state: - description: The current state of the VPN connection. - returned: always - type: str - sample: available - tags: - description: Any tags assigned to the VPN connection. - returned: always - type: dict - sample: { - "Name": "test-conn" - } - type: - description: The type of VPN connection. - returned: always - type: str - sample: ipsec.1 - vgw_telemetry: - description: Information about the VPN tunnel. - returned: always - type: complex - contains: - accepted_route_count: - description: The number of accepted routes. - returned: always - type: int - sample: 0 - last_status_change: - description: The date and time of the last change in status. - returned: always - type: str - sample: "2018-02-09T14:35:27+00:00" - outside_ip_address: - description: The Internet-routable IP address of the virtual private gateway's outside interface. - returned: always - type: str - sample: 13.127.79.191 - status: - description: The status of the VPN tunnel. - returned: always - type: str - sample: DOWN - status_message: - description: If an error occurs, a description of the error. - returned: always - type: str - sample: IPSEC IS DOWN - certificate_arn: - description: The Amazon Resource Name of the virtual private gateway tunnel endpoint certificate. - returned: when a private certificate is used for authentication - type: str - sample: "arn:aws:acm:us-east-1:123456789012:certificate/c544d8ce-20b8-4fff-98b0-example" - vpn_connection_id: - description: The ID of the VPN connection. - returned: always - type: str - sample: vpn-f700d5c0 - vpn_gateway_id: - description: The ID of the virtual private gateway at the AWS side of the VPN connection. - returned: always - type: str - sample: vgw-cbe56bfb -""" - -import json - -try: - from botocore.exceptions import BotoCoreError - from botocore.exceptions import ClientError -except ImportError: - pass # caught by AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - - -def date_handler(obj): - return obj.isoformat() if hasattr(obj, "isoformat") else obj - - -def list_vpn_connections(connection, module): - params = dict() - - params["Filters"] = ansible_dict_to_boto3_filter_list(module.params.get("filters")) - params["VpnConnectionIds"] = module.params.get("vpn_connection_ids") - - try: - result = json.loads(json.dumps(connection.describe_vpn_connections(**params), default=date_handler)) - except ValueError as e: - module.fail_json_aws(e, msg="Cannot validate JSON data") - except (ClientError, BotoCoreError) as e: - module.fail_json_aws(e, msg="Could not describe customer gateways") - snaked_vpn_connections = [camel_dict_to_snake_dict(vpn_connection) for vpn_connection in result["VpnConnections"]] - if snaked_vpn_connections: - for vpn_connection in snaked_vpn_connections: - vpn_connection["tags"] = boto3_tag_list_to_ansible_dict(vpn_connection.get("tags", [])) - module.exit_json(changed=False, vpn_connections=snaked_vpn_connections) - - -def main(): - argument_spec = dict( - vpn_connection_ids=dict(default=[], type="list", elements="str"), - filters=dict(default={}, type="dict"), - ) - - module = AnsibleAWSModule( - argument_spec=argument_spec, - mutually_exclusive=[["vpn_connection_ids", "filters"]], - supports_check_mode=True, - ) - - connection = module.client("ec2") - - list_vpn_connections(connection, module) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/ecs_cluster.py b/plugins/modules/ecs_cluster.py index 5a0470eea8e..c94095bf7b8 100644 --- a/plugins/modules/ecs_cluster.py +++ b/plugins/modules/ecs_cluster.py @@ -72,10 +72,10 @@ version_added: 5.2.0 description: - Toggle overwriting of existing capacity providers or strategy. This is needed for backwards compatibility. - - By default I(purge_capacity_providers=false). In release 9.0.0 this default will be changed to I(purge_capacity_providers=true). + - By default I(purge_capacity_providers=true). required: false type: bool - default: false + default: true extends_documentation_fragment: - amazon.aws.common.modules - amazon.aws.region.modules @@ -237,7 +237,7 @@ def main(): name=dict(required=True, type="str"), delay=dict(required=False, type="int", default=10), repeat=dict(required=False, type="int", default=10), - purge_capacity_providers=dict(required=False, type="bool", default=False), + purge_capacity_providers=dict(required=False, type="bool", default=True), capacity_providers=dict(required=False, type="list", elements="str"), capacity_provider_strategy=dict( required=False, @@ -291,12 +291,6 @@ def main(): # Unless purge_capacity_providers is true, we will not be updating the providers or strategy. if not purge_capacity_providers: - module.deprecate( - "In release 9.0.0 the default value of purge_capacity_providers will change from false to true." - " To maintain the existing behaviour explicitly set purge_capacity_providers=true", - version="9.0.0", - collection_name="community.aws", - ) cps_update_needed = False requested_cp = existing_cp requested_cps = existing_cps @@ -339,7 +333,7 @@ def main(): elif module.params["state"] == "has_instances": if not existing: module.fail_json(msg="Cluster '" + module.params["name"] + " not found.") - return + # it exists, so we should delete it and mark changed. # return info about the cluster deleted delay = module.params["delay"] @@ -361,7 +355,6 @@ def main(): + str(delay) + " seconds each." ) - return module.exit_json(**results) diff --git a/plugins/modules/ecs_service.py b/plugins/modules/ecs_service.py index e6ecf736b5c..fae0af619b5 100644 --- a/plugins/modules/ecs_service.py +++ b/plugins/modules/ecs_service.py @@ -420,7 +420,6 @@ loadBalancers: description: - A list of load balancer objects - - Updating the loadbalancer configuration of an existing service requires botocore>=1.24.14. returned: always type: complex contains: @@ -1248,7 +1247,7 @@ def main(): elif module.params["state"] == "deleting": if not existing: module.fail_json(msg="Service '" + module.params["name"] + " not found.") - return + # it exists, so we should delete it and mark changed. # return info about the cluster deleted delay = module.params["delay"] @@ -1263,7 +1262,6 @@ def main(): time.sleep(delay) if i is repeat - 1: module.fail_json(msg=f"Service still not deleted after {repeat} tries of {delay} seconds each.") - return module.exit_json(**results) diff --git a/plugins/modules/elb_classic_lb_info.py b/plugins/modules/elb_classic_lb_info.py deleted file mode 100644 index 5329e5b81db..00000000000 --- a/plugins/modules/elb_classic_lb_info.py +++ /dev/null @@ -1,237 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Copyright: Contributors to the Ansible project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -DOCUMENTATION = r""" ---- -module: elb_classic_lb_info -version_added: 1.0.0 -short_description: Gather information about EC2 Elastic Load Balancers in AWS -description: - - Gather information about EC2 Elastic Load Balancers in AWS -author: - - "Michael Schultz (@mjschultz)" - - "Fernando Jose Pando (@nand0p)" -options: - names: - description: - - List of ELB names to gather information about. Pass this option to gather information about a set of ELBs, otherwise, all ELBs are returned. - type: list - elements: str - default: [] -extends_documentation_fragment: - - amazon.aws.common.modules - - amazon.aws.region.modules - - amazon.aws.boto3 -""" - -EXAMPLES = r""" -# Note: These examples do not set authentication details, see the AWS Guide for details. -# Output format tries to match amazon.aws.ec2_elb_lb module input parameters - -# Gather information about all ELBs -- community.aws.elb_classic_lb_info: - register: elb_info - -- ansible.builtin.debug: - msg: "{{ item.dns_name }}" - loop: "{{ elb_info.elbs }}" - -# Gather information about a particular ELB -- community.aws.elb_classic_lb_info: - names: frontend-prod-elb - register: elb_info - -- ansible.builtin.debug: - msg: "{{ elb_info.elbs.0.dns_name }}" - -# Gather information about a set of ELBs -- community.aws.elb_classic_lb_info: - names: - - frontend-prod-elb - - backend-prod-elb - register: elb_info - -- ansible.builtin.debug: - msg: "{{ item.dns_name }}" - loop: "{{ elb_info.elbs }}" -""" - -RETURN = r""" -elbs: - description: a list of load balancers - returned: always - type: list - sample: - elbs: - - attributes: - access_log: - enabled: false - connection_draining: - enabled: true - timeout: 300 - connection_settings: - idle_timeout: 60 - cross_zone_load_balancing: - enabled: true - availability_zones: - - "us-east-1a" - - "us-east-1b" - - "us-east-1c" - - "us-east-1d" - - "us-east-1e" - backend_server_description: [] - canonical_hosted_zone_name: test-lb-XXXXXXXXXXXX.us-east-1.elb.amazonaws.com - canonical_hosted_zone_name_id: XXXXXXXXXXXXXX - created_time: '2017-08-23T18:25:03.280000+00:00' - dns_name: test-lb-XXXXXXXXXXXX.us-east-1.elb.amazonaws.com - health_check: - healthy_threshold: 10 - interval: 30 - target: HTTP:80/index.html - timeout: 5 - unhealthy_threshold: 2 - instances: [] - instances_inservice: [] - instances_inservice_count: 0 - instances_outofservice: [] - instances_outofservice_count: 0 - instances_unknownservice: [] - instances_unknownservice_count: 0 - listener_descriptions: - - listener: - instance_port: 80 - instance_protocol: HTTP - load_balancer_port: 80 - protocol: HTTP - policy_names: [] - load_balancer_name: test-lb - policies: - app_cookie_stickiness_policies: [] - lb_cookie_stickiness_policies: [] - other_policies: [] - scheme: internet-facing - security_groups: - - sg-29d13055 - source_security_group: - group_name: default - owner_alias: XXXXXXXXXXXX - subnets: - - subnet-XXXXXXXX - - subnet-XXXXXXXX - tags: {} - vpc_id: vpc-c248fda4 -""" - -try: - import botocore -except ImportError: - pass # caught by AnsibleAWSModule - -from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict - -from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict - -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule - -MAX_AWS_RETRIES = 5 -MAX_AWS_DELAY = 5 - - -def list_elbs(connection, load_balancer_names): - results = [] - - if not load_balancer_names: - for lb in get_all_lb(connection): - results.append(describe_elb(connection, lb)) - - for load_balancer_name in load_balancer_names: - lb = get_lb(connection, load_balancer_name) - if not lb: - continue - results.append(describe_elb(connection, lb)) - return results - - -def describe_elb(connection, lb): - description = camel_dict_to_snake_dict(lb) - name = lb["LoadBalancerName"] - instances = lb.get("Instances", []) - description["tags"] = get_tags(connection, name) - description["instances_inservice"], description["instances_inservice_count"] = lb_instance_health( - connection, name, instances, "InService" - ) - description["instances_outofservice"], description["instances_outofservice_count"] = lb_instance_health( - connection, name, instances, "OutOfService" - ) - description["instances_unknownservice"], description["instances_unknownservice_count"] = lb_instance_health( - connection, name, instances, "Unknown" - ) - description["attributes"] = get_lb_attributes(connection, name) - return description - - -@AWSRetry.jittered_backoff() -def get_all_lb(connection): - paginator = connection.get_paginator("describe_load_balancers") - return paginator.paginate().build_full_result()["LoadBalancerDescriptions"] - - -def get_lb(connection, load_balancer_name): - try: - return connection.describe_load_balancers(aws_retry=True, LoadBalancerNames=[load_balancer_name])[ - "LoadBalancerDescriptions" - ][0] - except is_boto3_error_code("LoadBalancerNotFound"): - return [] - - -def get_lb_attributes(connection, load_balancer_name): - attributes = connection.describe_load_balancer_attributes(aws_retry=True, LoadBalancerName=load_balancer_name).get( - "LoadBalancerAttributes", {} - ) - return camel_dict_to_snake_dict(attributes) - - -def get_tags(connection, load_balancer_name): - tags = connection.describe_tags(aws_retry=True, LoadBalancerNames=[load_balancer_name])["TagDescriptions"] - if not tags: - return {} - return boto3_tag_list_to_ansible_dict(tags[0]["Tags"]) - - -def lb_instance_health(connection, load_balancer_name, instances, state): - instance_states = connection.describe_instance_health(LoadBalancerName=load_balancer_name, Instances=instances).get( - "InstanceStates", [] - ) - instate = [instance["InstanceId"] for instance in instance_states if instance["State"] == state] - return instate, len(instate) - - -def main(): - argument_spec = dict( - names=dict(default=[], type="list", elements="str"), - ) - module = AnsibleAWSModule( - argument_spec=argument_spec, - supports_check_mode=True, - ) - - connection = module.client( - "elb", retry_decorator=AWSRetry.jittered_backoff(retries=MAX_AWS_RETRIES, delay=MAX_AWS_DELAY) - ) - - try: - elbs = list_elbs(connection, module.params.get("names")) - except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: - module.fail_json_aws(e, msg="Failed to get load balancer information.") - - module.exit_json(elbs=elbs) - - -if __name__ == "__main__": - main() diff --git a/plugins/modules/glue_connection.py b/plugins/modules/glue_connection.py index f44ca8bbf76..f967fcddcdc 100644 --- a/plugins/modules/glue_connection.py +++ b/plugins/modules/glue_connection.py @@ -107,13 +107,6 @@ """ RETURN = r""" -connection_properties: - description: - - (deprecated) A dict of key-value pairs (converted to lowercase) used as parameters for this connection. - - This return key has been deprecated, and will be removed in release 9.0.0. - returned: when state is present - type: dict - sample: {'jdbc_connection_url':'jdbc:mysql://mydb:3306/databasename','username':'x','password':'y'} connection_type: description: The type of the connection. returned: when state is present @@ -332,15 +325,8 @@ def create_or_update_glue_connection(connection, connection_ec2, module, glue_co glue_connection = _await_glue_connection(connection, module) if glue_connection: - module.deprecate( - ( - "The 'connection_properties' return key is deprecated and will be replaced" - " by 'raw_connection_properties'. Both values are returned for now." - ), - version="9.0.0", - collection_name="community.aws", - ) glue_connection["RawConnectionProperties"] = glue_connection["ConnectionProperties"] + glue_connection.pop("ConnectionProperties") module.exit_json( changed=changed, **camel_dict_to_snake_dict(glue_connection or {}, ignore_list=["RawConnectionProperties"]) diff --git a/requirements.txt b/requirements.txt index cd474e3b66b..131cc3b8f5c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ # - tests/unit/constraints.txt # - tests/integration/constraints.txt # - tests/integration/targets/setup_botocore_pip -botocore>=1.29.0 -boto3>=1.26.0 +botocore>=1.31.0 +boto3>=1.28.0 diff --git a/tests/integration/constraints.txt b/tests/integration/constraints.txt index f388e1f900b..c55f7cdd016 100644 --- a/tests/integration/constraints.txt +++ b/tests/integration/constraints.txt @@ -1,10 +1,10 @@ # Specifically run tests against the oldest versions that we support -botocore==1.29.0 -boto3==1.26.0 +botocore==1.31.0 +boto3==1.28.0 # AWS CLI has `botocore==` dependencies, provide the one that matches botocore # to avoid needing to download over a years worth of awscli wheels. -awscli==1.27.0 +awscli==1.29.0 # AWS CLI depends on PyYAML <5.5,>=3.10; the latest PyYAML release in that range, 5.4.1, fails to install. # Use a version in that range that is known to work (https://github.com/yaml/pyyaml/issues/736) diff --git a/tests/integration/targets/autoscaling_instance_refresh/aliases b/tests/integration/targets/autoscaling_instance_refresh/aliases deleted file mode 100644 index 6ce549da4bb..00000000000 --- a/tests/integration/targets/autoscaling_instance_refresh/aliases +++ /dev/null @@ -1,3 +0,0 @@ -time=14m -cloud/aws -autoscaling_instance_refresh_info diff --git a/tests/integration/targets/autoscaling_instance_refresh/defaults/main.yml b/tests/integration/targets/autoscaling_instance_refresh/defaults/main.yml deleted file mode 100644 index 08e57d2558e..00000000000 --- a/tests/integration/targets/autoscaling_instance_refresh/defaults/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -# defaults file for ec2_asg -vpc_seed: '{{ tiny_prefix }}' -subnet_a_cidr: '10.{{ 256 | random(seed=vpc_seed) }}.32.0/24' - -default_resource_name: '{{ resource_prefix }}-asg-refresh' -short_resource_name: '{{ tiny_prefix }}-asg-refresh' - -vpc_name: '{{ default_resource_name }}' -subnet_name: '{{ default_resource_name }}' -route_name: '{{ default_resource_name }}' -sg_name: '{{ default_resource_name }}' -asg_name: '{{ default_resource_name }}' -lc_name_1: '{{ default_resource_name }}-1' -lc_name_2: '{{ default_resource_name }}-2' -load_balancer_name: '{{ short_resource_name }}' diff --git a/tests/integration/targets/autoscaling_instance_refresh/meta/main.yml b/tests/integration/targets/autoscaling_instance_refresh/meta/main.yml deleted file mode 100644 index 1471b11f658..00000000000 --- a/tests/integration/targets/autoscaling_instance_refresh/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: - - setup_ec2_facts diff --git a/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml b/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml deleted file mode 100644 index 5b754d47d69..00000000000 --- a/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml +++ /dev/null @@ -1,517 +0,0 @@ ---- -- name: setup credentials and region - module_defaults: - group/aws: - access_key: "{{ aws_access_key }}" - secret_key: "{{ aws_secret_key }}" - session_token: "{{ security_token | default(omit) }}" - region: "{{ aws_region }}" - - collections: - - amazon.aws - - block: - # Set up the testing dependencies: VPC, subnet, security group, and two launch configurations - - name: Create VPC for use in testing - ec2_vpc_net: - name: "{{ vpc_name }}" - cidr_block: '{{ subnet_a_cidr }}' - tenancy: default - register: testing_vpc - - - name: Create internet gateway for use in testing - ec2_vpc_igw: - vpc_id: "{{ testing_vpc.vpc.id }}" - state: present - register: igw - - - name: Create subnet for use in testing - ec2_vpc_subnet: - state: present - vpc_id: "{{ testing_vpc.vpc.id }}" - cidr: '{{ subnet_a_cidr }}' - az: "{{ aws_region }}a" - resource_tags: - Name: "{{ subnet_name }}" - register: testing_subnet - - - name: create routing rules - ec2_vpc_route_table: - vpc_id: "{{ testing_vpc.vpc.id }}" - tags: - created: "{{ route_name }}" - routes: - - dest: 0.0.0.0/0 - gateway_id: "{{ igw.gateway_id }}" - subnets: - - "{{ testing_subnet.subnet.id }}" - - - name: create a security group with the vpc created in the ec2_setup - ec2_security_group: - name: "{{ sg_name }}" - description: a security group for ansible tests - vpc_id: "{{ testing_vpc.vpc.id }}" - rules: - - proto: tcp - from_port: 22 - to_port: 22 - cidr_ip: 0.0.0.0/0 - - proto: tcp - from_port: 80 - to_port: 80 - cidr_ip: 0.0.0.0/0 - register: sg - - - name: ensure launch configs exist - autoscaling_launch_config: - name: "{{ item }}" - assign_public_ip: true - image_id: "{{ ec2_ami_id }}" - user_data: | - package_upgrade: true - package_update: true - packages: - - httpd - runcmd: - - "service httpd start" - security_groups: "{{ sg.group_id }}" - instance_type: t3.micro - loop: - - "{{ lc_name_1 }}" - - "{{ lc_name_2 }}" - - - name: launch asg and do not wait for instances to be deemed healthy (no ELB) - autoscaling_group: - name: "{{ asg_name }}" - launch_config_name: "{{ lc_name_1 }}" - desired_capacity: 1 - min_size: 1 - max_size: 1 - vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" - wait_for_instances: no - state: present - register: output - - - assert: - that: - - "output.viable_instances == 0" - - # ============================================================ - - - name: test invalid cancelation - V1 - (pre-refresh) - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "cancelled" - ignore_errors: yes - register: result - - - assert: - that: - - "'An error occurred (ActiveInstanceRefreshNotFound) when calling the CancelInstanceRefresh operation: No in progress or pending Instance Refresh found for Auto Scaling group ' ~ resource_prefix ~ '-asg' in result.msg" - - - name: test starting a refresh with a valid ASG name - check_mode - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "started" - check_mode: true - register: output - - - assert: - that: - - output is not failed - - output is changed - - '"autoscaling:StartInstanceRefresh" not in output.resource_actions' - - - name: test starting a refresh with a valid ASG name - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "started" - register: output - - - assert: - that: - - "'instance_refresh_id' in output.instance_refreshes" - - - name: test starting a refresh with a valid ASG name - Idempotent - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "started" - ignore_errors: true - register: output - - - assert: - that: - - output is not changed - - '"Failed to start InstanceRefresh: An error occurred (InstanceRefreshInProgress) when calling the StartInstanceRefresh operation: An Instance Refresh is already in progress and blocks the execution of this Instance Refresh." in output.msg' - - - name: test starting a refresh with a valid ASG name - Idempotent (check_mode) - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "started" - ignore_errors: true - check_mode: true - register: output - - - assert: - that: - - output is not changed - - output is not failed - - '"In check_mode - Instance Refresh is already in progress, can not start new instance refresh." in output.msg' - - - name: test starting a refresh with a nonexistent ASG name - autoscaling_instance_refresh: - name: "nonexistentname-asg" - state: "started" - ignore_errors: yes - register: result - - - assert: - that: - - "'Failed to start InstanceRefresh: An error occurred (ValidationError) when calling the StartInstanceRefresh operation: AutoScalingGroup name not found' in result.msg" - - - name: test canceling a refresh with an ASG name - check_mode - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "cancelled" - check_mode: true - register: output - - - assert: - that: - - output is not failed - - output is changed - - '"autoscaling:CancelInstanceRefresh" not in output.resource_actions' - - - name: test canceling a refresh with an ASG name - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "cancelled" - register: output - - - assert: - that: - - "'instance_refresh_id' in output.instance_refreshes" - - - name: test canceling a refresh with a ASG name - Idempotent - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "cancelled" - ignore_errors: yes - register: output - - - assert: - that: - - output is not changed - - - name: test cancelling a refresh with a valid ASG name - Idempotent (check_mode) - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "cancelled" - ignore_errors: true - check_mode: true - register: output - - - assert: - that: - - output is not changed - - output is not failed - - - name: test starting a refresh with an ASG name and preferences dict - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "started" - preferences: - min_healthy_percentage: 10 - instance_warmup: 10 - retries: 5 - register: output - until: output is not failed - - - assert: - that: - - "'instance_refresh_id' in output.instance_refreshes" - - - name: re-test canceling a refresh with an ASG name - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "cancelled" - register: output - - - assert: - that: - - "'instance_refresh_id' in output.instance_refreshes" - - - name: test valid start - V1 - (with preferences missing instance_warmup) - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "started" - preferences: - min_healthy_percentage: 10 - ignore_errors: yes - retries: 5 - register: output - until: output is not failed - - - assert: - that: - - "'instance_refresh_id' in output.instance_refreshes" - - - name: re-test canceling a refresh with an ASG name - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "cancelled" - register: output - - - assert: - that: - - "'instance_refresh_id' in output.instance_refreshes" - - - name: test valid start - V2 - (with preferences missing min_healthy_percentage) - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "started" - preferences: - instance_warmup: 10 - retries: 5 - register: output - until: output is not failed - ignore_errors: yes - - - assert: - that: - - "'instance_refresh_id' in output.instance_refreshes" - - - name: test invalid cancelation - V2 - (with preferences) - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "cancelled" - preferences: - min_healthy_percentage: 10 - instance_warmup: 10 - ignore_errors: yes - register: result - - - assert: - that: - - "'can not pass preferences dict when canceling a refresh' in result.msg" - - # ============================================================ - - - name: run setup with refresh_and_cancel_three_times.yml - include_tasks: refresh_and_cancel_three_times.yml - loop: "{{ query('sequence', 'start=1 end=3') }}" - - - name: test getting info for an ASG name - autoscaling_instance_refresh_info: - name: "{{ asg_name }}" - region: "{{ aws_region }}" - ignore_errors: yes - register: output - - - assert: - that: - - output | community.general.json_query(inst_refresh_id_json_query) | unique | length == 7 - vars: - inst_refresh_id_json_query: instance_refreshes[].instance_refresh_id - - - name: test using fake refresh ID - autoscaling_instance_refresh_info: - name: "{{ asg_name }}" - ids: ['0e367f58-blabla-bla-bla-ca870dc5dbfe'] - ignore_errors: yes - register: output - - - assert: - that: - - output.instance_refreshes | length == 0 - - - name: test using a real refresh ID - autoscaling_instance_refresh_info: - name: "{{ asg_name }}" - ids: [ '{{ refreshout.instance_refreshes.instance_refresh_id }}' ] - ignore_errors: yes - register: output - - - assert: - that: - - output.instance_refreshes | length == 1 - - - name: test getting info for an ASG name which doesn't exist - autoscaling_instance_refresh_info: - name: n0n3x1stentname27b - ignore_errors: yes - register: output - - - assert: - that: - - "'Failed to describe InstanceRefreshes: An error occurred (ValidationError) when calling the DescribeInstanceRefreshes operation: AutoScalingGroup name not found - AutoScalingGroup n0n3x1stentname27b not found' == output.msg" - - - name: assert that the correct number of records are returned - autoscaling_instance_refresh_info: - name: "{{ asg_name }}" - ignore_errors: yes - register: output - - - assert: - that: - - output.instance_refreshes | length == 7 - - - name: assert that valid message with fake-token is returned - autoscaling_instance_refresh_info: - name: "{{ asg_name }}" - next_token: "fake-token-123" - ignore_errors: yes - register: output - - - assert: - that: - - '"Failed to describe InstanceRefreshes: An error occurred (InvalidNextToken) when calling the DescribeInstanceRefreshes operation: The token ''********'' is invalid." == output.msg' - - - name: assert that max records=1 returns no more than one record - autoscaling_instance_refresh_info: - name: "{{ asg_name }}" - max_records: 1 - ignore_errors: yes - register: output - - - assert: - that: - - output.instance_refreshes | length < 2 - - - name: assert that valid message with real-token is returned - autoscaling_instance_refresh_info: - name: "{{ asg_name }}" - next_token: "{{ output.next_token }}" - ignore_errors: yes - register: output - - - assert: - that: - - output.instance_refreshes | length == 7 - - - name: test using both real nextToken and max_records=1 - autoscaling_instance_refresh_info: - name: "{{ asg_name }}" - max_records: 1 - next_token: "{{ output.next_token }}" - ignore_errors: yes - register: output - - - assert: - that: - - output.instance_refreshes | length == 1 - - always: - - - name: kill asg - autoscaling_group: - name: "{{ asg_name }}" - state: absent - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - # Remove the testing dependencies - - - name: remove the load balancer - elb_classic_lb: - name: "{{ load_balancer_name }}" - state: absent - security_group_ids: - - "{{ sg.group_id }}" - subnets: "{{ testing_subnet.subnet.id }}" - wait: yes - connection_draining_timeout: 60 - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - health_check: - ping_protocol: tcp - ping_port: 80 - ping_path: "/" - response_timeout: 5 - interval: 10 - unhealthy_threshold: 4 - healthy_threshold: 2 - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - - - name: remove launch configs - autoscaling_launch_config: - name: "{{ item }}" - state: absent - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - loop: - - "{{ lc_name_1 }}" - - "{{ lc_name_2 }}" - - - name: delete launch template - ec2_launch_template: - name: "{{ resource_prefix }}-lt" - state: absent - register: del_lt - retries: 10 - until: del_lt is not failed - ignore_errors: true - - - name: remove the security group - ec2_security_group: - name: "{{ sg_name }}" - description: a security group for ansible tests - vpc_id: "{{ testing_vpc.vpc.id }}" - state: absent - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - - - name: remove routing rules - ec2_vpc_route_table: - state: absent - vpc_id: "{{ testing_vpc.vpc.id }}" - tags: - created: "{{ route_name }}" - routes: - - dest: 0.0.0.0/0 - gateway_id: "{{ igw.gateway_id }}" - subnets: - - "{{ testing_subnet.subnet.id }}" - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - - - name: remove internet gateway - ec2_vpc_igw: - vpc_id: "{{ testing_vpc.vpc.id }}" - state: absent - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - - - name: remove the subnet - ec2_vpc_subnet: - state: absent - vpc_id: "{{ testing_vpc.vpc.id }}" - cidr: '{{ subnet_a_cidr }}' - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - - - name: remove the VPC - ec2_vpc_net: - name: "{{ vpc_name }}" - cidr_block: '{{ subnet_a_cidr }}' - state: absent - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 diff --git a/tests/integration/targets/autoscaling_instance_refresh/tasks/refresh_and_cancel_three_times.yml b/tests/integration/targets/autoscaling_instance_refresh/tasks/refresh_and_cancel_three_times.yml deleted file mode 100644 index 9b051a054e0..00000000000 --- a/tests/integration/targets/autoscaling_instance_refresh/tasks/refresh_and_cancel_three_times.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- - -- name: try to cancel pre-loop - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "cancelled" - ignore_errors: yes - -- name: test starting a refresh with an ASG name - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "started" - access_key: "{{ aws_access_key }}" - secret_key: "{{ aws_secret_key }}" - region: "{{ aws_region }}" - ignore_errors: no - retries: 10 - delay: 5 - register: refreshout - until: refreshout is not failed - -- name: test cancelling a refresh with an ASG name - autoscaling_instance_refresh: - name: "{{ asg_name }}" - state: "cancelled" - access_key: "{{ aws_access_key }}" - secret_key: "{{ aws_secret_key }}" - region: "{{ aws_region }}" - ignore_errors: yes diff --git a/tests/integration/targets/ec2_launch_template/aliases b/tests/integration/targets/ec2_launch_template/aliases deleted file mode 100644 index 4ef4b2067d0..00000000000 --- a/tests/integration/targets/ec2_launch_template/aliases +++ /dev/null @@ -1 +0,0 @@ -cloud/aws diff --git a/tests/integration/targets/ec2_launch_template/defaults/main.yml b/tests/integration/targets/ec2_launch_template/defaults/main.yml deleted file mode 100644 index 269083ee507..00000000000 --- a/tests/integration/targets/ec2_launch_template/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -test_role_name: ansible-test-{{ tiny_prefix }} diff --git a/tests/integration/targets/ec2_launch_template/files/assume-role-policy.json b/tests/integration/targets/ec2_launch_template/files/assume-role-policy.json deleted file mode 100644 index 72413abdd38..00000000000 --- a/tests/integration/targets/ec2_launch_template/files/assume-role-policy.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Version": "2008-10-17", - "Statement": [ - { - "Sid": "", - "Effect": "Allow", - "Principal": { - "Service": "ec2.amazonaws.com" - }, - "Action": "sts:AssumeRole" - } - ] -} diff --git a/tests/integration/targets/ec2_launch_template/meta/main.yml b/tests/integration/targets/ec2_launch_template/meta/main.yml deleted file mode 100644 index 1471b11f658..00000000000 --- a/tests/integration/targets/ec2_launch_template/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: - - setup_ec2_facts diff --git a/tests/integration/targets/ec2_launch_template/tasks/cpu_options.yml b/tests/integration/targets/ec2_launch_template/tasks/cpu_options.yml deleted file mode 100644 index 92d7fac5fe1..00000000000 --- a/tests/integration/targets/ec2_launch_template/tasks/cpu_options.yml +++ /dev/null @@ -1,38 +0,0 @@ -- block: - - name: delete a non-existent template - ec2_launch_template: - name: "{{ resource_prefix }}-not-a-real-template" - state: absent - register: del_fake_lt - ignore_errors: true - - assert: - that: - - del_fake_lt is not failed - - name: create c4.large instance with cpu_options - ec2_launch_template: - name: "{{ resource_prefix }}-c4large-1-threads-per-core" - image_id: "{{ ec2_ami_id }}" - tags: - TestId: "{{ resource_prefix }}" - instance_type: c4.large - cpu_options: - core_count: 1 - threads_per_core: 1 - register: lt - - - name: instance with cpu_options created with the right options - assert: - that: - - lt is success - - lt is changed - - "lt.latest_template.launch_template_data.cpu_options.core_count == 1" - - "lt.latest_template.launch_template_data.cpu_options.threads_per_core == 1" - always: - - name: delete the template - ec2_launch_template: - name: "{{ resource_prefix }}-c4large-1-threads-per-core" - state: absent - register: del_lt - retries: 10 - until: del_lt is not failed - ignore_errors: true diff --git a/tests/integration/targets/ec2_launch_template/tasks/iam_instance_role.yml b/tests/integration/targets/ec2_launch_template/tasks/iam_instance_role.yml deleted file mode 100644 index ad797fabb79..00000000000 --- a/tests/integration/targets/ec2_launch_template/tasks/iam_instance_role.yml +++ /dev/null @@ -1,134 +0,0 @@ -- block: - - name: Create IAM role for test - iam_role: - name: "{{ test_role_name }}-1" - assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" - state: present - create_instance_profile: yes - managed_policy: - - AWSDenyAll - register: iam_role - - - name: Create second IAM role for test - iam_role: - name: "{{ test_role_name }}-2" - assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" - state: present - create_instance_profile: yes - managed_policy: - - AWSDenyAll - register: iam_role_2 - - - name: Make instance with an instance_role - ec2_launch_template: - name: "{{ resource_prefix }}-test-instance-role" - image_id: "{{ ec2_ami_id }}" - instance_type: t2.micro - iam_instance_profile: "{{ test_role_name }}-1" - register: template_with_role - - - assert: - that: - - 'template_with_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.iam_role.arn.replace(":role/", ":instance-profile/")' - - - name: Create template again, with no change to instance_role - ec2_launch_template: - name: "{{ resource_prefix }}-test-instance-role" - image_id: "{{ ec2_ami_id }}" - instance_type: t2.micro - iam_instance_profile: "{{ test_role_name }}-1" - register: template_with_role - - - assert: - that: - - 'template_with_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.iam_role.arn.replace(":role/", ":instance-profile/")' - - 'template_with_role is not changed' - - - name: Update instance with new instance_role - ec2_launch_template: - name: "{{ resource_prefix }}-test-instance-role" - image_id: "{{ ec2_ami_id }}" - instance_type: t2.micro - iam_instance_profile: "{{ test_role_name }}-2" - register: template_with_updated_role - - - assert: - that: - - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.iam_role.arn.replace(":role/", ":instance-profile/")' - - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.iam_role.arn.replace(":role/", ":instance-profile/")' - - 'template_with_role.default_template.version_number < template_with_updated_role.default_template.version_number' - - 'template_with_updated_role is changed' - - 'template_with_updated_role is not failed' - - - name: Re-set with same new instance_role - ec2_launch_template: - name: "{{ resource_prefix }}-test-instance-role" - image_id: "{{ ec2_ami_id }}" - instance_type: t2.micro - iam_instance_profile: "{{ test_role_name }}-2" - register: template_with_updated_role - - - assert: - that: - - 'template_with_updated_role is not changed' - - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.iam_role.arn.replace(":role/", ":instance-profile/")' - - - name: Update instance with original instance_role (pass profile ARN) - ec2_launch_template: - name: "{{ resource_prefix }}-test-instance-role" - image_id: "{{ ec2_ami_id }}" - instance_type: t2.micro - # By default an instance profile will be created with the same name as the role - iam_instance_profile: '{{ iam_role.iam_role.arn.replace(":role/", ":instance-profile/") }}' - register: template_with_updated_role - - - assert: - that: - - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.iam_role.arn.replace(":role/", ":instance-profile/")' - - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.iam_role.arn.replace(":role/", ":instance-profile/")' - - 'template_with_role.default_template.version_number < template_with_updated_role.default_template.version_number' - - 'template_with_updated_role is changed' - - 'template_with_updated_role is not failed' - - - name: Re-set with same new instance_role (pass profile ARN) - ec2_launch_template: - name: "{{ resource_prefix }}-test-instance-role" - image_id: "{{ ec2_ami_id }}" - instance_type: t2.micro - iam_instance_profile: '{{ iam_role.iam_role.arn.replace(":role/", ":instance-profile/") }}' - register: template_with_updated_role - - - assert: - that: - - 'template_with_updated_role is not changed' - - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.iam_role.arn.replace(":role/", ":instance-profile/")' - - always: - - name: delete launch template - ec2_launch_template: - name: "{{ resource_prefix }}-test-instance-role" - state: absent - register: lt_removed - until: lt_removed is not failed - ignore_errors: yes - retries: 10 - - name: Delete IAM role for test - iam_role: - name: "{{ test_role_name }}-1" - assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" - state: absent - delete_instance_profile: yes - register: iam_removed - until: iam_removed is not failed - ignore_errors: yes - retries: 10 - - name: Delete IAM role for test - iam_role: - name: "{{ test_role_name }}-2" - assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" - state: absent - delete_instance_profile: yes - register: iam_2_removed - until: iam_2_removed is not failed - ignore_errors: yes - retries: 10 diff --git a/tests/integration/targets/ec2_launch_template/tasks/instance-metadata.yml b/tests/integration/targets/ec2_launch_template/tasks/instance-metadata.yml deleted file mode 100644 index 7648f00efb8..00000000000 --- a/tests/integration/targets/ec2_launch_template/tasks/instance-metadata.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -- name: instance_metadata_tags - block: - - name: metadata_options - ec2_launch_template: - name: "{{ resource_prefix }}-test-metadata" - metadata_options: - http_put_response_hop_limit: 1 - http_tokens: required - http_protocol_ipv6: enabled - instance_metadata_tags: enabled - state: present - register: metadata_options_launch_template - - name: instance with metadata_options created with the right options - assert: - that: - - metadata_options_launch_template is changed - - "metadata_options_launch_template.latest_template.launch_template_data.metadata_options.http_put_response_hop_limit == 1" - - "metadata_options_launch_template.latest_template.launch_template_data.metadata_options.http_tokens == 'required'" - - "metadata_options_launch_template.latest_template.launch_template_data.metadata_options.http_protocol_ipv6 == 'enabled'" - - "metadata_options_launch_template.latest_template.launch_template_data.metadata_options.instance_metadata_tags == 'enabled'" - always: - - name: delete the template - ec2_launch_template: - name: "{{ resource_prefix }}-test-metadata" - state: absent - register: del_lt - retries: 10 - until: del_lt is not failed - ignore_errors: true diff --git a/tests/integration/targets/ec2_launch_template/tasks/main.yml b/tests/integration/targets/ec2_launch_template/tasks/main.yml deleted file mode 100644 index e89dfceb557..00000000000 --- a/tests/integration/targets/ec2_launch_template/tasks/main.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- module_defaults: - group/aws: - access_key: "{{ aws_access_key }}" - secret_key: "{{ aws_secret_key }}" - session_token: "{{ security_token | default(omit) }}" - region: "{{ aws_region }}" - block: - - include_tasks: cpu_options.yml - - include_tasks: iam_instance_role.yml - - include_tasks: versions.yml - - include_tasks: instance-metadata.yml - - include_tasks: network_interfaces.yml diff --git a/tests/integration/targets/ec2_launch_template/tasks/network_interfaces.yml b/tests/integration/targets/ec2_launch_template/tasks/network_interfaces.yml deleted file mode 100644 index a2ca0e5f6b9..00000000000 --- a/tests/integration/targets/ec2_launch_template/tasks/network_interfaces.yml +++ /dev/null @@ -1,53 +0,0 @@ -- block: - - name: network_interfaces - ec2_launch_template: - name: "{{ resource_prefix }}-test-nic" - state: present - network_interfaces: - - device_index: 0 - associate_public_ip_address: false - delete_on_termination: true - - device_index: 1 - associate_public_ip_address: true - delete_on_termination: false - ipv6_address_count: 1 - register: nic_template - - name: instance with network_interfaces created with the right settings - assert: - that: - - nic_template is changed - - nic_template.default_template.launch_template_data.network_interfaces[0].associate_public_ip_address == False - - nic_template.default_template.launch_template_data.network_interfaces[0].delete_on_termination == True - - nic_template.default_template.launch_template_data.network_interfaces[0].device_index == 0 - - nic_template.default_template.launch_template_data.network_interfaces[1].associate_public_ip_address == True - - nic_template.default_template.launch_template_data.network_interfaces[1].delete_on_termination == False - - nic_template.default_template.launch_template_data.network_interfaces[1].device_index == 1 - - nic_template.default_template.launch_template_data.network_interfaces[1].ipv6_address_count == 1 - - - name: network_interfaces - ec2_launch_template: - name: "{{ resource_prefix }}-test-nic" - state: present - network_interfaces: - - device_index: 0 - associate_public_ip_address: false - delete_on_termination: true - - device_index: 1 - associate_public_ip_address: true - delete_on_termination: false - ipv6_address_count: 1 - register: nic_template - - name: instance with network_interfaces created with the right settings - assert: - that: - - nic_template is not changed - - always: - - name: delete the template - ec2_launch_template: - name: "{{ resource_prefix }}-test-nic" - state: absent - register: del_lt - retries: 10 - until: del_lt is not failed - ignore_errors: true diff --git a/tests/integration/targets/ec2_launch_template/tasks/tags_and_vpc_settings.yml b/tests/integration/targets/ec2_launch_template/tasks/tags_and_vpc_settings.yml deleted file mode 100644 index 41ff9082b76..00000000000 --- a/tests/integration/targets/ec2_launch_template/tasks/tags_and_vpc_settings.yml +++ /dev/null @@ -1,208 +0,0 @@ -- block: - # ============================================================ - # set up VPC - - name: Create VPC for use in testing - ec2_vpc_net: - name: "{{ resource_prefix }}-vpc" - cidr_block: 10.99.0.0/16 - tags: - Name: Ansible ec2_instance Testing VPC - tenancy: default - register: testing_vpc - - - name: Create default subnet in zone A - ec2_vpc_subnet: - state: present - vpc_id: "{{ testing_vpc.vpc.id }}" - cidr: 10.99.0.0/24 - az: "{{ aws_region }}a" - resource_tags: - Name: "{{ resource_prefix }}-subnet-a" - register: testing_subnet_a - - - name: Create secondary subnet in zone B - ec2_vpc_subnet: - state: present - vpc_id: "{{ testing_vpc.vpc.id }}" - cidr: 10.99.1.0/24 - az: "{{ aws_region }}b" - resource_tags: - Name: "{{ resource_prefix }}-subnet-b" - register: testing_subnet_b - - - name: create a security group with the vpc - ec2_security_group: - name: "{{ resource_prefix }}-sg" - description: a security group for ansible tests - vpc_id: "{{ testing_vpc.vpc.id }}" - rules: - - proto: tcp - ports: [22, 80] - cidr_ip: 0.0.0.0/0 - register: sg - # TODO: switch these tests from instances - - assert: - that: - - 1 == 0 - # ============================================================ - # start subnet/sg testing - - name: Make instance in the testing subnet created in the test VPC - ec2_instance: - name: "{{ resource_prefix }}-test-basic-vpc-create" - image_id: "{{ ec2_ami_id }}" - user_data: | - #cloud-config - package_upgrade: true - package_update: true - tags: - TestId: "{{ resource_prefix }}" - Something: else - security_groups: "{{ sg.group_id }}" - network: - source_dest_check: false - vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" - instance_type: t2.micro - volumes: - - device_name: /dev/sda1 - ebs: - delete_on_termination: true - register: in_test_vpc - - - name: Try to re-make the instance, hopefully this shows changed=False - ec2_instance: - name: "{{ resource_prefix }}-test-basic-vpc-create" - image_id: "{{ ec2_ami_id }}" - user_data: | - #cloud-config - package_upgrade: true - package_update: true - tags: - TestId: "{{ resource_prefix }}" - Something: else - security_groups: "{{ sg.group_id }}" - vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" - instance_type: t2.micro - register: remake_in_test_vpc - - name: "Remaking the same instance resulted in no changes" - assert: - that: not remake_in_test_vpc.changed - - name: check that instance IDs match anyway - assert: - that: 'remake_in_test_vpc.instance_ids[0] == in_test_vpc.instance_ids[0]' - - name: check that source_dest_check was set to false - assert: - that: 'not remake_in_test_vpc.instances[0].source_dest_check' - - - name: Alter it by adding tags - ec2_instance: - name: "{{ resource_prefix }}-test-basic-vpc-create" - image_id: "{{ ec2_ami_id }}" - tags: - TestId: "{{ resource_prefix }}" - Another: thing - security_groups: "{{ sg.group_id }}" - vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" - instance_type: t2.micro - register: add_another_tag - - - ec2_instance_info: - instance_ids: "{{ add_another_tag.instance_ids }}" - register: check_tags - - name: "Remaking the same instance resulted in no changes" - assert: - that: - - check_tags.instances[0].tags.Another == 'thing' - - check_tags.instances[0].tags.Something == 'else' - - - name: Purge a tag - ec2_instance: - name: "{{ resource_prefix }}-test-basic-vpc-create" - image_id: "{{ ec2_ami_id }}" - purge_tags: true - tags: - TestId: "{{ resource_prefix }}" - Another: thing - security_groups: "{{ sg.group_id }}" - vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" - instance_type: t2.micro - - ec2_instance_info: - instance_ids: "{{ add_another_tag.instance_ids }}" - register: check_tags - - name: "Remaking the same instance resulted in no changes" - assert: - that: - - "'Something' not in check_tags.instances[0].tags" - - - name: Terminate instance - ec2_instance: - filters: - tag:TestId: "{{ resource_prefix }}" - state: absent - register: result - - assert: - that: result.changed - - - name: Terminate instance - ec2_instance: - instance_ids: "{{ in_test_vpc.instance_ids }}" - state: absent - register: result - - assert: - that: not result.changed - - - name: check that subnet-default public IP rule was followed - assert: - that: - - in_test_vpc.instances[0].public_dns_name == "" - - in_test_vpc.instances[0].private_ip_address.startswith("10.22.33") - - in_test_vpc.instances[0].subnet_id == testing_subnet_b.subnet.id - - name: check that tags were applied - assert: - that: - - in_test_vpc.instances[0].tags.Name.startswith(resource_prefix) - - in_test_vpc.instances[0].state.name == 'running' - - always: - - name: remove the security group - ec2_security_group: - name: "{{ resource_prefix }}-sg" - description: a security group for ansible tests - vpc_id: "{{ testing_vpc.vpc.id }}" - state: absent - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - - - name: remove subnet A - ec2_vpc_subnet: - state: absent - vpc_id: "{{ testing_vpc.vpc.id }}" - cidr: 10.99.0.0/24 - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - - - name: remove subnet B - ec2_vpc_subnet: - state: absent - vpc_id: "{{ testing_vpc.vpc.id }}" - cidr: 10.99.1.0/24 - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - - - name: remove the VPC - ec2_vpc_net: - name: "{{ resource_prefix }}-vpc" - cidr_block: 10.99.0.0/16 - state: absent - tags: - Name: Ansible Testing VPC - tenancy: default - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 diff --git a/tests/integration/targets/ec2_launch_template/tasks/versions.yml b/tests/integration/targets/ec2_launch_template/tasks/versions.yml deleted file mode 100644 index a9e40cd0843..00000000000 --- a/tests/integration/targets/ec2_launch_template/tasks/versions.yml +++ /dev/null @@ -1,95 +0,0 @@ -- block: - - name: create simple instance template - ec2_launch_template: - name: "{{ resource_prefix }}-simple" - image_id: "{{ ec2_ami_id }}" - tags: - TestId: "{{ resource_prefix }}" - instance_type: c4.large - register: lt - - - name: instance with cpu_options created with the right options - assert: - that: - - lt is success - - lt is changed - - lt.default_version == 1 - - lt.latest_version == 1 - - - name: update simple instance template - ec2_launch_template: - name: "{{ resource_prefix }}-simple" - default_version: 1 - image_id: "{{ ec2_ami_id }}" - tags: - TestId: "{{ resource_prefix }}" - instance_type: m5.large - register: lt - - - name: instance with cpu_options created with the right options - assert: - that: - - lt is success - - lt is changed - - lt.default_version == 1 - - lt.latest_version == 2 - - - name: update simple instance template - ec2_launch_template: - name: "{{ resource_prefix }}-simple" - image_id: "{{ ec2_ami_id }}" - tags: - TestId: "{{ resource_prefix }}" - instance_type: t3.medium - register: lt - - - name: instance with cpu_options created with the right options - assert: - that: - - lt is success - - lt is changed - - lt.default_version == 3 - - lt.latest_version == 3 - - - name: create new template version based on an old version - ec2_launch_template: - name: "{{ resource_prefix }}-simple" - cpu_options: - core_count: 1 - threads_per_core: 1 - source_version: 1 - register: lt - - - name: instance with cpu_options created with the right options - assert: - that: - - lt is success - - lt is changed - - lt.default_version == 4 - - lt.latest_version == 4 - - lt.latest_template.launch_template_data.instance_type == "c4.large" - - - name: update simple instance template - ec2_launch_template: - name: "{{ resource_prefix }}-simple" - version_description: "Fix something." - register: lt - - - name: instance with cpu_options created with the right options - assert: - that: - - lt is success - - lt is changed - - lt.default_version == 5 - - lt.latest_version == 5 - - lt.latest_template.version_description == "Fix something." - - always: - - name: delete the template - ec2_launch_template: - name: "{{ resource_prefix }}-simple" - state: absent - register: del_lt - retries: 10 - until: del_lt is not failed - ignore_errors: true diff --git a/tests/integration/targets/ec2_placement_group/aliases b/tests/integration/targets/ec2_placement_group/aliases deleted file mode 100644 index c6944e7b949..00000000000 --- a/tests/integration/targets/ec2_placement_group/aliases +++ /dev/null @@ -1,3 +0,0 @@ -cloud/aws - -ec2_placement_group_info diff --git a/tests/integration/targets/ec2_placement_group/defaults/main.yml b/tests/integration/targets/ec2_placement_group/defaults/main.yml deleted file mode 100644 index ed97d539c09..00000000000 --- a/tests/integration/targets/ec2_placement_group/defaults/main.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/tests/integration/targets/ec2_placement_group/meta/main.yml b/tests/integration/targets/ec2_placement_group/meta/main.yml deleted file mode 100644 index ed97d539c09..00000000000 --- a/tests/integration/targets/ec2_placement_group/meta/main.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/tests/integration/targets/ec2_placement_group/tasks/env_cleanup.yml b/tests/integration/targets/ec2_placement_group/tasks/env_cleanup.yml deleted file mode 100644 index ce626b69c3d..00000000000 --- a/tests/integration/targets/ec2_placement_group/tasks/env_cleanup.yml +++ /dev/null @@ -1,94 +0,0 @@ -- name: remove any instances in the test VPC - ec2_instance: - filters: - vpc_id: "{{ testing_vpc.vpc.id }}" - state: absent - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - -- name: Get ENIs - ec2_eni_info: - filters: - vpc-id: "{{ testing_vpc.vpc.id }}" - register: enis - -- name: delete all ENIs - ec2_eni: - eni_id: "{{ item.id }}" - state: absent - until: removed is not failed - with_items: "{{ enis.network_interfaces }}" - ignore_errors: yes - retries: 10 - -- name: remove the security group - ec2_security_group: - name: "{{ resource_prefix }}-sg" - description: a security group for ansible tests - vpc_id: "{{ testing_vpc.vpc.id }}" - state: absent - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - -- name: remove routing rules - ec2_vpc_route_table: - state: absent - vpc_id: "{{ testing_vpc.vpc.id }}" - tags: - created: "{{ resource_prefix }}-route" - routes: - - dest: 0.0.0.0/0 - gateway_id: "{{ igw.gateway_id }}" - subnets: - - "{{ testing_subnet_a.subnet.id }}" - - "{{ testing_subnet_b.subnet.id }}" - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - -- name: remove internet gateway - ec2_vpc_igw: - vpc_id: "{{ testing_vpc.vpc.id }}" - state: absent - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - -- name: remove subnet A - ec2_vpc_subnet: - state: absent - vpc_id: "{{ testing_vpc.vpc.id }}" - cidr: 10.22.32.0/24 - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - -- name: remove subnet B - ec2_vpc_subnet: - state: absent - vpc_id: "{{ testing_vpc.vpc.id }}" - cidr: 10.22.33.0/24 - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 - -- name: remove the VPC - ec2_vpc_net: - name: "{{ resource_prefix }}-vpc" - cidr_block: 10.22.32.0/23 - state: absent - tags: - Name: Ansible Testing VPC - tenancy: default - register: removed - until: removed is not failed - ignore_errors: yes - retries: 10 diff --git a/tests/integration/targets/ec2_placement_group/tasks/env_setup.yml b/tests/integration/targets/ec2_placement_group/tasks/env_setup.yml deleted file mode 100644 index d48bae66c83..00000000000 --- a/tests/integration/targets/ec2_placement_group/tasks/env_setup.yml +++ /dev/null @@ -1,64 +0,0 @@ -- name: Create VPC for use in testing - ec2_vpc_net: - name: "{{ resource_prefix }}-vpc" - cidr_block: 10.22.32.0/23 - tags: - Name: Ansible ec2_lc Testing VPC - tenancy: default - register: testing_vpc - -- name: Create internet gateway for use in testing - ec2_vpc_igw: - vpc_id: "{{ testing_vpc.vpc.id }}" - state: present - tags: - Name: Ansible ec2_lc Testing gateway - register: igw - -- name: Create default subnet in zone A - ec2_vpc_subnet: - state: present - vpc_id: "{{ testing_vpc.vpc.id }}" - cidr: 10.22.32.0/24 - az: "{{ aws_region }}a" - resource_tags: - Name: "{{ resource_prefix }}-subnet-a" - register: testing_subnet_a - -- name: Create secondary subnet in zone B - ec2_vpc_subnet: - state: present - vpc_id: "{{ testing_vpc.vpc.id }}" - cidr: 10.22.33.0/24 - az: "{{ aws_region }}b" - resource_tags: - Name: "{{ resource_prefix }}-subnet-b" - register: testing_subnet_b - -- name: create routing rules - ec2_vpc_route_table: - vpc_id: "{{ testing_vpc.vpc.id }}" - tags: - created: "{{ resource_prefix }}-route" - routes: - - dest: 0.0.0.0/0 - gateway_id: "{{ igw.gateway_id }}" - subnets: - - "{{ testing_subnet_a.subnet.id }}" - - "{{ testing_subnet_b.subnet.id }}" - -- name: create a security group with the vpc - ec2_security_group: - name: "{{ resource_prefix }}-sg" - description: a security group for ansible tests - vpc_id: "{{ testing_vpc.vpc.id }}" - rules: - - proto: tcp - from_port: 22 - to_port: 22 - cidr_ip: 0.0.0.0/0 - - proto: tcp - from_port: 80 - to_port: 80 - cidr_ip: 0.0.0.0/0 - register: sg diff --git a/tests/integration/targets/ec2_placement_group/tasks/main.yml b/tests/integration/targets/ec2_placement_group/tasks/main.yml deleted file mode 100644 index 10695571ebf..00000000000 --- a/tests/integration/targets/ec2_placement_group/tasks/main.yml +++ /dev/null @@ -1,408 +0,0 @@ -- name: run ec2_placement_group tests - module_defaults: - group/aws: - access_key: "{{ aws_access_key }}" - secret_key: "{{ aws_secret_key }}" - session_token: "{{ security_token | default(omit) }}" - region: "{{ aws_region }}" - collections: - - amazon.aws - vars: - placement_group_names: [] - - block: - - - name: set up environment for testing. - include_tasks: env_setup.yml - - - name: Create a placement group 1 - check_mode - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg1' - state: present - check_mode: true - register: pg_1_create_check_mode - - - assert: - that: - - pg_1_create_check_mode is changed - - pg_1_create_check_mode.placement_group.name == resource_prefix ~ '-pg1' - - pg_1_create_check_mode.placement_group.state == "DryRun" - - '"ec2:CreatePlacementGroup" in pg_1_create_check_mode.resource_actions' - - - name: Create a placement group 1 - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg1' - state: present - register: pg_1_create - - - set_fact: - placement_group_names: "{{ placement_group_names + [pg_1_create.placement_group.name] }}" - - - assert: - that: - - pg_1_create is changed - - pg_1_create.placement_group.name == resource_prefix ~ '-pg1' - - pg_1_create.placement_group.state == "available" - - '"ec2:CreatePlacementGroup" in pg_1_create.resource_actions' - - - name: Gather information about placement group 1 - community.aws.ec2_placement_group_info: - names: - - '{{ resource_prefix }}-pg1' - register: pg_1_info_result - - - assert: - that: - - pg_1_info_result is not changed - - pg_1_info_result.placement_groups[0].name == resource_prefix ~ '-pg1' - - pg_1_info_result.placement_groups[0].state == "available" - - pg_1_info_result.placement_groups[0].strategy == "cluster" - - '"ec2:DescribePlacementGroups" in pg_1_info_result.resource_actions' - - - name: Create a placement group 1 - Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg1' - state: present - register: pg_1_create - - - assert: - that: - - pg_1_create is not changed - - pg_1_create.placement_group.name == resource_prefix ~ '-pg1' - - pg_1_create.placement_group.state == "available" - - '"ec2:CreatePlacementGroup" not in pg_1_create.resource_actions' - - - name: Create a placement group 1 - check_mode Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg1' - state: present - check_mode: true - register: pg_1_create_check_mode_idem - - - assert: - that: - - pg_1_create_check_mode_idem is not changed - - pg_1_create_check_mode_idem.placement_group.name == resource_prefix ~ '-pg1' - - pg_1_create_check_mode_idem.placement_group.state == "available" - - '"ec2:CreatePlacementGroup" not in pg_1_create_check_mode_idem.resource_actions' - - - name: Create a placement group 2 - check_mode - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg2' - state: present - strategy: spread - check_mode: true - register: pg_2_create_check_mode - - - assert: - that: - - pg_2_create_check_mode is changed - - pg_2_create_check_mode.placement_group.name == resource_prefix ~ '-pg2' - - pg_2_create_check_mode.placement_group.state == "DryRun" - - '"ec2:CreatePlacementGroup" in pg_2_create_check_mode.resource_actions' - - - name: Create a placement group 2 with spread strategy - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg2' - state: present - strategy: spread - register: pg_2_create - - - assert: - that: - - pg_2_create is changed - - pg_2_create.placement_group.name == resource_prefix ~ '-pg2' - - pg_2_create.placement_group.state == "available" - - '"ec2:CreatePlacementGroup" in pg_2_create.resource_actions' - - - set_fact: - placement_group_names: "{{ placement_group_names + [pg_2_create.placement_group.name] }}" - - - name: Gather information about placement group 2 - community.aws.ec2_placement_group_info: - names: - - '{{ resource_prefix }}-pg2' - register: pg_2_info_result - - - assert: - that: - - pg_2_info_result is not changed - - pg_2_info_result.placement_groups[0].name == resource_prefix ~ '-pg2' - - pg_2_info_result.placement_groups[0].state == "available" - - pg_2_info_result.placement_groups[0].strategy == "spread" - - '"ec2:DescribePlacementGroups" in pg_2_info_result.resource_actions' - - - name: Create a placement group 2 with spread strategy - Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg2' - state: present - strategy: spread - register: pg_2_create - - - assert: - that: - - pg_2_create is not changed - - pg_2_create.placement_group.name == resource_prefix ~ '-pg2' - - pg_2_create.placement_group.state == "available" - - '"ec2:CreatePlacementGroup" not in pg_2_create.resource_actions' - - - name: Create a placement group 2 - check_mode Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg2' - state: present - strategy: spread - check_mode: true - register: pg_2_create_check_mode_idem - - - assert: - that: - - pg_2_create_check_mode_idem is not changed - - pg_2_create_check_mode_idem.placement_group.name == resource_prefix ~ '-pg2' - - pg_2_create_check_mode_idem.placement_group.state == "available" - - '"ec2:CreatePlacementGroup" not in pg_2_create_check_mode_idem.resource_actions' - - - name: Create a placement group 3 - check_mode - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg3' - state: present - strategy: partition - partition_count: 4 - check_mode: true - register: pg_3_create_check_mode - - - assert: - that: - - pg_3_create_check_mode is changed - - pg_3_create_check_mode.placement_group.name == resource_prefix ~ '-pg3' - - pg_3_create_check_mode.placement_group.state == "DryRun" - - '"ec2:CreatePlacementGroup" in pg_3_create_check_mode.resource_actions' - - - name: Create a placement group 3 with Partition strategy - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg3' - state: present - strategy: partition - partition_count: 4 - register: pg_3_create - - - assert: - that: - - pg_3_create is changed - - pg_3_create.placement_group.name == resource_prefix ~ '-pg3' - - pg_3_create.placement_group.state == "available" - - '"ec2:CreatePlacementGroup" in pg_3_create.resource_actions' - - - set_fact: - placement_group_names: "{{ placement_group_names + [pg_3_create.placement_group.name] }}" - - - - name: Gather information about placement group 3 - community.aws.ec2_placement_group_info: - names: - - '{{ resource_prefix }}-pg3' - register: pg_3_info_result - - - assert: - that: - - pg_3_info_result is not changed - - pg_3_info_result.placement_groups[0].name == resource_prefix ~ '-pg3' - - pg_3_info_result.placement_groups[0].state == "available" - - pg_3_info_result.placement_groups[0].strategy == "partition" - - '"ec2:DescribePlacementGroups" in pg_3_info_result.resource_actions' - - - name: Create a placement group 3 with Partition strategy - Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg3' - state: present - strategy: partition - partition_count: 4 - register: pg_3_create - - - assert: - that: - - pg_3_create is not changed - - pg_3_create.placement_group.name == resource_prefix ~ '-pg3' - - pg_3_create.placement_group.state == "available" - - '"ec2:CreatePlacementGroup" not in pg_3_create.resource_actions' - - - name: Create a placement group 3 - check_mode Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg3' - state: present - strategy: partition - partition_count: 4 - check_mode: true - register: pg_3_create_check_mode_idem - - - assert: - that: - - pg_3_create_check_mode_idem is not changed - - pg_3_create_check_mode_idem.placement_group.name == resource_prefix ~ '-pg3' - - pg_3_create_check_mode_idem.placement_group.state == "available" - - '"ec2:CreatePlacementGroup" not in pg_3_create_check_mode_idem.resource_actions' - - - name: List all placement groups. - community.aws.ec2_placement_group_info: - register: all_ec2_placement_groups - -# Delete Placement Group ========================================== - - # On using check_mode for delete placement group operation - # If operation would have succeeded, the error response is DryRunOperation. - # Otherwise, it is UnauthorizedOperation . - - name: Delete a placement group 1 - check_mode - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg1' - state: absent - check_mode: true - register: pg_1_delete_check_mode - ignore_errors: true - - - assert: - that: - - pg_1_delete_check_mode is not changed - - pg_1_delete_check_mode.error.code == 'DryRunOperation' - - '"ec2:DeletePlacementGroup" in pg_1_delete_check_mode.resource_actions' - - - name: Delete a placement group 1 - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg1' - state: absent - register: pg_1_delete - - - assert: - that: - - pg_1_delete is changed - - '"ec2:DeletePlacementGroup" in pg_1_delete.resource_actions' - - - name: Delete a placement group 1 - Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg1' - state: absent - register: pg_1_delete - - - assert: - that: - - pg_1_delete is not changed - - '"ec2:DeletePlacementGroup" not in pg_1_delete.resource_actions' - - - name: Delete a placement group 1 - check_mode Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg1' - state: absent - check_mode: true - register: pg_1_delete_check_mode_idem - ignore_errors: true - - - assert: - that: - - pg_1_delete_check_mode_idem is not changed - - '"ec2:DeletePlacementGroup" not in pg_1_delete_check_mode_idem.resource_actions' - - - name: Delete a placement group 2 - check_mode - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg2' - state: absent - check_mode: true - register: pg_2_delete_check_mode - ignore_errors: true - - - assert: - that: - - pg_2_delete_check_mode is not changed - - pg_2_delete_check_mode.error.code == 'DryRunOperation' - - '"ec2:DeletePlacementGroup" in pg_2_delete_check_mode.resource_actions' - - - name: Delete a placement group 2 - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg2' - state: absent - register: pg_2_delete - - - assert: - that: - - pg_2_delete is changed - - '"ec2:DeletePlacementGroup" in pg_2_delete.resource_actions' - - - name: Delete a placement group 2 - Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg2' - state: absent - register: pg_2_delete - - - assert: - that: - - pg_2_delete is not changed - - '"ec2:DeletePlacementGroup" not in pg_2_delete.resource_actions' - - - name: Delete a placement group 2 - check_mode Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg2' - state: absent - check_mode: true - register: pg_2_delete_check_mode_idem - ignore_errors: true - - - assert: - that: - - pg_2_delete_check_mode_idem is not changed - - '"ec2:DeletePlacementGroup" not in pg_2_delete_check_mode_idem.resource_actions' - - - name: Delete a placement group 3 - check_mode - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg3' - state: absent - check_mode: true - register: pg_3_delete_check_mode - ignore_errors: true - - - assert: - that: - - pg_3_delete_check_mode is not changed - - pg_3_delete_check_mode.error.code == 'DryRunOperation' - - '"ec2:DeletePlacementGroup" in pg_3_delete_check_mode.resource_actions' - - - name: Delete a placement group 3 - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg3' - state: absent - register: pg_3_delete - - - assert: - that: - - pg_3_delete is changed - - '"ec2:DeletePlacementGroup" in pg_3_delete.resource_actions' - - - name: Delete a placement group 3 - Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg3' - state: absent - register: pg_3_delete - - - assert: - that: - - pg_3_delete is not changed - - '"ec2:DeletePlacementGroup" not in pg_3_delete.resource_actions' - - - name: Delete a placement group 3 - check_mode Idempotency - community.aws.ec2_placement_group: - name: '{{ resource_prefix }}-pg3' - state: absent - check_mode: true - register: pg_3_delete_check_mode_idem - ignore_errors: true - - - assert: - that: - - pg_3_delete_check_mode_idem is not changed - - '"ec2:DeletePlacementGroup" not in pg_3_delete_check_mode_idem.resource_actions' - - always: - - - name: Make sure placement groups created during test are deleted - community.aws.ec2_placement_group: - name: '{{ item }}' - state: absent - with_items: '{{ placement_group_names }}' - - - include_tasks: env_cleanup.yml diff --git a/tests/integration/targets/ec2_placement_group/vars/main.yml b/tests/integration/targets/ec2_placement_group/vars/main.yml deleted file mode 100644 index ed97d539c09..00000000000 --- a/tests/integration/targets/ec2_placement_group/vars/main.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/tests/integration/targets/ec2_transit_gateway/aliases b/tests/integration/targets/ec2_transit_gateway/aliases deleted file mode 100644 index cfcde0de380..00000000000 --- a/tests/integration/targets/ec2_transit_gateway/aliases +++ /dev/null @@ -1,3 +0,0 @@ -cloud/aws - -ec2_transit_gateway_info diff --git a/tests/integration/targets/ec2_transit_gateway/meta/main.yml b/tests/integration/targets/ec2_transit_gateway/meta/main.yml deleted file mode 100644 index 32cf5dda7ed..00000000000 --- a/tests/integration/targets/ec2_transit_gateway/meta/main.yml +++ /dev/null @@ -1 +0,0 @@ -dependencies: [] diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml deleted file mode 100644 index 241c9c2c324..00000000000 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ /dev/null @@ -1,168 +0,0 @@ ---- -- name: 'ec2_transit_gateway integration tests' - collections: - - amazon.aws - module_defaults: - group/aws: - access_key: '{{ aws_access_key }}' - secret_key: '{{ aws_secret_key }}' - session_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region }}' - block: - - - name: generate unique value for testing - set_fact: - tgw_description: "{{ resource_prefix }}-tgw" - - - name: test create transit gateway without tags - ec2_transit_gateway: - description: "{{ tgw_description }}" - register: create_result - - name: assert changed is True - assert: - that: - - create_result.changed == True - - - name: test update transit gateway with tags by description - ec2_transit_gateway: - description: "{{ tgw_description }}" - tags: - Name: Ansible Test TGW - register: result - - name: assert changed is True - assert: - that: - - result.changed == True - - result.transit_gateway.tags | length == 1 - - "'Name' in result.transit_gateway.tags" - - - name: test update transit gateway with new tag and purge_tags false - ec2_transit_gateway: - transit_gateway_id: '{{ create_result.transit_gateway.transit_gateway_id }}' - purge_tags: False - tags: - status: ok to delete - register: result - - name: assert changed is True and have 2 tags - assert: - that: - - result.changed == True - - result.transit_gateway.tags | length == 2 - - "'Name' in result.transit_gateway.tags" - - - name: test update transit gateway with purge_tags true - ec2_transit_gateway: - transit_gateway_id: '{{ create_result.transit_gateway.transit_gateway_id }}' - purge_tags: True - tags: - status: ok to delete - register: result - - name: assert changed is True and TGW tag is absent - assert: - that: - - result.changed == True - - result.transit_gateway.tags | length == 1 - - "'Name' not in result.transit_gateway.tags" - - - name: test idempotence - ec2_transit_gateway: - description: "{{ tgw_description }}" - purge_tags: True - tags: - status: ok to delete - register: result - - name: assert changed is False - assert: - that: - - result.changed == False - - - name: generate unique value for testing - set_fact: - tgw_description_multicast: "{{ resource_prefix }}-tgw-multicast" - - - name: test create transit gateway with multicast enabled - ec2_transit_gateway: - description: "{{ tgw_description_multicast }}" - multicast_support: true - register: create_result - - - name: assert changed is True - assert: - that: - - create_result.changed == True - - - name: test success with filter - ec2_transit_gateway_info: - filters: - options.multicast-support: enable - register: result - - - name: assert success with multicast-support filter - assert: - that: - - 'result.transit_gateways != []' - - # ==== Combine ec2_transit_gateway_info ====================== - - name: test success with no parameters - ec2_transit_gateway_info: - register: result - - name: assert success with no parameters - assert: - that: - - 'result.changed == false' - - 'result.transit_gateways != []' - - - name: test success with single filter - ec2_transit_gateway_info: - filters: - transit-gateway-id: "{{ create_result.transit_gateway.transit_gateway_id }}" - register: result - - name: assert success with transit_gateway_id filter - assert: - that: - - 'result.changed == false' - - 'result.transit_gateways != []' - - - name: test empty result set for non-existent tgw id via filter - ec2_transit_gateway_info: - filters: - transit-gateway-id: tgw-00000011111111122 - register: result - - name: assert success with transit_gateway_id filter - assert: - that: - - 'result.changed == false' - - 'result.transit_gateways == []' - - - name: test NotFound exception caught and returned empty result set - ec2_transit_gateway_info: - transit_gateway_id: tgw-00000011111111122 - register: result - - name: assert success with transit_gateway_id filter - assert: - that: - - 'result.changed == false' - - 'result.transit_gateways == []' - - - name: test success with multiple filters - ec2_transit_gateway_info: - filters: - options.dns-support: enable - options.vpn-ecmp-support: enable - register: result - - name: assert success with transit_gateway_id filter - assert: - that: - - 'result.changed == false' - - 'result.transit_gateways != []' - - always: - ###### TEARDOWN STARTS HERE ###### - - name: delete transit gateway - ec2_transit_gateway: - description: "{{ item }}" - state: absent - ignore_errors: yes - loop: - - "{{ tgw_description }}" - - "{{ tgw_description_multicast }}" diff --git a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/aliases b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/aliases deleted file mode 100644 index 94fa60d71f2..00000000000 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/aliases +++ /dev/null @@ -1,3 +0,0 @@ -cloud/aws -time=35m -# ec2_transit_gateway_vpc_attachment_info diff --git a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/defaults/main.yml b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/defaults/main.yml deleted file mode 100644 index c9727746555..00000000000 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/defaults/main.yml +++ /dev/null @@ -1,26 +0,0 @@ -_resource_prefix: 'AnsibleTest' -#_resource_prefix: 'AnsibleTest-{{ tiny_prefix }}-TGW-Attach' -cidr_prefix: '10.{{ 255 | random(seed=_resource_prefix) }}' -tgw_name: '{{ _resource_prefix }}' -tgw_name_2: '{{ _resource_prefix }}-2' -vpc_name_a: '{{ _resource_prefix }}-1' -vpc_name_b: '{{ _resource_prefix }}-2' -vpc_cidr_a: '{{ cidr_prefix }}.1.0/24' -vpc_cidr_b: '{{ cidr_prefix }}.2.0/24' - -subnet_cidr_a_1: '{{ cidr_prefix }}.1.0/26' -subnet_cidr_a_2: '{{ cidr_prefix }}.1.64/26' -subnet_cidr_a_3: '{{ cidr_prefix }}.1.128/26' -subnet_cidr_a_1a: '{{ cidr_prefix }}.1.192/26' -subnet_cidr_b_1: '{{ cidr_prefix }}.2.0/26' -subnet_cidr_b_2: '{{ cidr_prefix }}.2.64/26' - -subnet_name_a_1: '{{ _resource_prefix }}-a-1' -subnet_name_a_1a: '{{ _resource_prefix }}-a-1a' -subnet_name_a_2: '{{ _resource_prefix }}-a-2' -subnet_name_a_3: '{{ _resource_prefix }}-a-3' -subnet_name_b_1: '{{ _resource_prefix }}-b-1' -subnet_name_b_2: '{{ _resource_prefix }}-b-2' - -attachment_name: '{{ _resource_prefix }}' -attachment_name_complex: '{{ _resource_prefix }}-complex' diff --git a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/meta/main.yml b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/meta/main.yml deleted file mode 100644 index aef5ca0ee57..00000000000 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: - - role: setup_ec2_facts diff --git a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/cleanup.yml b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/cleanup.yml deleted file mode 100644 index e59723bdc30..00000000000 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/cleanup.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -- name: 'Describe all attachments on our VPC' - ec2_transit_gateway_vpc_attachment_info: - filters: - transit-gateway-id: '{{ tgw_id }}' - register: info - ignore_errors: True - -- name: 'Start deletion of all attachments' - ec2_transit_gateway_vpc_attachment: - state: absent - id: '{{ item.transit_gateway_attachment_id }}' - wait: False - loop: '{{ info.attachments }}' - ignore_errors: True - -- name: 'Wait for deletion of all attachments' - ec2_transit_gateway_vpc_attachment: - state: absent - id: '{{ item.transit_gateway_attachment_id }}' - wait: True - loop: '{{ info.attachments }}' - ignore_errors: True - -- name: 'Delete subnets' - ec2_vpc_subnet: - state: absent - cidr: '{{ item.cidr }}' - vpc_id: '{{ item.vpc_id }}' - loop: - - cidr: '{{ subnet_cidr_a_1 }}' - vpc_id: '{{ vpc_id_a }}' - - cidr: '{{ subnet_cidr_a_2 }}' - vpc_id: '{{ vpc_id_a }}' - - cidr: '{{ subnet_cidr_a_3 }}' - vpc_id: '{{ vpc_id_a }}' - - cidr: '{{ subnet_cidr_b_1 }}' - vpc_id: '{{ vpc_id_b }}' - - cidr: '{{ subnet_cidr_b_2 }}' - vpc_id: '{{ vpc_id_b }}' - - cidr: '{{ subnet_cidr_a_1a }}' - vpc_id: '{{ vpc_id_a }}' - ignore_errors: True - -- name: 'Create VPCs to attach to TGW' - ec2_vpc_net: - state: absent - cidr_block: '{{ item.cidr }}' - name: '{{ item.name }}' - loop: - - cidr: '{{ vpc_cidr_a }}' - name: '{{ vpc_name_a }}' - - cidr: '{{ vpc_cidr_b }}' - name: '{{ vpc_name_b }}' - ignore_errors: True - -- name: 'Create Transit Gateways' - ec2_transit_gateway: - state: absent - transit_gateway_id: '{{ item.tgw_id }}' - loop: - - tgw_id: '{{ tgw_id }}' - - tgw_id: '{{ tgw_id_2 }}' - ignore_errors: True diff --git a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/complex.yml b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/complex.yml deleted file mode 100644 index eda3ab2ace4..00000000000 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/complex.yml +++ /dev/null @@ -1,443 +0,0 @@ ---- -# Tests the setting of most parameters at the same time -# -# Note: Does not delete the attachment, so that there's a second VPC attached to -# the TGW when we run our _info tests in simple.yml -# -# ============================================================================= -# Creation - -- block: - - name: '(CHECK_MODE) Create an attachment - complex parameters' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name_complex }}' - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_b_1 }}' - - '{{ subnet_id_b_2 }}' - tags: - tagA: 'example Value' - Tag_B: 'second value' - appliance_mode_support: True - ipv6_support: True - register: complex_attach - - - assert: - that: - - complex_attach is changed - - '"attachments" in complex_attach' - - complex_attach.attachments | length == 1 - - '"options" in attachment' - - '"subnet_ids" in attachment' - - '"tags" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == "enable" - - attachment.options.ipv6_support == "enable" - - attachment.subnet_ids | length == 2 - - subnet_id_b_1 in attachment.subnet_ids - - subnet_id_b_2 in attachment.subnet_ids - - attachment.tags | length == 3 - - '"Name" in attachment.tags' - - '"tagA" in attachment.tags' - - '"Tag_B" in attachment.tags' - - attachment.tags.Name == attachment_name_complex - - attachment.tags.tagA == "example Value" - - attachment.tags.Tag_B == "second value" - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_b - vars: - attachment: '{{ complex_attach.attachments[0] }}' - - - name: 'Create an attachment - complex parameters' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name_complex }}' - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_b_1 }}' - - '{{ subnet_id_b_2 }}' - tags: - tagA: 'example Value' - Tag_B: 'second value' - appliance_mode_support: True - ipv6_support: True - register: complex_attach - - - assert: - that: - - complex_attach is changed - - '"attachments" in complex_attach' - - complex_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_b_1 in attachment.subnet_ids - - subnet_id_b_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_b - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'enable' - - attachment.transit_gateway_attachment_id.startswith('tgw-attach-') - - attachment.state == 'available' - - attachment.tags | length == 3 - - '"Name" in attachment.tags' - - '"tagA" in attachment.tags' - - '"Tag_B" in attachment.tags' - - attachment.tags.Name == attachment_name_complex - - attachment.tags.tagA == "example Value" - - attachment.tags.Tag_B == "second value" - - attachment.vpc_owner_id == vpc_owner_b - vars: - attachment: '{{ complex_attach.attachments[0] }}' - - - name: Save Attachment ID - set_fact: - complex_attachment_id: '{{ complex_attach.attachments[0].transit_gateway_attachment_id }}' - - - name: '(CHECK_MODE) Create an attachment - complex parameters -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name_complex }}' - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_b_1 }}' - - '{{ subnet_id_b_2 }}' - tags: - tagA: 'example Value' - Tag_B: 'second value' - appliance_mode_support: True - ipv6_support: True - register: complex_attach - - - assert: - that: - - complex_attach is not changed - - '"attachments" in complex_attach' - - complex_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_b_1 in attachment.subnet_ids - - subnet_id_b_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_b - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'enable' - - attachment.transit_gateway_attachment_id == complex_attachment_id - - attachment.state == 'available' - - attachment.tags | length == 3 - - '"Name" in attachment.tags' - - '"tagA" in attachment.tags' - - '"Tag_B" in attachment.tags' - - attachment.tags.Name == attachment_name_complex - - attachment.tags.tagA == "example Value" - - attachment.tags.Tag_B == "second value" - - attachment.vpc_owner_id == vpc_owner_b - vars: - attachment: '{{ complex_attach.attachments[0] }}' - - - name: 'Create an attachment - complex parameters -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name_complex }}' - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_b_1 }}' - - '{{ subnet_id_b_2 }}' - tags: - tagA: 'example Value' - Tag_B: 'second value' - appliance_mode_support: True - ipv6_support: True - register: complex_attach - - - assert: - that: - - complex_attach is not changed - - '"attachments" in complex_attach' - - complex_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_b_1 in attachment.subnet_ids - - subnet_id_b_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_b - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'enable' - - attachment.transit_gateway_attachment_id == complex_attachment_id - - attachment.state == 'available' - - attachment.tags | length == 3 - - '"Name" in attachment.tags' - - '"tagA" in attachment.tags' - - '"Tag_B" in attachment.tags' - - attachment.tags.Name == attachment_name_complex - - attachment.tags.tagA == "example Value" - - attachment.tags.Tag_B == "second value" - - attachment.vpc_owner_id == vpc_owner_b - vars: - attachment: '{{ complex_attach.attachments[0] }}' - -# ============================================================================= -# Update - - - name: '(CHECK_MODE) Update an attachment - complex parameters' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name_complex }}' - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_b_1 }}' - purge_subnets: True - tags: - tagC: '3' - Tag_D: 'Hello again dear world' - purge_tags: False - dns_support: False - ipv6_support: False - register: complex_attach - - - assert: - that: - - complex_attach is changed - - '"attachments" in complex_attach' - - complex_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_b_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_b - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'disable' - - attachment.transit_gateway_attachment_id == complex_attachment_id - - attachment.state == 'available' - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"tagA" in attachment.tags' - - '"Tag_B" in attachment.tags' - - '"tagC" in attachment.tags' - - '"Tag_D" in attachment.tags' - - attachment.tags.Name == attachment_name_complex - - attachment.tags.tagA == "example Value" - - attachment.tags.Tag_B == "second value" - - attachment.tags.tagC == "3" - - attachment.tags.Tag_D == "Hello again dear world" - - attachment.vpc_owner_id == vpc_owner_b - vars: - attachment: '{{ complex_attach.attachments[0] }}' - - - name: 'Update an attachment - complex parameters' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name_complex }}' - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_b_1 }}' - purge_subnets: True - tags: - tagC: '3' - Tag_D: 'Hello again dear world' - purge_tags: False - dns_support: False - ipv6_support: False - register: complex_attach - - - assert: - that: - - complex_attach is changed - - '"attachments" in complex_attach' - - complex_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_b_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_b - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'disable' - - attachment.transit_gateway_attachment_id == complex_attachment_id - - attachment.state == 'available' - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"tagA" in attachment.tags' - - '"Tag_B" in attachment.tags' - - '"tagC" in attachment.tags' - - '"Tag_D" in attachment.tags' - - attachment.tags.Name == attachment_name_complex - - attachment.tags.tagA == "example Value" - - attachment.tags.Tag_B == "second value" - - attachment.tags.tagC == "3" - - attachment.tags.Tag_D == "Hello again dear world" - - attachment.vpc_owner_id == vpc_owner_b - vars: - attachment: '{{ complex_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Update an attachment - complex parameters -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name_complex }}' - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_b_1 }}' - purge_subnets: True - tags: - tagC: '3' - Tag_D: 'Hello again dear world' - purge_tags: False - dns_support: False - ipv6_support: False - register: complex_attach - - - assert: - that: - - complex_attach is not changed - - '"attachments" in complex_attach' - - complex_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_b_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_b - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'disable' - - attachment.transit_gateway_attachment_id == complex_attachment_id - - attachment.state == 'available' - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"tagA" in attachment.tags' - - '"Tag_B" in attachment.tags' - - '"tagC" in attachment.tags' - - '"Tag_D" in attachment.tags' - - attachment.tags.Name == attachment_name_complex - - attachment.tags.tagA == "example Value" - - attachment.tags.Tag_B == "second value" - - attachment.tags.tagC == "3" - - attachment.tags.Tag_D == "Hello again dear world" - - attachment.vpc_owner_id == vpc_owner_b - vars: - attachment: '{{ complex_attach.attachments[0] }}' - - - name: 'Update an attachment - complex parameters -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name_complex }}' - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_b_1 }}' - purge_subnets: True - tags: - tagC: '3' - Tag_D: 'Hello again dear world' - purge_tags: False - dns_support: False - ipv6_support: False - register: complex_attach - - - assert: - that: - - complex_attach is not changed - - '"attachments" in complex_attach' - - complex_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_b_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_b - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'disable' - - attachment.transit_gateway_attachment_id == complex_attachment_id - - attachment.state == 'available' - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"tagA" in attachment.tags' - - '"Tag_B" in attachment.tags' - - '"tagC" in attachment.tags' - - '"Tag_D" in attachment.tags' - - attachment.tags.Name == attachment_name_complex - - attachment.tags.tagA == "example Value" - - attachment.tags.Tag_B == "second value" - - attachment.tags.tagC == "3" - - attachment.tags.Tag_D == "Hello again dear world" - - attachment.vpc_owner_id == vpc_owner_b - vars: - attachment: '{{ complex_attach.attachments[0] }}' diff --git a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/main.yml deleted file mode 100644 index ce9659473f6..00000000000 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/main.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: 'ec2_transit_gateway_vpc_attachment integration tests' - collections: - - amazon.aws - module_defaults: - group/aws: - access_key: '{{ aws_access_key }}' - secret_key: '{{ aws_secret_key }}' - session_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region }}' - - block: - # Prepares various resources - - include_tasks: 'setup.yml' - - # Tests create / update on parameters simulatniously - - include_tasks: 'complex.yml' - - # Tests create / update / delete on individual parameters - - include_tasks: 'simple.yml' - - always: - # Cleanup after ourselves - - include_tasks: 'cleanup.yml' diff --git a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/setup.yml b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/setup.yml index 86d5aa51b5f..9dddd46c634 100644 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/setup.yml +++ b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/setup.yml @@ -1,5 +1,5 @@ --- -- name: 'Pick 2 AZs available for use' +- name: Pick 2 AZs available for use set_fact: subnet_az_a_1: '{{ ec2_availability_zone_names[0] }}' subnet_az_a_1a: '{{ ec2_availability_zone_names[0] }}' @@ -9,22 +9,22 @@ subnet_az_b_2: '{{ ec2_availability_zone_names[1] }}' - name: 'Create Transit Gateways' - ec2_transit_gateway: + community.aws.ec2_transit_gateway: description: '{{ item.description }}' tags: Name: '{{ item.name }}' loop: - - description: 'Transit Gateway for testing ec2_transit_gateway_attachment' + - description: 'Transit Gateway for testing community.aws.ec2_transit_gateway_attachment' name: '{{ tgw_name }}' - - description: 'Second Transit Gateway for testing ec2_transit_gateway_attachment' + - description: 'Second Transit Gateway for testing community.aws.ec2_transit_gateway_attachment' name: '{{ tgw_name_2 }}' register: create_tgws -- name: 'Create VPCs to attach to TGW' - ec2_vpc_net: +- name: Create VPCs to attach to TGW + amazon.aws.ec2_vpc_net: cidr_block: '{{ item.cidr }}' name: '{{ item.name }}' - ipv6_cidr: True + ipv6_cidr: true loop: - cidr: '{{ vpc_cidr_a }}' name: '{{ vpc_name_a }}' @@ -51,8 +51,8 @@ vpc_ipv6_a: '{{ vpc_a.ipv6_cidr_block_association_set[0].ipv6_cidr_block }}' vpc_ipv6_b: '{{ vpc_b.ipv6_cidr_block_association_set[0].ipv6_cidr_block }}' -- name: 'Create subnets' - ec2_vpc_subnet: +- name: Create subnets + amazon.aws.ec2_vpc_subnet: az: '{{ item.az }}' cidr: '{{ item.cidr }}' ipv6_cidr: '{{ item.ipv6_cidr }}' diff --git a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/simple.yml b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/simple.yml deleted file mode 100644 index 0085813a322..00000000000 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/simple.yml +++ /dev/null @@ -1,3611 +0,0 @@ ---- -# ============================================================================= -# Creation -- block: - - name: '(CHECK_MODE) Create an attachment - minimal parameters' - check_mode: True - ec2_transit_gateway_vpc_attachment: - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Create an attachment - minimal parameters' - ec2_transit_gateway_vpc_attachment: - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.transit_gateway_attachment_id.startswith('tgw-attach-') - - attachment.state == 'available' - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: Save Attachment ID - set_fact: - simple_attachment_id: '{{ simple_attach.attachments[0].transit_gateway_attachment_id }}' - - - name: '(CHECK_MODE) Create an attachment - minimal parameters -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Create an attachment - minimal parameters -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - transit_gateway: '{{ tgw_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) By Id - minimal parameters -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'By Id - minimal parameters -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ============================================================================= -# Set a name - - - name: '(CHECK_MODE) Set name' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - name: '{{ attachment_name }}' - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Set name' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - name: '{{ attachment_name }}' - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Set name -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - name: '{{ attachment_name }}' - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Set name -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - name: '{{ attachment_name }}' - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) By Name - minimal parameters -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - subnets: - - '{{ subnet_id_a_1 }}' - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'By Name - minimal parameters -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - subnets: - - '{{ subnet_id_a_1 }}' - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ============================================================================= -# Describe - - - name: 'Describe all attachments' - ec2_transit_gateway_vpc_attachment_info: - register: info - - - assert: - that: - - info is not changed - - '"attachments" in info' - - info.attachments | length >= 2 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length >= 1 - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - '"Name" in attachment.tags' - vars: - attachment: '{{ info.attachments[0] }}' - - - name: 'Describe attachments on a specific VPC' - ec2_transit_gateway_vpc_attachment_info: - filters: - transit-gateway-id: '{{ tgw_id }}' - register: info - - - assert: - that: - - info is not changed - - '"attachments" in info' - - info.attachments | length == 2 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length >= 1 - - attachment.transit_gateway_id == tgw_id - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - '"Name" in attachment.tags' - vars: - attachment: '{{ info.attachments[0] }}' - - - name: 'Describe attachment with a specific name' - ec2_transit_gateway_vpc_attachment_info: - name: '{{ attachment_name }}' - register: info - - - assert: - that: - - info is not changed - - '"attachments" in info' - - info.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ info.attachments[0] }}' - - - name: 'Describe attachment by ID' - ec2_transit_gateway_vpc_attachment_info: - id: '{{ simple_attachment_id }}' - register: info - - - assert: - that: - - info is not changed - - '"attachments" in info' - - info.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ info.attachments[0] }}' - -# ============================================================================= -# Tag attachment - - - name: '(CHECK_MODE) Set tags' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: - CamelCase: CamelCaseValue - pascalCase: pascalCaseValue - snake_case: snake_case_value - "Tag with Space": value with space - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value' - - attachment.tags['Tag with Space'] == 'value with space' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Set tags' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: - CamelCase: CamelCaseValue - pascalCase: pascalCaseValue - snake_case: snake_case_value - "Tag with Space": value with space - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value' - - attachment.tags['Tag with Space'] == 'value with space' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Set tags -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: - CamelCase: CamelCaseValue - pascalCase: pascalCaseValue - snake_case: snake_case_value - "Tag with Space": value with space - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value' - - attachment.tags['Tag with Space'] == 'value with space' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Set tags -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: - CamelCase: CamelCaseValue - pascalCase: pascalCaseValue - snake_case: snake_case_value - "Tag with Space": value with space - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value' - - attachment.tags['Tag with Space'] == 'value with space' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Describe attachment with tags set' - ec2_transit_gateway_vpc_attachment_info: - id: '{{ simple_attachment_id }}' - register: info - - - assert: - that: - - info is not changed - - '"attachments" in info' - - info.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value' - - attachment.tags['Tag with Space'] == 'value with space' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ info.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) No change to tags with name set -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value' - - attachment.tags['Tag with Space'] == 'value with space' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'No change to tags with name set -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value' - - attachment.tags['Tag with Space'] == 'value with space' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Update tags' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - purge_tags: False - tags: - snake_case: snake_case_value 2 - "Tag with Space": value with space 2 - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value 2' - - attachment.tags['Tag with Space'] == 'value with space 2' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Update tags' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - purge_tags: False - tags: - snake_case: snake_case_value 2 - "Tag with Space": value with space 2 - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value 2' - - attachment.tags['Tag with Space'] == 'value with space 2' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Update tags -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - purge_tags: False - tags: - snake_case: snake_case_value 2 - "Tag with Space": value with space 2 - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value 2' - - attachment.tags['Tag with Space'] == 'value with space 2' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Update tags -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - purge_tags: False - tags: - snake_case: snake_case_value 2 - "Tag with Space": value with space 2 - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 5 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"snake_case" in attachment.tags' - - '"Tag with Space" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.snake_case == 'snake_case_value 2' - - attachment.tags['Tag with Space'] == 'value with space 2' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Remove tags' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: - CamelCase: CamelCaseValue - pascalCase: pascalCaseValue - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 3 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Remove tags' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: - CamelCase: CamelCaseValue - pascalCase: pascalCaseValue - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 3 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Remove tags -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: - CamelCase: CamelCaseValue - pascalCase: pascalCaseValue - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 3 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Remove tags -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: - CamelCase: CamelCaseValue - pascalCase: pascalCaseValue - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 3 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Add tags with no purge' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - purge_tags: False - tags: - AnotherTag: Another Value - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 4 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"AnotherTag" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.AnotherTag == 'Another Value' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Add tags with no purge' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - purge_tags: False - tags: - AnotherTag: Another Value - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 4 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"AnotherTag" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.AnotherTag == 'Another Value' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Add tags with no purge -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - purge_tags: False - tags: - AnotherTag: Another Value - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 4 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"AnotherTag" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.AnotherTag == 'Another Value' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Add tags with no purge -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - purge_tags: False - tags: - AnotherTag: Another Value - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 4 - - '"Name" in attachment.tags' - - '"CamelCase" in attachment.tags' - - '"pascalCase" in attachment.tags' - - '"AnotherTag" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.tags.CamelCase == 'CamelCaseValue' - - attachment.tags.pascalCase == 'pascalCaseValue' - - attachment.tags.AnotherTag == 'Another Value' - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Remove all tags with name set' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: {} - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Remove all tags with name set' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: {} - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Remove all tags with name set -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: {} - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Remove all tags with name set -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - name: '{{ attachment_name }}' - tags: {} - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 1 - - '"Name" in attachment.tags' - - attachment.tags.Name == attachment_name - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Remove all tags including name' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - tags: {} - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Remove all tags including name' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - tags: {} - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Remove all tags including name -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - tags: {} - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Remove all tags including name -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - tags: {} - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ============================================================================= -# Options - - - name: '(CHECK_MODE) Set IPv6 support' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - ipv6_support: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Set IPv6 support' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - ipv6_support: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Set IPv6 support -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - ipv6_support: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Set IPv6 support -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - ipv6_support: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Set DNS support' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - dns_support: False - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Set DNS support' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - dns_support: False - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Set DNS support -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - dns_support: False - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Set DNS support -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - dns_support: False - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Set Appliance Mode support' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - appliance_mode_support: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Set Appliance Mode support' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - appliance_mode_support: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Set Appliance Mode support -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - appliance_mode_support: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Set Appliance Mode support -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - appliance_mode_support: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'enable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Update IPv6 support' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - ipv6_support: False - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Update IPv6 support' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - ipv6_support: False - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Update IPv6 support -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - ipv6_support: False - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Update IPv6 support -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - ipv6_support: False - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'disable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Update DNS support' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - dns_support: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Update DNS support' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - dns_support: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Update DNS support -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - dns_support: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Update DNS support -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - dns_support: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'enable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Update Appliance Mode support' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - appliance_mode_support: False - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Update Appliance Mode support' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - appliance_mode_support: False - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Update Appliance Mode support -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - appliance_mode_support: False - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Update Appliance Mode support -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - appliance_mode_support: False - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 1 - - subnet_id_a_1 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ============================================================================= -# Subnet Management - - - name: '(CHECK_MODE) Try to add subnet from a different VPC - no purge' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_b_2 }}' - purge_subnets: False - register: simple_attach - ignore_errors: True - - - assert: - that: - - simple_attach is failed - - - name: 'Try to add subnet from a different VPC - no purge' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_b_2 }}' - purge_subnets: False - register: simple_attach - ignore_errors: True - - - assert: - that: - - simple_attach is failed - -# ===== - - - name: '(CHECK_MODE) Try to add subnet from a different VPC - with purge' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_b_2 }}' - purge_subnets: True - register: simple_attach - ignore_errors: True - - - assert: - that: - - simple_attach is failed - - - name: 'Try to add subnet from a different VPC - with purge' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_b_2 }}' - purge_subnets: True - register: simple_attach - ignore_errors: True - - - assert: - that: - - simple_attach is failed - -# ===== - - - name: '(CHECK_MODE) Try to add subnet in the same AZ - no purge' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_b_1a }}' - purge_subnets: False - register: simple_attach - ignore_errors: True - - - assert: - that: - - simple_attach is failed - - - name: 'Try to add subnet in the same AZ - no purge' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1a }}' - purge_subnets: False - register: simple_attach - ignore_errors: True - - - assert: - that: - - simple_attach is failed - -# ===== - - - name: '(CHECK_MODE) Try to add subnet in the same AZ - with purge' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_a_1a }}' - purge_subnets: True - register: simple_attach - ignore_errors: True - - - assert: - that: - - simple_attach is failed - - - name: 'Try to add subnet in the same AZ - with purge' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_a_1a }}' - purge_subnets: True - register: simple_attach - ignore_errors: True - - - assert: - that: - - simple_attach is failed - -# ===== - - - name: '(CHECK_MODE) Add subnet - without purge' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_2 }}' - purge_subnets: False - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Add subnet - without purge' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_2 }}' - purge_subnets: False - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Add subnet - without purge -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_2 }}' - purge_subnets: False - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Add subnet - without purge -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_2 }}' - purge_subnets: False - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Add subnet - with purge' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_a_2 }}' - - '{{ subnet_id_a_3 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 3 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - subnet_id_a_3 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Add subnet - with purge' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_a_2 }}' - - '{{ subnet_id_a_3 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 3 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - subnet_id_a_3 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Add subnet - with purge -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_a_2 }}' - - '{{ subnet_id_a_3 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 3 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - subnet_id_a_3 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Add subnet - with purge -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_a_2 }}' - - '{{ subnet_id_a_3 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 3 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - subnet_id_a_3 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Remove subnet' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_2 }}' - - '{{ subnet_id_a_3 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_2 in attachment.subnet_ids - - subnet_id_a_3 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Remove subnet' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_2 }}' - - '{{ subnet_id_a_3 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_2 in attachment.subnet_ids - - subnet_id_a_3 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Remove subnet -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_2 }}' - - '{{ subnet_id_a_3 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_2 in attachment.subnet_ids - - subnet_id_a_3 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Remove subnet -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_2 }}' - - '{{ subnet_id_a_3 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_2 in attachment.subnet_ids - - subnet_id_a_3 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ===== - - - name: '(CHECK_MODE) Remove and add subnet' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_a_2 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Remove and add subnet' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_a_2 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: '(CHECK_MODE) Remove and add subnet -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_a_2 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - - - name: 'Remove and add subnet -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - id: '{{ simple_attachment_id }}' - subnets: - - '{{ subnet_id_a_1 }}' - - '{{ subnet_id_a_2 }}' - purge_subnets: True - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - '"attachments" in simple_attach' - - simple_attach.attachments | length == 1 - - '"subnet_ids" in attachment' - - '"transit_gateway_id" in attachment' - - '"vpc_id" in attachment' - - attachment.subnet_ids | length == 2 - - subnet_id_a_1 in attachment.subnet_ids - - subnet_id_a_2 in attachment.subnet_ids - - attachment.transit_gateway_id == tgw_id - - attachment.vpc_id == vpc_id_a - - '"creation_time" in attachment' - - '"options" in attachment' - - '"state" in attachment' - - '"tags" in attachment' - - '"transit_gateway_attachment_id" in attachment' - - '"vpc_owner_id" in attachment' - - '"appliance_mode_support" in attachment.options' - - '"dns_support" in attachment.options' - - '"ipv6_support" in attachment.options' - - attachment.options.appliance_mode_support == 'disable' - - attachment.options.dns_support == 'enable' - - attachment.options.ipv6_support == 'disable' - - attachment.state == 'available' - - attachment.transit_gateway_attachment_id == simple_attachment_id - - attachment.tags | length == 0 - - attachment.vpc_owner_id == vpc_owner_a - vars: - attachment: '{{ simple_attach.attachments[0] }}' - -# ============================================================================= -# Deletion - - - name: '(CHECK_MODE) Delete an attachment - minimal parameters' - check_mode: True - ec2_transit_gateway_vpc_attachment: - state: absent - id: '{{ simple_attachment_id }}' - wait: False - register: simple_attach - - - assert: - that: - - simple_attach is changed - - - name: 'Delete an attachment - minimal parameters' - ec2_transit_gateway_vpc_attachment: - state: absent - id: '{{ simple_attachment_id }}' - wait: False - register: simple_attach - - - assert: - that: - - simple_attach is changed - - - name: '(CHECK_MODE) Delete an attachment - minimal parameters -- IDEMPOTENCY' - check_mode: True - ec2_transit_gateway_vpc_attachment: - state: absent - id: '{{ simple_attachment_id }}' - wait: False - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - - name: 'Delete an attachment - minimal parameters -- IDEMPOTENCY' - ec2_transit_gateway_vpc_attachment: - state: absent - id: '{{ simple_attachment_id }}' - wait: False - register: simple_attach - - - assert: - that: - - simple_attach is not changed - - always: - - name: 'Delete attachment' - ec2_transit_gateway_vpc_attachment: - state: absent - id: '{{ simple_attachment_id }}' - wait: False - ignore_errors: True diff --git a/tests/integration/targets/ec2_vpc_egress_igw/aliases b/tests/integration/targets/ec2_vpc_egress_igw/aliases deleted file mode 100644 index 4ef4b2067d0..00000000000 --- a/tests/integration/targets/ec2_vpc_egress_igw/aliases +++ /dev/null @@ -1 +0,0 @@ -cloud/aws diff --git a/tests/integration/targets/ec2_vpc_egress_igw/meta/main.yml b/tests/integration/targets/ec2_vpc_egress_igw/meta/main.yml deleted file mode 100644 index 32cf5dda7ed..00000000000 --- a/tests/integration/targets/ec2_vpc_egress_igw/meta/main.yml +++ /dev/null @@ -1 +0,0 @@ -dependencies: [] diff --git a/tests/integration/targets/ec2_vpc_egress_igw/tasks/main.yml b/tests/integration/targets/ec2_vpc_egress_igw/tasks/main.yml deleted file mode 100644 index 75fff0e4e22..00000000000 --- a/tests/integration/targets/ec2_vpc_egress_igw/tasks/main.yml +++ /dev/null @@ -1,104 +0,0 @@ ---- -- name: 'ec2_vpc_egress_igw integration tests' - collections: - - amazon.aws - module_defaults: - group/aws: - access_key: '{{ aws_access_key }}' - secret_key: '{{ aws_secret_key }}' - session_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region }}' - block: - - # ============================================================ - - name: test failure with no parameters - ec2_vpc_egress_igw: - register: result - ignore_errors: true - - - name: assert failure with no parameters - assert: - that: - - 'result.failed' - - 'result.msg == "missing required arguments: vpc_id"' - - # ============================================================ - - name: test failure with non-existent VPC ID - ec2_vpc_egress_igw: - state: present - vpc_id: vpc-02394e50abc1807e8 - register: result - ignore_errors: true - - - name: assert failure with non-existent VPC ID - assert: - that: - - 'result.failed' - - 'result.error.code == "InvalidVpcID.NotFound"' - - '"invalid vpc ID" in result.msg' - - # ============================================================ - - name: create a VPC - ec2_vpc_net: - name: "{{ resource_prefix }}-vpc" - state: present - cidr_block: "10.232.232.128/26" - tags: - Name: "{{ resource_prefix }}-vpc" - Description: "Created by ansible-test" - register: vpc_result - - # ============================================================ - - name: create egress-only internet gateway (expected changed=true) - ec2_vpc_egress_igw: - state: present - vpc_id: "{{ vpc_result.vpc.id }}" - register: vpc_eigw_create - - - name: assert creation happened (expected changed=true) - assert: - that: - - 'vpc_eigw_create' - - 'vpc_eigw_create.gateway_id.startswith("eigw-")' - - 'vpc_eigw_create.vpc_id == vpc_result.vpc.id' - - # ============================================================ - - name: attempt to recreate egress-only internet gateway on VPC (expected changed=false) - ec2_vpc_egress_igw: - state: present - vpc_id: "{{ vpc_result.vpc.id }}" - register: vpc_eigw_recreate - - - name: assert recreation did nothing (expected changed=false) - assert: - that: - - 'vpc_eigw_recreate.changed == False' - - 'vpc_eigw_recreate.gateway_id == vpc_eigw_create.gateway_id' - - 'vpc_eigw_recreate.vpc_id == vpc_eigw_create.vpc_id' - - # ============================================================ - - name: test state=absent (expected changed=true) - ec2_vpc_egress_igw: - state: absent - vpc_id: "{{ vpc_result.vpc.id }}" - register: vpc_eigw_delete - - - name: assert state=absent (expected changed=true) - assert: - that: - - 'vpc_eigw_delete.changed' - - always: - # ============================================================ - - name: tidy up EIGW - ec2_vpc_egress_igw: - state: absent - vpc_id: "{{ vpc_result.vpc.id }}" - ignore_errors: true - - - name: tidy up VPC - ec2_vpc_net: - name: "{{ resource_prefix }}-vpc" - state: absent - cidr_block: "10.232.232.128/26" - ignore_errors: true diff --git a/tests/integration/targets/ec2_vpc_nacl/aliases b/tests/integration/targets/ec2_vpc_nacl/aliases deleted file mode 100644 index 04109c2687b..00000000000 --- a/tests/integration/targets/ec2_vpc_nacl/aliases +++ /dev/null @@ -1,3 +0,0 @@ -cloud/aws - -ec2_vpc_nacl_info diff --git a/tests/integration/targets/ec2_vpc_nacl/defaults/main.yml b/tests/integration/targets/ec2_vpc_nacl/defaults/main.yml deleted file mode 100644 index 5ac931209fb..00000000000 --- a/tests/integration/targets/ec2_vpc_nacl/defaults/main.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -vpc_name: '{{ resource_prefix }}-ec2-vpc-nacl' -nacl_name: '{{ resource_prefix }}-ec2-vpc-nacl' -subnet_name: '{{ resource_prefix }}-ec2-vpc-nacl' -vpc_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.0.0/16' -subnet_1: '10.{{ 256 | random(seed=resource_prefix) }}.1.0/24' -subnet_2: '10.{{ 256 | random(seed=resource_prefix) }}.2.0/24' -subnet_3: '10.{{ 256 | random(seed=resource_prefix) }}.3.0/24' -subnet_4: '10.{{ 256 | random(seed=resource_prefix) }}.4.0/24' - -vpc_ipv6_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.5.0/25' -vpc_ipv6_name: '{{ vpc_name }}-ipv6' diff --git a/tests/integration/targets/ec2_vpc_nacl/meta/main.yml b/tests/integration/targets/ec2_vpc_nacl/meta/main.yml deleted file mode 100644 index 32cf5dda7ed..00000000000 --- a/tests/integration/targets/ec2_vpc_nacl/meta/main.yml +++ /dev/null @@ -1 +0,0 @@ -dependencies: [] diff --git a/tests/integration/targets/ec2_vpc_nacl/tasks/ingress_and_egress.yml b/tests/integration/targets/ec2_vpc_nacl/tasks/ingress_and_egress.yml deleted file mode 100644 index 875e7f0b2d7..00000000000 --- a/tests/integration/targets/ec2_vpc_nacl/tasks/ingress_and_egress.yml +++ /dev/null @@ -1,158 +0,0 @@ -# ============================================================ -- block: - - name: create ingress and egress rules using subnet IDs - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - state: 'present' - register: nacl - - - name: assert the network acl was created - assert: - that: - - nacl.changed - - nacl.nacl_id.startswith('acl-') - - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_facts - - - name: assert the nacl has the correct attributes - assert: - that: - - nacl_facts.nacls | length == 1 - - nacl_facts.nacls[0].ingress | length == 3 - - nacl_facts.nacls[0].egress | length == 1 - - # ============================================================ - - - name: remove an ingress rule - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - state: 'present' - register: nacl - - - name: assert the network acl changed - assert: - that: - - nacl.changed - - nacl.nacl_id.startswith('acl-') - - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_facts - - - name: assert the nacl has the correct attributes - assert: - that: - - nacl_facts.nacls | length == 1 - - nacl_facts.nacls[0].ingress | length == 2 - - nacl_facts.nacls[0].egress | length == 1 - - # ============================================================ - - - name: remove the egress rule - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - egress: [] - state: 'present' - register: nacl - - - name: assert the network acl changed - assert: - that: - - nacl.changed - - nacl.nacl_id.startswith('acl-') - - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_facts - - - name: assert the nacl has the correct attributes - assert: - that: - - nacl_facts.nacls | length == 1 - - nacl_facts.nacls[0].ingress | length == 2 - - nacl_facts.nacls[0].egress | length == 0 - - # ============================================================ - - - name: add egress rules - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - egress: - - [100, 'tcp', 'allow', '10.0.0.0/24', null, null, 22, 22] - - [200, 'udp', 'allow', '10.0.0.0/24', null, null, 22, 22] - state: 'present' - register: nacl - - - name: assert the network acl changed - assert: - that: - - nacl.changed - - nacl.nacl_id.startswith('acl-') - - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_facts - - - name: assert the nacl has the correct attributes - assert: - that: - - nacl_facts.nacls | length == 1 - - nacl_facts.nacls[0].ingress | length == 2 - - nacl_facts.nacls[0].egress | length == 2 - - # ============================================================ - - - name: remove the network ACL - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - state: absent - register: nacl - - - name: assert nacl was removed - assert: - that: - - nacl.changed diff --git a/tests/integration/targets/ec2_vpc_nacl/tasks/ipv6.yml b/tests/integration/targets/ec2_vpc_nacl/tasks/ipv6.yml deleted file mode 100644 index 1366971613a..00000000000 --- a/tests/integration/targets/ec2_vpc_nacl/tasks/ipv6.yml +++ /dev/null @@ -1,124 +0,0 @@ -- block: - - # ============================================================ - - - name: create ingress and egress rules using subnet names - ec2_vpc_nacl: - vpc_id: "{{ vpc_ipv6_id }}" - name: "{{ nacl_name }}" - subnets: - - "{{ subnet_name }}-ipv6" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - state: 'present' - register: nacl - - assert: - that: - - nacl.nacl_id - - - set_fact: - nacl_id: "{{ nacl.nacl_id }}" - - - name: add ipv6 entries - ec2_vpc_nacl: - vpc_id: "{{ vpc_ipv6_id }}" - name: "{{ nacl_name }}" - subnets: - - "{{ subnet_name }}-ipv6" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - - [205, 'tcp', 'allow', '::/0', null, null, 80, 80] - - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] - - [305, 'ipv6-icmp', 'allow', '::/0', 0, 8] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - - [105, 'all', 'allow', '::/0', null, null, null, null] - state: 'present' - register: nacl - - - assert: - that: - - nacl.changed - - nacl.nacl_id == nacl_id - - - name: get network ACL facts (test that it works with ipv6 entries) - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl_id }}" - register: nacl_facts - - - name: assert the nacl has the correct attributes - assert: - that: - - nacl_facts.nacls | length == 1 - - nacl_facts.nacls[0].ingress | length == 5 - - nacl_facts.nacls[0].egress | length == 2 - - - name: purge ingress entries - ec2_vpc_nacl: - vpc_id: "{{ vpc_ipv6_id }}" - name: "{{ nacl_name }}" - subnets: - - "{{ subnet_name }}-ipv6" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: [] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - - [105, 'all', 'allow', '::/0', null, null, null, null] - state: 'present' - register: nacl - - - assert: - that: - - nacl.changed - - nacl.nacl_id == nacl_id - - - name: purge egress entries - ec2_vpc_nacl: - vpc_id: "{{ vpc_ipv6_id }}" - name: "{{ nacl_name }}" - subnets: - - "{{ subnet_name }}-ipv6" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: [] - egress: [] - state: 'present' - register: nacl - - - assert: - that: - - nacl.changed - - - name: get network ACL facts (test that removed entries are gone) - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl_id }}" - register: nacl_facts - - - name: assert the nacl has the correct attributes - assert: - that: - - nacl_facts.nacls | length == 1 - - nacl_facts.nacls[0].ingress | length == 0 - - nacl_facts.nacls[0].egress | length == 0 - - always: - - - name: remove network ACL - ec2_vpc_nacl: - vpc_id: "{{ vpc_ipv6_id }}" - name: "{{ nacl_name }}" - state: absent - register: removed_acl - ignore_errors: yes diff --git a/tests/integration/targets/ec2_vpc_nacl/tasks/main.yml b/tests/integration/targets/ec2_vpc_nacl/tasks/main.yml deleted file mode 100644 index 36c7ab2d8bb..00000000000 --- a/tests/integration/targets/ec2_vpc_nacl/tasks/main.yml +++ /dev/null @@ -1,175 +0,0 @@ ---- -- module_defaults: - group/aws: - access_key: "{{ aws_access_key }}" - secret_key: "{{ aws_secret_key }}" - session_token: "{{ security_token | default(omit) }}" - region: "{{ aws_region }}" - collections: - - amazon.aws - block: - - # ============================================================ - - - name: test without any parameters - ec2_vpc_nacl: - register: result - ignore_errors: yes - - - name: assert required parameters - assert: - that: - - result.failed - - "result.msg == 'one of the following is required: name, nacl_id'" - - - name: get network ACL info without any parameters - ec2_vpc_nacl_info: - register: nacl_facts - - - name: assert we don't error - assert: - that: - - nacl_facts is succeeded - - - name: get network ACL info with invalid ID - ec2_vpc_nacl_info: - nacl_ids: - - 'acl-000000000000' - register: nacl_facts - ignore_errors: yes - - - name: assert message mentions missing ACLs - assert: - that: - - nacl_facts is failed - - '"does not exist" in nacl_facts.msg' - - # ============================================================ - - - name: fetch AZ availability - aws_az_info: - register: az_info - - - name: Assert that we have multiple AZs available to us - assert: - that: az_info.availability_zones | length >= 2 - - - name: pick AZs - set_fact: - az_one: '{{ az_info.availability_zones[0].zone_name }}' - az_two: '{{ az_info.availability_zones[1].zone_name }}' - - # ============================================================ - - - name: create a VPC - ec2_vpc_net: - cidr_block: "{{ vpc_cidr }}" - name: "{{ vpc_name }}" - state: present - register: vpc - - - name: Save VPC ID for later - set_fact: - vpc_id: "{{ vpc.vpc.id }}" - - - name: create subnets - ec2_vpc_subnet: - cidr: "{{ item.cidr }}" - az: "{{ item.az }}" - vpc_id: "{{ vpc_id }}" - state: present - tags: - Name: "{{ item.name }}" - with_items: - - cidr: "{{ subnet_1 }}" - az: "{{ az_one }}" - name: "{{ subnet_name }}-1" - - cidr: "{{ subnet_2 }}" - az: "{{ az_two }}" - name: "{{ subnet_name }}-2" - - cidr: "{{ subnet_3 }}" - az: "{{ az_one }}" - name: "{{ subnet_name }}-3" - - cidr: "{{ subnet_4 }}" - az: "{{ az_two }}" - name: "{{ subnet_name }}-4" - register: subnets - - - name: set helpful facts about subnets - set_fact: - subnet_ids: "{{ subnets | community.general.json_query('results[*].subnet.id') }}" - subnet_names: "{{ subnets | community.general.json_query('results[*].subnet.tags.Name') }}" - - - name: create VPC for IPv6 tests - ec2_vpc_net: - cidr_block: "{{ vpc_ipv6_cidr }}" - name: "{{ vpc_ipv6_name }}" - state: present - ipv6_cidr: yes - register: vpc_result - - set_fact: - vpc_ipv6_id: "{{ vpc_result.vpc.id }}" - vpc_ipv6_cidr_v6: "{{ _ipv6_cidr }}" - subnet_ipv6: "{{ _ipv6_cidr | regex_replace('::/56', '::/64') }}" - vars: - _ipv6_cidr: "{{ vpc_result.vpc.ipv6_cidr_block_association_set[0].ipv6_cidr_block }}" - - - name: create subnet with IPv6 - ec2_vpc_subnet: - cidr: "{{ vpc_ipv6_cidr }}" - vpc_id: "{{ vpc_ipv6_id }}" - ipv6_cidr: "{{ subnet_ipv6 }}" - state: present - tags: - Name: "{{ subnet_name }}-ipv6" - - # ============================================================ - - - include_tasks: tasks/subnet_ids.yml - - - include_tasks: tasks/subnet_names.yml - - - include_tasks: tasks/tags.yml - - - include_tasks: tasks/ingress_and_egress.yml - - - include_tasks: tasks/ipv6.yml - - # ============================================================ - - always: - - - name: remove network ACL - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - state: absent - register: removed_acl - ignore_errors: yes - - - name: remove subnets - ec2_vpc_subnet: - cidr: "{{ item.cidr }}" - vpc_id: "{{ item.vpc_id | default(vpc_id) }}" - state: absent - with_items: - - cidr: "{{ subnet_1 }}" - - cidr: "{{ subnet_2 }}" - - cidr: "{{ subnet_3 }}" - - cidr: "{{ subnet_4 }}" - - cidr: "{{ vpc_ipv6_cidr }}" - vpc_id: "{{ vpc_ipv6_id }}" - ignore_errors: yes - register: removed_subnets - - - name: remove the VPCs - ec2_vpc_net: - vpc_id: "{{ item }}" - state: absent - ignore_errors: yes - register: removed_vpc - with_items: - - '{{ vpc_id }}' - - '{{ vpc_ipv6_id }}' - - # ============================================================ diff --git a/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_ids.yml b/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_ids.yml deleted file mode 100644 index 4e1affa1f34..00000000000 --- a/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_ids.yml +++ /dev/null @@ -1,161 +0,0 @@ -# ============================================================ - -- name: create ingress and egress rules using subnet IDs - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - state: 'present' - register: nacl - -- set_fact: - nacl_id: "{{ nacl.nacl_id }}" - -- name: assert the network acl was created - assert: - that: - - nacl.changed - - nacl.nacl_id.startswith('acl-') - -- name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl_id }}" - register: nacl_facts - -- name: assert the nacl has the correct attributes - assert: - that: - - nacl_facts.nacls | length == 1 - - nacl_facts.nacls[0].nacl_id == nacl_id - - nacl_facts.nacls[0].subnets | length == 4 - - nacl_facts.nacls[0].subnets | sort == subnet_ids | sort - - nacl_facts.nacls[0].ingress | length == 3 - - nacl_facts.nacls[0].egress | length == 1 - - nacl_facts.nacls[0].tags.Name == nacl_name - -# ============================================================ - -- name: test idempotence - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - state: 'present' - register: nacl - -- name: assert the network acl already existed - assert: - that: - - not nacl.changed - - nacl.nacl_id == nacl_id - - nacl.nacl_id.startswith('acl-') - -- name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_facts_idem - -- name: assert the facts are the same as before - assert: - that: - - nacl_facts_idem == nacl_facts - -# ============================================================ - -- name: remove a subnet from the network ACL - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: - - "{{ subnet_ids[0] }}" - - "{{ subnet_ids[1] }}" - - "{{ subnet_ids[2] }}" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - state: 'present' - register: nacl - -- name: assert the network ACL changed - assert: - that: - - nacl.changed - - nacl.nacl_id.startswith('acl-') - - nacl.nacl_id == nacl_id - -- name: get network ACL facts - ec2_vpc_nacl_info: - nacl_id: - - "{{ nacl.nacl_id }}" - register: nacl_facts - -- name: assert the nacl has the correct attributes - assert: - that: - - nacl_facts.nacls | length == 1 - - nacl_facts.nacls[0].nacl_id == nacl_id - - nacl_facts.nacls[0].subnets | length == 3 - - subnet_ids[3] not in nacl_facts.nacls[0].subnets - - nacl_facts.nacls[0].ingress | length == 3 - - nacl_facts.nacls[0].egress | length == 1 - - nacl_facts.nacls[0].tags.Name == nacl_name - -# ============================================================ - -- name: remove the network ACL - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - state: absent - register: nacl - -- name: assert nacl was removed - assert: - that: - - nacl.changed - -- name: re-remove the network ACL by name (test idempotency) - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - state: absent - register: nacl -- name: assert nacl was removed - assert: - that: - - nacl is not changed - -- name: re-remove the network ACL by id (test idempotency) - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - nacl_id: "{{ nacl_id }}" - state: absent - register: nacl - -- name: assert nacl was removed - assert: - that: - - nacl is not changed diff --git a/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_names.yml b/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_names.yml deleted file mode 100644 index 4db7e1b2068..00000000000 --- a/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_names.yml +++ /dev/null @@ -1,136 +0,0 @@ -# ============================================================ - -- name: create ingress and egress rules using subnet names - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_names }}" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - state: 'present' - register: nacl - -- set_fact: - nacl_id: "{{ nacl.nacl_id }}" - -- name: assert the network acl was created - assert: - that: - - nacl.changed - - nacl.nacl_id.startswith('acl-') - -- name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl_id }}" - register: nacl_facts - -- name: assert the nacl has the correct attributes - assert: - that: - - nacl_facts.nacls | length == 1 - - nacl_facts.nacls[0].nacl_id == nacl_id - - nacl_facts.nacls[0].subnets | length == 4 - - nacl_facts.nacls[0].ingress | length == 3 - - nacl_facts.nacls[0].egress | length == 1 - - nacl_facts.nacls[0].tags.Name == nacl_name - -# ============================================================ - -- name: test idempotence - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_names }}" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - state: 'present' - register: nacl - -- name: assert the network acl already existed - assert: - that: - - not nacl.changed - - nacl.nacl_id == nacl_id - - nacl.nacl_id.startswith('acl-') - -- name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_facts_idem - -- name: assert the facts are the same as before - assert: - that: - - nacl_facts_idem == nacl_facts - -# ============================================================ - -- name: remove a subnet from the network ACL - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: - - "{{ subnet_names[0] }}" - - "{{ subnet_names[1] }}" - - "{{ subnet_names[2] }}" - tags: - Created_by: "Ansible test {{ resource_prefix }}" - ingress: - - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] - - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] - - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] - egress: - - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] - state: 'present' - register: nacl - -- name: assert the network ACL changed - assert: - that: - - nacl.changed - - nacl.nacl_id == nacl_id - - nacl.nacl_id.startswith('acl-') - -- name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_facts - -- name: assert the nacl has the correct attributes - assert: - that: - - nacl_facts.nacls | length == 1 - - nacl_facts.nacls[0].nacl_id == nacl_id - - nacl_facts.nacls[0].subnets | length == 3 - - nacl_facts.nacls[0].ingress | length == 3 - - nacl_facts.nacls[0].egress | length == 1 - - nacl_facts.nacls[0].tags.Name == nacl_name - -# ============================================================ - -- name: remove the network ACL - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - state: absent - register: nacl - -- name: assert nacl was removed - assert: - that: - - nacl.changed diff --git a/tests/integration/targets/ec2_vpc_nacl/tasks/tags.yml b/tests/integration/targets/ec2_vpc_nacl/tasks/tags.yml deleted file mode 100644 index da3ad71dda3..00000000000 --- a/tests/integration/targets/ec2_vpc_nacl/tasks/tags.yml +++ /dev/null @@ -1,445 +0,0 @@ -- vars: - first_tags: - 'Key with Spaces': Value with spaces - CamelCaseKey: CamelCaseValue - pascalCaseKey: pascalCaseValue - snake_case_key: snake_case_value - second_tags: - 'New Key with Spaces': Value with spaces - NewCamelCaseKey: CamelCaseValue - newPascalCaseKey: pascalCaseValue - new_snake_case_key: snake_case_value - third_tags: - 'Key with Spaces': Value with spaces - CamelCaseKey: CamelCaseValue - pascalCaseKey: pascalCaseValue - snake_case_key: snake_case_value - 'New Key with Spaces': Updated Value with spaces - final_tags: - 'Key with Spaces': Value with spaces - CamelCaseKey: CamelCaseValue - pascalCaseKey: pascalCaseValue - snake_case_key: snake_case_value - 'New Key with Spaces': Updated Value with spaces - NewCamelCaseKey: CamelCaseValue - newPascalCaseKey: pascalCaseValue - new_snake_case_key: snake_case_value - name_tags: - Name: '{{ nacl_name }}' - block: - - # ============================================================ - - - name: create a network ACL using subnet IDs - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - state: 'present' - register: nacl - - - name: assert the network acl was created - assert: - that: - - nacl.changed - - nacl.nacl_id.startswith('acl-') - - - name: Store NACL ID - set_fact: - nacl_id: '{{ nacl.nacl_id }}' - - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl_id }}" - register: nacl_info - - - name: assert the nacl has the correct attributes - assert: - that: - - nacl_info.nacls[0].nacl_id == nacl_id - - nacl_info.nacls[0].tags == name_tags - - # ============================================================ - - - name: (check) add tags - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ first_tags }}" - state: 'present' - register: nacl - check_mode: True - - - name: assert would change - assert: - that: - - nacl is changed - - nacl.nacl_id == nacl_id - - - name: add tags - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ first_tags }}" - state: 'present' - register: nacl - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_info - - - name: verify the tags were added - assert: - that: - - nacl is changed - - nacl.nacl_id == nacl_id - - nacl_info.nacls[0].nacl_id == nacl_id - - nacl_info.nacls[0].tags == ( first_tags | combine(name_tags) ) - - - name: (check) add tags - IDEMPOTENCY - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ first_tags }}" - state: 'present' - register: nacl - check_mode: True - - - name: assert would not change - assert: - that: - - nacl is not changed - - nacl.nacl_id == nacl_id - - - name: add tags - IDEMPOTENCY - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ first_tags }}" - state: 'present' - register: nacl - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_info - - - name: verify no change - assert: - that: - - nacl is not changed - - nacl.nacl_id == nacl_id - - nacl_info.nacls[0].nacl_id == nacl_id - - nacl_info.nacls[0].tags == ( first_tags | combine(name_tags) ) - - # ============================================================ - - - name: get network ACL facts by filter - ec2_vpc_nacl_info: - filters: - "tag:Name": "{{ nacl_name }}" - register: nacl_info - - - name: assert the facts are the same as before - assert: - that: - - nacl_info.nacls | length == 1 - - nacl.nacl_id == nacl_id - - nacl_info.nacls[0].nacl_id == nacl_id - - # ============================================================ - - - name: (check) modify tags with purge - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ second_tags }}" - state: 'present' - register: nacl - check_mode: True - - - name: assert would change - assert: - that: - - nacl is changed - - nacl.nacl_id == nacl_id - - - name: modify tags with purge - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ second_tags }}" - state: 'present' - register: nacl - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_info - - - name: verify the tags were added - assert: - that: - - nacl is changed - - nacl.nacl_id == nacl_id - - nacl_info.nacls[0].nacl_id == nacl_id - - nacl_info.nacls[0].tags == ( second_tags | combine(name_tags) ) - - - name: (check) modify tags with purge - IDEMPOTENCY - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ second_tags }}" - state: 'present' - register: nacl - check_mode: True - - - name: assert would not change - assert: - that: - - nacl is not changed - - nacl.nacl_id == nacl_id - - - name: modify tags with purge - IDEMPOTENCY - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ second_tags }}" - state: 'present' - register: nacl - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_info - - - name: verify no change - assert: - that: - - nacl is not changed - - nacl.nacl_id == nacl_id - - nacl_info.nacls[0].nacl_id == nacl_id - - nacl_info.nacls[0].tags == ( second_tags | combine(name_tags) ) - - # ============================================================ - - - name: (check) modify tags without purge - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ third_tags }}" - state: 'present' - purge_tags: False - register: nacl - check_mode: True - - - name: assert would change - assert: - that: - - nacl is changed - - nacl.nacl_id == nacl_id - - - name: modify tags without purge - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ third_tags }}" - state: 'present' - purge_tags: False - register: nacl - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_info - - - name: verify the tags were added - assert: - that: - - nacl is changed - - nacl.nacl_id == nacl_id - - nacl_info.nacls[0].nacl_id == nacl_id - - nacl_info.nacls[0].tags == ( final_tags | combine(name_tags) ) - - - name: (check) modify tags without purge - IDEMPOTENCY - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ third_tags }}" - state: 'present' - purge_tags: False - register: nacl - check_mode: True - - - name: assert would not change - assert: - that: - - nacl is not changed - - nacl.nacl_id == nacl_id - - - name: modify tags without purge - IDEMPOTENCY - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: "{{ third_tags }}" - state: 'present' - purge_tags: False - register: nacl - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_info - - - name: verify no change - assert: - that: - - nacl is not changed - - nacl.nacl_id == nacl_id - - nacl_info.nacls[0].nacl_id == nacl_id - - nacl_info.nacls[0].tags == ( final_tags | combine(name_tags) ) - - # ============================================================ - - - name: (check) No change to tags without setting tags - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - state: 'present' - register: nacl - check_mode: True - - - name: assert would change - assert: - that: - - nacl is not changed - - nacl.nacl_id == nacl_id - - - name: No change to tags without setting tags - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - state: 'present' - register: nacl - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_info - - - name: verify the tags were added - assert: - that: - - nacl is not changed - - nacl.nacl_id == nacl_id - - nacl_info.nacls[0].nacl_id == nacl_id - - nacl_info.nacls[0].tags == ( final_tags | combine(name_tags) ) - - # ============================================================ - - - name: (check) remove non name tags - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: {} - state: 'present' - register: nacl - check_mode: True - - - name: assert would change - assert: - that: - - nacl is changed - - nacl.nacl_id == nacl_id - - - name: remove non name tags - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: {} - state: 'present' - register: nacl - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_info - - - name: verify the tags were added - assert: - that: - - nacl is changed - - nacl.nacl_id == nacl_id - - nacl_info.nacls[0].nacl_id == nacl_id - - nacl_info.nacls[0].tags == name_tags - - - name: (check) remove non name tags - IDEMPOTENCY - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: {} - state: 'present' - register: nacl - check_mode: True - - - name: assert would not change - assert: - that: - - nacl is not changed - - nacl.nacl_id == nacl_id - - - name: remove non name tags - IDEMPOTENCY - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - subnets: "{{ subnet_ids }}" - tags: {} - state: 'present' - register: nacl - - name: get network ACL facts - ec2_vpc_nacl_info: - nacl_ids: - - "{{ nacl.nacl_id }}" - register: nacl_info - - - name: verify no change - assert: - that: - - nacl is not changed - - nacl.nacl_id == nacl_id - - nacl_info.nacls[0].nacl_id == nacl_id - - nacl_info.nacls[0].tags == name_tags - - # ============================================================ - - always: - - name: remove the network ACL - ec2_vpc_nacl: - vpc_id: "{{ vpc_id }}" - name: "{{ nacl_name }}" - state: absent - register: nacl - - - name: assert nacl was removed - assert: - that: - - nacl.changed diff --git a/tests/integration/targets/ec2_vpc_peer/aliases b/tests/integration/targets/ec2_vpc_peer/aliases deleted file mode 100644 index 8807cb2514c..00000000000 --- a/tests/integration/targets/ec2_vpc_peer/aliases +++ /dev/null @@ -1,3 +0,0 @@ -cloud/aws - -ec2_vpc_peering_info diff --git a/tests/integration/targets/ec2_vpc_peer/defaults/main.yml b/tests/integration/targets/ec2_vpc_peer/defaults/main.yml deleted file mode 100644 index 0ff34455b45..00000000000 --- a/tests/integration/targets/ec2_vpc_peer/defaults/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -vpc_seed: '{{ resource_prefix }}' -vpc_1_name: '{{ resource_prefix }}-vpc-1' -vpc_1_cidr: '10.{{ 256 | random(seed=vpc_seed) }}.0.0/23' -vpc_2_name: '{{ resource_prefix }}-vpc-1' -vpc_2_cidr: '10.{{ 256 | random(seed=vpc_seed) }}.2.0/23' diff --git a/tests/integration/targets/ec2_vpc_peer/meta/main.yml b/tests/integration/targets/ec2_vpc_peer/meta/main.yml deleted file mode 100644 index 32cf5dda7ed..00000000000 --- a/tests/integration/targets/ec2_vpc_peer/meta/main.yml +++ /dev/null @@ -1 +0,0 @@ -dependencies: [] diff --git a/tests/integration/targets/ec2_vpc_peer/tasks/main.yml b/tests/integration/targets/ec2_vpc_peer/tasks/main.yml deleted file mode 100644 index b39b69b74b0..00000000000 --- a/tests/integration/targets/ec2_vpc_peer/tasks/main.yml +++ /dev/null @@ -1,514 +0,0 @@ ---- -- name: ec2_vpc_igw tests - collections: - - amazon.aws - module_defaults: - group/aws: - access_key: "{{ aws_access_key }}" - secret_key: "{{ aws_secret_key }}" - session_token: "{{ security_token | default(omit) }}" - region: "{{ aws_region }}" - block: - - name: get ARN of calling user - aws_caller_info: - register: aws_caller_info - - name: Store Account ID for later use - set_fact: - account_id: '{{ aws_caller_info.account }}' - - # ============================================================ - - name: Fetch Peers in check_mode - ec2_vpc_peering_info: - register: peers_info - check_mode: True - - name: Assert success - assert: - that: - - peers_info is successful - - '"result" in peers_info' - - # ============================================================ - - name: create VPC 1 - ec2_vpc_net: - name: "{{ vpc_1_name }}" - state: present - cidr_block: "{{ vpc_1_cidr }}" - tags: - Name: "{{ vpc_1_name }}" - TestPrefex: "{{ resource_prefix }}" - register: vpc_1_result - - name: Assert success - assert: - that: - - vpc_1_result is successful - - - name: create VPC 2 - ec2_vpc_net: - name: "{{ vpc_2_name }}" - state: present - cidr_block: "{{ vpc_2_cidr }}" - tags: - Name: "{{ vpc_2_name }}" - TestPrefex: "{{ resource_prefix }}" - register: vpc_2_result - - name: Assert success - assert: - that: - - vpc_2_result is successful - - - name: Store VPC IDs - set_fact: - vpc_1: '{{ vpc_1_result.vpc.id }}' - vpc_2: '{{ vpc_2_result.vpc.id }}' - - - name: Set a name to use with the connections - set_fact: - connection_name: 'Peering connection for VPC {{ vpc_1 }} to VPC {{ vpc_2 }}' - - - name: Create local account VPC peering Connection request - ec2_vpc_peer: - vpc_id: '{{ vpc_1 }}' - peer_vpc_id: '{{ vpc_2 }}' - state: present - tags: - Name: '{{ connection_name }}' - register: vpc_peer - - - name: Assert success - assert: - that: - - vpc_peer is changed - - vpc_peer is successful - - "'peering_id' in vpc_peer" - - vpc_peer.vpc_peering_connection.requester_vpc_info.cidr_block == vpc_1_cidr - - vpc_peer.peering_id.startswith('pcx-') - - - name: Store Connection ID - set_fact: - peer_id_1: '{{ vpc_peer.peering_id }}' - - - name: (re-) Create local account VPC peering Connection request (idempotency) - ec2_vpc_peer: - vpc_id: '{{ vpc_1 }}' - peer_vpc_id: '{{ vpc_2 }}' - state: present - tags: - Name: '{{ connection_name }}' - register: vpc_peer - - - name: Assert success - assert: - that: - - vpc_peer is not changed - - vpc_peer is successful - - vpc_peer.peering_id == peer_id_1 - - - name: (re-) Create local account VPC peering Connection request with accepter/requester reversed (idempotency) - ec2_vpc_peer: - vpc_id: '{{ vpc_2 }}' - peer_vpc_id: '{{ vpc_1 }}' - state: present - tags: - Name: '{{ connection_name }}' - register: vpc_peer - - - name: Assert success - assert: - that: - - vpc_peer is not changed - - vpc_peer is successful - - vpc_peer.peering_id == peer_id_1 - - - name: Get details on specific VPC peer - ec2_vpc_peering_info: - peer_connection_ids: - - '{{ peer_id_1 }}' - register: peer_info - - name: Assert expected values - assert: - that: - - peer_info is successful - - "'vpc_peering_connections' in peer_info" - - "'result' in peer_info" - - "'accepter_vpc_info' in peer_details" - - "'requester_vpc_info' in peer_details" - - "'status' in peer_details" - - "'code' in peer_details.status" - - peer_details.status.code == "pending-acceptance" - - "'message' in peer_details.status" - - "'tags' in peer_details" - - "'Name' in peer_details.tags" - - peer_details.tags.Name == connection_name - - "'vpc_peering_connection_id' in peer_details" - - peer_details.vpc_peering_connection_id == peer_id_1 - # Acceptor info isn't available until the connection has been accepted - - "'cidr_block' not in acceptor_details" - - "'cidr_block_set' not in acceptor_details" - - "'peering_options' not in acceptor_details" - - "'owner_id' in acceptor_details" - - acceptor_details.owner_id == account_id - - "'region' in acceptor_details" - - acceptor_details.region == aws_region - - "'vpc_id' in acceptor_details" - - acceptor_details.vpc_id == vpc_2 - # Information about the 'requesting' VPC - - "'cidr_block' in requester_details" - - requester_details.cidr_block == vpc_1_cidr - - "'cidr_block_set' in requester_details" - - requester_details.cidr_block_set | length == 1 - - "'cidr_block' in requester_details.cidr_block_set[0]" - - requester_details.cidr_block_set[0].cidr_block == vpc_1_cidr - - "'peering_options' in requester_details" - - "'owner_id' in requester_details" - - requester_details.owner_id == account_id - - "'region' in requester_details" - - requester_details.region == aws_region - - "'vpc_id' in requester_details" - - requester_details.vpc_id == vpc_1 - vars: - peer_details: '{{ peer_info.vpc_peering_connections[0] }}' - acceptor_details: '{{ peer_details["accepter_vpc_info"] }}' - requester_details: '{{ peer_details["requester_vpc_info"] }}' - - - name: Get all vpc peers with specific filters - ec2_vpc_peering_info: - filters: - status-code: ['pending-acceptance'] - register: pending_vpc_peers - - name: Assert expected values - assert: - that: - # Not guaranteed to just be us, only assert the shape - - pending_vpc_peers is successful - - "'vpc_peering_connections' in peer_info" - - "'result' in peer_info" - - "'accepter_vpc_info' in peer_details" - - "'requester_vpc_info' in peer_details" - - "'status' in peer_details" - - "'code' in peer_details.status" - - peer_details.status.code == "pending-acceptance" - - "'message' in peer_details.status" - - "'tags' in peer_details" - - "'vpc_peering_connection_id' in peer_details" - # Acceptor info isn't available until the connection has been accepted - - "'cidr_block' not in acceptor_details" - - "'cidr_block_set' not in acceptor_details" - - "'peering_options' not in acceptor_details" - - "'owner_id' in acceptor_details" - - "'region' in acceptor_details" - - "'vpc_id' in acceptor_details" - # Information about the 'requesting' VPC - - "'cidr_block' in requester_details" - - "'cidr_block_set' in requester_details" - - "'cidr_block' in requester_details.cidr_block_set[0]" - - "'peering_options' in requester_details" - - "'owner_id' in requester_details" - - "'region' in requester_details" - - "'vpc_id' in requester_details" - vars: - peer_details: '{{ pending_vpc_peers.vpc_peering_connections[0] }}' - acceptor_details: '{{ peer_details["accepter_vpc_info"] }}' - requester_details: '{{ peer_details["requester_vpc_info"] }}' - - - name: Update tags on the VPC Peering Connection - ec2_vpc_peer: - vpc_id: '{{ vpc_1 }}' - peer_vpc_id: '{{ vpc_2 }}' - state: present - tags: - Name: '{{ connection_name }}' - testPrefix: '{{ resource_prefix }}' - register: tag_peer - - name: Assert success - assert: - that: - - tag_peer is changed - - tag_peer is successful - - tag_peer.peering_id == peer_id_1 - - - name: (re-) Update tags on the VPC Peering Connection (idempotency) - ec2_vpc_peer: - vpc_id: '{{ vpc_1 }}' - peer_vpc_id: '{{ vpc_2 }}' - state: present - tags: - Name: '{{ connection_name }}' - testPrefix: '{{ resource_prefix }}' - register: tag_peer - - name: Assert success - assert: - that: - - tag_peer is not changed - - tag_peer is successful - - tag_peer.peering_id == peer_id_1 - - - name: Get details on specific VPC peer - ec2_vpc_peering_info: - peer_connection_ids: - - '{{ peer_id_1 }}' - register: peer_info - - name: Assert expected tags - assert: - that: - - peer_info is successful - - "'tags' in peer_details" - - "'Name' in peer_details.tags" - - "'testPrefix' in peer_details.tags" - - peer_details.tags.Name == connection_name - - peer_details.tags.testPrefix == resource_prefix - vars: - peer_details: '{{ peer_info.vpc_peering_connections[0] }}' - - - name: Accept local VPC peering request - ec2_vpc_peer: - peering_id: "{{ vpc_peer.peering_id }}" - state: accept - wait: True - register: action_peer - - name: Assert success - assert: - that: - - action_peer is changed - - action_peer is successful - - action_peer.peering_id == peer_id_1 - - action_peer.vpc_peering_connection.accepter_vpc_info.cidr_block == vpc_2_cidr - - action_peer.vpc_peering_connection.vpc_peering_connection_id == peer_id_1 - - - name: Get details on specific VPC peer - ec2_vpc_peering_info: - peer_connection_ids: - - '{{ peer_id_1 }}' - register: peer_info - - name: Assert expected values - assert: - that: - - peer_info is successful - - "'vpc_peering_connections' in peer_info" - - "'result' in peer_info" - - "'accepter_vpc_info' in peer_details" - - "'requester_vpc_info' in peer_details" - - "'status' in peer_details" - - "'code' in peer_details.status" - - peer_details.status.code == "active" - - "'message' in peer_details.status" - - "'tags' in peer_details" - - "'Name' in peer_details.tags" - - peer_details.tags.Name == connection_name - - "'testPrefix' in peer_details.tags" - - peer_details.tags.testPrefix == resource_prefix - - "'vpc_peering_connection_id' in peer_details" - - peer_details.vpc_peering_connection_id == peer_id_1 - # Information about the 'accepting' VPC should be available now - - "'cidr_block' in acceptor_details" - - acceptor_details.cidr_block == vpc_2_cidr - - "'cidr_block_set' in acceptor_details" - - acceptor_details.cidr_block_set | length == 1 - - "'cidr_block' in acceptor_details.cidr_block_set[0]" - - acceptor_details.cidr_block_set[0].cidr_block == vpc_2_cidr - - "'peering_options' in acceptor_details" - - "'owner_id' in acceptor_details" - - acceptor_details.owner_id == account_id - - "'region' in acceptor_details" - - acceptor_details.region == aws_region - - "'vpc_id' in acceptor_details" - - acceptor_details.vpc_id == vpc_2 - # Information about the 'requesting' VPC - - "'cidr_block' in requester_details" - - requester_details.cidr_block == vpc_1_cidr - - "'cidr_block_set' in requester_details" - - requester_details.cidr_block_set | length == 1 - - "'cidr_block' in requester_details.cidr_block_set[0]" - - requester_details.cidr_block_set[0].cidr_block == vpc_1_cidr - - "'peering_options' in requester_details" - - "'owner_id' in requester_details" - - requester_details.owner_id == account_id - - "'region' in requester_details" - - requester_details.region == aws_region - - "'vpc_id' in requester_details" - - requester_details.vpc_id == vpc_1 - vars: - peer_details: '{{ peer_info.vpc_peering_connections[0] }}' - acceptor_details: '{{ peer_details["accepter_vpc_info"] }}' - requester_details: '{{ peer_details["requester_vpc_info"] }}' - - - name: (re-) Accept local VPC peering request (idempotency) - ec2_vpc_peer: - peering_id: "{{ vpc_peer.peering_id }}" - state: accept - register: action_peer - - name: Assert success - assert: - that: - - action_peer is not changed - - action_peer is successful - - action_peer.peering_id == peer_id_1 - - action_peer.vpc_peering_connection.vpc_peering_connection_id == peer_id_1 - - - name: delete a local VPC peering Connection - ec2_vpc_peer: - peering_id: "{{ vpc_peer.peering_id }}" - state: absent - register: delete_peer - - name: Assert success - assert: - that: - - delete_peer is changed - - delete_peer is successful - - "'peering_id' in delete_peer" - - - name: Get details on specific VPC peer - ec2_vpc_peering_info: - peer_connection_ids: - - '{{ peer_id_1}}' - register: peer_info - - name: Assert expected values - assert: - that: - - peer_info is successful - - "'vpc_peering_connections' in peer_info" - - "'result' in peer_info" - - "'accepter_vpc_info' in peer_details" - - "'requester_vpc_info' in peer_details" - - "'status' in peer_details" - - "'code' in peer_details.status" - - peer_details.status.code == "deleted" - - "'message' in peer_details.status" - - "'tags' in peer_details" - - "'Name' in peer_details.tags" - - peer_details.tags.Name == connection_name - - "'testPrefix' in peer_details.tags" - - peer_details.tags.testPrefix == resource_prefix - - "'vpc_peering_connection_id' in peer_details" - - peer_details.vpc_peering_connection_id == peer_id_1 - # Information about the 'accepting' VPC is reduced again - - "'cidr_block' not in acceptor_details" - - "'cidr_block_set' not in acceptor_details" - - "'peering_options' not in acceptor_details" - - "'owner_id' in acceptor_details" - - acceptor_details.owner_id == account_id - - "'region' in acceptor_details" - - acceptor_details.region == aws_region - - "'vpc_id' in acceptor_details" - - acceptor_details.vpc_id == vpc_2 - # Information about the 'requesting' VPC is reduced once the VPC's deleted - - "'cidr_block' not in requester_details" - - "'cidr_block_set' not in requester_details" - - "'peering_options' not in requester_details" - - "'owner_id' in requester_details" - - requester_details.owner_id == account_id - - "'region' in requester_details" - - requester_details.region == aws_region - - "'vpc_id' in requester_details" - - requester_details.vpc_id == vpc_1 - vars: - peer_details: '{{ peer_info.vpc_peering_connections[0] }}' - acceptor_details: '{{ peer_details["accepter_vpc_info"] }}' - requester_details: '{{ peer_details["requester_vpc_info"] }}' - - - name: (re-) delete a local VPC peering Connection (idempotency) - ec2_vpc_peer: - peering_id: "{{ vpc_peer.peering_id }}" - state: absent - register: delete_peer - - name: Assert success - assert: - that: - - delete_peer is not changed - - delete_peer is successful - - - name: Create local account VPC peering Connection - ec2_vpc_peer: - vpc_id: '{{ vpc_1 }}' - peer_vpc_id: '{{ vpc_2 }}' - state: present - tags: - Name: 'Peering connection for VPC {{ vpc_1 }} to VPC {{ vpc_2 }}' - register: vpc_peer2 - - name: Assert success - assert: - that: - - vpc_peer2 is changed - - vpc_peer2 is successful - - "'peering_id' in vpc_peer2" - - vpc_peer2.peering_id.startswith('pcx-') - - - name: Store Connection ID - set_fact: - peer_id_2: '{{ vpc_peer2.peering_id }}' - - - name: reject a local VPC peering Connection - ec2_vpc_peer: - peering_id: "{{ vpc_peer2.peering_id }}" - state: reject - wait: True - register: reject_peer - - name: Assert success - assert: - that: - - reject_peer is changed - - reject_peer is successful - - reject_peer.peering_id == peer_id_2 - - - name: (re-) reject a local VPC peering Connection - ec2_vpc_peer: - peering_id: "{{ vpc_peer2.peering_id }}" - state: reject - register: reject_peer - - name: Assert success - assert: - that: - - reject_peer is not changed - - reject_peer is successful - - reject_peer.peering_id == peer_id_2 - - reject_peer.vpc_peering_connection.vpc_peering_connection_id == peer_id_2 - - - name: delete a local VPC peering Connection - ec2_vpc_peer: - peering_id: "{{ vpc_peer2.peering_id }}" - state: absent - register: delete_peer - - name: Assert success - assert: - that: - - delete_peer is not changed - - delete_peer is successful - - always: - - - name: Find all VPC Peering connections for our VPCs - ec2_vpc_peering_info: - filters: - accepter-vpc-info.vpc-id: '{{ item }}' - register: peering_info - loop: - - '{{ vpc_1 }}' - - '{{ vpc_2 }}' - - - set_fact: - vpc_peering_connection_ids: '{{ _vpc_peering_connections | map(attribute="vpc_peering_connection_id") | list }}' - vars: - _vpc_peering_connections: '{{ peering_info.results | map(attribute="vpc_peering_connections") | flatten }}' - ignore_errors: True - - # ============================================================ - - - name: Delete remaining Peering connections - ec2_vpc_peer: - peering_id: "{{ item }}" - state: absent - ignore_errors: True - loop: '{{ vpc_peering_connection_ids }}' - - - name: tidy up VPC 2 - ec2_vpc_net: - name: "{{ vpc_2_name }}" - state: absent - cidr_block: "{{ vpc_2_cidr }}" - ignore_errors: true - - - name: tidy up VPC 1 - ec2_vpc_net: - name: "{{ vpc_1_name }}" - state: absent - cidr_block: "{{ vpc_1_cidr }}" - ignore_errors: true diff --git a/tests/integration/targets/ec2_vpc_vgw/aliases b/tests/integration/targets/ec2_vpc_vgw/aliases deleted file mode 100644 index 9daebe59222..00000000000 --- a/tests/integration/targets/ec2_vpc_vgw/aliases +++ /dev/null @@ -1,3 +0,0 @@ -cloud/aws - -ec2_vpc_vgw_info diff --git a/tests/integration/targets/ec2_vpc_vgw/defaults/main.yml b/tests/integration/targets/ec2_vpc_vgw/defaults/main.yml deleted file mode 100644 index b10650336c4..00000000000 --- a/tests/integration/targets/ec2_vpc_vgw/defaults/main.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -vpc_name: '{{ resource_prefix }}-ec2-vpc-vgw' -vgw_name: '{{ resource_prefix }}-ec2-vpc-vgw' -subnet_name: '{{ resource_prefix }}-ec2-vpc-vgw' -vpc_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.0.0/16' -subnet_1: '10.{{ 256 | random(seed=resource_prefix) }}.1.0/24' -subnet_2: '10.{{ 256 | random(seed=resource_prefix) }}.2.0/24' -subnet_3: '10.{{ 256 | random(seed=resource_prefix) }}.3.0/24' -subnet_4: '10.{{ 256 | random(seed=resource_prefix) }}.4.0/24' - -vpc_ipv6_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.5.0/25' -vpc_ipv6_name: '{{ vpc_name }}-ipv6' diff --git a/tests/integration/targets/ec2_vpc_vgw/meta/main.yml b/tests/integration/targets/ec2_vpc_vgw/meta/main.yml deleted file mode 100644 index 32cf5dda7ed..00000000000 --- a/tests/integration/targets/ec2_vpc_vgw/meta/main.yml +++ /dev/null @@ -1 +0,0 @@ -dependencies: [] diff --git a/tests/integration/targets/ec2_vpc_vgw/tasks/main.yml b/tests/integration/targets/ec2_vpc_vgw/tasks/main.yml deleted file mode 100644 index f5a850a7140..00000000000 --- a/tests/integration/targets/ec2_vpc_vgw/tasks/main.yml +++ /dev/null @@ -1,233 +0,0 @@ ---- -- name: 'ec2_vpc_vgw integration tests' - collections: - - amazon.aws - module_defaults: - group/aws: - access_key: '{{ aws_access_key }}' - secret_key: '{{ aws_secret_key }}' - session_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region }}' - block: - - # ============================================================ - - debug: msg="Setting up test dependencies" - - - name: create a VPC - ec2_vpc_net: - name: "{{ vpc_name }}-{{ item }}" - state: present - cidr_block: "{{ vpc_cidr }}" - tags: - Description: "Created by ansible-test for IGW tests" - register: vpc_result - loop: [1, 2] - - - name: use set fact for vpc ids - set_fact: - vpc_id_1: '{{ vpc_result.results.0.vpc.id }}' - vpc_id_2: '{{ vpc_result.results.1.vpc.id }}' - - # ============================================================ - - debug: msg="Running tests" - - - name: create vpn gateway and attach it to vpc - ec2_vpc_vgw: - state: present - vpc_id: '{{ vpc_id_1 }}' - name: "{{ vgw_name }}" - register: vgw - - - name: use set fact for vgw ids - set_fact: - vgw_id: '{{ vgw.vgw.id }}' - - - assert: - that: - - vgw.changed - - vgw.vgw.vpc_id == vpc_id_1 - - vgw.vgw.tags.Name == vgw_name - - - name: test idempotence - ec2_vpc_vgw: - state: present - vpc_id: '{{ vpc_id_1 }}' - name: "{{ vgw_name }}" - register: vgw - - - assert: - that: - - not vgw.changed - - vgw.vgw.id == vgw_id - - # ============================================================ - - name: attach vpn gateway to the other VPC - ec2_vpc_vgw: - state: present - vpc_id: '{{ vpc_id_2 }}' - name: "{{ vgw_name }}" - register: vgw - - - assert: - that: - - vgw.changed - - vgw.vgw.id == vgw_id - - vgw.vgw.vpc_id == vpc_id_2 - - # ============================================================ - - - name: get VPC VGW facts by ID (CHECK) - ec2_vpc_vgw_info: - vpn_gateway_ids: ['{{ vgw_id }}'] - register: vgw_info - check_mode: True - - - name: verify expected facts - vars: - vgw_details: '{{ vgw_info.virtual_gateways[0] }}' - attach_1_description: - state: 'detached' - vpc_id: '{{ vpc_id_1 }}' - attach_2_description: - state: 'attached' - vpc_id: '{{ vpc_id_2 }}' - assert: - that: - - vgw_info.virtual_gateways | length == 1 - - '"resource_tags" in vgw_details' - - '"state" in vgw_details' - - '"tags" in vgw_details' - - '"type" in vgw_details' - - '"vpc_attachments" in vgw_details' - - '"vpn_gateway_id" in vgw_details' - - vgw_details.vpn_gateway_id == vgw_id - - vgw_details.type == 'ipsec.1' - - vgw_details.state == 'available' - - '"Name" in vgw_details.resource_tags' - - vgw_details.resource_tags.Name == vgw_name - - ( - attach_1_description in vgw_details.vpc_attachments - and - vgw_details.vpc_attachments | length == 2 - ) or ( vgw_details.vpc_attachments | length == 1 ) - - attach_2_description in vgw_details.vpc_attachments - - - name: get VPC VGW facts by Tag - ec2_vpc_vgw_info: - filters: - "tag:Name": "{{ vgw_name }}" - register: vgw_info - - - name: verify expected facts - vars: - vgw_details: '{{ vgw_info.virtual_gateways[0] }}' - attach_1_description: - state: 'detached' - vpc_id: '{{ vpc_id_1 }}' - attach_2_description: - state: 'attached' - vpc_id: '{{ vpc_id_2 }}' - assert: - that: - - vgw_info.virtual_gateways | length == 1 - - '"resource_tags" in vgw_details' - - '"state" in vgw_details' - - '"tags" in vgw_details' - - '"type" in vgw_details' - - '"vpc_attachments" in vgw_details' - - '"vpn_gateway_id" in vgw_details' - - vgw_details.vpn_gateway_id == vgw_id - - vgw_details.type == 'ipsec.1' - - vgw_details.state == 'available' - - '"Name" in vgw_details.resource_tags' - - vgw_details.resource_tags.Name == vgw_name - - ( - attach_1_description in vgw_details.vpc_attachments - and - vgw_details.vpc_attachments | length == 2 - ) or ( vgw_details.vpc_attachments | length == 1 ) - - attach_2_description in vgw_details.vpc_attachments - - # ============================================================ - - - name: get all VGWs - ec2_vpc_vgw_info: - register: vgw_info - - - name: verify test VGW is in the results - vars: - vgw_id_list: '{{ vgw_info.virtual_gateways | map(attribute="vpn_gateway_id") | list }}' - assert: - that: - - vgw_id in vgw_id_list - - # ============================================================ - - - name: detach vpn gateway - ec2_vpc_vgw: - state: present - name: "{{ vgw_name }}" - register: vgw - - - assert: - that: - - vgw.changed - - not vgw.vgw.vpc_id - - - name: test idempotence - ec2_vpc_vgw: - state: present - name: "{{ vgw_name }}" - register: vgw - - - assert: - that: - - not vgw.changed - - # ============================================================ - - - include_tasks: 'tags.yml' - - # ============================================================ - - - name: delete vpn gateway - ec2_vpc_vgw: - state: absent - name: "{{ vgw_name }}" - register: vgw - - - assert: - that: - - vgw.changed - - - name: test idempotence - ec2_vpc_vgw: - state: absent - name: "{{ vgw_name }}" - register: vgw - - - assert: - that: - - not vgw.changed - - always: - - - debug: msg="Removing test dependencies" - - - name: delete vpn gateway - ec2_vpc_vgw: - state: absent - vpn_gateway_id: '{{ vgw.vgw.id | default(vgw_id) }}' - ignore_errors: yes - - - name: delete vpc - ec2_vpc_net: - name: "{{ vpc_name }}-{{ item }}" - state: absent - cidr_block: "{{ vpc_cidr }}" - loop: [1, 2] - register: result - retries: 10 - delay: 5 - until: result is not failed - ignore_errors: true diff --git a/tests/integration/targets/ec2_vpc_vgw/tasks/tags.yml b/tests/integration/targets/ec2_vpc_vgw/tasks/tags.yml deleted file mode 100644 index a80521313fb..00000000000 --- a/tests/integration/targets/ec2_vpc_vgw/tasks/tags.yml +++ /dev/null @@ -1,333 +0,0 @@ -- vars: - first_tags: - 'Key with Spaces': Value with spaces - CamelCaseKey: CamelCaseValue - pascalCaseKey: pascalCaseValue - snake_case_key: snake_case_value - second_tags: - 'New Key with Spaces': Value with spaces - NewCamelCaseKey: CamelCaseValue - newPascalCaseKey: pascalCaseValue - new_snake_case_key: snake_case_value - third_tags: - 'Key with Spaces': Value with spaces - CamelCaseKey: CamelCaseValue - pascalCaseKey: pascalCaseValue - snake_case_key: snake_case_value - 'New Key with Spaces': Updated Value with spaces - final_tags: - 'Key with Spaces': Value with spaces - CamelCaseKey: CamelCaseValue - pascalCaseKey: pascalCaseValue - snake_case_key: snake_case_value - 'New Key with Spaces': Updated Value with spaces - NewCamelCaseKey: CamelCaseValue - newPascalCaseKey: pascalCaseValue - new_snake_case_key: snake_case_value - name_tags: - Name: '{{ vgw_name }}' - module_defaults: - ec2_vpc_vgw: - name: '{{ vgw_name }}' - ec2_vpc_vgw_info: - vpn_gateway_ids: ['{{ vgw_id }}'] - block: - - # ============================================================ - -# - name: (check) add tags -# ec2_vpc_vgw: -# tags: '{{ first_tags }}' -# state: 'present' -# register: tag_vgw -# check_mode: True -# -# - name: assert would change -# assert: -# that: -# - tag_vgw is changed -# - tag_vgw.vgw.id == vgw_id - - - name: add tags - ec2_vpc_vgw: - tags: '{{ first_tags }}' - state: 'present' - register: tag_vgw - - - name: get VPC VGW facts - ec2_vpc_vgw_info: {} - register: tag_vgw_info - - - name: verify the tags were added - assert: - that: - - tag_vgw is changed - - tag_vgw.vgw.id == vgw_id - - tag_vgw_info.virtual_gateways[0].vpn_gateway_id == vgw_id - - tag_vgw_info.virtual_gateways[0].resource_tags == ( first_tags | combine(name_tags) ) - -# - name: (check) add tags - IDEMPOTENCY -# ec2_vpc_vgw: -# tags: '{{ first_tags }}' -# state: 'present' -# register: tag_vgw -# check_mode: True -# -# - name: assert would not change -# assert: -# that: -# - tag_vgw is not changed -# - tag_vgw.vgw.id == vgw_id - - - name: add tags - IDEMPOTENCY - ec2_vpc_vgw: - tags: '{{ first_tags }}' - state: 'present' - register: tag_vgw - - name: get VPC VGW facts - ec2_vpc_vgw_info: {} - register: tag_vgw_info - - - name: verify no change - assert: - that: - - tag_vgw is not changed - - tag_vgw.vgw.id == vgw_id - - tag_vgw_info.virtual_gateways[0].vpn_gateway_id == vgw_id - - tag_vgw_info.virtual_gateways[0].resource_tags == ( first_tags | combine(name_tags) ) - - # ============================================================ - - - name: get VPC VGW facts by filter - ec2_vpc_vgw_info: - filters: - 'tag:Name': '{{ vgw_name }}' - vpn_gateway_ids: '{{ omit }}' - register: tag_vgw_info - - - name: assert the facts are the same as before - assert: - that: - - tag_vgw_info.virtual_gateways | length == 1 - - tag_vgw.vgw.id == vgw_id - - tag_vgw_info.virtual_gateways[0].vpn_gateway_id == vgw_id - - # ============================================================ - -# - name: (check) modify tags with purge -# ec2_vpc_vgw: -# tags: '{{ second_tags }}' -# state: 'present' -# register: tag_vgw -# check_mode: True -# -# - name: assert would change -# assert: -# that: -# - tag_vgw is changed -# - tag_vgw.vgw.id == vgw_id - - - name: modify tags with purge - ec2_vpc_vgw: - tags: '{{ second_tags }}' - state: 'present' - register: tag_vgw - - name: get VPC VGW facts - ec2_vpc_vgw_info: - register: tag_vgw_info - - - name: verify the tags were added - assert: - that: - - tag_vgw is changed - - tag_vgw.vgw.id == vgw_id - - tag_vgw_info.virtual_gateways[0].vpn_gateway_id == vgw_id - - tag_vgw_info.virtual_gateways[0].resource_tags == ( second_tags | combine(name_tags) ) - -# - name: (check) modify tags with purge - IDEMPOTENCY -# ec2_vpc_vgw: -# tags: '{{ second_tags }}' -# state: 'present' -# register: tag_vgw -# check_mode: True -# -# - name: assert would not change -# assert: -# that: -# - tag_vgw is not changed -# - tag_vgw.vgw.id == vgw_id - - - name: modify tags with purge - IDEMPOTENCY - ec2_vpc_vgw: - tags: '{{ second_tags }}' - state: 'present' - register: tag_vgw - - name: get VPC VGW facts - ec2_vpc_vgw_info: - register: tag_vgw_info - - - name: verify no change - assert: - that: - - tag_vgw is not changed - - tag_vgw.vgw.id == vgw_id - - tag_vgw_info.virtual_gateways[0].vpn_gateway_id == vgw_id - - tag_vgw_info.virtual_gateways[0].resource_tags == ( second_tags | combine(name_tags) ) - - # ============================================================ - -# - name: (check) modify tags without purge -# ec2_vpc_vgw: -# tags: '{{ third_tags }}' -# state: 'present' -# purge_tags: False -# register: tag_vgw -# check_mode: True -# -# - name: assert would change -# assert: -# that: -# - tag_vgw is changed -# - tag_vgw.vgw.id == vgw_id - - - name: modify tags without purge - ec2_vpc_vgw: - tags: '{{ third_tags }}' - state: 'present' - purge_tags: False - register: tag_vgw - - name: get VPC VGW facts - ec2_vpc_vgw_info: - register: tag_vgw_info - - - name: verify the tags were added - assert: - that: - - tag_vgw is changed - - tag_vgw.vgw.id == vgw_id - - tag_vgw_info.virtual_gateways[0].vpn_gateway_id == vgw_id - - tag_vgw_info.virtual_gateways[0].resource_tags == ( final_tags | combine(name_tags) ) - -# - name: (check) modify tags without purge - IDEMPOTENCY -# ec2_vpc_vgw: -# tags: '{{ third_tags }}' -# state: 'present' -# purge_tags: False -# register: tag_vgw -# check_mode: True -# -# - name: assert would not change -# assert: -# that: -# - tag_vgw is not changed -# - tag_vgw.vgw.id == vgw_id - - - name: modify tags without purge - IDEMPOTENCY - ec2_vpc_vgw: - tags: '{{ third_tags }}' - state: 'present' - purge_tags: False - register: tag_vgw - - name: get VPC VGW facts - ec2_vpc_vgw_info: - register: tag_vgw_info - - - name: verify no change - assert: - that: - - tag_vgw is not changed - - tag_vgw.vgw.id == vgw_id - - tag_vgw_info.virtual_gateways[0].vpn_gateway_id == vgw_id - - tag_vgw_info.virtual_gateways[0].resource_tags == ( final_tags | combine(name_tags) ) - - # ============================================================ - -# - name: (check) No change to tags without setting tags -# ec2_vpc_vgw: -# state: 'present' -# register: tag_vgw -# check_mode: True -# -# - name: assert would change -# assert: -# that: -# - tag_vgw is not changed -# - tag_vgw.vgw.id == vgw_id - - - name: No change to tags without setting tags - ec2_vpc_vgw: - state: 'present' - register: tag_vgw - - name: get VPC VGW facts - ec2_vpc_vgw_info: - register: tag_vgw_info - - - name: verify the tags were added - assert: - that: - - tag_vgw is not changed - - tag_vgw.vgw.id == vgw_id - - tag_vgw_info.virtual_gateways[0].vpn_gateway_id == vgw_id - - tag_vgw_info.virtual_gateways[0].resource_tags == ( final_tags | combine(name_tags) ) - - # ============================================================ - -# - name: (check) remove non name tags -# ec2_vpc_vgw: -# tags: {} -# state: 'present' -# register: tag_vgw -# check_mode: True -# -# - name: assert would change -# assert: -# that: -# - tag_vgw is changed -# - tag_vgw.vgw.id == vgw_id - - - name: remove non name tags - ec2_vpc_vgw: - tags: {} - state: 'present' - register: tag_vgw - - name: get VPC VGW facts - ec2_vpc_vgw_info: - register: tag_vgw_info - - - name: verify the tags were added - assert: - that: - - tag_vgw is changed - - tag_vgw.vgw.id == vgw_id - - tag_vgw_info.virtual_gateways[0].vpn_gateway_id == vgw_id - - tag_vgw_info.virtual_gateways[0].resource_tags == name_tags - -# - name: (check) remove non name tags - IDEMPOTENCY -# ec2_vpc_vgw: -# tags: {} -# state: 'present' -# register: tag_vgw -# check_mode: True -# -# - name: assert would not change -# assert: -# that: -# - tag_vgw is not changed -# - tag_vgw.vgw.id == vgw_id - - - name: remove non name tags - IDEMPOTENCY - ec2_vpc_vgw: - tags: {} - state: 'present' - register: tag_vgw - - name: get VPC VGW facts - ec2_vpc_vgw_info: - register: tag_vgw_info - - - name: verify no change - assert: - that: - - tag_vgw is not changed - - tag_vgw.vgw.id == vgw_id - - tag_vgw_info.virtual_gateways[0].vpn_gateway_id == vgw_id - - tag_vgw_info.virtual_gateways[0].resource_tags == name_tags diff --git a/tests/integration/targets/ec2_vpc_vpn/aliases b/tests/integration/targets/ec2_vpc_vpn/aliases deleted file mode 100644 index 28e84af91be..00000000000 --- a/tests/integration/targets/ec2_vpc_vpn/aliases +++ /dev/null @@ -1,3 +0,0 @@ -cloud/aws - -ec2_vpc_vpn_info diff --git a/tests/integration/targets/ec2_vpc_vpn/meta/main.yml b/tests/integration/targets/ec2_vpc_vpn/meta/main.yml deleted file mode 100644 index 32cf5dda7ed..00000000000 --- a/tests/integration/targets/ec2_vpc_vpn/meta/main.yml +++ /dev/null @@ -1 +0,0 @@ -dependencies: [] diff --git a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml deleted file mode 100644 index 9514d7cf350..00000000000 --- a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml +++ /dev/null @@ -1,228 +0,0 @@ ---- -- name: 'ec2_vpc_vpn_info integration tests' - collections: - - amazon.aws - module_defaults: - group/aws: - access_key: '{{ aws_access_key }}' - secret_key: '{{ aws_secret_key }}' - session_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region }}' - block: - - # ============================================================ - - name: create a VPC - ec2_vpc_net: - name: "{{ resource_prefix }}-vpc" - state: present - cidr_block: "10.0.0.0/26" - tags: - Name: "{{ resource_prefix }}-vpc" - Description: "Created by ansible-test" - register: vpc_result - - - name: create vpn gateway and attach it to vpc - ec2_vpc_vgw: - state: present - vpc_id: '{{ vpc_result.vpc.id }}' - name: "{{ resource_prefix }}-vgw" - register: vgw - - - name: create customer gateway - ec2_customer_gateway: - bgp_asn: 12345 - ip_address: 1.2.3.4 - name: testcgw - register: cgw - - - name: create transit gateway - ec2_transit_gateway: - description: "Transit Gateway for vpn attachment" - register: tgw - - - name: create vpn connection, with customer gateway, vpn_gateway_id and transit_gateway - ec2_vpc_vpn: - customer_gateway_id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' - vpn_gateway_id: '{{ vgw.vgw.id }}' - transit_gateway_id: '{{ tgw.transit_gateway.transit_gateway_id }}' - state: present - register: result - ignore_errors: true - - - name: assert creation of vpn failed - assert: - that: - - result is failed - - result.msg == "parameters are mutually exclusive: vpn_gateway_id|transit_gateway_id" - - - - name: create vpn connection, with customer gateway and transit_gateway - ec2_vpc_vpn: - customer_gateway_id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' - transit_gateway_id: '{{ tgw.transit_gateway.transit_gateway_id }}' - state: present - register: tgw_vpn - - - name: Store ID of VPN - set_fact: - vpn_id: '{{ tgw_vpn.vpn_connection_id }}' - - # ============================================================ - - name: test success with no parameters - ec2_vpc_vpn_info: - register: result - - - name: assert success with no parameters - assert: - that: - - 'result.changed == false' - - 'result.vpn_connections != []' - # ============================================================ - - - name: Delete vpn created with transit gateway - ec2_vpc_vpn: - state: absent - vpn_connection_id: '{{ vpn_id }}' - register: result - retries: 10 - delay: 3 - until: result is not failed - ignore_errors: true - - # ============================================================ - - - name: create vpn connection, with customer gateway and vpn gateway - ec2_vpc_vpn: - customer_gateway_id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' - vpn_gateway_id: '{{ vgw.vgw.id }}' - state: present - register: vpn - - - name: Store ID of VPN - set_fact: - vpn_id: '{{ vpn.vpn_connection_id }}' - - # ============================================================ - - - name: test success with no parameters - ec2_vpc_vpn_info: - register: result - - - name: assert success with no parameters - assert: - that: - - 'result.changed == false' - - 'result.vpn_connections != []' - - - name: test success with customer gateway id as a filter - ec2_vpc_vpn_info: - filters: - customer-gateway-id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' - vpn-connection-id: '{{ vpn.vpn_connection_id }}' - register: result - - - name: assert success with customer gateway id as filter - assert: - that: - - 'result.changed == false' - - 'result.vpn_connections != []' - - # ============================================================ - - - include_tasks: 'tags.yml' - - # ============================================================ - - - name: delete vpn connection (check) - ec2_vpc_vpn: - state: absent - vpn_connection_id: '{{ vpn_id }}' - register: result - check_mode: True - - - assert: - that: - - result is changed - - - name: delete vpn connection - ec2_vpc_vpn: - state: absent - vpn_connection_id: '{{ vpn_id }}' - register: result - - - assert: - that: - - result is changed - - - name: delete vpn connection - idempotency (check) - ec2_vpc_vpn: - state: absent - vpn_connection_id: '{{ vpn_id }}' - register: result - check_mode: True - - - assert: - that: - - result is not changed - - - name: delete vpn connection - idempotency - ec2_vpc_vpn: - state: absent - vpn_connection_id: '{{ vpn_id }}' - register: result - - - assert: - that: - - result is not changed - - # ============================================================ - always: - - - name: delete vpn connection - ec2_vpc_vpn: - state: absent - vpn_connection_id: '{{ vpn.vpn_connection_id }}' - register: result - retries: 10 - delay: 3 - until: result is not failed - ignore_errors: true - - - name: delete customer gateway - ec2_customer_gateway: - state: absent - ip_address: 1.2.3.4 - name: testcgw - bgp_asn: 12345 - register: result - retries: 10 - delay: 3 - until: result is not failed - ignore_errors: true - - - name: delete vpn gateway - ec2_vpc_vgw: - state: absent - vpn_gateway_id: '{{ vgw.vgw.id }}' - register: result - retries: 10 - delay: 3 - until: result is not failed - ignore_errors: true - - - name: delete vpc - ec2_vpc_net: - name: "{{ resource_prefix }}-vpc" - state: absent - cidr_block: "10.0.0.0/26" - register: result - retries: 10 - delay: 3 - until: result is not failed - ignore_errors: true - - - name: delete transit gateway - ec2_transit_gateway: - transit_gateway_id: '{{ tgw.transit_gateway.transit_gateway_id }}' - state: absent - ignore_errors: true diff --git a/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml b/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml deleted file mode 100644 index fb97f01faab..00000000000 --- a/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml +++ /dev/null @@ -1,338 +0,0 @@ -- vars: - first_tags: - 'Key with Spaces': Value with spaces - CamelCaseKey: CamelCaseValue - pascalCaseKey: pascalCaseValue - snake_case_key: snake_case_value - second_tags: - 'New Key with Spaces': Value with spaces - NewCamelCaseKey: CamelCaseValue - newPascalCaseKey: pascalCaseValue - new_snake_case_key: snake_case_value - third_tags: - 'Key with Spaces': Value with spaces - CamelCaseKey: CamelCaseValue - pascalCaseKey: pascalCaseValue - snake_case_key: snake_case_value - 'New Key with Spaces': Updated Value with spaces - final_tags: - 'Key with Spaces': Value with spaces - CamelCaseKey: CamelCaseValue - pascalCaseKey: pascalCaseValue - snake_case_key: snake_case_value - 'New Key with Spaces': Updated Value with spaces - NewCamelCaseKey: CamelCaseValue - newPascalCaseKey: pascalCaseValue - new_snake_case_key: snake_case_value - module_defaults: - ec2_vpc_vpn: - vpn_connection_id: '{{ vpn_id }}' - ec2_vpc_vpn_info: - filters: - vpn-connection-id: '{{ vpn_id }}' - block: - - # ============================================================ - - - name: (check) add tags - ec2_vpc_vpn: - tags: '{{ first_tags }}' - state: 'present' - register: tag_vpn - check_mode: True - - - name: assert would change - assert: - that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - - name: add tags - ec2_vpc_vpn: - tags: '{{ first_tags }}' - state: 'present' - register: tag_vpn - - - name: get VPC VPN facts - ec2_vpc_vpn_info: {} - register: tag_vpn_info - - - name: verify the tags were added - assert: - that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == first_tags - - - name: (check) add tags - IDEMPOTENCY - ec2_vpc_vpn: - tags: '{{ first_tags }}' - state: 'present' - register: tag_vpn - check_mode: True - - - name: assert would not change - assert: - that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - - name: add tags - IDEMPOTENCY - ec2_vpc_vpn: - tags: '{{ first_tags }}' - state: 'present' - register: tag_vpn - - name: get VPC VPN facts - ec2_vpc_vpn_info: {} - register: tag_vpn_info - - - name: verify no change - assert: - that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == first_tags - - # ============================================================ - -# - name: get VPC VPN facts by filter -# ec2_vpc_vpn_info: -# filters: -# 'tag:Name': '{{ vgw_name }}' -# vpn_connection_ids: '{{ omit }}' -# register: tag_vpn_info -# -# - name: assert the facts are the same as before -# assert: -# that: -# - tag_vpn_info.vpn_connections | length == 1 -# - tag_vpn.vpn_connection_id == vpn_id -# - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - # ============================================================ - - - name: (check) modify tags with purge - ec2_vpc_vpn: - tags: '{{ second_tags }}' - state: 'present' - purge_tags: true - register: tag_vpn - check_mode: True - - - name: assert would change - assert: - that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - - name: modify tags with purge - ec2_vpc_vpn: - tags: '{{ second_tags }}' - state: 'present' - purge_tags: true - register: tag_vpn - - name: get VPC VPN facts - ec2_vpc_vpn_info: - register: tag_vpn_info - - - name: verify the tags were added - assert: - that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == second_tags - - - name: (check) modify tags with purge - IDEMPOTENCY - ec2_vpc_vpn: - tags: '{{ second_tags }}' - state: 'present' - purge_tags: true - register: tag_vpn - check_mode: True - - - name: assert would not change - assert: - that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - - name: modify tags with purge - IDEMPOTENCY - ec2_vpc_vpn: - tags: '{{ second_tags }}' - state: 'present' - purge_tags: true - register: tag_vpn - - name: get VPC VPN facts - ec2_vpc_vpn_info: - register: tag_vpn_info - - - name: verify no change - assert: - that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == second_tags - - # ============================================================ - - - name: (check) modify tags without purge - ec2_vpc_vpn: - tags: '{{ third_tags }}' - state: 'present' - purge_tags: False - register: tag_vpn - check_mode: True - - - name: assert would change - assert: - that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - - name: modify tags without purge - ec2_vpc_vpn: - tags: '{{ third_tags }}' - state: 'present' - purge_tags: False - register: tag_vpn - - name: get VPC VPN facts - ec2_vpc_vpn_info: - register: tag_vpn_info - - - name: verify the tags were added - assert: - that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == final_tags - - - name: (check) modify tags without purge - IDEMPOTENCY - ec2_vpc_vpn: - tags: '{{ third_tags }}' - state: 'present' - purge_tags: False - register: tag_vpn - check_mode: True - - - name: assert would not change - assert: - that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - - name: modify tags without purge - IDEMPOTENCY - ec2_vpc_vpn: - tags: '{{ third_tags }}' - state: 'present' - purge_tags: False - register: tag_vpn - - name: get VPC VPN facts - ec2_vpc_vpn_info: - register: tag_vpn_info - - - name: verify no change - assert: - that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == final_tags - - # ============================================================ - - - name: (check) No change to tags without setting tags - ec2_vpc_vpn: - state: 'present' - register: tag_vpn - check_mode: True - - - name: assert would change - assert: - that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - - name: No change to tags without setting tags - ec2_vpc_vpn: - state: 'present' - register: tag_vpn - - name: get VPC VPN facts - ec2_vpc_vpn_info: - register: tag_vpn_info - - - name: verify no tags were added - assert: - that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == final_tags - - # ============================================================ - - - name: (check) remove tags - ec2_vpc_vpn: - tags: {} - state: 'present' - purge_tags: True - register: tag_vpn - check_mode: True - - - name: assert would change - assert: - that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - - name: remove tags - ec2_vpc_vpn: - tags: {} - state: 'present' - purge_tags: True - register: tag_vpn - - name: get VPC VPN facts - ec2_vpc_vpn_info: - register: tag_vpn_info - - - name: verify the tags were removed - assert: - that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - - name: (check) remove tags - IDEMPOTENCY - ec2_vpc_vpn: - tags: {} - state: 'present' - purge_tags: True - register: tag_vpn - check_mode: True - - - name: assert would not change - assert: - that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - - name: remove tags - IDEMPOTENCY - ec2_vpc_vpn: - tags: {} - state: 'present' - purge_tags: True - register: tag_vpn - - name: get VPC VPN facts - ec2_vpc_vpn_info: - register: tag_vpn_info - - - name: verify no change - assert: - that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id diff --git a/tests/integration/targets/elb_classic_lb_info/aliases b/tests/integration/targets/elb_classic_lb_info/aliases deleted file mode 100644 index 4ef4b2067d0..00000000000 --- a/tests/integration/targets/elb_classic_lb_info/aliases +++ /dev/null @@ -1 +0,0 @@ -cloud/aws diff --git a/tests/integration/targets/elb_classic_lb_info/defaults/main.yml b/tests/integration/targets/elb_classic_lb_info/defaults/main.yml deleted file mode 100644 index bd059e26ea7..00000000000 --- a/tests/integration/targets/elb_classic_lb_info/defaults/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# defaults file for test_ec2_eip -elb_name: 'ansible-test-{{ tiny_prefix }}-ecli' diff --git a/tests/integration/targets/elb_classic_lb_info/meta/main.yml b/tests/integration/targets/elb_classic_lb_info/meta/main.yml deleted file mode 100644 index 32cf5dda7ed..00000000000 --- a/tests/integration/targets/elb_classic_lb_info/meta/main.yml +++ /dev/null @@ -1 +0,0 @@ -dependencies: [] diff --git a/tests/integration/targets/elb_classic_lb_info/tasks/main.yml b/tests/integration/targets/elb_classic_lb_info/tasks/main.yml deleted file mode 100644 index b09e8807269..00000000000 --- a/tests/integration/targets/elb_classic_lb_info/tasks/main.yml +++ /dev/null @@ -1,311 +0,0 @@ ---- -# __Test Info__ -# Create a self signed cert and upload it to AWS -# http://www.akadia.com/services/ssh_test_certificate.html -# http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/ssl-server-cert.html - -# __Test Outline__ -# -# __elb_classic_lb__ -# create test elb with listeners and certificate -# change AZ's -# change listeners -# remove listeners -# remove elb - -# __elb_classic_lb_info_ -# get nonexistent load balancer - -- module_defaults: - group/aws: - region: "{{ aws_region }}" - access_key: "{{ aws_access_key }}" - secret_key: "{{ aws_secret_key }}" - session_token: "{{ security_token | default(omit) }}" - block: - - # ============================================================ - # create test elb with listeners, certificate, and health check - - - name: Create ELB - elb_classic_lb: - name: "{{ elb_name }}" - state: present - zones: - - "{{ aws_region }}a" - - "{{ aws_region }}b" - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - - protocol: http - load_balancer_port: 8080 - instance_port: 8080 - health_check: - ping_protocol: http - ping_port: 80 - ping_path: "/index.html" - response_timeout: 5 - interval: 30 - unhealthy_threshold: 2 - healthy_threshold: 10 - register: create - - - assert: - that: - - create is changed - # We rely on these for the info test, make sure they're what we expect - - aws_region ~ 'a' in create.elb.zones - - aws_region ~ 'b' in create.elb.zones - - create.elb.health_check.healthy_threshold == 10 - - create.elb.health_check.interval == 30 - - create.elb.health_check.target == "HTTP:80/index.html" - - create.elb.health_check.timeout == 5 - - create.elb.health_check.unhealthy_threshold == 2 - - '[80, 80, "HTTP", "HTTP"] in create.elb.listeners' - - '[8080, 8080, "HTTP", "HTTP"] in create.elb.listeners' - - - name: Get ELB info - elb_classic_lb_info: - names: "{{ elb_name }}" - register: info - - - assert: - that: - - info.elbs|length == 1 - - elb.availability_zones|length == 2 - - aws_region ~ 'a' in elb.availability_zones - - aws_region ~ 'b' in elb.availability_zones - - elb.health_check.healthy_threshold == 10 - - elb.health_check.interval == 30 - - elb.health_check.target == "HTTP:80/index.html" - - elb.health_check.timeout == 5 - - elb.health_check.unhealthy_threshold == 2 - - '{"instance_port": 80, "instance_protocol": "HTTP", "load_balancer_port": 80, "protocol": "HTTP"} == listeners[0]' - - '{"instance_port": 8080, "instance_protocol": "HTTP", "load_balancer_port": 8080, "protocol": "HTTP"} == listeners[1]' - vars: - elb: "{{ info.elbs[0] }}" - listeners: "{{ elb.listener_descriptions|map(attribute='listener')|sort(attribute='load_balancer_port') }}" - - # ============================================================ - - # check ports, would be cool, but we are at the mercy of AWS - # to start things in a timely manner - - #- name: check to make sure 80 is listening - # wait_for: host={{ info.elb.dns_name }} port=80 timeout=600 - # register: result - - #- name: assert can connect to port# - # assert: 'result.state == "started"' - - #- name: check to make sure 443 is listening - # wait_for: host={{ info.elb.dns_name }} port=443 timeout=600 - # register: result - - #- name: assert can connect to port# - # assert: 'result.state == "started"' - - # ============================================================ - - # Change AZ's - - - name: Change AZ's - elb_classic_lb: - name: "{{ elb_name }}" - state: present - zones: - - "{{ aws_region }}c" - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - purge_zones: yes - health_check: - ping_protocol: http - ping_port: 80 - ping_path: "/index.html" - response_timeout: 5 - interval: 30 - unhealthy_threshold: 2 - healthy_threshold: 10 - register: update_az - - - assert: - that: - - update_az is changed - - update_az.elb.zones[0] == aws_region ~ 'c' - - - name: Get ELB info after changing AZ's - elb_classic_lb_info: - names: "{{ elb_name }}" - register: info - - - assert: - that: - - elb.availability_zones|length == 1 - - aws_region ~ 'c' in elb.availability_zones[0] - vars: - elb: "{{ info.elbs[0] }}" - - # ============================================================ - - # Update AZ's - - - name: Update AZ's - elb_classic_lb: - name: "{{ elb_name }}" - state: present - zones: - - "{{ aws_region }}a" - - "{{ aws_region }}b" - - "{{ aws_region }}c" - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - purge_zones: yes - register: update_az - - - assert: - that: - - update_az is changed - - aws_region ~ 'a' in update_az.elb.zones - - aws_region ~ 'b' in update_az.elb.zones - - aws_region ~ 'c' in update_az.elb.zones - - - name: Get ELB info after updating AZ's - elb_classic_lb_info: - names: "{{ elb_name }}" - register: info - - - assert: - that: - - elb.availability_zones|length == 3 - - aws_region ~ 'a' in elb.availability_zones - - aws_region ~ 'b' in elb.availability_zones - - aws_region ~ 'c' in elb.availability_zones - vars: - elb: "{{ info.elbs[0] }}" - - # ============================================================ - - # Purge Listeners - - - name: Purge Listeners - elb_classic_lb: - name: "{{ elb_name }}" - state: present - zones: - - "{{ aws_region }}a" - - "{{ aws_region }}b" - - "{{ aws_region }}c" - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 81 - purge_listeners: yes - register: purge_listeners - - - assert: - that: - - purge_listeners is changed - - '[80, 81, "HTTP", "HTTP"] in purge_listeners.elb.listeners' - - purge_listeners.elb.listeners|length == 1 - - - name: Get ELB info after purging listeners - elb_classic_lb_info: - names: "{{ elb_name }}" - register: info - - - assert: - that: - - elb.listener_descriptions|length == 1 - - '{"instance_port": 81, "instance_protocol": "HTTP", "load_balancer_port": 80, "protocol": "HTTP"} == elb.listener_descriptions[0].listener' - vars: - elb: "{{ info.elbs[0] }}" - - - # ============================================================ - - # add Listeners - - - name: Add Listeners - elb_classic_lb: - name: "{{ elb_name }}" - state: present - zones: - - "{{ aws_region }}a" - - "{{ aws_region }}b" - - "{{ aws_region }}c" - listeners: - - protocol: http - load_balancer_port: 8081 - instance_port: 8081 - purge_listeners: no - register: update_listeners - - - assert: - that: - - update_listeners is changed - - '[80, 81, "HTTP", "HTTP"] in update_listeners.elb.listeners' - - '[8081, 8081, "HTTP", "HTTP"] in update_listeners.elb.listeners' - - update_listeners.elb.listeners|length == 2 - - - name: Get ELB info after adding listeners - elb_classic_lb_info: - names: "{{ elb_name }}" - register: info - - - assert: - that: - - elb.listener_descriptions|length == 2 - - '{"instance_port": 81, "instance_protocol": "HTTP", "load_balancer_port": 80, "protocol": "HTTP"} == listeners[0]' - - '{"instance_port": 8081, "instance_protocol": "HTTP", "load_balancer_port": 8081, "protocol": "HTTP"} == listeners[1]' - vars: - elb: "{{ info.elbs[0] }}" - listeners: "{{ elb.listener_descriptions|map(attribute='listener')|sort(attribute='load_balancer_port') }}" - - # ============================================================ - - # Test getting nonexistent load balancer - - name: get nonexistent load balancer - elb_classic_lb_info: - names: "invalid-elb" - register: info - - - assert: - that: - - info.elbs|length==0 - - # Test getting a valid and nonexistent load balancer - - name: get nonexistent load balancer - elb_classic_lb_info: - names: ["{{ elb_name }}", "invalid-elb"] - register: info - - - assert: - that: - - info.elbs|length==1 - - info.elbs[0].load_balancer_name == elb_name - - # ============================================================ - - - name: get all load balancers - elb_classic_lb_info: - names: "{{ omit }}" - register: info - - - assert: - that: - - info.elbs|length>0 - - always: - - # ============================================================ - - name: remove the test load balancer completely - elb_classic_lb: - name: "{{ elb_name }}" - state: absent - register: result - ignore_errors: true diff --git a/tests/integration/targets/elb_classic_lb_info/vars/main.yml b/tests/integration/targets/elb_classic_lb_info/vars/main.yml deleted file mode 100644 index 79194af1ef5..00000000000 --- a/tests/integration/targets/elb_classic_lb_info/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for test_ec2_elb_lb diff --git a/tests/integration/targets/elb_network_lb/tasks/generate-certs.yml b/tests/integration/targets/elb_network_lb/tasks/generate-certs.yml index a79289a958d..dccfa6df65b 100644 --- a/tests/integration/targets/elb_network_lb/tasks/generate-certs.yml +++ b/tests/integration/targets/elb_network_lb/tasks/generate-certs.yml @@ -4,7 +4,7 @@ - name: 'Generate SSL Keys' community.crypto.openssl_privatekey: path: '{{ remote_tmp_dir }}/{{ item }}-key.pem' - size: 4096 + size: 3072 loop: - 'ca' - 'cert1' diff --git a/tests/integration/targets/ses_identity/tasks/main.yaml b/tests/integration/targets/ses_identity/tasks/main.yaml index 3ecb68c38de..79008346a84 100644 --- a/tests/integration/targets/ses_identity/tasks/main.yaml +++ b/tests/integration/targets/ses_identity/tasks/main.yaml @@ -15,7 +15,7 @@ block: - name: register email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-email" state: present register: result - name: assert changed is True @@ -24,18 +24,18 @@ - result.changed == True - import_tasks: assert_defaults.yaml vars: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-email" always: - name: cleanup email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-email" state: absent # ============================================================ - name: test register domain identity block: - name: register domain identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-domain" state: present register: result - name: assert changed is True @@ -44,7 +44,7 @@ - result.changed == True - import_tasks: assert_defaults.yaml vars: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-domain" - name: assert verification_attributes.verification_token is defined assert: that: @@ -52,18 +52,18 @@ always: - name: cleanup domain identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-domain" state: absent # ============================================================ - name: test email_identity unchanged when already existing block: - name: register identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-duplicate" state: present - name: duplicate register identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-duplicate" state: present register: result - name: assert changed is False @@ -72,22 +72,22 @@ - result.changed == False - import_tasks: assert_defaults.yaml vars: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-duplicate" always: - name: cleanup identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-duplicate" state: absent # ============================================================ - name: test domain_identity unchanged when already existing block: - name: register identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-duplicate" state: present - name: duplicate register identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-duplicate" state: present register: result - name: assert changed is False @@ -96,11 +96,11 @@ - result.changed == False - import_tasks: assert_defaults.yaml vars: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-duplicate" always: - name: cleanup identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-duplicate" state: absent # ============================================================ # Test for https://github.com/ansible/ansible/issues/51531 @@ -111,7 +111,7 @@ block: - name: register email identity without explicit region ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-noregion" state: present region: "{{ omit }}" register: result @@ -123,18 +123,18 @@ - result.changed == True - import_tasks: assert_defaults.yaml vars: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-noregion" always: - name: cleanup email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-noregion" state: absent # ============================================================ - name: test register email identity check mode block: - name: register email identity check mode ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-check" state: present register: result check_mode: True @@ -146,12 +146,12 @@ - import_tasks: assert_defaults.yaml vars: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-check" always: - name: cleanup email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-check" state: absent register: result @@ -164,7 +164,7 @@ block: - name: register domain identity check mode ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-domain-check" state: present register: result check_mode: True @@ -176,12 +176,12 @@ - import_tasks: assert_defaults.yaml vars: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-domain-check" always: - name: cleanup domain identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-domain-check" state: absent register: result @@ -192,7 +192,7 @@ # ============================================================ - name: remove non-existent email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-missing" state: absent register: result - name: assert changed is False @@ -202,7 +202,7 @@ # ============================================================ - name: remove non-existent domain identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-missing-domain" state: absent register: result - name: assert changed is False @@ -214,13 +214,13 @@ block: - name: register email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-remove-check" state: present register: result - name: remove email identity check mode ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-remove-check" state: absent register: result check_mode: True @@ -232,7 +232,7 @@ always: - name: cleanup email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-remove-check" state: absent register: result @@ -245,13 +245,13 @@ block: - name: register domain identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-remove-domain-check" state: present register: result - name: remove domain identity check mode ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-remove-domain-check" state: absent register: result check_mode: True @@ -263,7 +263,7 @@ always: - name: cleanup domain identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-remove-domain-check" state: absent register: result @@ -285,7 +285,7 @@ - delivery - name: register email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics" state: present bounce_notifications: topic: "{{ topic_info.results[0].sns_arn }}" @@ -317,7 +317,7 @@ - delivery - name: cleanup email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics" state: absent # ============================================================ - name: test change notification queues after create @@ -333,11 +333,11 @@ - delivery - name: register email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-post" state: present - name: set notification topics ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-post" state: present bounce_notifications: topic: "{{ topic_info.results[0].sns_arn }}" @@ -367,7 +367,7 @@ - delivery - name: cleanup email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-post" state: absent # ============================================================ - name: test clear notification configuration @@ -383,7 +383,7 @@ - delivery - name: register email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-clear" state: present bounce_notifications: topic: "{{ topic_info.results[0].sns_arn }}" @@ -393,7 +393,7 @@ topic: "{{ topic_info.results[2].sns_arn }}" - name: Make no change to identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-clear" state: present register: result - name: assert no change @@ -403,7 +403,7 @@ - name: clear notification settings ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-clear" state: present bounce_notifications: {} complaint_notifications: {} @@ -427,7 +427,7 @@ - delivery - name: cleanup email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-clear" state: absent # ============================================================ - name: test change notification settings check mode @@ -444,12 +444,12 @@ - name: register email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-check" state: present - name: set notification settings check mode ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-check" state: present bounce_notifications: topic: "{{ topic_info.results[0].sns_arn }}" @@ -482,7 +482,7 @@ - name: re-register base email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-check" state: present register: result @@ -509,14 +509,14 @@ - name: cleanup email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-topics-check" state: absent # ============================================================ - name: test include headers on notification queues block: - name: register email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-headers" state: present bounce_notifications: include_headers: Yes @@ -534,7 +534,7 @@ always: - name: cleanup email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-headers" state: absent # ============================================================ - name: test disable feedback forwarding @@ -549,7 +549,7 @@ - complaint - name: register email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-feedback" state: present bounce_notifications: topic: "{{ topic_info.results[0].sns_arn }}" @@ -571,14 +571,14 @@ - complaint - name: cleanup email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-feedback" state: absent # ============================================================ - name: test disable feedback forwarding fails if no topics block: - name: register identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-feedback-nt" state: present feedback_forwarding: No register: result @@ -590,7 +590,7 @@ always: - name: cleanup identity ses_identity: - identity: "{{ domain_identity }}" + identity: "{{ domain_identity }}-feedback-nt" state: absent # ============================================================ - name: test disable feedback forwarding fails if no complaint topic @@ -602,7 +602,7 @@ register: topic_info - name: register email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-feedback-nb" state: present bounce_notifications: topic: "{{ topic_info.sns_arn }}" @@ -620,7 +620,7 @@ state: absent - name: cleanup identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-feedback-nb" state: absent # ============================================================ - name: test disable feedback forwarding fails if no bounce topic @@ -632,7 +632,7 @@ register: topic_info - name: register email identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-feedback-nc" state: present complaint_notifications: topic: "{{ topic_info.sns_arn }}" @@ -650,5 +650,5 @@ state: absent - name: cleanup identity ses_identity: - identity: "{{ email_identity }}" + identity: "{{ email_identity }}-feedback-nc" state: absent diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index e846a866640..67d3693df63 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -1,4 +1,2 @@ plugins/connection/aws_ssm.py yamllint:unparsable-with-libyaml # bug in ansible-test - https://github.com/ansible/ansible/issues/82353 plugins/inventory/aws_mq.py yamllint:unparsable-with-libyaml # bug in ansible-test - https://github.com/ansible/ansible/issues/82353 -plugins/modules/ecs_cluster.py pylint:collection-deprecated-version -plugins/modules/glue_connection.py pylint:collection-deprecated-version diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt index e846a866640..67d3693df63 100644 --- a/tests/sanity/ignore-2.16.txt +++ b/tests/sanity/ignore-2.16.txt @@ -1,4 +1,2 @@ plugins/connection/aws_ssm.py yamllint:unparsable-with-libyaml # bug in ansible-test - https://github.com/ansible/ansible/issues/82353 plugins/inventory/aws_mq.py yamllint:unparsable-with-libyaml # bug in ansible-test - https://github.com/ansible/ansible/issues/82353 -plugins/modules/ecs_cluster.py pylint:collection-deprecated-version -plugins/modules/glue_connection.py pylint:collection-deprecated-version diff --git a/tests/sanity/ignore-2.17.txt b/tests/sanity/ignore-2.17.txt index e925c5a05f2..e69de29bb2d 100644 --- a/tests/sanity/ignore-2.17.txt +++ b/tests/sanity/ignore-2.17.txt @@ -1,2 +0,0 @@ -plugins/modules/ecs_cluster.py pylint:collection-deprecated-version -plugins/modules/glue_connection.py pylint:collection-deprecated-version diff --git a/tests/sanity/ignore-2.18.txt b/tests/sanity/ignore-2.18.txt index e925c5a05f2..e69de29bb2d 100644 --- a/tests/sanity/ignore-2.18.txt +++ b/tests/sanity/ignore-2.18.txt @@ -1,2 +0,0 @@ -plugins/modules/ecs_cluster.py pylint:collection-deprecated-version -plugins/modules/glue_connection.py pylint:collection-deprecated-version diff --git a/tests/integration/targets/autoscaling_instance_refresh/vars/main.yml b/tests/sanity/ignore-2.19.txt similarity index 100% rename from tests/integration/targets/autoscaling_instance_refresh/vars/main.yml rename to tests/sanity/ignore-2.19.txt diff --git a/tests/unit/constraints.txt b/tests/unit/constraints.txt index 5708323f110..c2fad718813 100644 --- a/tests/unit/constraints.txt +++ b/tests/unit/constraints.txt @@ -1,7 +1,7 @@ # Specifically run tests against the oldest versions that we support -botocore==1.29.0 -boto3==1.26.0 +botocore==1.31.0 +boto3==1.28.0 # AWS CLI has `botocore==` dependencies, provide the one that matches botocore # to avoid needing to download over a years worth of awscli wheels. -awscli==1.27.0 +awscli==1.29.0 diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/__init__.py b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json deleted file mode 100644 index 2b8018f2548..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "22cf9d88-b0ca-4a6c-8bfa-a2969541f25b", - "HTTPHeaders": { - "content-length": "249", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:18:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json deleted file mode 100644 index 540cb22d86b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ee7493f2-1db0-4edb-a2c8-66dc31c41df8", - "HTTPHeaders": { - "content-length": "249", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:18:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json deleted file mode 100644 index 16510d83d40..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9b06e28e", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b0fe4793-77a1-4c92-978c-975c7b963c59", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5234", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:07 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index 30d8ac08ee9..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "92162d1f-1563-4b14-8fc5-0821c50687cb", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:18:48 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 97f64fd2526..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "Tags": [ - { - "Key": "Ansible-Test", - "Value": "VPN" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "Tags": [ - { - "Key": "One", - "Value": "one" - }, - { - "Key": "Two", - "Value": "two" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "9843e24b-c094-451f-9be3-3f859dc39385", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5887", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:06 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index d67ec8ac010..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "d5d76451-0539-4de2-a197-dac87c4eb91b", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:17:13 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index c61544026a8..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 23, - "minute": 17, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7906c368-77fc-4afc-9ee4-c822dab4864e", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:17:29 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index 95032ac3f5b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 23, - "minute": 17, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b9e2ca97-e467-4dcc-a8fc-eff788e8ed49", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:17:44 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index 76d21af3c23..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 23, - "minute": 17, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "249f8e82-8137-4b69-8002-969e880dbcd2", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:18:00 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index 101822a5d9c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 23, - "minute": 17, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "554aea72-2359-4c35-956b-1cd55c3b1ded", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:18:15 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index a4fd2ecce72..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 23, - "minute": 17, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a9203775-14d5-4020-aa61-f6709cd6c455", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:18:32 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_16.json deleted file mode 100644 index 6092812e211..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_16.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 18, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 23, - "minute": 17, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c0621c72-8851-4c34-9d3d-7ae4bb5de50f", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:18:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_17.json deleted file mode 100644 index ef7b5d3723b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_17.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 18, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 23, - "minute": 17, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "62aae2fc-e699-4a66-9bea-1b4b2b26ce35", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:18:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_18.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_18.json deleted file mode 100644 index afa295f3bfd..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_18.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 18, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 23, - "minute": 17, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0d20ed3c-a88e-42ba-87cc-f573d22b0a11", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:18:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_19.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_19.json deleted file mode 100644 index 320101d50cd..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_19.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [ - { - "DestinationCidrBlock": "195.168.2.0/24", - "State": "available" - }, - { - "DestinationCidrBlock": "196.168.2.0/24", - "State": "available" - } - ], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 2, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 18, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 2, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 23, - "minute": 17, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "Tags": [ - { - "Key": "Ansible-Test", - "Value": "VPN" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "Tags": [ - { - "Key": "One", - "Value": "one" - }, - { - "Key": "Two", - "Value": "two" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "d5ce628c-8270-4bb8-b0d9-c68b5834a9a8", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 13:18:48 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index 12e36ed156e..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "96ef43c9-1210-47a7-87f7-22c85a05eb2b", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:07 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_20.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_20.json deleted file mode 100644 index bca49264855..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_20.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "Routes": [ - { - "DestinationCidrBlock": "196.168.2.0/24", - "State": "deleted" - }, - { - "DestinationCidrBlock": "195.168.2.0/24", - "State": "deleted" - } - ], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "3a0d05ae-dbf7-4885-9b50-db2899bc30d5", - "HTTPHeaders": { - "content-length": "1066", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:18:48 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index b868885c82d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c4fb8aa0-39ad-4333-9b45-25b48ce5a8cd", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:22 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index 619c4866240..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b728a197-4790-4987-afe1-23ba2d2edf55", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:38 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index 9ab3007c3a9..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "06bdac8b-d1ec-48d6-9af4-b2d5bf3fa2f4", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:55 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index 193586bf442..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "baefffe5-7638-423e-84fc-fd21fa7fc6d1", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:16:10 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index b8569545efc..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "591329e5-78f5-4655-90c0-bf2b312b54af", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:16:26 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index 66e29949af0..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "4e526b69-b5ea-4f05-a81b-831aa5825e18", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:16:42 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index 35f035130df..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9b06e28e", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.11.116.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.13.135", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 7, - "minute": 15, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "534f5ec5-2d5f-46ac-8216-453fc4cad713", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:16:58 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json deleted file mode 100644 index 8af115a96ec..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "9661b9b4-e18b-491b-8182-6548bfb680bb", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 13:12:21 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json deleted file mode 100644 index e7cd28ab8b1..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9e06e28b", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0c445bcd-4e37-4368-b45d-b4560bde459f", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5236", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:28 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index e190e232a71..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "8deda3c9-1498-44ef-a663-111e93657c7f", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:22 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 6d975f1ac7c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "Tags": [ - { - "Key": "One", - "Value": "one" - }, - { - "Key": "Two", - "Value": "two" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e3c0cd84-d327-4a9e-8cac-0361a0afaaac", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "4836", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:28 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index 6066eb507ba..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "3888db16-157b-404a-9fea-fe27e8bd556d", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:11:34 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index 92d1f1e7f57..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 41, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ada7d223-32a6-4b60-81bb-63bca2cb2d56", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:11:50 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index e60cb21cec4..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 41, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "def174a4-c5c2-4e5b-a5b6-1c2448e869f1", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:05 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index 055f7de90ef..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 41, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7c65999e-0e70-4aac-a720-b2216dbe70af", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:20 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index e199f3c0fc3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 41, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "1153ff47-87b6-40b1-bcdd-ae66c4d4a3ae", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:21 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index f67a916094c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 41, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c0748f40-1e33-4f0b-9417-77092bfc9090", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:21 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_16.json deleted file mode 100644 index 8b6d7e2d30a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_16.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Ansible-Test", - "Value": "VPN" - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 41, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 11, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "State": "available" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "Tags": [ - { - "Key": "One", - "Value": "one" - }, - { - "Key": "Two", - "Value": "two" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "16aa6a4d-0fca-4035-b607-c223fc424f81", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 13:12:22 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_17.json deleted file mode 100644 index 78a05ba8605..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_17.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "Tags": [ - { - "Key": "Ansible-Test", - "Value": "VPN" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0d463b0f-87ea-4ada-a79a-f2bb0910c31c", - "HTTPHeaders": { - "content-length": "878", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:22 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index 5c0dea83c39..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bab29653-3411-49bb-af70-3d7b3284ca06", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:28 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index 3b47382cf9d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "d3732d64-34fb-40eb-bddb-c34e5e571921", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:44 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index 701f05ae0a9..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bd3ccd25-a6d6-44cf-9371-f01ca22d3f57", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:10:00 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index f25da7060f1..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "36906e17-078f-4c15-9e01-af3e233af2d3", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:10:15 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index f8aa9ec9734..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "cab9bb1a-7afe-4c5f-b106-038b10cba813", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:10:31 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index 1a8a4f86aae..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "938c6207-f582-4935-bef5-a9e3b01e18e1", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:10:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index e7f974dced9..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0bf3fb58-412a-447c-8cf7-af7185ec7f93", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:11:02 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index dbbefcbc5a6..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.212.254.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.160.254.75", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b67d7024-2bad-4283-b440-5519b5541867", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:11:18 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json deleted file mode 100644 index 503422fc263..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9f06e28a", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "3239a34a-f3ed-4ba7-9d31-99265ceda2a9", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5237", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index 46de4d6ab4c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bdcbf647-c1cc-4971-b133-3e1cd8ee36d5", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:24 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 835d53a9d95..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "Tags": [ - { - "Key": "One", - "Value": "one" - }, - { - "Key": "Two", - "Value": "two" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "87d4db59-f8e6-4d4c-9800-7c0bda5ebee2", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "4397", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:46 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index 7ee030b7d87..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 8, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "40e8326d-2f4b-4761-a2f9-011c989b0d11", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:08:53 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index 9e4979b24f6..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 3, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 8, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5c5688ae-0f6e-4d88-adb6-d9f654c74b42", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:08 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index ba464dc252b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 3, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 8, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7a5c5c59-d48a-467b-9414-097a93c923ae", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6124", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:23 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index 57967a5e57e..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 3, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 8, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "cb26ba43-cfc6-466b-8bde-5e63d58728e0", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6124", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:24 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index 6f500939bb7..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 3, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 8, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "1005f435-3e86-461f-a96c-a4f45c32c795", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6124", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:24 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index 6f500939bb7..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 3, - "minute": 9, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 8, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "1005f435-3e86-461f-a96c-a4f45c32c795", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6124", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:24 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_16.json deleted file mode 100644 index 55bbb3116e8..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_16.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "edac5b19-14be-4b2d-ab47-a2279de47d40", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:25 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index a69976b5566..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "07ee7fe5-c16a-4940-b099-3cd39aa9c2c8", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index b1254a9ff9a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7f34b516-b810-4a2b-8e9c-2e4ac5ea32f2", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:07:03 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index 97128118379..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "3f0d6abf-421a-4e56-9f19-a95c4639cbe6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:07:18 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index 71ccc5f0bfb..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "8174eae1-ae94-492c-b8d3-369a912dc994", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:07:34 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index 7fba5fbca67..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ab76cd4e-9a69-48f4-8fa6-7b1ea9710f2d", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:07:49 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index e98f0cead5f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "9e552112-f325-4d3e-bb3d-0698b69a9074", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:08:05 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index 9f3c01830c7..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "1c10aa65-e78f-41e5-bb24-7902b7974bff", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:08:21 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index 863aa6350ce..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.43.202.248", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 47, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.70.185.193", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 8, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "1963dfb1-564a-4a0c-932c-ecddcdb39d41", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:08:37 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json deleted file mode 100644 index 32afe4c15d7..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "8738f361-b294-47d7-a6d7-82d289db5e5f", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 13:06:44 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json deleted file mode 100644 index 0e22d719b02..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9c06e289", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "d94359a8-8a4f-4087-b848-27de6253ff6c", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5234", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:35 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index 0d225110b26..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e780e8ce-5417-4a33-a39e-dd78a18b69a5", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:44 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 548dcfe963a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "35740449-70e9-4723-b5c4-8c82dc5ec5e6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "3673", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:35 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index 584a6216a2a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 28, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 5, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "2d618f80-4045-4951-8d2e-c8d33395a141", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:42 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index f328bac1ba8..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 28, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 5, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c9e48b82-1edc-4aa7-ac4d-c45c7bd4ae19", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:42 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index 4137627685e..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 28, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 5, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b346f588-dc55-4be6-95c8-e4708609a4e2", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:43 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index b8a3a18fa79..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 28, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 5, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a5650999-a5ad-4eea-b407-6d9913738f24", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 13:06:43 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index 56db26d9b81..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 28, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 5, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5e8c0572-8f87-4708-9aca-997ea3736bc4", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:43 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index 84a774dd80d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "Tags": [ - { - "Key": "One", - "Value": "one" - }, - { - "Key": "Two", - "Value": "two" - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 28, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 5, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "134576b2-43ed-40ac-aefb-c4770a81f587", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6407", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:44 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_16.json deleted file mode 100644 index e2bdf29eeeb..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_16.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "Tags": [ - { - "Key": "One", - "Value": "one" - }, - { - "Key": "Two", - "Value": "two" - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 28, - "minute": 6, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 5, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5daf9a13-6835-4e6d-be9f-040405da8dff", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6407", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:44 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_17.json deleted file mode 100644 index 4f365045384..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_17.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "Tags": [ - { - "Key": "One", - "Value": "one" - }, - { - "Key": "Two", - "Value": "two" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "561b039d-ffee-42dc-a390-6dde1ae4fcfe", - "HTTPHeaders": { - "content-length": "990", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:44 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index ebd539e3a5c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "29d88495-a6b4-4f53-9ec7-32ac21fd80c6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:35 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index 9b004c2a971..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a647316d-7079-4a0a-8ad3-91a0a36dc124", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:51 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index 9cf6f0ffc36..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "f913c208-ac39-4b8e-aba5-1410f2e4d6cf", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:05:07 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index 88eeadf41a5..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "260f7ff4-ec3b-452e-90f3-9ffb3d5f6895", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:05:23 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index 860dcfd3312..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "fb308284-ea47-44f9-af61-3c0271809839", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:05:39 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index d71b6108ec2..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5e0c4efb-8f23-4ce1-b1fe-c5bccac45063", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:05:53 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index 6ca0be0346b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 5, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "be516d5b-d999-4de7-bd3e-9c0cb5de857c", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:09 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index 633be4130cd..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.112.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 36, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.148.246.46", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 57, - "minute": 5, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "007948c6-bac8-4f43-8b80-5e7c32f2d1e8", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:06:25 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json deleted file mode 100644 index c7f4a8a970d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9006e285", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e312dbd3-7956-4b0e-bb66-29a85e65e477", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5233", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:33 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index 933d9868223..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "fd2ddf0e-f378-46d7-92e7-1b6008d98b04", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:56:11 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 4c2a4f72bc4..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bcdba325-fd96-4c4b-bb15-dc9a88c456ae", - "HTTPHeaders": { - "content-length": "1917", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:33 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index 25f9a24c45a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 10, - "minute": 55, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ee75ebe8-0587-49b5-a231-0d31f713e3be", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:55:39 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index fde1cd4c02e..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 10, - "minute": 55, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5cbe30a2-8771-4116-ba7d-78c32a06546e", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:55:55 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index 3c37b32a2bb..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 10, - "minute": 55, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 56, - "minute": 55, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "3d3d8178-0359-4c80-85c7-410411a532f4", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:56:11 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index e13b27d041c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 10, - "minute": 55, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 56, - "minute": 55, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "67e4f285-2875-4615-ba4e-a36105d24dd7", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:56:11 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index beaa98a1c0a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 10, - "minute": 55, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 56, - "minute": 55, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a31cc536-1f4b-46d7-a91d-c8d0909eb897", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:56:11 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index cf88d5b8d0f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0cf4c8bf-4f69-4f9f-b6ae-aecbbcb60081", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:56:12 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index 4803740289d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "07019e0f-0012-47dc-8f86-950bb2b36e52", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:33 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index 5e69b0584df..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "8174c5d9-d54a-4173-aef3-5e9c3e86bac6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:49 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index 47ad906096b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "46432541-20bd-444f-ab0a-38db7c36aab5", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:54:05 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index f7137760d33..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "84598175-301b-40e4-884d-4e4777267375", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:54:21 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index 69249db308c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "092fbf9c-c529-4f71-855e-20b4289dc6f4", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:54:37 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index da6185154f4..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "6d1bb01f-6afe-418c-94c2-7d83c4f94a4d", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:54:52 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index 284e8b5492f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "830ae224-6cdf-46e2-817b-92bcd5fa86ec", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:55:08 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index 3f1a6a680f2..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.24.101.167", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 10, - "minute": 55, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.126.9", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 34, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "51ec304a-3c90-4bbe-86dc-56d87d693ef6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:55:23 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json deleted file mode 100644 index 45abc721826..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9306e286", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "541d2997-d79d-42b4-af0a-7d49754a99a0", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5235", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:56:14 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index 46c92879a6f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e9b91aeb-4237-44ba-9367-b9d240b3d8ba", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:25 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 5a1e79ea42e..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "fc165fe7-372e-4517-a256-5e12138aa890", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "2356", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:56:14 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index 06d4d8371d6..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "9e46eaa5-4f5b-42ff-ada0-d90504c0bd9c", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:58:20 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index fc46769aff2..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a3d938cd-ea4f-4739-87df-956db661c1a3", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:58:36 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index 0a7045f11ed..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c49c942f-0408-4d6d-b04a-1778dc3a3c43", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:58:52 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index 385a832a5e4..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 58, - "minute": 58, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 0, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "18debff6-05c3-44ad-8106-1c1099fba0e0", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:07 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index cb313c523ce..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 58, - "minute": 58, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 0, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "6fb7285e-c4ff-4f11-bdbc-464efbb66f15", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:23 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index 4749c57d5dc..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 58, - "minute": 58, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 0, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "cffd1787-58a7-4506-b14b-0bab509b8a1a", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:23 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_16.json deleted file mode 100644 index de15a8f21dc..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_16.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 58, - "minute": 58, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 0, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "cb19e2ba-a42a-47d3-a20f-9ea9521978f4", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:23 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_17.json deleted file mode 100644 index 33283151024..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_17.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 58, - "minute": 58, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 0, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "de97618e-a5a7-4efd-925c-6ca24b2603c6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 12:59:24 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_18.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_18.json deleted file mode 100644 index 505d1a36a5b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_18.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 58, - "minute": 58, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 0, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "aa76261f-ab0e-4bd4-a412-a59e7fdfb6db", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:24 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_19.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_19.json deleted file mode 100644 index caac14d220a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_19.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 58, - "minute": 58, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 0, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "9885231e-ee67-49cb-ada6-e8eb3c772e6b", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:24 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index 7e870bbe37f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ca30a295-dfce-49f8-a1d1-f5af0dffd1c2", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:56:14 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_20.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_20.json deleted file mode 100644 index 0f39c5aa638..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_20.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "204f247b-ad5a-4917-bc3e-a793bf09bd48", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:25 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index 1af37e30570..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a8ebc328-fea9-430d-a546-c5e24d447cef", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:56:30 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index e8ab98030aa..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "edf29e1c-30a1-4d11-9e5a-feddd7f082ab", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:56:46 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index 5e8203fec88..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "51c5182c-f83e-496b-ba45-e4972064d690", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:57:01 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index cf06e0ad472..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b9255f48-f509-42a9-8c0f-6626a492b46e", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:57:17 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index e7965bd025f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bab0deee-150b-4952-b949-4acefe6ebafe", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:57:33 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index e7c600455d1..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c90d25a2-7e6c-42cc-8f5a-17ab0c58e720", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:57:49 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index 17bd7e73954..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.213.145.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.202.36", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 15, - "minute": 56, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b1da658d-a66a-4def-873f-193ede827765", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:58:05 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json deleted file mode 100644 index 21408b7a6da..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9d06e288", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "6b76950f-28f0-4e74-9b61-14780c62ced9", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5234", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:53 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index a27bc82cf9f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e0e829b9-86e9-4b26-aa01-ccacf0a77edc", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:31 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index fc618a3241d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "149f4f23-9fec-4995-acc5-0db46d4d698f", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "3234", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:53 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index 958e8a9821a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 3, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5bb89e85-8f96-43b1-96e3-0fd6c00f9b14", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:03:58 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index 265a34962da..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 3, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "40ebbb4a-0a18-494e-9666-3481637027fc", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:14 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index 71caefcf584..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 19, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 3, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a86ec01a-5ea5-4fba-8123-5567a04a3596", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:30 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index 037ba1a1d95..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 19, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 3, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "6c96cc41-2657-47a0-b437-a79b0631bbd8", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:30 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index 7e74e95fbe4..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 19, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 3, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "1f605613-e582-4b3b-8838-e9fcf0c58e67", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:30 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index 5bbb025be0a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 19, - "minute": 4, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 3, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "9e38c8b0-f339-463a-b92f-aa90fd3315e8", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 13:04:31 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_16.json deleted file mode 100644 index 786f224ead0..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_16.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0d2390b1-83fb-40f6-ab75-adf605a9a3fc", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:31 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index 7abf137d37f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e29c19bc-d875-4b6b-83b2-bc2fdfb87bf0", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:53 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index e7dc1a4a4f2..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "686ef8bb-a95e-4b86-b814-f272c54c8ea5", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:02:09 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index 3e3f889f906..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c0583208-1fa5-4c6e-8970-8dd2f3ecd62d", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:02:25 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index 59d520d1c43..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b10cdcbf-b16e-43c0-99b1-2fe2ad8db09b", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:02:40 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index 06ce44a44db..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "93d3176a-6d6a-44de-8a20-91bd4a64b3a3", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:02:56 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index e15dc61ebf8..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "329c10c9-0ee8-48d3-acb2-b48668ddbab6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:03:12 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index 806c717d2f4..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bf983aa1-224e-470a-b0a1-add5bda488b5", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:03:27 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index 8e7c3eccfb9..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.166.247.180", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 54, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.167.45.7", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 29, - "minute": 3, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "4857fe1d-dc96-4168-a7e1-9fbb73282ab2", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:03:43 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index eebfb3a70bf..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "data": { - "VpnConnections": [], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "8218208e-030d-4aea-9ae5-6e8534efe1ef", - "HTTPHeaders": { - "content-length": "243", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:04:32 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json deleted file mode 100644 index 9f4209eea08..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ccf8e327-eeee-4db8-9ae6-006a8fe5628c", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 12:48:04 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json deleted file mode 100644 index 062840fc216..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0e1859bf-b896-4a30-ab94-849441b914f9", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 12:48:05 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json deleted file mode 100644 index c81bb5f509e..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-6a06e27f", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5db2e287-2d09-4a50-aaa1-a4615ece9bd6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5235", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:03 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json deleted file mode 100644 index 69c39a89a83..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-9e13c880", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9506e280", - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7533469a-5979-42fd-94de-c33a66d34065", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5234", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:45:25 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index cc17b12afc6..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5670f275-006d-48db-91e0-72058d9d881f", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:06 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json deleted file mode 100644 index d2fd5524e8f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "35514550-20a7-4f91-b175-d21182ad8bdd", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:07 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index d9d2f28724b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "edae433c-c2f8-475a-95f9-5c3c00d0b54b", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:03 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index aeb3224679e..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 6, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 53, - "minute": 44, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a30a934b-5716-4d4d-958a-7e780e333a24", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:45:08 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index 3132117c7cd..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 6, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 53, - "minute": 44, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "99b8bb83-e3f0-4b87-9121-5d862e2627f0", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:45:24 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index 89a6fd077d6..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 6, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 53, - "minute": 44, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c6d1bf65-4f3e-4f7f-9274-281ebf433b2b", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:45:24 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index 6c50e6b66c8..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 6, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 53, - "minute": 44, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "28733dff-592e-4c48-94f9-b4d56bbc246a", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:45:25 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index c8ad595dcb8..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-32d70c2c", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "d38f939c-ded7-416b-a563-88161b71be1c", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:45:25 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index 06fd99e110b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "af7c54ed-ca7f-4013-adee-16133b822d53", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:45:26 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_16.json deleted file mode 100644 index ef0845944ac..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_16.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "24133f7b-2620-4f2b-98b5-427aaa5d04bd", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:45:41 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_17.json deleted file mode 100644 index 1a5bc6e7858..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_17.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5ac6d438-cae6-40cc-9c63-81073def54be", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:45:57 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_18.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_18.json deleted file mode 100644 index 77dbba5bba1..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_18.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "968a8ebd-ed59-4a8d-a314-83a6430bebd3", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:46:13 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_19.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_19.json deleted file mode 100644 index 6c01e2c67f6..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_19.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "07f96ac8-f5ec-43e4-ab7d-6b989e071808", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:46:29 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index 2f51af37102..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b1b10bb7-e85c-44ca-b74e-85352550db52", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:04 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_20.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_20.json deleted file mode 100644 index 30ecbe4b4e2..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_20.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0750711f-fafd-4323-a685-65329a0a9302", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:46:43 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_21.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_21.json deleted file mode 100644 index 844fdab041c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_21.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ec319bcc-2a61-43d3-a69c-9d94235aeb56", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:46:59 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_22.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_22.json deleted file mode 100644 index be8c4aa55b3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_22.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "6fe5a339-9436-4077-a201-dab2b7b95039", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:47:16 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_23.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_23.json deleted file mode 100644 index 0a98ebdf353..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_23.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7897be6a-fc15-4608-bac0-c3cf7bba28c6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:47:31 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_24.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_24.json deleted file mode 100644 index d304915288f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_24.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 26, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "898cc57f-ab56-47d7-920e-995814f532a4", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:47:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_25.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_25.json deleted file mode 100644 index 79b0739f098..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_25.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 49, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "134c741c-757b-4a87-9a34-c8f1848ef33e", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:02 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_26.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_26.json deleted file mode 100644 index 49b4c09ab6d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_26.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 49, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "8009af6c-6d35-45fa-a94d-5384d3b92573", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:02 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_27.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_27.json deleted file mode 100644 index 059a154eebd..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_27.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 49, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7ef9e804-1eb9-4486-9285-584204a824a3", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:02 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_28.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_28.json deleted file mode 100644 index 76ad9ba8ec6..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_28.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 6, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 53, - "minute": 44, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "05c178e1-3f1f-4e0f-bb43-027d2b41f56c", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6561", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:04 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_29.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_29.json deleted file mode 100644 index 0b2918289ea..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_29.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 6, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 53, - "minute": 44, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "92db5b5e-d7e6-4cfd-9d62-abdda5a6083c", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:04 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index 9f85a23b561..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "2a3a4fd7-189b-43b0-8a44-82ebd52dba01", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:19 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_30.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_30.json deleted file mode 100644 index cad1188b977..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_30.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 6, - "minute": 45, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 53, - "minute": 44, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ffa7e24d-e004-4b4e-9317-80b97dc89cc8", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6288", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:04 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_31.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_31.json deleted file mode 100644 index 94f87c7d060..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_31.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 49, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "available" - }, - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-32d70c2c", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0cebf278-197b-4bdd-b8d9-c44250637154", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6559", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:05 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_32.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_32.json deleted file mode 100644 index bba62063290..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_32.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 49, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "4bc3a17b-6896-4f8a-b3bc-07cbbf88e9e2", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:05 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_33.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_33.json deleted file mode 100644 index 630ea016d7f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_33.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 49, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7371d436-849d-4717-a284-e33389f8982d", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6288", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:06 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_34.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_34.json deleted file mode 100644 index a294fb7421c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_34.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.164.115.77", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.32.43.175", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 49, - "minute": 47, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b645a20e-3689-4a13-8af1-2dcc38f70a9b", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6288", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:06 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_35.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_35.json deleted file mode 100644 index 42ea2ec0db8..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_35.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "6e80e598-aeb2-4ae1-bfe3-2383505379cc", - "HTTPHeaders": { - "content-length": "871", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:07 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_36.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_36.json deleted file mode 100644 index 9a97df1f0eb..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_36.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-32d70c2c", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "f4072f73-ff8c-49ed-89a7-eaed0389b11a", - "HTTPHeaders": { - "content-length": "873", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:08 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index ad74fa0620f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ed467717-f22a-4c33-a9e7-0f871d1b35b2", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:35 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index 9f2bb01f3fa..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "49f28398-4458-4c9d-9c04-598c9d8e76bd", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:50 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index 58c773d2c01..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bebb46be-76a1-486b-a9d0-7f0e33f68294", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:44:06 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index a15fd0e3264..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "090f369a-71f4-4e60-b860-c1f5cc52a5ab", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:44:21 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index 2765a9f26f7..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "f98ad6e5-e3c6-48ae-b6c1-d9ed9824ea88", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:44:37 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index 9b6e2ada236..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.160.156", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 4, - "minute": 43, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.33.241.73", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 53, - "minute": 44, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ef918599-de1c-40e5-95ab-2a4b16356455", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:44:52 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json deleted file mode 100644 index 52ca9673111..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "f39595f7-c4f7-4e7c-9681-83e5619e0d84", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 12:50:34 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json deleted file mode 100644 index 3aeb21cf6fe..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "61647610-452d-4a99-abce-d8e61a6ada95", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 12:53:28 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json deleted file mode 100644 index 17aca9388e3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9706e282", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "080cc661-516b-4d6c-806b-64f54b232f57", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5235", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:13 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json deleted file mode 100644 index 0080abe9dc4..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-9e13c880", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9606e283", - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "d49ec118-3438-40cb-bcb5-8e98d9676688", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5236", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:50:36 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index ddce99bb1ed..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "995f99a1-42d4-4d0f-b216-5e54c7052a71", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:29 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json deleted file mode 100644 index 65af7a36663..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "701a2c53-ef2e-4b77-bb0c-b0e4904dc714", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:29 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 59bbeec791c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "22e251ed-4e2b-49a4-8747-fcc9c39ad99e", - "HTTPHeaders": { - "content-length": "1310", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:12 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index 334a32fc447..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 1, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 9, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "66c5b212-f514-4075-ab41-6c70424d13ef", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:50:17 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index 27cf0e60f48..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 1, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 9, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "4fa0db43-456e-491d-a6f6-2a2a262bc068", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:50:33 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index 12afe81e0da..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 1, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 9, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "521f0a1b-e935-40c2-b896-b13b5b6f2d1a", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:50:34 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index 0c5d8ca7849..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 1, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 9, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "da5b58d2-4042-4ed5-8faf-daceb3d706c6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6290", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:50:35 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index 861ebd74b53..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-32d70c2c", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-32d70c2c", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "d4e21661-391e-48b9-80f8-6c04a13a653e", - "HTTPHeaders": { - "content-length": "1312", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:50:35 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index d54c65027c0..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "3b4a1671-80a6-45a7-b620-885f88f5fd77", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:50:36 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_16.json deleted file mode 100644 index 41fc9a238f3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_16.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "55115858-ebfd-4329-85e8-5bd15b31e62d", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:50:51 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_17.json deleted file mode 100644 index 1d82c71110a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_17.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "241b82e1-4611-495a-952d-21fce8354e6e", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:51:07 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_18.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_18.json deleted file mode 100644 index 0b0861b6896..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_18.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "898fcbc8-4c89-49cd-943f-7c2f0e3a73b7", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:51:22 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_19.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_19.json deleted file mode 100644 index c054486c7a3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_19.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "2f8be95a-d488-412c-9bc3-bca1c66c3ccf", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:51:38 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index 9900b9b0a8b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bd0e67d4-f5a5-4e98-a388-e80af982bebf", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:13 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_20.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_20.json deleted file mode 100644 index 39ddd25ed78..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_20.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "66fe299d-2a18-4693-bdc3-00475c529a7f", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:51:53 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_21.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_21.json deleted file mode 100644 index cd711acfe3f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_21.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b5ebc50e-0f1d-4d96-87c1-bf222c186911", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:52:09 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_22.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_22.json deleted file mode 100644 index 490f336b65d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_22.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "4f123753-f797-4aff-83f2-edfdb31b679f", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:52:24 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_23.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_23.json deleted file mode 100644 index 78223c6e995..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_23.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ff8ad5d4-4798-44f2-b89a-100387a1e1bc", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:52:40 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_24.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_24.json deleted file mode 100644 index 2a98e206985..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_24.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 41, - "minute": 52, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c69b6d28-6925-4b09-9a23-c58bd23a952d", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:52:56 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_25.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_25.json deleted file mode 100644 index 069b679c245..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_25.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 41, - "minute": 52, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 36, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "30239673-06bd-4122-8187-834e098e3035", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:12 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_26.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_26.json deleted file mode 100644 index 95f632a8339..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_26.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 41, - "minute": 52, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 14, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a35493d8-79cf-44ce-a5d9-a322984952bb", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:27 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_27.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_27.json deleted file mode 100644 index f3e3744186d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_27.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 41, - "minute": 52, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 14, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a0d807f4-6947-474e-86bc-f1d978a1e6c6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:27 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_28.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_28.json deleted file mode 100644 index 0eb348b26b7..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_28.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 41, - "minute": 52, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 14, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "123f065b-f06a-4464-93e9-f0c9224825dc", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6290", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:28 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_29.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_29.json deleted file mode 100644 index 15182c9cab1..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_29.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.215.4.190", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 41, - "minute": 52, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.163.123.41", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 14, - "minute": 53, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "State": "available" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 1, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 9, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "State": "available" - }, - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-32d70c2c", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c6c78a9a-e004-4766-8ef6-16c52b25475d", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 12:53:28 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index fb9619cdcd6..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "2b96bd10-97eb-44b0-9ab9-548b0ddf03b9", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:28 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_30.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_30.json deleted file mode 100644 index 4dd608bc648..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_30.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "1b613de0-c6e1-48d3-9c9d-b94de070ccda", - "HTTPHeaders": { - "content-length": "873", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:29 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_31.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_31.json deleted file mode 100644 index 6e537944b51..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_31.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-32d70c2c", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0e36b69f-39b7-40ac-8273-8003211fc5f5", - "HTTPHeaders": { - "content-length": "873", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:29 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index 4a13f61e8c3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ace0b6a9-e76f-4198-a077-1e2dffbc6c2e", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:43 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index 3695e62250f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "434a478c-99ab-4da1-9446-0190d615553f", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:48:59 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index 337959a7984..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "406c570c-4ca9-4657-aab6-c3aec6943a24", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:49:15 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index 171cce65798..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bc262f2c-187c-45ff-bd0e-b8287760d26e", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:49:31 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index 9b63c6f5f0c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "99bc2889-52c9-4933-ba37-9fc2524a6ec1", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:49:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index a6472849102..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "34.214.254.212", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 1, - "minute": 50, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.38.34.113", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 48, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "26fd3e6c-8c41-4e3b-8bda-47ee9b1ef167", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:50:02 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 288d2313bc4..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9606e283", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-32d70c2c", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-9506e280", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-32d70c2c", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "79832782-f6e3-483a-b848-306c43731940", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "2087", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:53:30 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json deleted file mode 100644 index 90b1f2dd202..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-6f06e27a", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ef16cc59-db82-49e8-b39f-5ed5035a6fba", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5236", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:37:13 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json deleted file mode 100644 index dbb692fb60b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-9e13c880", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-6906e27c", - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7311c482-6425-4bf5-b764-06652c9ea4b8", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5232", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:40:37 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index 7d346168ad3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "73286a1c-f428-4617-9b23-b0af8e8e2657", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:00 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json deleted file mode 100644 index cde1d023770..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "6ff1e7ac-f41b-45f8-a925-99f12f15df72", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:00 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 079fe193fc1..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "data": { - "VpnConnections": [], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "784ab580-8495-4cff-b8a9-a70474686d99", - "HTTPHeaders": { - "content-length": "243", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:37:13 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index 5a14e8385b3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 39, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "45a3a55f-4577-4292-9c88-6b20c8968bdb", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:39:18 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index d70a4c405e4..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 39, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "dea0cb15-a87a-4340-836d-6cd460b2243e", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:39:33 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index 731805d6b95..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 39, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c9f63be4-079d-4dcd-adb8-ab18f8787a9c", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:39:48 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index b7406b64cb7..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 39, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "75e6bdc7-dab7-428c-900b-f8566fcdd8b4", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:40:04 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index a5f05224ef3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 39, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "02cad910-6d43-4d55-a031-4055a30bf411", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:40:20 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index f663512223e..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 25, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 39, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "18e05aff-5c66-4e73-97bd-a63061019ed2", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6124", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:40:36 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_16.json deleted file mode 100644 index 53623b87b39..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_16.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 25, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 39, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "6df83c0e-40bd-41ed-8149-960375e0b0cf", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6124", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:40:36 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_17.json deleted file mode 100644 index 62f01fc341b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_17.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 25, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 39, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a6f596eb-c6a8-4e31-8e1a-bc1ae80443c5", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6124", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:40:36 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_18.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_18.json deleted file mode 100644 index 2336ab51cb7..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_18.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "data": { - "VpnConnections": [], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "dde896f2-98ea-45d2-8208-b71b46a88cd7", - "HTTPHeaders": { - "content-length": "243", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:40:37 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_19.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_19.json deleted file mode 100644 index 3741da6497e..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_19.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "22bd50ce-bac1-4b63-bef5-d91e10a27cb6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:40:38 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index 7552a17aae8..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "acad86c4-655b-488f-a552-f04c60502dcb", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:37:13 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_20.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_20.json deleted file mode 100644 index 448959205db..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_20.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "4df8324c-5d9f-436e-b9c8-31d123170bcd", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:40:53 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_21.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_21.json deleted file mode 100644 index fcfe29941d3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_21.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "b2fddbbe-070c-40c4-b3ff-31b4ab039a93", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:41:09 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_22.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_22.json deleted file mode 100644 index 819d4fb183c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_22.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e4575384-f0ae-4ddb-a6f0-60bf09ae3431", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:41:24 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_23.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_23.json deleted file mode 100644 index f7b5de10de3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_23.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "3c2df2d8-21ff-435b-a25e-309708e5d728", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:41:40 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_24.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_24.json deleted file mode 100644 index d2b789983e0..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_24.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "47bedfce-6c4f-40e5-8d3c-2f7618670665", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:41:55 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_25.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_25.json deleted file mode 100644 index bf69c4d5798..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_25.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "25fb78ea-cc25-427c-a1bb-c9bc06a0fcf0", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:42:11 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_26.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_26.json deleted file mode 100644 index 005ca53be1a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_26.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "dfd25f0b-3331-46b0-9594-739e54b3633b", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:42:27 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_27.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_27.json deleted file mode 100644 index a8dc687f131..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_27.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 31, - "minute": 42, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 37, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e0ce84a4-b7fa-4c51-89c5-f689f5ab05e7", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6116", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:42:42 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_28.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_28.json deleted file mode 100644 index 207caacdcff..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_28.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 31, - "minute": 42, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 46, - "minute": 42, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "fbb5d0bf-db4a-4865-b74a-15c9d5dc9acb", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:42:58 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_29.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_29.json deleted file mode 100644 index 397ea49ca36..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_29.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 31, - "minute": 42, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 46, - "minute": 42, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "06310935-6410-44da-ab8a-0a3a77b2ed02", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:42:59 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index 6c2a473a761..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bc0abc0d-3217-4a9c-91b7-4cf7d1612270", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:37:29 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_30.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_30.json deleted file mode 100644 index 86a37a4779e..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_30.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.40.19.84", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 31, - "minute": 42, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "54.149.194.122", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 46, - "minute": 42, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-32d70c2c", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5ce492e4-a36b-4148-9db4-1cd1390f4d94", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:42:59 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_31.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_31.json deleted file mode 100644 index c5d67fffc90..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_31.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 25, - "minute": 40, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 39, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "fab3e62a-b821-40cc-ac9d-3b589ddd7be9", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6124", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:00 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_32.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_32.json deleted file mode 100644 index 66db65f6bf7..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_32.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c45356e9-b255-4886-bdeb-a200225b3066", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:00 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_33.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_33.json deleted file mode 100644 index 0abc8171746..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_33.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-9e13c880", - "VpnConnectionId": "vpn-6906e27c", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-32d70c2c", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "39d1181a-5c5b-4d7e-97cd-dcd5b83bc0b3", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:43:00 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index 2c4135812dd..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ed7c7fbb-b31b-4244-b588-e90821e65bff", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:37:45 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index 6434571b265..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "096fa68d-3ed3-4483-b323-4b03cc2c1ebd", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:37:59 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index 5e30b888c19..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e18b7cde-2baa-466e-a5ac-ac5cd94db089", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:38:15 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index c84d4c084d3..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5845f7f3-a0ea-4948-b3ee-d9ee3fc0f303", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:38:30 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index 3b729eccb5d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "4a29bfaa-c800-4ed7-858c-9ea4fc8de167", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:38:47 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index 87dd4df8e48..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.161.239.138", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.108.105", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 13, - "minute": 37, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "8c873704-b869-4dc2-890d-ebc7d62d7963", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:39:02 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json deleted file mode 100644 index 1262491d43b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9206e287", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "686913e8-485a-4de0-880d-60a0c2444f65", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5235", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:28 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index 2f8b7802e67..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ba0807f4-446e-471b-ad25-dc627d0917ff", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:49 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 3fe09832d7f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e85e108f-c5c6-4627-a409-ae5e57519e68", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "2795", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:28 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index 5726948840b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 32, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "fe0912ad-2a87-4f24-a2e9-ecce88edd3a6", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:33 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index c1593d62e4b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 32, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "3d9c0acf-a5e7-41cf-a929-17a804c23cf1", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:49 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index f1d5f5b426f..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 32, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c59001df-f7a6-413d-8ba2-a3a3e1f3a08c", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:49 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index 686dfef8424..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 32, - "minute": 1, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "f9a5a6a9-a952-4183-8600-f0d709ca5902", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:49 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index 5a65e1dcb4d..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ad7f2a01-f5a2-41cb-b572-e55cfff6f0fd", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:50 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index b2bbc32a63b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "ffd0c558-1fb0-4e47-8a78-ad93241a8909", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:50 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index 4ce279f36de..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "aefdae0c-715c-468d-b209-df744593d702", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:28 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index a2d6c448ba0..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5e7d2b85-1951-4fa5-8003-dcae818ab111", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:44 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index 9075e75e642..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "648be063-6a5d-4871-8ccf-047275662818", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 12:59:59 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index ba6c47c51ac..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "e5f1a740-ef05-454b-a8ce-26c6c96d6822", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:00:15 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index 089a0a16973..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "240aa4a8-495f-4e22-973a-d1b8ca85a7b7", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:00:30 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index a93c555c8b2..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "71e9943b-886d-442f-bd0d-eb50d92522e2", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:00:46 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index ca810951ba1..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "518172bc-6355-4988-8a92-14c589fbfc6f", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:02 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index 2af22bb65b8..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.26.213.112", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.36.80.33", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 12, - "second": 28, - "minute": 59, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "4679b3c8-f187-4207-81fc-79982e721cb0", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6118", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:01:18 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json deleted file mode 100644 index f278854b925..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "data": { - "VpnConnection": { - "CustomerGatewayId": "cgw-6113c87f", - "Options": { - "StaticRoutesOnly": true - }, - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "VpnConnectionId": "vpn-9806e28d", - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - }, - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "f5a54fbe-aabf-4b5e-82f6-0fc9cd13e50c", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5234", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:25 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json deleted file mode 100644 index bf0afd35e49..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "2714ec51-d05e-4034-8401-2c99f5247755", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 13:15:02 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json deleted file mode 100644 index 5cdff416eb9..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "data": { - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "d635286c-b0e0-4048-9edd-5370c643aab4", - "HTTPHeaders": { - "content-length": "239", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:03 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json deleted file mode 100644 index 0e552275c2c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "Tags": [ - { - "Key": "Ansible-Test", - "Value": "VPN" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "Tags": [ - { - "Key": "One", - "Value": "one" - }, - { - "Key": "Two", - "Value": "two" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "0a7676c6-68de-4301-b107-5ef0fcf5136e", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "5448", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:25 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_10.json deleted file mode 100644 index f5afd3ed161..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_10.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 16, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "68efe4ef-9c50-414b-bd65-cbf418c25f72", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:14:30 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_11.json deleted file mode 100644 index 56c742fafed..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_11.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 38, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 16, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7b7f58cb-4e94-4cb2-9d93-ad6e82949476", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:14:46 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_12.json deleted file mode 100644 index fd2890b7efe..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_12.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 38, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 16, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "1d06bb9d-234a-43b4-9465-0f0d6769e7cb", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:01 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_13.json deleted file mode 100644 index 18c7b173fe7..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_13.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 38, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 16, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "d967fe54-4131-4d3c-8bec-ca51039d51f5", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:01 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_14.json deleted file mode 100644 index 3373af1da70..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_14.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 38, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 16, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "9bdf35c6-373f-4a9f-a86a-4f01cd15f742", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6122", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:02 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_15.json deleted file mode 100644 index bfe18c03743..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_15.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 38, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 16, - "minute": 14, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "available" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9e06e28b", - "Category": "VPN", - "Tags": [ - { - "Key": "Ansible-Test", - "Value": "VPN" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9f06e28a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9c06e289", - "Category": "VPN", - "Tags": [ - { - "Key": "One", - "Value": "one" - }, - { - "Key": "Two", - "Value": "two" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9d06e288", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9206e287", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9306e286", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9006e285", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9706e282", - "Category": "VPN", - "Tags": [ - { - "Key": "Correct", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6a06e27f", - "Category": "VPN", - "Tags": [ - { - "Key": "Wrong", - "Value": "Tag" - } - ], - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - }, - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-6f06e27a", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "bcdce0f0-10da-4e78-8fbe-ac147d62013b", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-type": "text/xml;charset=UTF-8", - "server": "AmazonEC2", - "date": "Mon, 16 Apr 2018 13:15:02 GMT", - "transfer-encoding": "chunked" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_16.json deleted file mode 100644 index 1e44c3c514b..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_16.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "4d572583-1b0c-431f-a9f9-7acd45d588e8", - "HTTPHeaders": { - "content-length": "705", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:15:03 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json deleted file mode 100644 index d337c7f6938..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "c8f872e5-ef0e-4517-8ab8-9ef0788a04bc", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:26 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json deleted file mode 100644 index 1d65fb2c689..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "d99d51ce-6b82-4f53-ade0-d4967b769c93", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:41 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json deleted file mode 100644 index 3c63747c06c..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "f43f34f0-e4d7-4888-9037-2d3f99a30f8f", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:12:57 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_5.json deleted file mode 100644 index 4b1ed8e7fd5..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_5.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "5b03354b-e15d-4cb7-92e3-b359870a99a3", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:13:13 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_6.json deleted file mode 100644 index f10651beffd..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_6.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "a022a838-4264-4f08-b309-bea8058706ae", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:13:28 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_7.json deleted file mode 100644 index 6f5406b365a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_7.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "f9ae9cd9-ce79-4245-863b-79fd5b39cdc1", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:13:44 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_8.json deleted file mode 100644 index 25e0713fdb4..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_8.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "57806378-a669-45b1-96ec-ab29ae8a47bb", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:13:59 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_9.json deleted file mode 100644 index 98f25682a2a..00000000000 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_9.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "data": { - "VpnConnections": [ - { - "CustomerGatewayId": "cgw-6113c87f", - "VpnConnectionId": "vpn-9806e28d", - "Category": "VPN", - "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", - "Routes": [], - "Options": { - "StaticRoutesOnly": true - }, - "Type": "ipsec.1", - "VgwTelemetry": [ - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "35.165.156.252", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - }, - { - "StatusMessage": "", - "Status": "DOWN", - "OutsideIpAddress": "52.39.145.205", - "AcceptedRouteCount": 0, - "LastStatusChange": { - "year": 2018, - "hour": 13, - "second": 26, - "minute": 12, - "__class__": "datetime", - "day": 16, - "month": 4, - "microsecond": 0 - } - } - ], - "VpnGatewayId": "vgw-35d70c2b", - "State": "pending" - } - ], - "ResponseMetadata": { - "HTTPStatusCode": 200, - "RequestId": "7efaeb2a-f071-4178-af9c-1bcdbb383d0d", - "HTTPHeaders": { - "vary": "Accept-Encoding", - "content-length": "6120", - "server": "AmazonEC2", - "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:14:15 GMT" - }, - "RetryAttempts": 0 - } - }, - "status_code": 200 -} \ No newline at end of file diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py deleted file mode 100644 index 2b5db4226dd..00000000000 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ /dev/null @@ -1,435 +0,0 @@ -# (c) 2017 Red Hat Inc. -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - -__metaclass__ = type - -import os - -import pytest - -import ansible_collections.amazon.aws.plugins.module_utils.retries as aws_retries -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_conn -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info - -# Magic... Incorrectly identified by pylint as unused -# isort: off -# pylint: disable=unused-import -from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep -from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify - -# pylint: enable=unused-import -# isort: on - -from ansible_collections.community.aws.plugins.modules import ec2_vpc_vpn - - -class FailException(Exception): - pass - - -class FakeModule(object): - def __init__(self, **kwargs): - self.params = kwargs - - def fail_json_aws(self, *args, **kwargs): - self.exit_args = args - self.exit_kwargs = kwargs - raise FailException("FAIL") - - def fail_json(self, *args, **kwargs): - self.exit_args = args - self.exit_kwargs = kwargs - raise FailException("FAIL") - - def exit_json(self, *args, **kwargs): - self.exit_args = args - self.exit_kwargs = kwargs - - -def get_vgw(connection): - # see if two vgw exist and return them if so - vgw = connection.describe_vpn_gateways(Filters=[{"Name": "tag:Ansible_VPN", "Values": ["Test"]}]) - if len(vgw["VpnGateways"]) >= 2: - return [vgw["VpnGateways"][0]["VpnGatewayId"], vgw["VpnGateways"][1]["VpnGatewayId"]] - # otherwise create two and return them - vgw_1 = connection.create_vpn_gateway(Type="ipsec.1") - vgw_2 = connection.create_vpn_gateway(Type="ipsec.1") - for resource in (vgw_1, vgw_2): - connection.create_tags( - Resources=[resource["VpnGateway"]["VpnGatewayId"]], Tags=[{"Key": "Ansible_VPN", "Value": "Test"}] - ) - return [vgw_1["VpnGateway"]["VpnGatewayId"], vgw_2["VpnGateway"]["VpnGatewayId"]] - - -def get_cgw(connection): - # see if two cgw exist and return them if so - cgw = connection.describe_customer_gateways( - DryRun=False, - Filters=[{"Name": "state", "Values": ["available"]}, {"Name": "tag:Name", "Values": ["Ansible-CGW"]}], - ) - if len(cgw["CustomerGateways"]) >= 2: - return [cgw["CustomerGateways"][0]["CustomerGatewayId"], cgw["CustomerGateways"][1]["CustomerGatewayId"]] - # otherwise create and return them - cgw_1 = connection.create_customer_gateway(DryRun=False, Type="ipsec.1", PublicIp="9.8.7.6", BgpAsn=65000) - cgw_2 = connection.create_customer_gateway(DryRun=False, Type="ipsec.1", PublicIp="5.4.3.2", BgpAsn=65000) - for resource in (cgw_1, cgw_2): - connection.create_tags( - Resources=[resource["CustomerGateway"]["CustomerGatewayId"]], Tags=[{"Key": "Ansible-CGW", "Value": "Test"}] - ) - return [cgw_1["CustomerGateway"]["CustomerGatewayId"], cgw_2["CustomerGateway"]["CustomerGatewayId"]] - - -def get_dependencies(): - if os.getenv("PLACEBO_RECORD"): - module = FakeModule(**{}) - region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True) - connection = boto3_conn( - module, conn_type="client", resource="ec2", region=region, endpoint=ec2_url, **aws_connect_kwargs - ) - vgw = get_vgw(connection) - cgw = get_cgw(connection) - else: - vgw = ["vgw-35d70c2b", "vgw-32d70c2c"] - cgw = ["cgw-6113c87f", "cgw-9e13c880"] - - return cgw, vgw - - -def setup_mod_conn(placeboify, params): - conn = placeboify.client("ec2") - retry_decorator = aws_retries.AWSRetry.jittered_backoff() - wrapped_conn = aws_retries.RetryingBotoClientWrapper(conn, retry_decorator) - m = FakeModule(**params) - return m, wrapped_conn - - -def make_params(cgw, vgw, tags=None, filters=None, routes=None): - tags = {} if tags is None else tags - filters = {} if filters is None else filters - routes = [] if routes is None else routes - - return { - "customer_gateway_id": cgw, - "static_only": True, - "vpn_gateway_id": vgw, - "connection_type": "ipsec.1", - "purge_tags": True, - "tags": tags, - "filters": filters, - "routes": routes, - "delay": 15, - "wait_timeout": 600, - } - - -def make_conn(placeboify, module, connection): - customer_gateway_id = module.params["customer_gateway_id"] - static_only = module.params["static_only"] - vpn_gateway_id = module.params["vpn_gateway_id"] - connection_type = module.params["connection_type"] - changed = True - vpn = ec2_vpc_vpn.create_connection(connection, customer_gateway_id, static_only, vpn_gateway_id, connection_type) - return changed, vpn - - -def tear_down_conn(placeboify, connection, vpn_connection_id): - ec2_vpc_vpn.delete_connection(connection, vpn_connection_id, delay=15, max_attempts=40) - - -def setup_req(placeboify, number_of_results=1): - """returns dependencies for VPN connections""" - assert number_of_results in (1, 2) - results = [] - cgw, vgw = get_dependencies() - for each in range(0, number_of_results): - params = make_params(cgw[each], vgw[each]) - m, conn = setup_mod_conn(placeboify, params) - vpn = ec2_vpc_vpn.ensure_present(conn, params)[1] - - results.append({"module": m, "connection": conn, "vpn": vpn, "params": params}) - if number_of_results == 1: - return results[0] - else: - return results[0], results[1] - - -def test_find_connection_vpc_conn_id(placeboify, maybe_sleep): - # setup dependencies for 2 vpn connections - dependencies = setup_req(placeboify, 2) - dep1, dep2 = dependencies[0], dependencies[1] - params1, vpn1, _m1, conn1 = dep1["params"], dep1["vpn"], dep1["module"], dep1["connection"] - _params2, vpn2, _m2, conn2 = dep2["params"], dep2["vpn"], dep2["module"], dep2["connection"] - - # find the connection with a vpn_connection_id and assert it is the expected one - assert ( - vpn1["VpnConnectionId"] - == ec2_vpc_vpn.find_connection(conn1, params1, vpn1["VpnConnectionId"])["VpnConnectionId"] - ) - - tear_down_conn(placeboify, conn1, vpn1["VpnConnectionId"]) - tear_down_conn(placeboify, conn2, vpn2["VpnConnectionId"]) - - -def test_find_connection_filters(placeboify, maybe_sleep): - # setup dependencies for 2 vpn connections - dependencies = setup_req(placeboify, 2) - dep1, dep2 = dependencies[0], dependencies[1] - params1, vpn1, _m1, conn1 = dep1["params"], dep1["vpn"], dep1["module"], dep1["connection"] - params2, vpn2, _m2, conn2 = dep2["params"], dep2["vpn"], dep2["module"], dep2["connection"] - - # update to different tags - params1.update(tags={"Wrong": "Tag"}) - params2.update(tags={"Correct": "Tag"}) - ec2_vpc_vpn.ensure_present(conn1, params1) - ec2_vpc_vpn.ensure_present(conn2, params2) - - # create some new parameters for a filter - params = {"filters": {"tags": {"Correct": "Tag"}}} - - # find the connection that has the parameters above - found = ec2_vpc_vpn.find_connection(conn1, params) - - # assert the correct connection was found - assert found["VpnConnectionId"] == vpn2["VpnConnectionId"] - - # delete the connections - tear_down_conn(placeboify, conn1, vpn1["VpnConnectionId"]) - tear_down_conn(placeboify, conn2, vpn2["VpnConnectionId"]) - - -def test_find_connection_insufficient_filters(placeboify, maybe_sleep): - # get list of customer gateways and virtual private gateways - cgw, vgw = get_dependencies() - - # create two connections with the same tags - params = make_params(cgw[0], vgw[0], tags={"Correct": "Tag"}) - params2 = make_params(cgw[1], vgw[1], tags={"Correct": "Tag"}) - m, conn = setup_mod_conn(placeboify, params) - m2, conn2 = setup_mod_conn(placeboify, params2) - vpn1 = ec2_vpc_vpn.ensure_present(conn, m.params)[1] - vpn2 = ec2_vpc_vpn.ensure_present(conn2, m2.params)[1] - - # reset the parameters so only filtering by tags will occur - m.params = {"filters": {"tags": {"Correct": "Tag"}}} - - expected_message = "More than one matching VPN connection was found" - # assert that multiple matching connections have been found - with pytest.raises(ec2_vpc_vpn.VPNConnectionException, match=expected_message): - ec2_vpc_vpn.find_connection(conn, m.params) - - # delete the connections - tear_down_conn(placeboify, conn, vpn1["VpnConnectionId"]) - tear_down_conn(placeboify, conn, vpn2["VpnConnectionId"]) - - -def test_find_connection_nonexistent(placeboify, maybe_sleep): - # create parameters but don't create a connection with them - params = {"filters": {"tags": {"Correct": "Tag"}}} - m, conn = setup_mod_conn(placeboify, params) - - # try to find a connection with matching parameters and assert None are found - assert ec2_vpc_vpn.find_connection(conn, m.params) is None - - -def test_create_connection(placeboify, maybe_sleep): - # get list of customer gateways and virtual private gateways - cgw, vgw = get_dependencies() - - # create a connection - params = make_params(cgw[0], vgw[0]) - m, conn = setup_mod_conn(placeboify, params) - changed, vpn = ec2_vpc_vpn.ensure_present(conn, m.params) - - # assert that changed is true and that there is a connection id - assert changed is True - assert "VpnConnectionId" in vpn - - # delete connection - tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) - - -def test_create_connection_that_exists(placeboify, maybe_sleep): - # setup dependencies for 1 vpn connection - dependencies = setup_req(placeboify, 1) - params, vpn, _m, conn = ( - dependencies["params"], - dependencies["vpn"], - dependencies["module"], - dependencies["connection"], - ) - - # try to recreate the same connection - changed, vpn2 = ec2_vpc_vpn.ensure_present(conn, params) - - # nothing should have changed - assert changed is False - assert vpn["VpnConnectionId"] == vpn2["VpnConnectionId"] - - # delete connection - tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) - - -def test_modify_deleted_connection(placeboify, maybe_sleep): - # setup dependencies for 1 vpn connection - dependencies = setup_req(placeboify, 1) - _params, vpn, m, conn = ( - dependencies["params"], - dependencies["vpn"], - dependencies["module"], - dependencies["connection"], - ) - - # delete it - tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) - - # try to update the deleted connection - m.params.update(vpn_connection_id=vpn["VpnConnectionId"]) - expected_message = "no VPN connection available or pending with that id" - with pytest.raises(ec2_vpc_vpn.VPNConnectionException, match=expected_message): - ec2_vpc_vpn.ensure_present(conn, m.params) - - -def test_delete_connection(placeboify, maybe_sleep): - # setup dependencies for 1 vpn connection - dependencies = setup_req(placeboify, 1) - _params, vpn, m, conn = ( - dependencies["params"], - dependencies["vpn"], - dependencies["module"], - dependencies["connection"], - ) - - # delete it - changed, vpn = ec2_vpc_vpn.ensure_absent(conn, m.params) - - assert changed is True - assert vpn == {} - - -def test_delete_nonexistent_connection(placeboify, maybe_sleep): - # create parameters and ensure any connection matching (None) is deleted - params = {"filters": {"tags": {"ThisConnection": "DoesntExist"}}, "delay": 15, "wait_timeout": 600} - m, conn = setup_mod_conn(placeboify, params) - changed, vpn = ec2_vpc_vpn.ensure_absent(conn, m.params) - - assert changed is False - assert vpn == {} - - -def test_check_for_update_tags(placeboify, maybe_sleep): - # setup dependencies for 1 vpn connection - dependencies = setup_req(placeboify, 1) - _params, vpn, m, conn = ( - dependencies["params"], - dependencies["vpn"], - dependencies["module"], - dependencies["connection"], - ) - - # add and remove a number of tags - m.params["tags"] = {"One": "one", "Two": "two"} - ec2_vpc_vpn.ensure_present(conn, m.params) - m.params["tags"] = {"Two": "two", "Three": "three", "Four": "four"} - changes = ec2_vpc_vpn.check_for_update(conn, m.params, vpn["VpnConnectionId"]) - - flat_dict_changes = boto3_tag_list_to_ansible_dict(changes["tags_to_add"]) - correct_changes = boto3_tag_list_to_ansible_dict( - [{"Key": "Three", "Value": "three"}, {"Key": "Four", "Value": "four"}] - ) - assert flat_dict_changes == correct_changes - assert changes["tags_to_remove"] == ["One"] - - # delete connection - tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) - - -def test_check_for_update_nonmodifiable_attr(placeboify, maybe_sleep): - # setup dependencies for 1 vpn connection - dependencies = setup_req(placeboify, 1) - params, vpn, m, conn = ( - dependencies["params"], - dependencies["vpn"], - dependencies["module"], - dependencies["connection"], - ) - current_vgw = params["vpn_gateway_id"] - - # update a parameter that isn't modifiable - m.params.update(vpn_gateway_id="invalidchange") - - expected_message = f"You cannot modify vpn_gateway_id, the current value of which is {current_vgw}. Modifiable VPN connection attributes are" - with pytest.raises(ec2_vpc_vpn.VPNConnectionException, match=expected_message): - ec2_vpc_vpn.check_for_update(conn, m.params, vpn["VpnConnectionId"]) - - # delete connection - tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) - - -def test_add_tags(placeboify, maybe_sleep): - # setup dependencies for 1 vpn connection - dependencies = setup_req(placeboify, 1) - params, vpn, _m, conn = ( - dependencies["params"], - dependencies["vpn"], - dependencies["module"], - dependencies["connection"], - ) - - # add a tag to the connection - ec2_vpc_vpn.add_tags(conn, vpn["VpnConnectionId"], add=[{"Key": "Ansible-Test", "Value": "VPN"}]) - - # assert tag is there - current_vpn = ec2_vpc_vpn.find_connection(conn, params) - assert current_vpn["Tags"] == [{"Key": "Ansible-Test", "Value": "VPN"}] - - # delete connection - tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) - - -def test_remove_tags(placeboify, maybe_sleep): - # setup dependencies for 1 vpn connection - dependencies = setup_req(placeboify, 1) - params, vpn, _m, conn = ( - dependencies["params"], - dependencies["vpn"], - dependencies["module"], - dependencies["connection"], - ) - - # remove a tag from the connection - ec2_vpc_vpn.remove_tags(conn, vpn["VpnConnectionId"], remove=["Ansible-Test"]) - - # assert the tag is gone - current_vpn = ec2_vpc_vpn.find_connection(conn, params) - assert "Tags" not in current_vpn - - # delete connection - tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) - - -def test_add_routes(placeboify, maybe_sleep): - # setup dependencies for 1 vpn connection - dependencies = setup_req(placeboify, 1) - params, vpn, _m, conn = ( - dependencies["params"], - dependencies["vpn"], - dependencies["module"], - dependencies["connection"], - ) - - # create connection with a route - ec2_vpc_vpn.add_routes(conn, vpn["VpnConnectionId"], ["195.168.2.0/24", "196.168.2.0/24"]) - - # assert both routes are there - current_vpn = ec2_vpc_vpn.find_connection(conn, params) - assert set(each["DestinationCidrBlock"] for each in current_vpn["Routes"]) == set( - ["195.168.2.0/24", "196.168.2.0/24"] - ) - - # delete connection - tear_down_conn(placeboify, conn, vpn["VpnConnectionId"])