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 35b58df243f..be826cba8d2 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -5,7 +5,6 @@ concurrency: on: pull_request_target: types: [opened, synchronize, reopened, closed] - env: GHP_BASE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }} @@ -18,10 +17,13 @@ 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/ ansible_devel:https://docs.ansible.com/ansible-core/devel/ + artifact-name: ${{ github.event.repository.name }}_validate_docs_${{ github.event.pull_request.head.sha }} + build-docs: permissions: @@ -31,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 69c8fe7d689..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/ @@ -31,10 +32,13 @@ jobs: if: github.repository == 'ansible-collections/community.aws' permissions: contents: write + pages: write + id-token: write needs: [build-docs] name: Publish Ansible Docs uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main with: artifact-name: ${{ needs.build-docs.outputs.artifact-name }} + publish-gh-pages-branch: true secrets: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index 55318f2266a..1cd6a6ba3b2 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -8,66 +8,4 @@ jobs: uses: ansible-network/github_actions/.github/workflows/sanity.yml@main with: matrix_include: "[]" - matrix_exclude: >- - [ - { - "ansible-version": "stable-2.9" - }, - { - "ansible-version": "stable-2.12", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.12", - "python-version": "3.11" - }, - { - "ansible-version": "stable-2.13", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.13", - "python-version": "3.11" - }, - { - "ansible-version": "stable-2.14", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.14", - "python-version": "3.8" - }, - { - "ansible-version": "stable-2.15", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.15", - "python-version": "3.8" - }, - { - "ansible-version": "milestone", - "python-version": "3.7" - }, - { - "ansible-version": "milestone", - "python-version": "3.8" - }, - { - "ansible-version": "milestone", - "python-version": "3.9" - }, - { - "ansible-version": "devel", - "python-version": "3.7" - }, - { - "ansible-version": "devel", - "python-version": "3.8" - }, - { - "ansible-version": "devel", - "python-version": "3.9" - } - ] collection_pre_install: '-r source/tests/sanity/requirements.yml' diff --git a/.github/workflows/units.yml b/.github/workflows/units.yml index 4c92b52f91d..7dddcc61050 100644 --- a/.github/workflows/units.yml +++ b/.github/workflows/units.yml @@ -7,66 +7,4 @@ jobs: unit-source: uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main with: - matrix_exclude: >- - [ - { - "python-version": "3.11" - }, - { - "ansible-version": "stable-2.12", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.13", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.12", - "python-version": "3.8" - }, - { - "ansible-version": "stable-2.13", - "python-version": "3.8" - }, - { - "ansible-version": "stable-2.14", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.14", - "python-version": "3.8" - }, - { - "ansible-version": "stable-2.15", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.15", - "python-version": "3.8" - }, - { - "ansible-version": "milestone", - "python-version": "3.7" - }, - { - "ansible-version": "milestone", - "python-version": "3.8" - }, - { - "ansible-version": "milestone", - "python-version": "3.9" - }, - { - "ansible-version": "devel", - "python-version": "3.7" - }, - { - "ansible-version": "devel", - "python-version": "3.8" - }, - { - "ansible-version": "devel", - "python-version": "3.9" - } - ] collection_pre_install: '-r source/tests/unit/requirements.yml' diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 76c7dc0cbd7..ea2a0ce2dbd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,218 @@ 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 +====== + +Release Summary +--------------- + +This major release brings several new features, bug fixes, and deprecated features. It also includes the removal of several modules that have been migrated to the ``amazon.aws`` collection. We have also removed support for ``ansible-core<2.15``. + +Minor Changes +------------- + +- api_gateway - use fstrings where appropriate (https://github.com/ansible-collections/amazon.aws/pull/1962). +- api_gateway_info - use fstrings where appropriate (https://github.com/ansible-collections/amazon.aws/pull/1962). +- community.aws collection - apply isort code formatting to ensure consistent formatting of code (https://github.com/ansible-collections/community.aws/pull/1962) +- ecs_taskdefinition - Add parameter ``runtime_platform`` (https://github.com/ansible-collections/community.aws/issues/1891). +- eks_nodegroup - ensure wait also waits for deletion to complete when ``wait==True`` (https://github.com/ansible-collections/community.aws/pull/1994). +- elb_network_lb - add support for Application-Layer Protocol Negotiation (ALPN) policy ``AlpnPolicy`` for TLS listeners (https://github.com/ansible-collections/community.aws/issues/1566). +- elb_network_lb - add the possibly to update ``SslPolicy`` and ``Certificates`` for TLS listeners (). + +Breaking Changes / Porting Guide +-------------------------------- + +- The community.aws collection has dropped support for ``botocore<1.29.0`` and ``boto3<1.26.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/amazon.aws/pull/1763). +- aws_region_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.aws_region_info``. +- aws_s3_bucket_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.aws_s3_bucket_info``. +- community.aws collection - Support for ansible-core < 2.15 has been dropped (https://github.com/ansible-collections/community.aws/pull/2074). +- community.aws collection - due to the AWS SDKs announcing the end of support for Python less than 3.7 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/) support for Python less than 3.7 by this collection wss been deprecated in release 6.0.0 and removed in release 7.0.0. (https://github.com/ansible-collections/amazon.aws/pull/1763). +- iam_access_key - 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.iam_access_key``. +- iam_access_key_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.iam_access_key_info``. +- iam_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.iam_group`` (https://github.com/ansible-collections/community.aws/pull/1945). +- iam_managed_policy - 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.iam_managed_policy`` (https://github.com/ansible-collections/community.aws/pull/1954). +- iam_mfa_device_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.iam_mfa_device_info`` (https://github.com/ansible-collections/community.aws/pull/1953). +- iam_password_policy - 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.iam_password_policy``. +- iam_role - 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.iam_role`` (https://github.com/ansible-collections/community.aws/pull/1948). +- iam_role_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.iam_role_info`` (https://github.com/ansible-collections/community.aws/pull/1948). +- s3_bucket_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.s3_bucket_info``. +- sts_assume_role - 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.sts_assume_role``. + +Deprecated Features +------------------- + +- aws_glue_connection - updated the deprecation for removal of the ``connection_parameters`` return key from ``after 2024-06-01`` to release version ``9.0.0``, it is being replaced by the ``raw_connection_parameters`` key (https://github.com/ansible-collections/community.aws/pull/518). +- ecs_cluster - updated the deprecation for updated default of ``purge_capacity_providers``, the current default of ``False`` will be changed to ``True`` in release ``9.0.0``. To maintain the current behaviour explicitly set ``purge_capacity_providers=False`` (https://github.com/ansible-collections/community.aws/pull/1640). +- ecs_service - updated the deprecation for updated default of ``purge_placement_constraints``, the current default of ``False`` will be changed to ``True`` in release ``9.0.0``. To maintain the current behaviour explicitly set ``purge_placement_constraints=False`` (https://github.com/ansible-collections/community.aws/pull/1716). +- ecs_service - updated the deprecation for updated default of ``purge_placement_strategy``, the current default of ``False`` will be changed to ``True`` in release ``9.0.0``. To maintain the current behaviour explicitly set ``purge_placement_strategy=False`` (https://github.com/ansible-collections/community.aws/pull/1716). + +Bugfixes +-------- + +- mq_broker - ensure broker is created with ``tags`` when passed (https://github.com/ansible-collections/community.aws/issues/1832). +- opensearch - Don't try to read a non existing key from the domain config (https://github.com/ansible-collections/community.aws/pull/1910). + +v7.2.0 +====== + +Release Summary +--------------- + +This release includes a new module ``dynamodb_table_info``, new features for the ``glue_job`` and ``msk_cluster`` modules, and a bugfix for the ``aws_ssm`` connection plugin. + +Minor Changes +------------- + +- glue_job - add support for 2 new instance types which are G.4X and G.8X (https://github.com/ansible-collections/community.aws/pull/2048). +- msk_cluster - Support for additional ``m5`` and ``m7g`` types of MSK clusters (https://github.com/ansible-collections/community.aws/pull/1947). + +Bugfixes +-------- + +- ssm(connection) - fix bucket region logic when region is ``us-east-1`` (https://github.com/ansible-collections/community.aws/pull/1908). + +New Modules +----------- + +- dynamodb_table_info - Returns information about a Dynamo DB table + +v7.1.0 +====== + +Release Summary +--------------- + +This release includes new features for the ``cloudfront_distribution`` and ``mq_broker`` modules, as well as a bugfix for the ``aws_ssm`` connection plugin needed when connecting to hosts with Bash 5.1.0 and later. + +Minor Changes +------------- + +- aws_ssm - Updated the documentation to explicitly state that an S3 bucket is required, the behavior of the files in that bucket, and requirements around that. (https://github.com/ansible-collections/community.aws/issues/1775). +- cloudfront_distribution - added support for ``cache_policy_id`` and ``origin_request_policy_id`` for behaviors (https://github.com/ansible-collections/community.aws/pull/1589) +- mq_broker - add support to wait for broker state via ``wait`` and ``wait_timeout`` parameter values (https://github.com/ansible-collections/community.aws/pull/1879). + +Bugfixes +-------- + +- aws_ssm - disable ``enable-bracketed-paste`` to fix issue with amazon linux 2023 and other OSes (https://github.com/ansible-collections/community.aws/issues/1756) + +v7.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.29.0`` and ``boto3<1.26.0``. Due to the AWS SDKs announcing the end of support for Python less than 3.7 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/), support for Python less than 3.7 by this collection was deprecated in release 6.0.0 and removed in release 7.0.0. (https://github.com/ansible-collections/amazon.aws/pull/1763). + +Minor Changes +------------- + +- api_gateway - use fstrings where appropriate (https://github.com/ansible-collections/amazon.aws/pull/1962). +- api_gateway_info - use fstrings where appropriate (https://github.com/ansible-collections/amazon.aws/pull/1962). +- community.aws collection - apply isort code formatting to ensure consistent formatting of code (https://github.com/ansible-collections/community.aws/pull/1962) +- ecs_taskdefinition - Add parameter ``runtime_platform`` (https://github.com/ansible-collections/community.aws/issues/1891). +- eks_nodegroup - ensure wait also waits for deletion to complete when ``wait==True`` (https://github.com/ansible-collections/community.aws/pull/1994). + +Breaking Changes / Porting Guide +-------------------------------- + +- The community.aws collection has dropped support for ``botocore<1.29.0`` and ``boto3<1.26.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/amazon.aws/pull/1763). +- aws_region_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.aws_region_info``. +- aws_s3_bucket_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.aws_s3_bucket_info``. +- community.aws collection - due to the AWS SDKs announcing the end of support for Python less than 3.7 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/) support for Python less than 3.7 by this collection wss been deprecated in release 6.0.0 and removed in release 7.0.0. (https://github.com/ansible-collections/amazon.aws/pull/1763). +- iam_access_key - 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.iam_access_key``. +- iam_access_key_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.iam_access_key_info``. +- iam_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.iam_group`` (https://github.com/ansible-collections/community.aws/pull/1945). +- iam_managed_policy - 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.iam_managed_policy`` (https://github.com/ansible-collections/community.aws/pull/1954). +- iam_mfa_device_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.iam_mfa_device_info`` (https://github.com/ansible-collections/community.aws/pull/1953). +- iam_password_policy - 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.iam_password_policy``. +- iam_role - 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.iam_role`` (https://github.com/ansible-collections/community.aws/pull/1948). +- iam_role_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.iam_role_info`` (https://github.com/ansible-collections/community.aws/pull/1948). +- s3_bucket_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.s3_bucket_info``. +- sts_assume_role - 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.sts_assume_role``. + +Bugfixes +-------- + +- mq_broker - ensure broker is created with ``tags`` when passed (https://github.com/ansible-collections/community.aws/issues/1832). +- opensearch - Don't try to read a non existing key from the domain config (https://github.com/ansible-collections/community.aws/pull/1910). v6.2.0 ====== @@ -73,7 +285,6 @@ This release brings some new plugins and features. Several bugfixes, breaking ch The community.aws collection has dropped support for ``botocore<1.25.0`` and ``boto3<1.22.0``. Support for Python 3.6 has also been dropped. - Minor Changes ------------- @@ -146,7 +357,6 @@ Release Summary This release contains a number of bugfixes for various modules, as well as new features for the ``ec2_launch_template`` and ``msk_cluster`` modules. This is the last planned minor release prior to the release of version 6.0.0. - Minor Changes ------------- @@ -242,7 +452,6 @@ modules. As well as improvements to the ``ecs_cluster``, ``ec2_ecr``, ``ecs_service``, ``iam_role`` and ``ssm_parameter`` plugins. - Minor Changes ------------- @@ -308,7 +517,6 @@ Support for ``ansible-core<2.11`` has also been dropped. This release also brings some new features, bugfixes, breaking changes and deprecated features. - Minor Changes ------------- @@ -470,7 +678,6 @@ Release Summary This release contains a minor bugfix for the ``sns_topic`` module as well as corrections to the documentation for various modules. This is the last planned release of the 4.x series. - Bugfixes -------- @@ -828,7 +1035,6 @@ Release Summary Following the release of community.aws 5.0.0, 3.6.0 is a bugfix release and the final planned release for the 3.x series. - Minor Changes ------------- 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 bcabfb701e2..1c4a4ed6173 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,22 @@ 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.12.0 versions, and the current development version of Ansible. Ansible Core versions before 2.12.0 are not supported. +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. Use community.aws 4.x.y if you are using Ansible 2.9 or Ansible Core 2.10. @@ -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 25fcad5fdef..e2702bdfb5a 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1643,9 +1643,8 @@ releases: release_date: '2022-06-22' 2.6.1: changes: - release_summary: - Bump collection from 2.6.0 to 2.6.1 due to a publishing error with 2.6.0. This - release supersedes 2.6.0 entirely, users should skip 2.6.0. + release_summary: Bump collection from 2.6.0 to 2.6.1 due to a publishing error + with 2.6.0. This release supersedes 2.6.0 entirely, users should skip 2.6.0. fragments: - 261_increase.yml release_date: '2022-06-22' @@ -3470,7 +3469,8 @@ releases: - cloudfront_distribution - add ``http3`` support via parameter value ``http2and3`` for parameter ``http_version`` (https://github.com/ansible-collections/community.aws/pull/1753). - cloudfront_distribution - add ``origin_shield`` options (https://github.com/ansible-collections/community.aws/pull/1557). - - cloudfront_distribution - documented ``connection_attempts`` and ``connection_timeout`` the module was already capable of using them + - cloudfront_distribution - documented ``connection_attempts`` and ``connection_timeout`` + the module was already capable of using them - community.aws - updated document fragments based on changes in amazon.aws (https://github.com/ansible-collections/community.aws/pull/1738). - community.aws - updated imports based on changes in amazon.aws (https://github.com/ansible-collections/community.aws/pull/1738). @@ -3614,3 +3614,441 @@ releases: - release_summary.yml - transit_gateway_to_vpn.yaml release_date: '2023-08-04' + 7.0.0: + changes: + breaking_changes: + - The community.aws collection has dropped support for ``botocore<1.29.0`` and + ``boto3<1.26.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/amazon.aws/pull/1763). + - aws_region_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.aws_region_info``. + - aws_s3_bucket_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.aws_s3_bucket_info``. + - community.aws collection - due to the AWS SDKs announcing the end of support + for Python less than 3.7 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/) + support for Python less than 3.7 by this collection wss been deprecated in + release 6.0.0 and removed in release 7.0.0. (https://github.com/ansible-collections/amazon.aws/pull/1763). + - iam_access_key - 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.iam_access_key``. + - iam_access_key_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.iam_access_key_info``. + - iam_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.iam_group`` (https://github.com/ansible-collections/community.aws/pull/1945). + - iam_managed_policy - 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.iam_managed_policy`` (https://github.com/ansible-collections/community.aws/pull/1954). + - iam_mfa_device_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.iam_mfa_device_info`` (https://github.com/ansible-collections/community.aws/pull/1953). + - iam_password_policy - 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.iam_password_policy``. + - iam_role - 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.iam_role`` (https://github.com/ansible-collections/community.aws/pull/1948). + - iam_role_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.iam_role_info`` (https://github.com/ansible-collections/community.aws/pull/1948). + - s3_bucket_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.s3_bucket_info``. + - sts_assume_role - 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.sts_assume_role``. + bugfixes: + - mq_broker - ensure broker is created with ``tags`` when passed (https://github.com/ansible-collections/community.aws/issues/1832). + - opensearch - Don't try to read a non existing key from the domain config (https://github.com/ansible-collections/community.aws/pull/1910). + minor_changes: + - api_gateway - use fstrings where appropriate (https://github.com/ansible-collections/amazon.aws/pull/1962). + - api_gateway_info - use fstrings where appropriate (https://github.com/ansible-collections/amazon.aws/pull/1962). + - community.aws collection - apply isort code formatting to ensure consistent + formatting of code (https://github.com/ansible-collections/community.aws/pull/1962) + - ecs_taskdefinition - Add parameter ``runtime_platform`` (https://github.com/ansible-collections/community.aws/issues/1891). + - eks_nodegroup - ensure wait also waits for deletion to complete when ``wait==True`` + (https://github.com/ansible-collections/community.aws/pull/1994). + 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.29.0`` and ``boto3<1.26.0``. Due to the + AWS SDKs announcing the end of support for Python less than 3.7 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/), + support for Python less than 3.7 by this collection was deprecated in release + 6.0.0 and removed in release 7.0.0. (https://github.com/ansible-collections/amazon.aws/pull/1763). + fragments: + - 1832-mq_broker_tags.yml + - 1891_ecs-task-definition-add-runtime-platform.yml + - 1904-route53_wait.yml + - 1962-isort.yml + - 20230623-black-cloudfront.yml + - 20230702-isort.yml + - 20230801-fix-linters.yml + - 20230906-galaxy.yml + - 20230906-route53_wait.yml + - 20230908-alias-cleanup.yml + - 20230915_migrate_iam_role_and_iam_role_info.yml + - 7.0.0-dev0.yml + - botocore.yml + - botocore_params-cleanup.yml + - eks_nodegroup-integration-wait-delete.yml + - galaxy_importer.yml + - migrate_aws_region_info.yml + - migrate_iam_access_key.yml + - migrate_iam_group.yml + - migrate_iam_managed_policy.yml + - migrate_iam_mfa_device_info.yml + - migrate_iam_password_policy.yml + - migrate_s3_bucket_info.yml + - migrate_sts_assume_role.yml + - opensearch_domainconfig_no_options.yaml + - python37.yml + - release_summary.yml + - workflow-requirements.yml + release_date: '2023-11-06' + 7.1.0: + changes: + bugfixes: + - aws_ssm - disable ``enable-bracketed-paste`` to fix issue with amazon linux + 2023 and other OSes (https://github.com/ansible-collections/community.aws/issues/1756) + minor_changes: + - aws_ssm - Updated the documentation to explicitly state that an S3 bucket + is required, the behavior of the files in that bucket, and requirements around + that. (https://github.com/ansible-collections/community.aws/issues/1775). + - cloudfront_distribution - added support for ``cache_policy_id`` and ``origin_request_policy_id`` + for behaviors (https://github.com/ansible-collections/community.aws/pull/1589) + - mq_broker - add support to wait for broker state via ``wait`` and ``wait_timeout`` + parameter values (https://github.com/ansible-collections/community.aws/pull/1879). + release_summary: This release includes new features for the ``cloudfront_distribution`` + and ``mq_broker`` modules, as well as a bugfix for the ``aws_ssm`` connection + plugin needed when connecting to hosts with Bash 5.1.0 and later. + fragments: + - 1589-cloudfront_distribution-add-policies.yml + - 1775-aws_ssm-s3-docs.yaml + - 1839-disable-bracketed-paste.yml + - 1879-mq_broker-add-wait.yml + - release.yml + - ssm-fedora34.yml + release_date: '2024-01-10' + 7.2.0: + changes: + bugfixes: + - ssm(connection) - fix bucket region logic when region is ``us-east-1`` (https://github.com/ansible-collections/community.aws/pull/1908). + minor_changes: + - glue_job - add support for 2 new instance types which are G.4X and G.8X (https://github.com/ansible-collections/community.aws/pull/2048). + - msk_cluster - Support for additional ``m5`` and ``m7g`` types of MSK clusters + (https://github.com/ansible-collections/community.aws/pull/1947). + release_summary: This release includes a new module ``dynamodb_table_info``, + new features for the ``glue_job`` and ``msk_cluster`` modules, and a bugfix + for the ``aws_ssm`` connection plugin. + fragments: + - 1908-fix_find_out_bucket_region_logic.yml + - 1947-add_support_msk_addtinal_type.yml + - 20240402-lambda-test-runtime.yml + - 2048-add-new-instance-types-in-gluejob.yaml + modules: + - description: Returns information about a Dynamo DB table + name: dynamodb_table_info + namespace: '' + release_date: '2024-04-05' + 8.0.0: + changes: + breaking_changes: + - The community.aws collection has dropped support for ``botocore<1.29.0`` and + ``boto3<1.26.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/amazon.aws/pull/1763). + - aws_region_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.aws_region_info``. + - aws_s3_bucket_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.aws_s3_bucket_info``. + - community.aws collection - Support for ansible-core < 2.15 has been dropped + (https://github.com/ansible-collections/community.aws/pull/2074). + - community.aws collection - due to the AWS SDKs announcing the end of support + for Python less than 3.7 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/) + support for Python less than 3.7 by this collection wss been deprecated in + release 6.0.0 and removed in release 7.0.0. (https://github.com/ansible-collections/amazon.aws/pull/1763). + - iam_access_key - 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.iam_access_key``. + - iam_access_key_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.iam_access_key_info``. + - iam_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.iam_group`` (https://github.com/ansible-collections/community.aws/pull/1945). + - iam_managed_policy - 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.iam_managed_policy`` (https://github.com/ansible-collections/community.aws/pull/1954). + - iam_mfa_device_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.iam_mfa_device_info`` (https://github.com/ansible-collections/community.aws/pull/1953). + - iam_password_policy - 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.iam_password_policy``. + - iam_role - 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.iam_role`` (https://github.com/ansible-collections/community.aws/pull/1948). + - iam_role_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.iam_role_info`` (https://github.com/ansible-collections/community.aws/pull/1948). + - s3_bucket_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.s3_bucket_info``. + - sts_assume_role - 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.sts_assume_role``. + bugfixes: + - mq_broker - ensure broker is created with ``tags`` when passed (https://github.com/ansible-collections/community.aws/issues/1832). + - opensearch - Don't try to read a non existing key from the domain config (https://github.com/ansible-collections/community.aws/pull/1910). + deprecated_features: + - aws_glue_connection - updated the deprecation for removal of the ``connection_parameters`` + return key from ``after 2024-06-01`` to release version ``9.0.0``, it is being + replaced by the ``raw_connection_parameters`` key (https://github.com/ansible-collections/community.aws/pull/518). + - ecs_cluster - updated the deprecation for updated default of ``purge_capacity_providers``, + the current default of ``False`` will be changed to ``True`` in release ``9.0.0``. To + maintain the current behaviour explicitly set ``purge_capacity_providers=False`` + (https://github.com/ansible-collections/community.aws/pull/1640). + - ecs_service - updated the deprecation for updated default of ``purge_placement_constraints``, + the current default of ``False`` will be changed to ``True`` in release ``9.0.0``. To + maintain the current behaviour explicitly set ``purge_placement_constraints=False`` + (https://github.com/ansible-collections/community.aws/pull/1716). + - ecs_service - updated the deprecation for updated default of ``purge_placement_strategy``, + the current default of ``False`` will be changed to ``True`` in release ``9.0.0``. To + maintain the current behaviour explicitly set ``purge_placement_strategy=False`` + (https://github.com/ansible-collections/community.aws/pull/1716). + minor_changes: + - api_gateway - use fstrings where appropriate (https://github.com/ansible-collections/amazon.aws/pull/1962). + - api_gateway_info - use fstrings where appropriate (https://github.com/ansible-collections/amazon.aws/pull/1962). + - community.aws collection - apply isort code formatting to ensure consistent + formatting of code (https://github.com/ansible-collections/community.aws/pull/1962) + - ecs_taskdefinition - Add parameter ``runtime_platform`` (https://github.com/ansible-collections/community.aws/issues/1891). + - eks_nodegroup - ensure wait also waits for deletion to complete when ``wait==True`` + (https://github.com/ansible-collections/community.aws/pull/1994). + - elb_network_lb - add support for Application-Layer Protocol Negotiation (ALPN) + policy ``AlpnPolicy`` for TLS listeners (https://github.com/ansible-collections/community.aws/issues/1566). + - elb_network_lb - add the possibly to update ``SslPolicy`` and ``Certificates`` + for TLS listeners (). + release_summary: This major release brings several new features, bug fixes, + and deprecated features. It also includes the removal of several modules that + have been migrated to the ``amazon.aws`` collection. We have also removed + support for ``ansible-core<2.15``. + fragments: + - 1832-mq_broker_tags.yml + - 1891_ecs-task-definition-add-runtime-platform.yml + - 1904-route53_wait.yml + - 1962-isort.yml + - 20230623-black-cloudfront.yml + - 20230702-isort.yml + - 20230801-fix-linters.yml + - 20230906-galaxy.yml + - 20230906-route53_wait.yml + - 20230908-alias-cleanup.yml + - 20230915_migrate_iam_role_and_iam_role_info.yml + - 20231127-elb_network_lb-update-tls-listeners.yaml + - 20240408-efs-sanity_fix.yml + - 7.0.0-dev0.yml + - 8.0.0-increase-ansible-core-version.yml + - 8.0.0-release.yml + - 9-date-deprecations.yml + - boto3_equals.yml + - botocore.yml + - botocore_params-cleanup.yml + - eks_nodegroup-integration-wait-delete.yml + - galaxy_importer.yml + - migrate_aws_region_info.yml + - migrate_iam_access_key.yml + - migrate_iam_group.yml + - migrate_iam_managed_policy.yml + - migrate_iam_mfa_device_info.yml + - migrate_iam_password_policy.yml + - migrate_s3_bucket_info.yml + - migrate_sts_assume_role.yml + - opensearch_domainconfig_no_options.yaml + - 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/1832-mq_broker_tags.yml b/changelogs/fragments/1832-mq_broker_tags.yml deleted file mode 100644 index b2320dd3c71..00000000000 --- a/changelogs/fragments/1832-mq_broker_tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - mq_broker - ensure broker is created with ``tags`` when passed (https://github.com/ansible-collections/community.aws/issues/1832). \ No newline at end of file diff --git a/changelogs/fragments/1891_ecs-task-definition-add-runtime-platform.yml b/changelogs/fragments/1891_ecs-task-definition-add-runtime-platform.yml deleted file mode 100644 index ae800635281..00000000000 --- a/changelogs/fragments/1891_ecs-task-definition-add-runtime-platform.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - ecs_taskdefinition - Add parameter ``runtime_platform`` (https://github.com/ansible-collections/community.aws/issues/1891). diff --git a/changelogs/fragments/1904-route53_wait.yml b/changelogs/fragments/1904-route53_wait.yml deleted file mode 100644 index f8f4568b43e..00000000000 --- a/changelogs/fragments/1904-route53_wait.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: - - "Add route53_wait module to community.aws.aws action group (https://github.com/ansible-collections/community.aws/pull/1904)." diff --git a/changelogs/fragments/1962-isort.yml b/changelogs/fragments/1962-isort.yml deleted file mode 100644 index 65eb9792250..00000000000 --- a/changelogs/fragments/1962-isort.yml +++ /dev/null @@ -1,4 +0,0 @@ -minor_changes: -- community.aws collection - apply isort code formatting to ensure consistent formatting of code (https://github.com/ansible-collections/community.aws/pull/1962) -- api_gateway - use fstrings where appropriate (https://github.com/ansible-collections/amazon.aws/pull/1962). -- api_gateway_info - use fstrings where appropriate (https://github.com/ansible-collections/amazon.aws/pull/1962). diff --git a/changelogs/fragments/20230623-black-cloudfront.yml b/changelogs/fragments/20230623-black-cloudfront.yml deleted file mode 100644 index 4630a814612..00000000000 --- a/changelogs/fragments/20230623-black-cloudfront.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: -- cloudfront_distribution - apply black formatting diff --git a/changelogs/fragments/20230702-isort.yml b/changelogs/fragments/20230702-isort.yml deleted file mode 100644 index 5ceaa201c0e..00000000000 --- a/changelogs/fragments/20230702-isort.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: -- added isort configs to pyproject.toml diff --git a/changelogs/fragments/20230801-fix-linters.yml b/changelogs/fragments/20230801-fix-linters.yml deleted file mode 100644 index d0a3c957d70..00000000000 --- a/changelogs/fragments/20230801-fix-linters.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: - - Replace use of ``type`` by ``isinstance`` to test variable type. diff --git a/changelogs/fragments/20230906-galaxy.yml b/changelogs/fragments/20230906-galaxy.yml deleted file mode 100644 index a7ff7b5a43f..00000000000 --- a/changelogs/fragments/20230906-galaxy.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: -- galaxy.yml - add collection description. diff --git a/changelogs/fragments/20230906-route53_wait.yml b/changelogs/fragments/20230906-route53_wait.yml deleted file mode 100644 index 34f5fc1d245..00000000000 --- a/changelogs/fragments/20230906-route53_wait.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: -- route53_wait - fix version_added. diff --git a/changelogs/fragments/20230908-alias-cleanup.yml b/changelogs/fragments/20230908-alias-cleanup.yml deleted file mode 100644 index b54cc42242e..00000000000 --- a/changelogs/fragments/20230908-alias-cleanup.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: -- Update integration tests to reflect renamed plugins diff --git a/changelogs/fragments/20230915_migrate_iam_role_and_iam_role_info.yml b/changelogs/fragments/20230915_migrate_iam_role_and_iam_role_info.yml deleted file mode 100644 index f984a66337f..00000000000 --- a/changelogs/fragments/20230915_migrate_iam_role_and_iam_role_info.yml +++ /dev/null @@ -1,7 +0,0 @@ -breaking_changes: -- iam_role - 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.iam_role`` (https://github.com/ansible-collections/community.aws/pull/1948). -- iam_role_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.iam_role_info`` (https://github.com/ansible-collections/community.aws/pull/1948). 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/7.0.0-dev0.yml b/changelogs/fragments/7.0.0-dev0.yml deleted file mode 100644 index c49331daa50..00000000000 --- a/changelogs/fragments/7.0.0-dev0.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: -- bump galaxy.yml to release 7.0.0-dev0 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/changelogs/fragments/botocore.yml b/changelogs/fragments/botocore.yml deleted file mode 100644 index 901bcdabcbe..00000000000 --- a/changelogs/fragments/botocore.yml +++ /dev/null @@ -1,6 +0,0 @@ -breaking_changes: -- The community.aws collection has dropped support for ``botocore<1.29.0`` and - ``boto3<1.26.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/amazon.aws/pull/1763). diff --git a/changelogs/fragments/botocore_params-cleanup.yml b/changelogs/fragments/botocore_params-cleanup.yml deleted file mode 100644 index b92b6606e75..00000000000 --- a/changelogs/fragments/botocore_params-cleanup.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: -- update docs and tests to use canonical parameter names for credentials. diff --git a/changelogs/fragments/eks_nodegroup-integration-wait-delete.yml b/changelogs/fragments/eks_nodegroup-integration-wait-delete.yml deleted file mode 100644 index a88c08d73ef..00000000000 --- a/changelogs/fragments/eks_nodegroup-integration-wait-delete.yml +++ /dev/null @@ -1,4 +0,0 @@ -trivial: -- eks_nodegroup - update integration test to wait for both nodegroups to be deleted. -minor_changes: -- eks_nodegroup - ensure wait also waits for deletion to complete when ``wait==True`` (https://github.com/ansible-collections/community.aws/pull/1994). diff --git a/changelogs/fragments/galaxy_importer.yml b/changelogs/fragments/galaxy_importer.yml deleted file mode 100644 index db2a75b6388..00000000000 --- a/changelogs/fragments/galaxy_importer.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: -- "Add Galaxy importer GitHub action." diff --git a/changelogs/fragments/migrate_aws_region_info.yml b/changelogs/fragments/migrate_aws_region_info.yml deleted file mode 100644 index ba6b319168f..00000000000 --- a/changelogs/fragments/migrate_aws_region_info.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -breaking_changes: - - aws_region_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.aws_region_info``. diff --git a/changelogs/fragments/migrate_iam_access_key.yml b/changelogs/fragments/migrate_iam_access_key.yml deleted file mode 100644 index 8485c6a1849..00000000000 --- a/changelogs/fragments/migrate_iam_access_key.yml +++ /dev/null @@ -1,7 +0,0 @@ -breaking_changes: -- iam_access_key - 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.iam_access_key``. -- iam_access_key_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.iam_access_key_info``. diff --git a/changelogs/fragments/migrate_iam_group.yml b/changelogs/fragments/migrate_iam_group.yml deleted file mode 100644 index 23aa0386250..00000000000 --- a/changelogs/fragments/migrate_iam_group.yml +++ /dev/null @@ -1,4 +0,0 @@ -breaking_changes: -- iam_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.iam_group`` (https://github.com/ansible-collections/community.aws/pull/1945). diff --git a/changelogs/fragments/migrate_iam_managed_policy.yml b/changelogs/fragments/migrate_iam_managed_policy.yml deleted file mode 100644 index 284a0e927ee..00000000000 --- a/changelogs/fragments/migrate_iam_managed_policy.yml +++ /dev/null @@ -1,4 +0,0 @@ -breaking_changes: -- iam_managed_policy - 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.iam_managed_policy`` (https://github.com/ansible-collections/community.aws/pull/1954). diff --git a/changelogs/fragments/migrate_iam_mfa_device_info.yml b/changelogs/fragments/migrate_iam_mfa_device_info.yml deleted file mode 100644 index 85ef2ec60af..00000000000 --- a/changelogs/fragments/migrate_iam_mfa_device_info.yml +++ /dev/null @@ -1,4 +0,0 @@ -breaking_changes: -- iam_mfa_device_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.iam_mfa_device_info`` (https://github.com/ansible-collections/community.aws/pull/1953). diff --git a/changelogs/fragments/migrate_iam_password_policy.yml b/changelogs/fragments/migrate_iam_password_policy.yml deleted file mode 100644 index fb9dbda7439..00000000000 --- a/changelogs/fragments/migrate_iam_password_policy.yml +++ /dev/null @@ -1,4 +0,0 @@ -breaking_changes: -- iam_password_policy - 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.iam_password_policy``. diff --git a/changelogs/fragments/migrate_s3_bucket_info.yml b/changelogs/fragments/migrate_s3_bucket_info.yml deleted file mode 100644 index 8be309e4d82..00000000000 --- a/changelogs/fragments/migrate_s3_bucket_info.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -breaking_changes: - - aws_s3_bucket_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.aws_s3_bucket_info``. - - s3_bucket_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.s3_bucket_info``. diff --git a/changelogs/fragments/migrate_sts_assume_role.yml b/changelogs/fragments/migrate_sts_assume_role.yml deleted file mode 100644 index 49bb113ab2d..00000000000 --- a/changelogs/fragments/migrate_sts_assume_role.yml +++ /dev/null @@ -1,4 +0,0 @@ -breaking_changes: -- sts_assume_role - 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.sts_assume_role``. diff --git a/changelogs/fragments/opensearch_domainconfig_no_options.yaml b/changelogs/fragments/opensearch_domainconfig_no_options.yaml deleted file mode 100644 index d86d379f55d..00000000000 --- a/changelogs/fragments/opensearch_domainconfig_no_options.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: -- "opensearch - Don't try to read a non existing key from the domain config (https://github.com/ansible-collections/community.aws/pull/1910)." diff --git a/changelogs/fragments/python37.yml b/changelogs/fragments/python37.yml deleted file mode 100644 index 8bd6d148bd0..00000000000 --- a/changelogs/fragments/python37.yml +++ /dev/null @@ -1,10 +0,0 @@ -breaking_changes: -- community.aws collection - due to the AWS SDKs announcing the end of support - for Python less than 3.7 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/) - support for Python less than 3.7 by this collection wss been deprecated in release 6.0.0 and removed in release 7.0.0. - (https://github.com/ansible-collections/amazon.aws/pull/1763). - -# We've already announced the deprecation for <3.8 (with 6.0.0), dropping support for <3.9 on ours side will happen -# after April 2026. This is about 2 years + 5 months away assuming a November 7.0.0 release, we could announce -# the deprecation now, but assuming we release 8.0.0 in about 6 months a just short of 2 year -# deprecation feels fine given it's predictable. diff --git a/changelogs/fragments/workflow-requirements.yml b/changelogs/fragments/workflow-requirements.yml deleted file mode 100644 index c43821ae60e..00000000000 --- a/changelogs/fragments/workflow-requirements.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: -- Update test workflows to use relevant requirements files. diff --git a/galaxy.yml b/galaxy.yml index 4ce2e744b11..e264d3977d6 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: community name: aws -version: 7.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: '>=7.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 5d05436df14..5d54de6274b 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,5 +1,5 @@ --- -requires_ansible: '>=2.12.0' +requires_ansible: '>=2.15.0' action_groups: aws: - accessanalyzer_validate_policy_info @@ -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 @@ -89,39 +87,22 @@ action_groups: - dms_endpoint - dms_replication_subnet_group - dynamodb_table + - dynamodb_table_info - dynamodb_ttl - 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 @@ -145,7 +126,6 @@ action_groups: - elasticache_subnet_group - elasticbeanstalk_app - elb_classic_lb - - elb_classic_lb_info - elb_instance - elb_network_lb - elb_target @@ -383,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 @@ -519,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/connection/aws_ssm.py b/plugins/connection/aws_ssm.py index 173dd6a084c..5c2d6d57788 100644 --- a/plugins/connection/aws_ssm.py +++ b/plugins/connection/aws_ssm.py @@ -20,12 +20,27 @@ ``ansible_user`` variables to configure the remote user. The ``become_user`` parameter should be used to configure which user to run commands as. Remote commands will often default to running as the ``ssm-agent`` user, however this will also depend on how SSM has been configured. + - This plugin requires an S3 bucket to send files to/from the remote instance. This is required even for modules + which do not explicitly send files (such as the C(shell) or C(command) modules), because Ansible sends over the C(.py) files of the module itself, via S3. + - Files sent via S3 will be named in S3 with the EC2 host ID (e.g. C(i-123abc/)) as the prefix. + - The files in S3 will be deleted by the end of the playbook run. If the play is terminated ungracefully, the files may remain in the bucket. + If the bucket has versioning enabled, the files will remain in version history. If your tasks involve sending secrets to/from the remote instance + (e.g. within a C(shell) command, or a SQL password in the C(community.postgresql.postgresql_query) module) then those passwords will be included in + plaintext in those files in S3 indefinitely, visible to anyone with access to that bucket. Therefore it is recommended to use a bucket with versioning + disabled/suspended. + - The files in S3 will be deleted even if the C(keep_remote_files) setting is C(true). + requirements: - The remote EC2 instance must be running the AWS Systems Manager Agent (SSM Agent). U(https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) - The control machine must have the AWS session manager plugin installed. U(https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html) - The remote EC2 Linux instance must have curl installed. + - The remote EC2 Linux instance and the controller both need network connectivity to S3. + - The remote instance does not require IAM credentials for S3. This module will generate a presigned URL for S3 from the controller, + and then will pass that URL to the target over SSM, telling the target to download/upload from S3 with C(curl). + - The controller requires IAM permissions to upload, download and delete files from the specified S3 bucket. This includes + `s3:GetObject`, `s3:PutObject`, `s3:ListBucket`, `s3:DeleteObject` and `s3:GetBucketLocation`. options: access_key_id: @@ -130,7 +145,7 @@ """ EXAMPLES = r""" - +--- # Wait for SSM Agent to be available on the Instance - name: Wait for connection to be available vars: @@ -183,17 +198,19 @@ path: C:\Windows\temp state: directory +--- + # Making use of Dynamic Inventory Plugin # ======================================= -# aws_ec2.yml (Dynamic Inventory - Linux) -# This will return the Instance IDs matching the filter -#plugin: aws_ec2 -#regions: -# - us-east-1 -#hostnames: -# - instance-id -#filters: -# tag:SSMTag: ssmlinux +# # aws_ec2.yml (Dynamic Inventory - Linux) +# plugin: aws_ec2 +# regions: +# - us-east-1 +# hostnames: +# - instance-id +# # This will return the Instances with the tag "SSMTag" set to "ssmlinux" +# filters: +# tag:SSMTag: ssmlinux # ----------------------- - name: install aws-cli hosts: all @@ -203,20 +220,23 @@ ansible_aws_ssm_bucket_name: nameofthebucket ansible_aws_ssm_region: us-east-1 tasks: - - name: aws-cli - raw: yum install -y awscli - tags: aws-cli + - name: aws-cli + raw: yum install -y awscli + tags: aws-cli + +--- + # Execution: ansible-playbook linux.yaml -i aws_ec2.yml -# The playbook tasks will get executed on the instance ids returned from the dynamic inventory plugin using ssm connection. # ===================================================== -# aws_ec2.yml (Dynamic Inventory - Windows) -#plugin: aws_ec2 -#regions: -# - us-east-1 -#hostnames: -# - instance-id -#filters: -# tag:SSMTag: ssmwindows +# # aws_ec2.yml (Dynamic Inventory - Windows) +# plugin: aws_ec2 +# regions: +# - us-east-1 +# hostnames: +# - instance-id +# # This will return the Instances with the tag "SSMTag" set to "ssmwindows" +# filters: +# tag:SSMTag: ssmwindows # ----------------------- - name: Create a dir. hosts: all @@ -231,10 +251,13 @@ win_file: path: C:\Temp\SSM_Testing5 state: directory + +--- + # Execution: ansible-playbook win_file.yaml -i aws_ec2.yml # The playbook tasks will get executed on the instance ids returned from the dynamic inventory plugin using ssm connection. -# Install a Nginx Package on Linux Instance; with specific SSE for file transfer +# Install a Nginx Package on Linux Instance; with specific SSE CMK used for the file transfer - name: Install a Nginx Package vars: ansible_connection: aws_ssm @@ -248,7 +271,7 @@ name: nginx state: present -# Install a Nginx Package on Linux Instance; with dedicated SSM document +# Install a Nginx Package on Linux Instance; using the specified SSM document - name: Install a Nginx Package vars: ansible_connection: aws_ssm @@ -407,7 +430,10 @@ def _get_bucket_endpoint(self): bucket_location = tmp_s3_client.get_bucket_location( Bucket=(self.get_option("bucket_name")), ) - bucket_region = bucket_location["LocationConstraint"] + if bucket_location["LocationConstraint"]: + bucket_region = bucket_location["LocationConstraint"] + else: + bucket_region = "us-east-1" if self.get_option("bucket_endpoint_url"): return self.get_option("bucket_endpoint_url"), bucket_region @@ -627,7 +653,7 @@ def _prepare_terminal(self): disable_prompt_complete = None end_mark = "".join([random.choice(string.ascii_letters) for i in xrange(self.MARK_LENGTH)]) disable_prompt_cmd = to_bytes( - "PS1='' ; printf '\\n%s\\n' '" + end_mark + "'\n", + "PS1='' ; bind 'set enable-bracketed-paste off'; printf '\\n%s\\n' '" + end_mark + "'\n", errors="surrogate_or_strict", ) disable_prompt_reply = re.compile(r"\r\r\n" + re.escape(end_mark) + r"\r\r\n", re.MULTILINE) diff --git a/plugins/inventory/aws_mq.py b/plugins/inventory/aws_mq.py index 96beaceb254..3ca1a6a97c8 100644 --- a/plugins/inventory/aws_mq.py +++ b/plugins/inventory/aws_mq.py @@ -52,21 +52,26 @@ """ EXAMPLES = r""" +--- # Minimal example using AWS credentials from environment vars or instance role credentials # Get all brokers in us-east-1 region plugin: community.aws.aws_mq regions: - ca-central-1 +--- + # Example multiple regions, ignoring permission errors, and only brokers with state RUNNING plugin: community.aws.aws_mq regions: - us-east-1 - us-east-2 -strict_permissions: False +strict_permissions: false statuses: - RUNNING +--- + # Example group by engine, hostvars custom prefix-suffix, and compose variable from tags plugin: community.aws.aws_mq regions: diff --git a/plugins/module_utils/common.py b/plugins/module_utils/common.py index 153d468830e..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 = "7.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 5f0e934d1f2..00000000000 --- a/plugins/module_utils/transitgateway.py +++ /dev/null @@ -1,365 +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_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/acm_certificate_info.py b/plugins/modules/acm_certificate_info.py index 26d00e7e319..2e61d2a8ccd 100644 --- a/plugins/modules/acm_certificate_info.py +++ b/plugins/modules/acm_certificate_info.py @@ -13,6 +13,7 @@ - Note that this will not return information about uploaded keys of size 4096 bits, due to a limitation of the ACM API. - Prior to release 5.0.0 this module was called C(community.aws.aws_acm_info). The usage did not change. + - Requires the IAM permissions 'acm:ListCertificates', 'acm:DescribeCertificate', 'acm:GetCertificate', 'acm:ListTagsForCertificate' options: certificate_arn: description: @@ -57,7 +58,7 @@ - name: obtain all certificates pending validation community.aws.acm_certificate_info: statuses: - - PENDING_VALIDATION + - PENDING_VALIDATION - name: obtain all certificates with tag Name=foo and myTag=bar community.aws.acm_certificate_info: @@ -69,8 +70,7 @@ # The output is still a list of certificates, just one item long. - name: obtain information about a certificate with a particular ARN community.aws.acm_certificate_info: - certificate_arn: "arn:aws:acm:ap-southeast-2:123456789012:certificate/abcdeabc-abcd-1234-4321-abcdeabcde12" - + certificate_arn: "arn:aws:acm:ap-southeast-2:123456789012:certificate/abcdeabc-abcd-1234-4321-abcdeabcde12" """ RETURN = r""" diff --git a/plugins/modules/api_gateway.py b/plugins/modules/api_gateway.py index 1936f8b5ad7..af443238738 100644 --- a/plugins/modules/api_gateway.py +++ b/plugins/modules/api_gateway.py @@ -152,7 +152,10 @@ swagger_file: my_api.yml cache_enabled: true cache_size: '6.1' - canary_settings: { percentTraffic: 50.0, deploymentId: '123', useStageCache: True } + canary_settings: + percentTraffic: 50.0 + deploymentId: '123' + useStageCache: true state: present - name: Delete API gateway diff --git a/plugins/modules/api_gateway_domain.py b/plugins/modules/api_gateway_domain.py index 10a1ca1f2f7..8ffbdaf20ed 100644 --- a/plugins/modules/api_gateway_domain.py +++ b/plugins/modules/api_gateway_domain.py @@ -73,7 +73,8 @@ security_policy: TLS_1_2 endpoint_type: EDGE domain_mappings: - - { rest_api_id: abc123, stage: production } + - rest_api_id: abc123 + stage: production state: present register: api_gw_domain_result diff --git a/plugins/modules/api_gateway_info.py b/plugins/modules/api_gateway_info.py index a6d0854b7ed..fd38d795ab7 100644 --- a/plugins/modules/api_gateway_info.py +++ b/plugins/modules/api_gateway_info.py @@ -35,8 +35,8 @@ - name: List all for a specific function community.aws.api_gateway_info: ids: - - 012345678a - - abcdefghij + - 012345678a + - abcdefghij """ RETURN = r""" diff --git a/plugins/modules/autoscaling_instance_refresh.py b/plugins/modules/autoscaling_instance_refresh.py deleted file mode 100644 index 86546fac21e..00000000000 --- a/plugins/modules/autoscaling_instance_refresh.py +++ /dev/null @@ -1,267 +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/autoscaling_launch_config.py b/plugins/modules/autoscaling_launch_config.py index a3cd600fa70..cd411e57606 100644 --- a/plugins/modules/autoscaling_launch_config.py +++ b/plugins/modules/autoscaling_launch_config.py @@ -192,65 +192,71 @@ name: special image_id: ami-XXX key_name: default - security_groups: ['group', 'group2' ] + security_groups: + - 'group' + - 'group2' instance_type: t1.micro volumes: - - device_name: /dev/sda1 - volume_size: 100 - volume_type: io1 - iops: 3000 - delete_on_termination: true - encrypted: true - - device_name: /dev/sdb - ephemeral: ephemeral0 + - device_name: /dev/sda1 + volume_size: 100 + volume_type: io1 + iops: 3000 + delete_on_termination: true + encrypted: true + - device_name: /dev/sdb + ephemeral: ephemeral0 - name: create a launch configuration using a running instance id as a basis community.aws.autoscaling_launch_config: name: special instance_id: i-00a48b207ec59e948 key_name: default - security_groups: ['launch-wizard-2' ] + security_groups: + - 'launch-wizard-2' volumes: - - device_name: /dev/sda1 - volume_size: 120 - volume_type: io1 - iops: 3000 - delete_on_termination: true + - device_name: /dev/sda1 + volume_size: 120 + volume_type: io1 + iops: 3000 + delete_on_termination: true - name: create a launch configuration to omit the /dev/sdf EBS device that is included in the AMI image community.aws.autoscaling_launch_config: name: special image_id: ami-XXX key_name: default - security_groups: ['group', 'group2' ] + security_groups: + - 'group' + - 'group2' instance_type: t1.micro volumes: - - device_name: /dev/sdf - no_device: true + - device_name: /dev/sdf + no_device: true - name: Use EBS snapshot ID for volume block: - - name: Set Volume Facts - ansible.builtin.set_fact: - volumes: - - device_name: /dev/sda1 - volume_size: 20 - ebs: - snapshot: snap-XXXX - volume_type: gp2 - delete_on_termination: true - encrypted: false - - - name: Create launch configuration - community.aws.autoscaling_launch_config: - name: lc1 - image_id: ami-xxxx - assign_public_ip: true - instance_type: t2.medium - key_name: my-key - security_groups: "['sg-xxxx']" - volumes: "{{ volumes }}" - register: lc_info + - name: Set Volume Facts + ansible.builtin.set_fact: + volumes: + - device_name: /dev/sda1 + volume_size: 20 + ebs: + snapshot: snap-XXXX + volume_type: gp2 + delete_on_termination: true + encrypted: false + + - name: Create launch configuration + community.aws.autoscaling_launch_config: + name: lc1 + image_id: ami-xxxx + assign_public_ip: true + instance_type: t2.medium + key_name: my-key + security_groups: + - 'sg-xxxx' + volumes: "{{ volumes }}" + register: lc_info """ RETURN = r""" @@ -527,7 +533,7 @@ def create_launch_config(connection, module): module.fail_json_aws(e, msg="Failed to connect to AWS") try: security_groups = get_ec2_security_group_ids_from_names( - module.params.get("security_groups"), ec2_connection, vpc_id=vpc_id, boto3=True + module.params.get("security_groups"), ec2_connection, vpc_id=vpc_id ) except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: module.fail_json_aws(e, msg="Failed to get Security Group IDs") diff --git a/plugins/modules/batch_job_queue.py b/plugins/modules/batch_job_queue.py index c9e253d0652..4be42cbc56b 100644 --- a/plugins/modules/batch_job_queue.py +++ b/plugins/modules/batch_job_queue.py @@ -75,10 +75,10 @@ job_queue_state: ENABLED priority: 1 compute_environment_order: - - order: 1 - compute_environment: my_compute_env1 - - order: 2 - compute_environment: my_compute_env2 + - order: 1 + compute_environment: my_compute_env1 + - order: 2 + compute_environment: my_compute_env2 register: batch_job_queue_action - name: show results diff --git a/plugins/modules/cloudformation_stack_set.py b/plugins/modules/cloudformation_stack_set.py index 17e888b4f1b..ebb9403e8c5 100644 --- a/plugins/modules/cloudformation_stack_set.py +++ b/plugins/modules/cloudformation_stack_set.py @@ -201,7 +201,7 @@ - 123456789012 - 234567890123 regions: - - us-east-1 + - us-east-1 - name: The same type of update, but wait for the update to complete in all stacks community.aws.cloudformation_stack_set: @@ -217,7 +217,7 @@ - 123456789012 - 234567890123 regions: - - us-east-1 + - us-east-1 - name: Register new accounts (create new stack instances) with an existing stack set. community.aws.cloudformation_stack_set: @@ -234,7 +234,7 @@ - 234567890123 - 345678901234 regions: - - us-east-1 + - us-east-1 """ RETURN = r""" @@ -315,7 +315,6 @@ other: Type: "AWS::SNS::Topic" Properties: {} - """ import datetime diff --git a/plugins/modules/cloudfront_distribution.py b/plugins/modules/cloudfront_distribution.py index 52e7440f366..13718cfb896 100644 --- a/plugins/modules/cloudfront_distribution.py +++ b/plugins/modules/cloudfront_distribution.py @@ -205,9 +205,25 @@ description: - The ID of the header policy that CloudFront adds to responses that it sends to viewers. type: str + cache_policy_id: + version_added: 7.1.0 + description: + - The ID of the cache policy for CloudFront to use for the default cache behavior. + - A behavior should use either a C(cache_policy_id) or a C(forwarded_values) option. + - For more information see the CloudFront documentation + at U(https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html) + type: str + origin_request_policy_id: + version_added: 7.1.0 + description: + - The ID of the origin request policy for CloudFront to use for the default cache behavior. + - For more information see the CloudFront documentation + at U(https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html) + type: str forwarded_values: description: - A dict that specifies how CloudFront handles query strings and cookies. + - A behavior should use either a C(cache_policy_id) or a C(forwarded_values) option. type: dict suboptions: query_string: @@ -326,9 +342,25 @@ description: - The ID of the header policy that CloudFront adds to responses that it sends to viewers. type: str + cache_policy_id: + version_added: 7.1.0 + description: + - The ID of the cache policy for CloudFront to use for the cache behavior. + - A behavior should use either a C(cache_policy_id) or a C(forwarded_values) option. + - For more information see the CloudFront documentation + at U(https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html) + type: str + origin_request_policy_id: + version_added: 7.1.0 + description: + - The ID of the origin request policy for CloudFront to use for the cache behavior. + - For more information see the CloudFront documentation + at U(https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html) + type: str forwarded_values: description: - A dict that specifies how CloudFront handles query strings and cookies. + - A behavior should use either a C(cache_policy_id) or a C(forwarded_values) option. type: dict suboptions: query_string: @@ -625,7 +657,9 @@ state: present distribution_id: E1RP5A2MJ8073O comment: modified by cloudfront.py again - aliases: [ 'www.my-distribution-source.com', 'zzz.aaa.io' ] + aliases: + - 'www.my-distribution-source.com' + - 'zzz.aaa.io' - name: update a distribution's aliases and comment using an alias as a reference community.aws.cloudfront_distribution: @@ -652,12 +686,12 @@ state: present caller_reference: unique test distribution ID origins: - - id: 'my test origin-000111' - domain_name: www.example.com - origin_path: /production - custom_headers: - - header_name: MyCustomHeaderName - header_value: MyCustomHeaderValue + - id: 'my test origin-000111' + domain_name: www.example.com + origin_path: /production + custom_headers: + - header_name: MyCustomHeaderName + header_value: MyCustomHeaderValue default_cache_behavior: target_origin_id: 'my test origin-000111' forwarded_values: @@ -665,7 +699,7 @@ cookies: forward: all headers: - - '*' + - '*' viewer_protocol_policy: allow-all smooth_streaming: true compress: true @@ -1912,7 +1946,10 @@ def validate_cache_behavior(self, config, cache_behavior, valid_origins, is_defa cache_behavior = self.validate_cache_behavior_first_level_keys( config, cache_behavior, valid_origins, is_default_cache ) - cache_behavior = self.validate_forwarded_values(config, cache_behavior.get("forwarded_values"), cache_behavior) + if cache_behavior.get("cache_policy_id") is None: + cache_behavior = self.validate_forwarded_values( + config, cache_behavior.get("forwarded_values"), cache_behavior + ) cache_behavior = self.validate_allowed_methods(config, cache_behavior.get("allowed_methods"), cache_behavior) cache_behavior = self.validate_lambda_function_associations( config, cache_behavior.get("lambda_function_associations"), cache_behavior @@ -1924,19 +1961,34 @@ def validate_cache_behavior(self, config, cache_behavior, valid_origins, is_defa return cache_behavior def validate_cache_behavior_first_level_keys(self, config, cache_behavior, valid_origins, is_default_cache): - try: - cache_behavior = self.add_key_else_change_dict_key( - cache_behavior, "min_ttl", "min_t_t_l", config.get("min_t_t_l", self.__default_cache_behavior_min_ttl) - ) - cache_behavior = self.add_key_else_change_dict_key( - cache_behavior, "max_ttl", "max_t_t_l", config.get("max_t_t_l", self.__default_cache_behavior_max_ttl) - ) - cache_behavior = self.add_key_else_change_dict_key( - cache_behavior, - "default_ttl", - "default_t_t_l", - config.get("default_t_t_l", self.__default_cache_behavior_default_ttl), + if cache_behavior.get("cache_policy_id") is not None and cache_behavior.get("forwarded_values") is not None: + if is_default_cache: + cache_behavior_name = "Default cache behavior" + else: + cache_behavior_name = f"Cache behavior for path {cache_behavior['path_pattern']}" + self.module.fail_json( + msg=f"{cache_behavior_name} cannot have both a cache_policy_id and a forwarded_values option." ) + try: + if cache_behavior.get("cache_policy_id") is None: + cache_behavior = self.add_key_else_change_dict_key( + cache_behavior, + "min_ttl", + "min_t_t_l", + config.get("min_t_t_l", self.__default_cache_behavior_min_ttl), + ) + cache_behavior = self.add_key_else_change_dict_key( + cache_behavior, + "max_ttl", + "max_t_t_l", + config.get("max_t_t_l", self.__default_cache_behavior_max_ttl), + ) + cache_behavior = self.add_key_else_change_dict_key( + cache_behavior, + "default_ttl", + "default_t_t_l", + config.get("default_t_t_l", self.__default_cache_behavior_default_ttl), + ) cache_behavior = self.add_missing_key( cache_behavior, "compress", config.get("compress", self.__default_cache_behavior_compress) ) diff --git a/plugins/modules/cloudfront_invalidation.py b/plugins/modules/cloudfront_invalidation.py index b98b56be2d2..732d135e1e5 100644 --- a/plugins/modules/cloudfront_invalidation.py +++ b/plugins/modules/cloudfront_invalidation.py @@ -52,7 +52,6 @@ """ EXAMPLES = r""" - - name: create a batch of invalidations using a distribution_id for a reference community.aws.cloudfront_invalidation: distribution_id: E15BU8SDCGSG57 @@ -70,7 +69,6 @@ - /testpathone/test4.css - /testpathtwo/test5.js - /testpaththree/* - """ RETURN = r""" diff --git a/plugins/modules/cloudfront_origin_access_identity.py b/plugins/modules/cloudfront_origin_access_identity.py index 3c9340df611..bb5e3a01703 100644 --- a/plugins/modules/cloudfront_origin_access_identity.py +++ b/plugins/modules/cloudfront_origin_access_identity.py @@ -63,16 +63,15 @@ - name: update an existing origin access identity using caller_reference as an identifier community.aws.cloudfront_origin_access_identity: - origin_access_identity_id: E17DRN9XUOAHZX - caller_reference: this is an example reference - comment: this is a new comment + origin_access_identity_id: E17DRN9XUOAHZX + caller_reference: this is an example reference + comment: this is a new comment - name: delete an existing origin access identity using caller_reference as an identifier community.aws.cloudfront_origin_access_identity: - state: absent - caller_reference: this is an example reference - comment: this is a new comment - + state: absent + caller_reference: this is an example reference + comment: this is a new comment """ RETURN = r""" @@ -110,7 +109,6 @@ description: The fully qualified URI of the new origin access identity just created. returned: when initially created type: str - """ import datetime diff --git a/plugins/modules/codebuild_project.py b/plugins/modules/codebuild_project.py index 69fd2e463b5..1f4630f73ca 100644 --- a/plugins/modules/codebuild_project.py +++ b/plugins/modules/codebuild_project.py @@ -161,21 +161,22 @@ description: My nice little project service_role: "arn:aws:iam::123123:role/service-role/code-build-service-role" source: - # Possible values: BITBUCKET, CODECOMMIT, CODEPIPELINE, GITHUB, S3 - type: CODEPIPELINE - buildspec: '' + # Possible values: BITBUCKET, CODECOMMIT, CODEPIPELINE, GITHUB, S3 + type: CODEPIPELINE + buildspec: '' artifacts: - namespaceType: NONE - packaging: NONE - type: CODEPIPELINE - name: my_project + namespaceType: NONE + packaging: NONE + type: CODEPIPELINE + name: my_project environment: - computeType: BUILD_GENERAL1_SMALL - privilegedMode: "true" - image: "aws/codebuild/docker:17.09.0" - type: LINUX_CONTAINER - environmentVariables: - - { name: 'PROFILE', value: 'staging' } + computeType: BUILD_GENERAL1_SMALL + privilegedMode: "true" + image: "aws/codebuild/docker:17.09.0" + type: LINUX_CONTAINER + environmentVariables: + - name: 'PROFILE' + value: 'staging' encryption_key: "arn:aws:kms:us-east-1:123123:alias/aws/s3" region: us-east-1 state: present diff --git a/plugins/modules/config_aggregator.py b/plugins/modules/config_aggregator.py index 58866159028..48771080b45 100644 --- a/plugins/modules/config_aggregator.py +++ b/plugins/modules/config_aggregator.py @@ -80,9 +80,9 @@ state: present account_sources: account_ids: - - 1234567890 - - 0123456789 - - 9012345678 + - 1234567890 + - 0123456789 + - 9012345678 all_aws_regions: true """ diff --git a/plugins/modules/config_recorder.py b/plugins/modules/config_recorder.py index 2672664a5fe..510bbaa2307 100644 --- a/plugins/modules/config_recorder.py +++ b/plugins/modules/config_recorder.py @@ -71,8 +71,8 @@ state: present role_arn: 'arn:aws:iam::123456789012:role/AwsConfigRecorder' recording_group: - all_supported: true - include_global_types: true + all_supported: true + include_global_types: true """ RETURN = r"""#""" diff --git a/plugins/modules/config_rule.py b/plugins/modules/config_rule.py index 3b49c17465e..b86a528dd55 100644 --- a/plugins/modules/config_rule.py +++ b/plugins/modules/config_rule.py @@ -95,12 +95,11 @@ state: present description: 'This AWS Config rule checks for public write access on S3 buckets' scope: - compliance_types: - - 'AWS::S3::Bucket' + compliance_types: + - 'AWS::S3::Bucket' source: - owner: AWS - identifier: 'S3_BUCKET_PUBLIC_WRITE_PROHIBITED' - + owner: AWS + identifier: 'S3_BUCKET_PUBLIC_WRITE_PROHIBITED' """ RETURN = r"""#""" diff --git a/plugins/modules/data_pipeline.py b/plugins/modules/data_pipeline.py index 5a62784c6e9..85849324f33 100644 --- a/plugins/modules/data_pipeline.py +++ b/plugins/modules/data_pipeline.py @@ -144,23 +144,30 @@ - community.aws.data_pipeline: name: test-dp objects: - - "id": "DefaultSchedule" - "name": "Every 1 day" - "fields": + - id: "DefaultSchedule" + name: "Every 1 day" + fields: - "key": "period" "stringValue": "1 days" - "key": "type" "stringValue": "Schedule" - "key": "startAt" "stringValue": "FIRST_ACTIVATION_DATE_TIME" - - "id": "Default" - "name": "Default" - "fields": [ { "key": "resourceRole", "stringValue": "my_resource_role" }, - { "key": "role", "stringValue": "DataPipelineDefaultRole" }, - { "key": "pipelineLogUri", "stringValue": "s3://my_s3_log.txt" }, - { "key": "scheduleType", "stringValue": "cron" }, - { "key": "schedule", "refValue": "DefaultSchedule" }, - { "key": "failureAndRerunMode", "stringValue": "CASCADE" } ] + - id: "Default" + name: "Default" + fields: + - "key": "resourceRole" + "stringValue": "my_resource_role" + - "key": "role" + "stringValue": "DataPipelineDefaultRole" + - "key": "pipelineLogUri" + "stringValue": "s3://my_s3_log.txt" + - "key": "scheduleType" + "stringValue": "cron" + - "key": "schedule" + "refValue": "DefaultSchedule" + - "key": "failureAndRerunMode" + "stringValue": "CASCADE" state: active # Activate pipeline @@ -174,7 +181,6 @@ name: test-dp region: us-west-2 state: absent - """ RETURN = r""" diff --git a/plugins/modules/directconnect_virtual_interface.py b/plugins/modules/directconnect_virtual_interface.py index ec0c87099a4..da76d57372d 100644 --- a/plugins/modules/directconnect_virtual_interface.py +++ b/plugins/modules/directconnect_virtual_interface.py @@ -242,7 +242,6 @@ state: absent connection_id: dxcon-XXXXXXXX virtual_interface_id: dxv-XXXXXXXX - """ import traceback diff --git a/plugins/modules/dms_replication_subnet_group.py b/plugins/modules/dms_replication_subnet_group.py index 6f847d8e35f..772a54aa1fd 100644 --- a/plugins/modules/dms_replication_subnet_group.py +++ b/plugins/modules/dms_replication_subnet_group.py @@ -51,7 +51,7 @@ state: present identifier: "dev-sngroup" description: "Development Subnet Group asdasdas" - subnet_ids: ['subnet-id1','subnet-id2'] + subnet_ids: ['subnet-id1', 'subnet-id2'] """ RETURN = r""" # """ diff --git a/plugins/modules/dynamodb_table_info.py b/plugins/modules/dynamodb_table_info.py new file mode 100644 index 00000000000..66349e2d74f --- /dev/null +++ b/plugins/modules/dynamodb_table_info.py @@ -0,0 +1,292 @@ +#!/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: dynamodb_table_info +version_added: 7.2.0 +short_description: Returns information about a Dynamo DB table +description: + - Returns information about the Dynamo DB table, including the current status of the table, + when it was created, the primary key schema, and any indexes on the table. +author: + - Aubin Bikouo (@abikouo) +options: + name: + description: + - The name of the table to describe. + required: true + type: str +extends_documentation_fragment: + - amazon.aws.common.modules + - amazon.aws.region.modules + - amazon.aws.boto3 +""" + +EXAMPLES = r""" +- name: Return information about the DynamoDB table named 'my-table' + community.aws.dynamodb_table_info: + name: my-table +""" + +RETURN = r""" +table: + description: The returned table params from the describe API call. + returned: success + type: complex + contains: + table_name: + description: The name of the table. + returned: always + type: str + table_status: + description: The current state of the table. + returned: always + type: str + sample: 'ACTIVE' + creation_date_time: + description: The date and time when the table was created, in UNIX epoch time format. + returned: always + type: str + table_size_bytes: + description: The total size of the specified table, in bytes. + returned: always + type: int + item_count: + description: The number of items in the specified table. + returned: always + type: int + table_arn: + description: The Amazon Resource Name (ARN) that uniquely identifies the table. + returned: always + type: str + table_id: + description: Unique identifier for the table for which the backup was created. + returned: always + type: str + attribute_definitions: + description: A list of attributes for describing the key schema for the table and indexes. + returned: always + type: complex + contains: + attribute_name: + description: A name for the attribute. + type: str + returned: always + attribute_type: + description: The data type for the attribute, S (String), N (Number) and B (Binary). + type: str + returned: always + key_schema: + description: A list of key schemas that specify the attributes that make up the primary key of a table, or the key attributes of an index. + returned: always + type: complex + contains: + attribute_name: + description: The name of a key attribute. + type: str + returned: always + key_type: + description: The role that this key attribute will assume, 'HASH' for partition key, 'RANGE' for sort key + type: str + returned: always + billing_mode: + description: Controls how you are charged for read and write throughput and how you manage capacity. + returned: always + type: str + local_secondary_indexes: + description: Represents one or more local secondary indexes on the table. + returned: if any, on the table + type: list + elements: dict + global_secondary_indexes: + description: The global secondary indexes of table. + returned: if any, on the table + type: list + elements: dict + stream_specification: + description: The current DynamoDB Streams configuration for the table. + returned: if any, on the table + type: complex + contains: + stream_enabled: + description: Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table. + type: bool + returned: always + sample: true + stream_view_type: + description: When an item in the table is modified, stream_view_type determines what information is written to the stream for this table. + type: str + returned: always + sample: KEYS_ONLY + latest_stream_label: + description: A timestamp, in ISO 8601 format, for this stream. + type: str + returned: if any on the table + latest_stream_arn: + description: The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table. + returned: if any on the table + type: str + global_table_version: + description: Represents the version of global tables in use, if the table is replicated across AWS Regions. + type: str + returned: if the table is replicated + replicas: + description: Represents replicas of the table. + type: list + elements: dict + returned: if any on the table + source_backup_arn: + description: The Amazon Resource Name (ARN) of the backup from which the table was restored. + type: str + returned: if any, on the table + source_table_arn: + description: The ARN of the source table of the backup that is being restored. + type: str + returned: if any, on the table + restore_date_time: + description: Point in time or source backup time. + type: str + returned: if any, on table + restore_in_progress: + description: Indicates if a restore is in progress or not. + type: bool + returned: if any, on table + sse_description: + description: The description of the server-side encryption status on the specified table. + type: dict + returned: if any, on table + sample: {} + archival_summary: + description: Contains information about the table archive. + type: complex + returned: if any, on table + contains: + archival_date_time: + description: The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format. + type: str + returned: always + archival_reason: + description: The reason DynamoDB archived the table. + type: str + returned: always + sample: INACCESSIBLE_ENCRYPTION_CREDENTIALS + archival_backup_arn: + description: The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. + type: str + returned: always + table_class: + description: The table class of the specified table. + type: str + returned: if any on the table + sample: STANDARD_INFREQUENT_ACCESS + deletion_protection_enabled: + description: Indicates whether deletion protection is enabled (true) or disabled (false) on the table. + type: bool + returned: always + sample: true + provisioned_throughput: + description: The provisioned throughput settings for the table. + type: dict + returned: always + sample: '{"number_of_decreases_today": 0, "read_capacity_units": 1, "write_capacity_units": 1}' + tags: + description: A dict of tags associated with the DynamoDB table. + returned: always + type: dict +""" + +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.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 + + +# ResourceNotFoundException is expected here if the table doesn't exist +@AWSRetry.jittered_backoff(catch_extra_error_codes=["LimitExceededException", "ResourceInUseException"]) +def _describe_table(client, **params): + return client.describe_table(**params) + + +def describe_dynamodb_table(module): + table_name = module.params.get("name") + retry_decorator = AWSRetry.jittered_backoff( + catch_extra_error_codes=["LimitExceededException", "ResourceInUseException", "ResourceNotFoundException"], + ) + client = module.client("dynamodb", retry_decorator=retry_decorator) + try: + table = _describe_table(client, TableName=table_name) + except is_boto3_error_code("ResourceNotFoundException"): + module.exit_json(table={}) + except ( + botocore.exceptions.ClientError, + botocore.exceptions.BotoCoreError, + ) as e: # pylint: disable=duplicate-except + module.fail_json_aws(e, msg="Failed to describe table") + + table = table["Table"] + try: + tags = client.list_tags_of_resource(aws_retry=True, ResourceArn=table["TableArn"])["Tags"] + except is_boto3_error_code("AccessDeniedException"): + module.warn("Permission denied when listing tags") + tags = [] + except ( + botocore.exceptions.ClientError, + botocore.exceptions.BotoCoreError, + ) as e: # pylint: disable=duplicate-except + module.fail_json_aws(e, msg="Failed to list table tags") + + table = camel_dict_to_snake_dict(table) + table["tags"] = boto3_tag_list_to_ansible_dict(tags) + + if "table_class_summary" in table: + table["table_class"] = table["table_class_summary"]["table_class"] + del table["table_class_summary"] + + # billing_mode_summary doesn't always seem to be set but is always set for PAY_PER_REQUEST + # and when updating the billing_mode + if "billing_mode_summary" in table: + table["billing_mode"] = table["billing_mode_summary"]["billing_mode"] + del table["billing_mode_summary"] + else: + table["billing_mode"] = "PROVISIONED" + + # Restore summary + if "restore_summary" in table: + table["source_backup_arn"] = table["restore_summary"].get("source_backup_arn", "") + table["source_table_arn"] = table["restore_summary"].get("source_table_arn", "") + table["restore_date_time"] = table["restore_summary"].get("restore_date_time", "") + table["restore_in_progress"] = table["restore_summary"].get("restore_in_progress") + del table["restore_summary"] + + module.exit_json(table=table) + + +def main(): + argument_spec = dict( + name=dict( + required=True, + ), + ) + + module = AnsibleAWSModule( + argument_spec=argument_spec, + supports_check_mode=True, + ) + + describe_dynamodb_table(module) + + +if __name__ == "__main__": + main() diff --git a/plugins/modules/ec2_ami_copy.py b/plugins/modules/ec2_ami_copy.py index 170a564e15d..bb5a30ea117 100644 --- a/plugins/modules/ec2_ami_copy.py +++ b/plugins/modules/ec2_ami_copy.py @@ -104,8 +104,8 @@ region: eu-west-1 source_image_id: ami-xxxxxxx tags: - Name: My-Super-AMI - Patch: 1.2.3 + Name: My-Super-AMI + Patch: 1.2.3 tag_equality: true - name: Encrypted AMI copy diff --git a/plugins/modules/ec2_carrier_gateway.py b/plugins/modules/ec2_carrier_gateway.py index e02b1a7ded5..97d62b5fc42 100644 --- a/plugins/modules/ec2_carrier_gateway.py +++ b/plugins/modules/ec2_carrier_gateway.py @@ -53,8 +53,8 @@ vpc_id: vpc-abcdefgh state: present tags: - Tag1: tag1 - Tag2: tag2 + Tag1: tag1 + Tag2: tag2 register: cagw - name: Delete Carrier gateway diff --git a/plugins/modules/ec2_carrier_gateway_info.py b/plugins/modules/ec2_carrier_gateway_info.py index 43d77d59aa6..67ee30e55e5 100644 --- a/plugins/modules/ec2_carrier_gateway_info.py +++ b/plugins/modules/ec2_carrier_gateway_info.py @@ -45,7 +45,7 @@ community.aws.ec2_carrier_gateway_info: region: ap-southeast-2 filters: - "tag:Name": "cagw-123" + "tag:Name": "cagw-123" register: cagw_info - name: Gather information about a specific carrier gateway by CarrierGatewayId 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 ccdd7d54785..00000000000 --- a/plugins/modules/ec2_placement_group.py +++ /dev/null @@ -1,235 +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 75cbc72585c..00000000000 --- a/plugins/modules/ec2_placement_group_info.py +++ /dev/null @@ -1,129 +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_snapshot_copy.py b/plugins/modules/ec2_snapshot_copy.py index ce73191cb79..2cf994caaba 100644 --- a/plugins/modules/ec2_snapshot_copy.py +++ b/plugins/modules/ec2_snapshot_copy.py @@ -81,7 +81,7 @@ region: eu-west-1 source_snapshot_id: snap-xxxxxxx tags: - Name: Snapshot-Name + Name: Snapshot-Name - name: Encrypted Snapshot copy community.aws.ec2_snapshot_copy: diff --git a/plugins/modules/ec2_transit_gateway.py b/plugins/modules/ec2_transit_gateway.py deleted file mode 100644 index 9b50cb21b9c..00000000000 --- a/plugins/modules/ec2_transit_gateway.py +++ /dev/null @@ -1,516 +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 - 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 - 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 - 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")) - - 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"), - 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 b25346b84b8..00000000000 --- a/plugins/modules/ec2_transit_gateway_info.py +++ /dev/null @@ -1,253 +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" - 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 301fefb0513..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 0a309b4863c..00000000000 --- a/plugins/modules/ec2_vpc_egress_igw.py +++ /dev/null @@ -1,192 +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 46f7086bc85..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 465c9c852eb..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 d8bfcc78ecb..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 c354724c9c6..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 a release after 2024-06-01 this 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 @@ -103,7 +103,7 @@ weight: 1 - capacity_provider: FARGATE_SPOT weight: 100 - purge_capacity_providers: True + purge_capacity_providers: true - name: Cluster deletion community.aws.ecs_cluster: @@ -117,8 +117,8 @@ delay: 10 repeat: 10 register: task_output - """ + RETURN = r""" activeServicesCount: description: how many services are active in this cluster @@ -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( - "After 2024-06-01 the default value of purge_capacity_providers will change from false to true." - " To maintain the existing behaviour explicitly set purge_capacity_providers=true", - date="2024-06-01", - 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 3230e2e4a5b..fae0af619b5 100644 --- a/plugins/modules/ecs_service.py +++ b/plugins/modules/ecs_service.py @@ -158,7 +158,7 @@ version_added: 5.3.0 description: - Toggle overwriting of existing placement constraints. This is needed for backwards compatibility. - - By default I(purge_placement_constraints=false). In a release after 2024-06-01 this will be changed to I(purge_placement_constraints=true). + - By default I(purge_placement_constraints=false). In release 9.0.0 this will be changed to I(purge_placement_constraints=true). required: false type: bool default: false @@ -180,7 +180,7 @@ version_added: 5.3.0 description: - Toggle overwriting of existing placement strategy. This is needed for backwards compatibility. - - By default I(purge_placement_strategy=false). In a release after 2024-06-01 this will be changed to I(purge_placement_strategy=true). + - By default I(purge_placement_strategy=false). In release 9.0.0 this will be changed to I(purge_placement_strategy=true). required: false type: bool default: false @@ -320,10 +320,10 @@ desired_count: 0 network_configuration: subnets: - - subnet-abcd1234 + - subnet-abcd1234 security_groups: - - sg-aaaa1111 - - my_security_group + - sg-aaaa1111 + - my_security_group # Simple example to delete - community.aws.ecs_service: @@ -357,8 +357,8 @@ desired_count: 3 deployment_configuration: deployment_circuit_breaker: - enable: True - rollback: True + enable: true + rollback: true # With capacity_provider_strategy (added in version 4.0) - community.aws.ecs_service: @@ -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/ecs_tag.py b/plugins/modules/ecs_tag.py index 109b974eea6..dd09096ea4c 100644 --- a/plugins/modules/ecs_tag.py +++ b/plugins/modules/ecs_tag.py @@ -86,7 +86,7 @@ cluster_name: mycluster resource_type: cluster tags: - Name: foo + Name: foo state: absent purge_tags: true """ diff --git a/plugins/modules/ecs_task.py b/plugins/modules/ecs_task.py index dfd7d9a7902..169ff4c7b0b 100644 --- a/plugins/modules/ecs_task.py +++ b/plugins/modules/ecs_task.py @@ -117,63 +117,63 @@ - name: Start a task community.aws.ecs_task: - operation: start - cluster: console-sample-app-static-cluster - task_definition: console-sample-app-static-taskdef - task: "arn:aws:ecs:us-west-2:123456789012:task/3f8353d1-29a8-4689-bbf6-ad79937ffe8a" - tags: - resourceName: a_task_for_ansible_to_run - type: long_running_task - network: internal - version: 1.4 - container_instances: + operation: start + cluster: console-sample-app-static-cluster + task_definition: console-sample-app-static-taskdef + task: "arn:aws:ecs:us-west-2:123456789012:task/3f8353d1-29a8-4689-bbf6-ad79937ffe8a" + tags: + resourceName: a_task_for_ansible_to_run + type: long_running_task + network: internal + version: 1.4 + container_instances: - arn:aws:ecs:us-west-2:123456789012:container-instance/79c23f22-876c-438a-bddf-55c98a3538a8 - started_by: ansible_user - network_configuration: - subnets: + started_by: ansible_user + network_configuration: + subnets: - subnet-abcd1234 - security_groups: + security_groups: - sg-aaaa1111 - my_security_group register: task_output - name: RUN a task on Fargate community.aws.ecs_task: - operation: run - cluster: console-sample-app-static-cluster - task_definition: console-sample-app-static-taskdef - task: "arn:aws:ecs:us-west-2:123456789012:task/3f8353d1-29a8-4689-bbf6-ad79937ffe8a" - started_by: ansible_user - launch_type: FARGATE - network_configuration: - subnets: + operation: run + cluster: console-sample-app-static-cluster + task_definition: console-sample-app-static-taskdef + task: "arn:aws:ecs:us-west-2:123456789012:task/3f8353d1-29a8-4689-bbf6-ad79937ffe8a" + started_by: ansible_user + launch_type: FARGATE + network_configuration: + subnets: - subnet-abcd1234 - security_groups: + security_groups: - sg-aaaa1111 - my_security_group register: task_output - name: RUN a task on Fargate with public ip assigned community.aws.ecs_task: - operation: run - count: 2 - cluster: console-sample-app-static-cluster - task_definition: console-sample-app-static-taskdef - task: "arn:aws:ecs:us-west-2:123456789012:task/3f8353d1-29a8-4689-bbf6-ad79937ffe8a" - started_by: ansible_user - launch_type: FARGATE - network_configuration: - assign_public_ip: true - subnets: + operation: run + count: 2 + cluster: console-sample-app-static-cluster + task_definition: console-sample-app-static-taskdef + task: "arn:aws:ecs:us-west-2:123456789012:task/3f8353d1-29a8-4689-bbf6-ad79937ffe8a" + started_by: ansible_user + launch_type: FARGATE + network_configuration: + assign_public_ip: true + subnets: - subnet-abcd1234 register: task_output - name: Stop a task community.aws.ecs_task: - operation: stop - cluster: console-sample-app-static-cluster - task_definition: console-sample-app-static-taskdef - task: "arn:aws:ecs:us-west-2:123456789012:task/3f8353d1-29a8-4689-bbf6-ad79937ffe8a" + operation: stop + cluster: console-sample-app-static-cluster + task_definition: console-sample-app-static-taskdef + task: "arn:aws:ecs:us-west-2:123456789012:task/3f8353d1-29a8-4689-bbf6-ad79937ffe8a" """ RETURN = r""" diff --git a/plugins/modules/ecs_taskdefinition.py b/plugins/modules/ecs_taskdefinition.py index 4c4aefc2032..9f8871def49 100644 --- a/plugins/modules/ecs_taskdefinition.py +++ b/plugins/modules/ecs_taskdefinition.py @@ -658,40 +658,41 @@ - name: Create task definition community.aws.ecs_taskdefinition: containers: - - name: simple-app - cpu: 10 - essential: true - image: "httpd:2.4" - memory: 300 - mountPoints: - - containerPath: /usr/local/apache2/htdocs - sourceVolume: my-vol - portMappings: - - containerPort: 80 - hostPort: 80 - logConfiguration: - logDriver: awslogs - options: - awslogs-group: /ecs/test-cluster-taskdef - awslogs-region: us-west-2 - awslogs-stream-prefix: ecs - - name: busybox - command: - - > - /bin/sh -c "while true; do echo 'Amazon ECS Sample App

Amazon ECS Sample App

Congratulations! -

Your application is now running on a container in Amazon ECS.

' > top; /bin/date > date ; echo '
' > bottom; - cat top date bottom > /usr/local/apache2/htdocs/index.html ; sleep 1; done" - cpu: 10 - entryPoint: - - sh - - "-c" - essential: false - image: busybox - memory: 200 - volumesFrom: - - sourceContainer: simple-app + - name: simple-app + cpu: 10 + essential: true + image: "httpd:2.4" + memory: 300 + mountPoints: + - containerPath: /usr/local/apache2/htdocs + sourceVolume: my-vol + portMappings: + - containerPort: 80 + hostPort: 80 + logConfiguration: + logDriver: awslogs + options: + awslogs-group: /ecs/test-cluster-taskdef + awslogs-region: us-west-2 + awslogs-stream-prefix: ecs + - name: busybox + command: + - > + /bin/sh -c "while true; do echo 'Amazon ECS Sample App

Amazon ECS Sample App

+

Congratulations!

+

Your application is now running on a container in Amazon ECS.

' > top; /bin/date > date ; echo '
' > bottom; + cat top date bottom > /usr/local/apache2/htdocs/index.html ; sleep 1; done" + cpu: 10 + entryPoint: + - sh + - "-c" + essential: false + image: busybox + memory: 200 + volumesFrom: + - sourceContainer: simple-app volumes: - - name: my-vol + - name: my-vol family: test-cluster-taskdef state: present register: task_output @@ -700,26 +701,26 @@ community.aws.ecs_taskdefinition: family: nginx containers: - - name: nginx - essential: true - image: "nginx" - portMappings: - - containerPort: 8080 - hostPort: 8080 - cpu: 512 - memory: 1024 + - name: nginx + essential: true + image: "nginx" + portMappings: + - containerPort: 8080 + hostPort: 8080 + cpu: 512 + memory: 1024 state: present - name: Create task definition community.aws.ecs_taskdefinition: family: nginx containers: - - name: nginx - essential: true - image: "nginx" - portMappings: - - containerPort: 8080 - hostPort: 8080 + - name: nginx + essential: true + image: "nginx" + portMappings: + - containerPort: 8080 + hostPort: 8080 launch_type: FARGATE cpu: 512 memory: 1024 @@ -730,36 +731,36 @@ community.aws.ecs_taskdefinition: family: nginx containers: - - name: nginx - essential: true - image: "nginx" - portMappings: - - containerPort: 8080 - hostPort: 8080 - cpu: 512 - memory: 1024 - dependsOn: - - containerName: "simple-app" - condition: "start" + - name: nginx + essential: true + image: "nginx" + portMappings: + - containerPort: 8080 + hostPort: 8080 + cpu: 512 + memory: 1024 + dependsOn: + - containerName: "simple-app" + condition: "start" # Create Task Definition with Environment Variables and Secrets - name: Create task definition community.aws.ecs_taskdefinition: family: nginx containers: - - name: nginx - essential: true - image: "nginx" - environment: - - name: "PORT" - value: "8080" - secrets: - # For variables stored in Secrets Manager - - name: "NGINX_HOST" - valueFrom: "arn:aws:secretsmanager:us-west-2:123456789012:secret:nginx/NGINX_HOST" - # For variables stored in Parameter Store - - name: "API_KEY" - valueFrom: "arn:aws:ssm:us-west-2:123456789012:parameter/nginx/API_KEY" + - name: nginx + essential: true + image: "nginx" + environment: + - name: "PORT" + value: "8080" + secrets: + # For variables stored in Secrets Manager + - name: "NGINX_HOST" + valueFrom: "arn:aws:secretsmanager:us-west-2:123456789012:secret:nginx/NGINX_HOST" + # For variables stored in Parameter Store + - name: "API_KEY" + valueFrom: "arn:aws:ssm:us-west-2:123456789012:parameter/nginx/API_KEY" launch_type: FARGATE cpu: 512 memory: 1GB @@ -771,22 +772,22 @@ community.aws.ecs_taskdefinition: family: nginx containers: - - name: nginx - essential: true - image: "nginx" - portMappings: - - containerPort: 8080 - hostPort: 8080 - cpu: 512 - memory: 1024 - healthCheck: - command: + - name: nginx + essential: true + image: "nginx" + portMappings: + - containerPort: 8080 + hostPort: 8080 + cpu: 512 + memory: 1024 + healthCheck: + command: - CMD-SHELL - /app/healthcheck.py - interval: 60 - retries: 3 - startPeriod: 15 - timeout: 15 + interval: 60 + retries: 3 + startPeriod: 15 + timeout: 15 state: present """ @@ -915,7 +916,7 @@ def fetch(): if data["nextToken"]: params["nextToken"] = data["nextToken"] - result = self.ecs.list_task_definitions(**params) + result = self.ecs.list_task_definitions(aws_retry=True, **params) data["taskDefinitionArns"] += result["taskDefinitionArns"] data["nextToken"] = result.get("nextToken", None) return data["nextToken"] is not None @@ -928,7 +929,7 @@ def fetch(): return list( sorted( [ - self.ecs.describe_task_definition(taskDefinition=arn)["taskDefinition"] + self.ecs.describe_task_definition(aws_retry=True, taskDefinition=arn)["taskDefinition"] for arn in data["taskDefinitionArns"] ], key=lambda td: td["revision"], @@ -936,7 +937,7 @@ def fetch(): ) def deregister_task(self, taskArn): - response = self.ecs.deregister_task_definition(taskDefinition=taskArn) + response = self.ecs.deregister_task_definition(aws_retry=True, taskDefinition=taskArn) return response["taskDefinition"] diff --git a/plugins/modules/efs.py b/plugins/modules/efs.py index bf4d57b9a96..6564e86ae9a 100644 --- a/plugins/modules/efs.py +++ b/plugins/modules/efs.py @@ -112,21 +112,21 @@ state: present name: myTestEFS tags: - Name: myTestNameTag - purpose: file-storage + Name: myTestNameTag + purpose: file-storage targets: - - subnet_id: subnet-748c5d03 - security_groups: [ "sg-1a2b3c4d" ] + - subnet_id: subnet-748c5d03 + security_groups: ["sg-1a2b3c4d"] - name: Modifying EFS data community.aws.efs: state: present name: myTestEFS tags: - name: myAnotherTestTag + name: myAnotherTestTag targets: - - subnet_id: subnet-7654fdca - security_groups: [ "sg-4c5d6f7a" ] + - subnet_id: subnet-7654fdca + security_groups: ["sg-4c5d6f7a"] - name: Set a lifecycle policy community.aws.efs: @@ -134,8 +134,8 @@ name: myTestEFS transition_to_ia: 7 targets: - - subnet_id: subnet-7654fdca - security_groups: [ "sg-4c5d6f7a" ] + - subnet_id: subnet-7654fdca + security_groups: ["sg-4c5d6f7a"] - name: Remove a lifecycle policy community.aws.efs: @@ -143,8 +143,8 @@ name: myTestEFS transition_to_ia: None targets: - - subnet_id: subnet-7654fdca - security_groups: [ "sg-4c5d6f7a" ] + - subnet_id: subnet-7654fdca + security_groups: ["sg-4c5d6f7a"] - name: Deleting EFS community.aws.efs: @@ -241,7 +241,6 @@ "name": "my-efs", "key": "Value" } - """ from time import sleep @@ -654,8 +653,7 @@ def iterate_all(attr, map_method, **kwargs): while True: try: data = map_method(**args) - for elm in data[attr]: - yield elm + yield from data[attr] if "NextMarker" in data: args["Marker"] = data["Nextmarker"] continue diff --git a/plugins/modules/efs_info.py b/plugins/modules/efs_info.py index 76952337b97..3a170a3915b 100644 --- a/plugins/modules/efs_info.py +++ b/plugins/modules/efs_info.py @@ -55,10 +55,10 @@ - name: Searching all EFS instances with tag Name = 'myTestNameTag', in subnet 'subnet-1a2b3c4d' and with security group 'sg-4d3c2b1a' community.aws.efs_info: tags: - Name: myTestNameTag + Name: myTestNameTag targets: - - subnet-1a2b3c4d - - sg-4d3c2b1a + - subnet-1a2b3c4d + - sg-4d3c2b1a register: result - ansible.builtin.debug: @@ -164,7 +164,6 @@ "name": "my-efs", "key": "Value" } - """ diff --git a/plugins/modules/efs_tag.py b/plugins/modules/efs_tag.py index c8e5a1f1667..0f51434716b 100644 --- a/plugins/modules/efs_tag.py +++ b/plugins/modules/efs_tag.py @@ -66,7 +66,7 @@ resource: fsap-78945ff state: absent tags: - Name: foo + Name: foo purge_tags: true - name: Remove all tags diff --git a/plugins/modules/eks_nodegroup.py b/plugins/modules/eks_nodegroup.py index 51f74c22164..f9bbb785762 100644 --- a/plugins/modules/eks_nodegroup.py +++ b/plugins/modules/eks_nodegroup.py @@ -184,25 +184,25 @@ - subnet-qwerty123 - subnet-asdfg456 scaling_config: - - min_size: 1 - - max_size: 2 - - desired_size: 1 + min_size: 1 + max_size: 2 + desired_size: 1 disk_size: 20 instance_types: 't3.micro' ami_type: 'AL2_x86_64' labels: - - 'teste': 'test' + 'teste': 'test' taints: - key: 'test' value: 'test' effect: 'NO_SCHEDULE' - capacity_type: 'on_demand' + capacity_type: 'ON_DEMAND' - name: Remove an EKS Nodegrop community.aws.eks_nodegroup: name: test_nodegroup cluster_name: test_cluster - wait: yes + wait: true state: absent """ diff --git a/plugins/modules/elasticache_parameter_group.py b/plugins/modules/elasticache_parameter_group.py index 00f2af19a08..fa7f87a2f78 100644 --- a/plugins/modules/elasticache_parameter_group.py +++ b/plugins/modules/elasticache_parameter_group.py @@ -51,8 +51,8 @@ EXAMPLES = r""" # Note: These examples do not set authentication details, see the AWS Guide for details. - -- hosts: localhost +- name: Create, modify and delete a parameter group + hosts: localhost connection: local tasks: - name: 'Create a test parameter group' @@ -65,7 +65,7 @@ community.aws.elasticache_parameter_group: name: 'test-param-group' values: - activerehashing: yes + activerehashing: true client-output-buffer-limit-normal-hard-limit: 4 state: 'present' - name: 'Reset all modifiable parameters for the test parameter group' diff --git a/plugins/modules/elasticbeanstalk_app.py b/plugins/modules/elasticbeanstalk_app.py index bf11afbb2bf..1aaa4c4d8fe 100644 --- a/plugins/modules/elasticbeanstalk_app.py +++ b/plugins/modules/elasticbeanstalk_app.py @@ -57,7 +57,6 @@ - community.aws.elasticbeanstalk_app: app_name: Sample_App state: absent - """ RETURN = r""" diff --git a/plugins/modules/elb_classic_lb_info.py b/plugins/modules/elb_classic_lb_info.py deleted file mode 100644 index 8ac3b1f1c6a..00000000000 --- a/plugins/modules/elb_classic_lb_info.py +++ /dev/null @@ -1,238 +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/elb_network_lb.py b/plugins/modules/elb_network_lb.py index fa0da3fed24..22e419328d9 100644 --- a/plugins/modules/elb_network_lb.py +++ b/plugins/modules/elb_network_lb.py @@ -69,6 +69,17 @@ description: - The name of the target group. - Mutually exclusive with I(TargetGroupArn). + AlpnPolicy: + description: + - The name of the Application-Layer Protocol Negotiation (ALPN) policy. + type: str + choices: + - HTTP1Only + - HTTP2Only + - HTTP2Optional + - HTTP2Preferred + - None + version_added: 7.1.0 name: description: - The name of the load balancer. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric @@ -183,7 +194,6 @@ community.aws.elb_network_lb: name: myelb state: absent - """ RETURN = r""" @@ -283,6 +293,13 @@ returned: when state is present type: str sample: "" + alpn_policy: + description: The name of the Application-Layer Protocol Negotiation (ALPN) policy. + returned: when state is present + type: list + elements: str + version_added: 7.1.0 + sample: ["HTTP1Only", "HTTP2Only"] load_balancer_arn: description: The Amazon Resource Name (ARN) of the load balancer. returned: when state is present @@ -449,6 +466,10 @@ def main(): SslPolicy=dict(type="str"), Certificates=dict(type="list", elements="dict"), DefaultActions=dict(type="list", required=True, elements="dict"), + AlpnPolicy=dict( + type="str", + choices=["HTTP1Only", "HTTP2Only", "HTTP2Optional", "HTTP2Preferred", "None"], + ), ), ), name=dict(required=True, type="str"), diff --git a/plugins/modules/elb_target.py b/plugins/modules/elb_target.py index d7dfaf824cb..22074d496de 100644 --- a/plugins/modules/elb_target.py +++ b/plugins/modules/elb_target.py @@ -105,11 +105,9 @@ target_id: i-1234567 target_port: 8080 state: present - """ RETURN = r""" - """ from time import sleep diff --git a/plugins/modules/elb_target_group.py b/plugins/modules/elb_target_group.py index 4eb38f4c2d4..71a859ead28 100644 --- a/plugins/modules/elb_target_group.py +++ b/plugins/modules/elb_target_group.py @@ -270,7 +270,7 @@ Port: 80 state: present wait_timeout: 200 - wait: True + wait: true - name: Create a target group with IP address targets community.aws.elb_target_group: @@ -290,7 +290,7 @@ Port: 80 state: present wait_timeout: 200 - wait: True + wait: true # Using lambda as targets require that the target group # itself is allow to invoke the lambda function. @@ -303,7 +303,7 @@ name: my-lambda-targetgroup target_type: lambda state: present - modify_targets: False + modify_targets: false register: out - name: second, allow invoke of the lambda @@ -321,8 +321,7 @@ target_type: lambda state: present targets: - - Id: arn:aws:lambda:eu-central-1:123456789012:function:my-lambda-function - + - Id: arn:aws:lambda:eu-central-1:123456789012:function:my-lambda-function """ RETURN = r""" diff --git a/plugins/modules/elb_target_group_info.py b/plugins/modules/elb_target_group_info.py index bf02db21f15..d0b013bfd09 100644 --- a/plugins/modules/elb_target_group_info.py +++ b/plugins/modules/elb_target_group_info.py @@ -59,7 +59,6 @@ names: - tg1 - tg2 - """ RETURN = r""" diff --git a/plugins/modules/elb_target_info.py b/plugins/modules/elb_target_info.py index add122416d9..ad0b3c74b30 100644 --- a/plugins/modules/elb_target_info.py +++ b/plugins/modules/elb_target_info.py @@ -35,96 +35,95 @@ EXAMPLES = r""" # practical use case - dynamically de-registering and re-registering nodes - - name: Get EC2 Metadata - amazon.aws.ec2_metadata_facts: - - - name: Get initial list of target groups - delegate_to: localhost - community.aws.elb_target_info: - instance_id: "{{ ansible_ec2_instance_id }}" - region: "{{ ansible_ec2_placement_region }}" - register: target_info - - - name: save fact for later - ansible.builtin.set_fact: - original_tgs: "{{ target_info.instance_target_groups }}" - - - name: Deregister instance from all target groups - delegate_to: localhost - community.aws.elb_target: - target_group_arn: "{{ item.0.target_group_arn }}" - target_port: "{{ item.1.target_port }}" - target_az: "{{ item.1.target_az }}" - target_id: "{{ item.1.target_id }}" - state: absent - target_status: "draining" - region: "{{ ansible_ec2_placement_region }}" - with_subelements: - - "{{ original_tgs }}" - - "targets" - - # This avoids having to wait for 'elb_target' to serially deregister each - # target group. An alternative would be to run all of the 'elb_target' - # tasks async and wait for them to finish. - - - name: wait for all targets to deregister simultaneously - delegate_to: localhost - community.aws.elb_target_info: - get_unused_target_groups: false - instance_id: "{{ ansible_ec2_instance_id }}" - region: "{{ ansible_ec2_placement_region }}" - register: target_info - until: (target_info.instance_target_groups | length) == 0 - retries: 60 - delay: 10 - - - name: reregister in elbv2s - community.aws.elb_target: - region: "{{ ansible_ec2_placement_region }}" - target_group_arn: "{{ item.0.target_group_arn }}" - target_port: "{{ item.1.target_port }}" - target_az: "{{ item.1.target_az }}" - target_id: "{{ item.1.target_id }}" - state: present - target_status: "initial" - with_subelements: - - "{{ original_tgs }}" - - "targets" - - # wait until all groups associated with this instance are 'healthy' or - # 'unused' - - name: wait for registration - community.aws.elb_target_info: - get_unused_target_groups: false - instance_id: "{{ ansible_ec2_instance_id }}" - region: "{{ ansible_ec2_placement_region }}" - register: target_info - until: (target_info.instance_target_groups | - map(attribute='targets') | - flatten | - map(attribute='target_health') | - rejectattr('state', 'equalto', 'healthy') | - rejectattr('state', 'equalto', 'unused') | - list | - length) == 0 - retries: 61 - delay: 10 +- name: Get EC2 Metadata + amazon.aws.ec2_metadata_facts: + +- name: Get initial list of target groups + delegate_to: localhost + community.aws.elb_target_info: + instance_id: "{{ ansible_ec2_instance_id }}" + region: "{{ ansible_ec2_placement_region }}" + register: target_info + +- name: save fact for later + ansible.builtin.set_fact: + original_tgs: "{{ target_info.instance_target_groups }}" + +- name: Deregister instance from all target groups + delegate_to: localhost + community.aws.elb_target: + target_group_arn: "{{ item.0.target_group_arn }}" + target_port: "{{ item.1.target_port }}" + target_az: "{{ item.1.target_az }}" + target_id: "{{ item.1.target_id }}" + state: absent + target_status: "draining" + region: "{{ ansible_ec2_placement_region }}" + with_subelements: + - "{{ original_tgs }}" + - "targets" + + # This avoids having to wait for 'elb_target' to serially deregister each + # target group. An alternative would be to run all of the 'elb_target' + # tasks async and wait for them to finish. + +- name: wait for all targets to deregister simultaneously + delegate_to: localhost + community.aws.elb_target_info: + get_unused_target_groups: false + instance_id: "{{ ansible_ec2_instance_id }}" + region: "{{ ansible_ec2_placement_region }}" + register: target_info + until: (target_info.instance_target_groups | length) == 0 + retries: 60 + delay: 10 + +- name: reregister in elbv2s + community.aws.elb_target: + region: "{{ ansible_ec2_placement_region }}" + target_group_arn: "{{ item.0.target_group_arn }}" + target_port: "{{ item.1.target_port }}" + target_az: "{{ item.1.target_az }}" + target_id: "{{ item.1.target_id }}" + state: present + target_status: "initial" + with_subelements: + - "{{ original_tgs }}" + - "targets" + +# wait until all groups associated with this instance are 'healthy' or +# 'unused' +- name: wait for registration + community.aws.elb_target_info: + get_unused_target_groups: false + instance_id: "{{ ansible_ec2_instance_id }}" + region: "{{ ansible_ec2_placement_region }}" + register: target_info + until: (target_info.instance_target_groups | + map(attribute='targets') | + flatten | + map(attribute='target_health') | + rejectattr('state', 'equalto', 'healthy') | + rejectattr('state', 'equalto', 'unused') | + list | + length) == 0 + retries: 61 + delay: 10 # using the target groups to generate AWS CLI commands to reregister the # instance - useful in case the playbook fails mid-run and manual # rollback is required - - name: "reregistration commands: ELBv2s" - ansible.builtin.debug: - msg: > - aws --region {{ansible_ec2_placement_region}} elbv2 - register-targets --target-group-arn {{item.target_group_arn}} - --targets{%for target in item.targets%} - Id={{target.target_id}}, - Port={{target.target_port}}{%if target.target_az%},AvailabilityZone={{target.target_az}} - {%endif%} - {%endfor%} - loop: "{{target_info.instance_target_groups}}" - +- name: "reregistration commands: ELBv2s" + ansible.builtin.debug: + msg: > + aws --region {{ansible_ec2_placement_region}} elbv2 + register-targets --target-group-arn {{item.target_group_arn}} + --targets{%for target in item.targets%} + Id={{target.target_id}}, + Port={{target.target_port}}{%if target.target_az%},AvailabilityZone={{target.target_az}} + {%endif%} + {%endfor%} + loop: "{{target_info.instance_target_groups}}" """ RETURN = r""" diff --git a/plugins/modules/glue_connection.py b/plugins/modules/glue_connection.py index 18039a8616d..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 a release after 2024-06-01. - 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 @@ -298,9 +291,7 @@ def create_or_update_glue_connection(connection, connection_ec2, module, glue_co params["ConnectionInput"]["PhysicalConnectionRequirements"] = dict() if module.params.get("security_groups") is not None: # Get security group IDs from names - security_group_ids = get_ec2_security_group_ids_from_names( - module.params.get("security_groups"), connection_ec2, boto3=True - ) + security_group_ids = get_ec2_security_group_ids_from_names(module.params.get("security_groups"), connection_ec2) params["ConnectionInput"]["PhysicalConnectionRequirements"]["SecurityGroupIdList"] = security_group_ids if module.params.get("subnet_id") is not None: params["ConnectionInput"]["PhysicalConnectionRequirements"]["SubnetId"] = module.params.get("subnet_id") @@ -334,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." - ), - date="2024-06-01", - 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/plugins/modules/glue_job.py b/plugins/modules/glue_job.py index 2567799757e..10ad102e340 100644 --- a/plugins/modules/glue_job.py +++ b/plugins/modules/glue_job.py @@ -95,7 +95,8 @@ worker_type: description: - The type of predefined worker that is allocated when a job runs. - choices: [ 'Standard', 'G.1X', 'G.2X' ] + - Support for instance types C(G.4X( and C(G.8X) was added in community.aws release 7.2.0. + choices: [ 'Standard', 'G.1X', 'G.2X', 'G.4X', 'G.8X' ] type: str version_added: 1.5.0 notes: @@ -465,7 +466,7 @@ def main(): state=dict(required=True, choices=["present", "absent"], type="str"), tags=dict(type="dict", aliases=["resource_tags"]), timeout=dict(type="int"), - worker_type=dict(choices=["Standard", "G.1X", "G.2X"], type="str"), + worker_type=dict(choices=["Standard", "G.1X", "G.2X", "G.4X", "G.8X"], type="str"), ) module = AnsibleAWSModule( diff --git a/plugins/modules/mq_broker.py b/plugins/modules/mq_broker.py index 25377407c2c..5a97fda9264 100644 --- a/plugins/modules/mq_broker.py +++ b/plugins/modules/mq_broker.py @@ -124,6 +124,19 @@ - At least one must be provided during creation. type: list elements: str + wait: + description: + - Specifies whether the module waits for the desired C(state). + - The time to wait can be controlled by setting I(wait_timeout). + type: bool + default: false + version_added: 7.1.0 + wait_timeout: + description: + - How long to wait (in seconds) for the broker to reach the desired state if I(wait=true). + default: 900 + type: int + version_added: 7.1.0 extends_documentation_fragment: - amazon.aws.boto3 @@ -152,7 +165,7 @@ register: result until: "result.broker['BrokerState'] == 'RUNNING'" retries: 15 - delay: 60 + delay: 60 - name: create or update broker with almost all parameter set including credentials community.aws.mq_broker: @@ -174,11 +187,11 @@ - subnet_xxx - subnet_yyy users: - - Username: 'initial-user' - Password': 'plain-text-password' - ConsoleAccess: true + - Username: 'initial-user' + Password': 'plain-text-password' + ConsoleAccess: true tags: - - env: Test + env: Test creator: ansible authentication_strategy: 'SIMPLE' auto_minor_version_upgrade: true @@ -215,6 +228,9 @@ # handled by AnsibleAWSModule pass +from time import sleep +from time import time + from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict from ansible_collections.amazon.aws.plugins.module_utils.modules import AnsibleAWSModule @@ -384,22 +400,77 @@ def get_broker_info(conn, module, broker_id): module.fail_json_aws(e, msg="Couldn't get broker details.") +def wait_for_status(conn, module): + interval_secs = 5 + timeout = module.params.get("wait_timeout", 900) + broker_name = module.params.get("broker_name") + desired_state = module.params.get("state") + done = False + + paginator = conn.get_paginator("list_brokers") + page_iterator = paginator.paginate(PaginationConfig={"MaxItems": 100, "PageSize": 100, "StartingToken": ""}) + wait_timeout = time() + timeout + + while wait_timeout > time(): + try: + filtered_iterator = page_iterator.search(f"BrokerSummaries[?BrokerName == `{broker_name}`][]") + broker_list = list(filtered_iterator) + + if module.check_mode: + return + + if len(broker_list) < 1 and desired_state == "absent": + done = True + break + + if desired_state in ["present", "rebooted"] and broker_list[0]["BrokerState"] == "RUNNING": + done = True + break + + if broker_list[0]["BrokerState"] == "CREATION_FAILED": + break + + sleep(interval_secs) + + except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: + module.fail_json_aws(e, msg="Couldn't paginate brokers.") + + if not done: + module.fail_json(msg="desired state not reached") + + def reboot_broker(conn, module, broker_id): + wait = module.params.get("wait") + try: - return conn.reboot_broker(BrokerId=broker_id) + response = conn.reboot_broker(BrokerId=broker_id) except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: module.fail_json_aws(e, msg="Couldn't reboot broker.") + if wait: + wait_for_status(conn, module) + + return response + def delete_broker(conn, module, broker_id): + wait = module.params.get("wait") + try: - return conn.delete_broker(BrokerId=broker_id) + response = conn.delete_broker(BrokerId=broker_id) except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: module.fail_json_aws(e, msg="Couldn't delete broker.") + if wait: + wait_for_status(conn, module) + + return response + def create_broker(conn, module): kwargs = _fill_kwargs(module) + wait = module.params.get("wait") + if "EngineVersion" in kwargs and kwargs["EngineVersion"] == "latest": kwargs["EngineVersion"] = get_latest_engine_version(conn, module, kwargs["EngineType"]) if kwargs["AuthenticationStrategy"] == "LDAP": @@ -416,11 +487,15 @@ def create_broker(conn, module): changed = True result = conn.create_broker(**kwargs) # + if wait: + wait_for_status(conn, module) + return {"broker": camel_dict_to_snake_dict(result, ignore_list=["Tags"]), "changed": changed} def update_broker(conn, module, broker_id): kwargs = _fill_kwargs(module, apply_defaults=False, ignore_create_params=True) + wait = module.params.get("wait") # replace name with id broker_name = kwargs["BrokerName"] del kwargs["BrokerName"] @@ -443,6 +518,9 @@ def update_broker(conn, module, broker_id): api_result = conn.update_broker(**kwargs) # # + if wait: + wait_for_status(conn, module) + return {"broker": result, "changed": changed} @@ -484,6 +562,8 @@ def main(): argument_spec = dict( broker_name=dict(required=True, type="str"), state=dict(default="present", choices=["present", "absent", "restarted"]), + wait=dict(default=False, type="bool"), + wait_timeout=dict(default=900, type="int"), # parameters only allowed on create deployment_mode=dict(choices=["SINGLE_INSTANCE", "ACTIVE_STANDBY_MULTI_AZ", "CLUSTER_MULTI_AZ"]), use_aws_owned_key=dict(type="bool"), diff --git a/plugins/modules/mq_user.py b/plugins/modules/mq_user.py index 0daf4e5b6e6..68e1fd62912 100644 --- a/plugins/modules/mq_user.py +++ b/plugins/modules/mq_user.py @@ -67,7 +67,7 @@ broker_id: "aws-mq-broker-id" username: "sample_user1" console_access: false - groups: [ "g1", "g2" ] + groups: ["g1", "g2"] password: "plain-text-password" - name: allow console access and update group list - relying on default state @@ -76,7 +76,7 @@ username: "sample_user1" region: "{{ aws_region }}" console_access: true - groups: [ "g1", "g2", "g3" ] + groups: ["g1", "g2", "g3"] - name: remove user - setting all credentials explicitly community.aws.mq_user: diff --git a/plugins/modules/msk_cluster.py b/plugins/modules/msk_cluster.py index aa0383294b2..9ecf053f87f 100644 --- a/plugins/modules/msk_cluster.py +++ b/plugins/modules/msk_cluster.py @@ -54,6 +54,17 @@ - kafka.m5.xlarge - kafka.m5.2xlarge - kafka.m5.4xlarge + - kafka.m5.8xlarge + - kafka.m5.12xlarge + - kafka.m5.16xlarge + - kafka.m5.24xlarge + - kafka.m7g.large + - kafka.m7g.xlarge + - kafka.m7g.2xlarge + - kafka.m7g.4xlarge + - kafka.m7g.8xlarge + - kafka.m7g.12xlarge + - kafka.m7g.16xlarge default: kafka.t3.small type: str ebs_volume_size: @@ -662,6 +673,17 @@ def main(): "kafka.m5.xlarge", "kafka.m5.2xlarge", "kafka.m5.4xlarge", + "kafka.m5.8xlarge", + "kafka.m5.12xlarge", + "kafka.m5.16xlarge", + "kafka.m5.24xlarge", + "kafka.m7g.large", + "kafka.m7g.xlarge", + "kafka.m7g.2xlarge", + "kafka.m7g.4xlarge", + "kafka.m7g.8xlarge", + "kafka.m7g.12xlarge", + "kafka.m7g.16xlarge", ], default="kafka.t3.small", ), diff --git a/plugins/modules/networkfirewall.py b/plugins/modules/networkfirewall.py index 2cab7e26dfc..f7fe63f3307 100644 --- a/plugins/modules/networkfirewall.py +++ b/plugins/modules/networkfirewall.py @@ -115,21 +115,21 @@ state: present policy: 'ExamplePolicy' subnets: - - 'subnet-123456789abcdef01' + - 'subnet-123456789abcdef01' # Create an AWS Network Firewall with various options, don't wait for creation # to finish. - community.aws.networkfirewall: name: 'ExampleFirewall' state: present - delete_protection: True + delete_protection: true description: "An example Description" policy: 'ExamplePolicy' - policy_change_protection: True + policy_change_protection: true subnets: - - 'subnet-123456789abcdef01' - - 'subnet-abcdef0123456789a' - subnet_change_protection: True + - 'subnet-123456789abcdef01' + - 'subnet-abcdef0123456789a' + subnet_change_protection: true tags: ExampleTag: Example Value another_tag: another_example diff --git a/plugins/modules/networkfirewall_rule_group.py b/plugins/modules/networkfirewall_rule_group.py index da67247aa96..9300036c5c7 100644 --- a/plugins/modules/networkfirewall_rule_group.py +++ b/plugins/modules/networkfirewall_rule_group.py @@ -365,8 +365,8 @@ domain_names: - 'example.com' - '.example.net' - filter_https: True - filter_http: True + filter_https: true + filter_http: true action: allow source_ips: '192.0.2.0/24' @@ -392,7 +392,6 @@ name: 'MinimalGroup' type: 'stateful' state: absent - """ RETURN = r""" diff --git a/plugins/modules/networkfirewall_rule_group_info.py b/plugins/modules/networkfirewall_rule_group_info.py index 3cf03e58baa..8b3c9d2305f 100644 --- a/plugins/modules/networkfirewall_rule_group_info.py +++ b/plugins/modules/networkfirewall_rule_group_info.py @@ -66,7 +66,6 @@ - community.aws.networkfirewall_rule_group_info: name: ExampleRuleGroup type: stateful - """ RETURN = r""" diff --git a/plugins/modules/opensearch.py b/plugins/modules/opensearch.py index 1c8f0deb582..d89e173bba2 100644 --- a/plugins/modules/opensearch.py +++ b/plugins/modules/opensearch.py @@ -450,16 +450,16 @@ auto_tune_options: enabled: true maintenance_schedules: - - start_at: "2025-01-12" - duration: - value: 1 - unit: "HOURS" - cron_expression_for_recurrence: "cron(0 12 * * ? *)" - - start_at: "2032-01-12" - duration: - value: 2 - unit: "HOURS" - cron_expression_for_recurrence: "cron(0 12 * * ? *)" + - start_at: "2025-01-12" + duration: + value: 1 + unit: "HOURS" + cron_expression_for_recurrence: "cron(0 12 * * ? *)" + - start_at: "2032-01-12" + duration: + value: 2 + unit: "HOURS" + cron_expression_for_recurrence: "cron(0 12 * * ? *)" tags: Environment: Development Application: Search @@ -478,7 +478,6 @@ cluster_config: instance_count: 40 wait: true - """ import datetime diff --git a/plugins/modules/redshift_subnet_group.py b/plugins/modules/redshift_subnet_group.py index 3d693cc23ac..2ae3a24059e 100644 --- a/plugins/modules/redshift_subnet_group.py +++ b/plugins/modules/redshift_subnet_group.py @@ -51,8 +51,8 @@ group_name: redshift-subnet group_description: Redshift subnet group_subnets: - - 'subnet-aaaaa' - - 'subnet-bbbbb' + - 'subnet-aaaaa' + - 'subnet-bbbbb' - name: Remove subnet group community.aws.redshift_subnet_group: diff --git a/plugins/modules/s3_logging.py b/plugins/modules/s3_logging.py index 193455a4be2..3a78749945f 100644 --- a/plugins/modules/s3_logging.py +++ b/plugins/modules/s3_logging.py @@ -56,7 +56,6 @@ community.aws.s3_logging: name: mywebsite.com state: absent - """ try: diff --git a/plugins/modules/s3_metrics_configuration.py b/plugins/modules/s3_metrics_configuration.py index d90e7d0e603..4e62b7bf8e4 100644 --- a/plugins/modules/s3_metrics_configuration.py +++ b/plugins/modules/s3_metrics_configuration.py @@ -93,7 +93,6 @@ bucket_name: my-bucket id: EntireBucket state: absent - """ try: diff --git a/plugins/modules/s3_website.py b/plugins/modules/s3_website.py index 38c411b1fe2..1c212d11789 100644 --- a/plugins/modules/s3_website.py +++ b/plugins/modules/s3_website.py @@ -68,7 +68,6 @@ suffix: home.htm error_key: errors/404.htm state: present - """ RETURN = r""" diff --git a/plugins/modules/ses_identity.py b/plugins/modules/ses_identity.py index e324a7e12f7..785519bd3ba 100644 --- a/plugins/modules/ses_identity.py +++ b/plugins/modules/ses_identity.py @@ -84,7 +84,7 @@ - Whether or not to enable feedback forwarding. - This can only be false if both I(bounce_notifications) and I(complaint_notifications) specify SNS topics. type: 'bool' - default: True + default: true extends_documentation_fragment: - amazon.aws.common.modules - amazon.aws.region.modules @@ -115,7 +115,7 @@ community.aws.sns_topic: name: "complaints-topic" state: present - purge_subscriptions: False + purge_subscriptions: false register: topic_info - name: Deliver feedback to topic instead of owner email @@ -124,11 +124,11 @@ state: present complaint_notifications: topic: "{{ topic_info.sns_arn }}" - include_headers: True + include_headers: true bounce_notifications: topic: "{{ topic_info.sns_arn }}" - include_headers: False - feedback_forwarding: False + include_headers: false + feedback_forwarding: false # Create an SNS topic for delivery notifications and leave complaints # Being forwarded to the identity owner email @@ -136,7 +136,7 @@ community.aws.sns_topic: name: "delivery-notifications-topic" state: present - purge_subscriptions: False + purge_subscriptions: false register: topic_info - name: Delivery notifications to topic diff --git a/plugins/modules/sns_topic.py b/plugins/modules/sns_topic.py index 03e69d8c40f..0fe7fbe3390 100644 --- a/plugins/modules/sns_topic.py +++ b/plugins/modules/sns_topic.py @@ -179,7 +179,7 @@ numMinDelayRetries: 2 numNoDelayRetries: 2 backoffFunction: "linear" - disableSubscriptionOverrides: True + disableSubscriptionOverrides: true defaultThrottlePolicy: maxReceivesPerSecond: 10 subscriptions: diff --git a/plugins/modules/sts_session_token.py b/plugins/modules/sts_session_token.py index 044a6367b58..cb9f99fd3a9 100644 --- a/plugins/modules/sts_session_token.py +++ b/plugins/modules/sts_session_token.py @@ -73,8 +73,7 @@ resource: i-xyzxyz01 state: present tags: - MyNewTag: value - + MyNewTag: value """ try: diff --git a/plugins/modules/waf_condition.py b/plugins/modules/waf_condition.py index aed48130d3c..5b08cb6de86 100644 --- a/plugins/modules/waf_condition.py +++ b/plugins/modules/waf_condition.py @@ -139,71 +139,70 @@ """ EXAMPLES = r""" - - name: create WAF byte condition - community.aws.waf_condition: - name: my_byte_condition - filters: +- name: create WAF byte condition + community.aws.waf_condition: + name: my_byte_condition + filters: - field_to_match: header position: STARTS_WITH target_string: Hello header: Content-type - type: byte - - - name: create WAF geo condition - community.aws.waf_condition: - name: my_geo_condition - filters: - - country: US - - country: AU - - country: AT - type: geo - - - name: create IP address condition - community.aws.waf_condition: - name: "{{ resource_prefix }}_ip_condition" - filters: - - ip_address: "10.0.0.0/8" - - ip_address: "192.168.0.0/24" - type: ip - - - name: create WAF regex condition - community.aws.waf_condition: - name: my_regex_condition - filters: - - field_to_match: query_string - regex_pattern: - name: greetings - regex_strings: - - '[hH]ello' - - '^Hi there' - - '.*Good Day to You' - type: regex - - - name: create WAF size condition - community.aws.waf_condition: - name: my_size_condition - filters: - - field_to_match: query_string - size: 300 - comparison: GT - type: size - - - name: create WAF sql injection condition - community.aws.waf_condition: - name: my_sql_condition - filters: - - field_to_match: query_string - transformation: url_decode - type: sql - - - name: create WAF xss condition - community.aws.waf_condition: - name: my_xss_condition - filters: - - field_to_match: query_string - transformation: url_decode - type: xss - + type: byte + +- name: create WAF geo condition + community.aws.waf_condition: + name: my_geo_condition + filters: + - country: US + - country: AU + - country: AT + type: geo + +- name: create IP address condition + community.aws.waf_condition: + name: "{{ resource_prefix }}_ip_condition" + filters: + - ip_address: "10.0.0.0/8" + - ip_address: "192.168.0.0/24" + type: ip + +- name: create WAF regex condition + community.aws.waf_condition: + name: my_regex_condition + filters: + - field_to_match: query_string + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + +- name: create WAF size condition + community.aws.waf_condition: + name: my_size_condition + filters: + - field_to_match: query_string + size: 300 + comparison: GT + type: size + +- name: create WAF sql injection condition + community.aws.waf_condition: + name: my_sql_condition + filters: + - field_to_match: query_string + transformation: url_decode + type: sql + +- name: create WAF xss condition + community.aws.waf_condition: + name: my_xss_condition + filters: + - field_to_match: query_string + transformation: url_decode + type: xss """ RETURN = r""" diff --git a/plugins/modules/waf_rule.py b/plugins/modules/waf_rule.py index a744d8747d8..87a02bbbdda 100644 --- a/plugins/modules/waf_rule.py +++ b/plugins/modules/waf_rule.py @@ -73,24 +73,24 @@ """ EXAMPLES = r""" - - name: create WAF rule - community.aws.waf_rule: - name: my_waf_rule - conditions: - - name: my_regex_condition - type: regex - negated: false - - name: my_geo_condition - type: geo - negated: false - - name: my_byte_condition - type: byte - negated: true - - - name: remove WAF rule - community.aws.waf_rule: - name: "my_waf_rule" - state: absent +- name: create WAF rule + community.aws.waf_rule: + name: my_waf_rule + conditions: + - name: my_regex_condition + type: regex + negated: false + - name: my_geo_condition + type: geo + negated: false + - name: my_byte_condition + type: byte + negated: true + +- name: remove WAF rule + community.aws.waf_rule: + name: "my_waf_rule" + state: absent """ RETURN = r""" diff --git a/plugins/modules/waf_web_acl.py b/plugins/modules/waf_web_acl.py index b8e4d9e6290..021ca568d80 100644 --- a/plugins/modules/waf_web_acl.py +++ b/plugins/modules/waf_web_acl.py @@ -87,21 +87,21 @@ """ EXAMPLES = r""" - - name: create web ACL - community.aws.waf_web_acl: - name: my_web_acl - rules: - - name: my_rule - priority: 1 - action: block - default_action: block - purge_rules: true - state: present - - - name: delete the web acl - community.aws.waf_web_acl: - name: my_web_acl - state: absent +- name: create web ACL + community.aws.waf_web_acl: + name: my_web_acl + rules: + - name: my_rule + priority: 1 + action: block + default_action: block + purge_rules: true + state: present + +- name: delete the web acl + community.aws.waf_web_acl: + name: my_web_acl + state: absent """ RETURN = r""" diff --git a/plugins/modules/wafv2_web_acl.py b/plugins/modules/wafv2_web_acl.py index acc5345be34..054c093c532 100644 --- a/plugins/modules/wafv2_web_acl.py +++ b/plugins/modules/wafv2_web_acl.py @@ -246,7 +246,6 @@ content: '{ message: "Your request has been blocked due to too many HTTP requests coming from your IP" }' region: us-east-1 state: present - """ RETURN = r""" 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/test-requirements.txt b/test-requirements.txt index 47896f74134..03e59f5965d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -17,7 +17,5 @@ git+https://github.com/ansible-community/pytest-ansible-units.git ; python_versi netaddr # Sometimes needed where we don't have features we need in modules awscli -# Used for comparing SSH Public keys to the Amazon fingerprints -pycrypto -# Used by ec2_win_password +# Used for comparing SSH Public keys to the Amazon fingerprints and ec2_win_password cryptography 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/requirements.txt b/tests/integration/requirements.txt index 352e8b7ff0f..aa71c96813e 100644 --- a/tests/integration/requirements.txt +++ b/tests/integration/requirements.txt @@ -8,6 +8,6 @@ virtualenv # Sometimes needed where we don't have features we need in modules awscli # Used for comparing SSH Public keys to the Amazon fingerprints -pycrypto +cryptography # Used by ec2_asg_scheduled_action python-dateutil diff --git a/tests/integration/targets/api_gateway_domain/tasks/main.yml b/tests/integration/targets/api_gateway_domain/tasks/main.yml index 24f391df37c..f3c7407937e 100644 --- a/tests/integration/targets/api_gateway_domain/tasks/main.yml +++ b/tests/integration/targets/api_gateway_domain/tasks/main.yml @@ -39,7 +39,7 @@ - assert: that: - create_result.changed == True - - create_result.response.domain.domain_name == "{{ api_gateway_domain_name }}" + - create_result.response.domain.domain_name == api_gateway_domain_name - create_result.response.domain.distribution_domain_name is defined - create_result.response.domain.distribution_hosted_zone_id is defined - create_result.response.path_mappings is defined @@ -59,7 +59,7 @@ that: - repeat_result.changed == False - repeat_result.failed == False - - repeat_result.response.domain_name == "{{ api_gateway_domain_name }}" + - repeat_result.response.domain_name == api_gateway_domain_name - name: Update Test - API gateway custom domain setup, change settings api_gateway_domain: @@ -75,7 +75,7 @@ - assert: that: - update_result.changed == True - - update_result.response.domain.domain_name == "{{ api_gateway_domain_name }}" + - update_result.response.domain.domain_name == api_gateway_domain_name - update_result.response.domain.security_policy == 'TLS_1_2' - update_result.response.domain.endpoint_configuration.types.0 == 'REGIONAL' - update_result.response.path_mappings.0.base_path = '/v1' 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 f19b7c3c24a..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/autoscaling_policy/tasks/main.yml b/tests/integration/targets/autoscaling_policy/tasks/main.yml index e3e42041f18..684522d641a 100644 --- a/tests/integration/targets/autoscaling_policy/tasks/main.yml +++ b/tests/integration/targets/autoscaling_policy/tasks/main.yml @@ -46,7 +46,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - result.policy_name == resource_prefix ~ '_simplescaling_policy' - result.changed - name: Update Simple Scaling policy using explicit defaults @@ -61,7 +61,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - result.policy_name == resource_prefix ~ '_simplescaling_policy' - not result.changed - name: min_adjustment_step is ignored with ChangeInCapacity @@ -77,7 +77,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - result.policy_name == resource_prefix ~ '_simplescaling_policy' - not result.changed - result.adjustment_type == "ChangeInCapacity" @@ -94,7 +94,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - result.policy_name == resource_prefix ~ '_simplescaling_policy' - result.changed - result.adjustment_type == "PercentChangeInCapacity" @@ -126,7 +126,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_stepscaling_policy" + - result.policy_name == resource_prefix ~ '_stepscaling_policy' - result.changed - name: Add another step @@ -149,7 +149,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_stepscaling_policy" + - result.policy_name == resource_prefix ~ '_stepscaling_policy' - result.changed - result.adjustment_type == "PercentChangeInCapacity" @@ -189,7 +189,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_targettracking_predefined_policy" + - result.policy_name == resource_prefix ~ '_targettracking_predefined_policy' - result.changed - result is successful @@ -206,7 +206,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_targettracking_predefined_policy" + - result.policy_name == resource_prefix ~ '_targettracking_predefined_policy' - result is not changed # # It would be good to also test this but we would need an Target group and an ALB @@ -263,7 +263,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_targettracking_custom_policy" + - result.policy_name == resource_prefix ~ '_targettracking_custom_policy' - result.changed - result is successful @@ -285,7 +285,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_targettracking_custom_policy" + - result.policy_name == resource_prefix ~ '_targettracking_custom_policy' - result is not changed always: diff --git a/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml b/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml index 6de1d2dff7a..4c0e97220af 100644 --- a/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml +++ b/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml @@ -101,7 +101,7 @@ that: - scheduled_action is successful - scheduled_action is changed - - scheduled_action.scheduled_action_name == "{{ resource_prefix }}-test" + - scheduled_action.scheduled_action_name == resource_prefix ~ '-test' - scheduled_action.desired_capacity == 2 - name: Create basic scheduled_action - idempotent @@ -155,7 +155,7 @@ that: - scheduled_action is successful - scheduled_action is changed - - scheduled_action.scheduled_action_name == "{{ resource_prefix }}-test" + - scheduled_action.scheduled_action_name == resource_prefix ~ '-test' - scheduled_action.desired_capacity == 3 - scheduled_action.min_size == 3 @@ -217,7 +217,7 @@ that: - advanced_scheduled_action is successful - advanced_scheduled_action is changed - - advanced_scheduled_action.scheduled_action_name == "{{ resource_prefix }}-test1" + - advanced_scheduled_action.scheduled_action_name == resource_prefix ~ '-test1' - advanced_scheduled_action.desired_capacity == 2 - advanced_scheduled_action.min_size == 2 - advanced_scheduled_action.max_size == 5 diff --git a/tests/integration/targets/cloudfront_distribution/tasks/main.yml b/tests/integration/targets/cloudfront_distribution/tasks/main.yml index c61684b7ce1..281097db1d1 100644 --- a/tests/integration/targets/cloudfront_distribution/tasks/main.yml +++ b/tests/integration/targets/cloudfront_distribution/tasks/main.yml @@ -168,7 +168,7 @@ that: - update_origin_origin_shield.changed - update_origin_origin_shield.origins['items'][0].origin_shield.enabled - - update_origin_origin_shield.origins['items'][0].origin_shield.origin_shield_region == '{{ aws_region }}' + - update_origin_origin_shield.origins['items'][0].origin_shield.origin_shield_region == aws_region # TODO: fix module idempotency issue # - name: enable origin Origin Shield again to test idempotency @@ -632,6 +632,22 @@ - result.origins['quantity'] > 0 - result.origins['items'] | selectattr('s3_origin_config', 'defined') | map(attribute='s3_origin_config') | selectattr('origin_access_identity', 'eq', origin_access_identity) | list | length == 1 + - name: update distribution to use cache_policy_id and origin_request_policy_id + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + default_cache_behavior: + cache_policy_id: "658327ea-f89d-4fab-a63d-7e88639e58f6" + origin_request_policy_id: "88a5eaf4-2fd4-4709-b370-b4c650ea3fcf" + state: present + register: update_distribution_with_cache_policies + + - name: ensure that the cache_policy_id and origin_request_policy_id was set + assert: + that: + - update_distribution_with_cache_policies.changed + - update_distribution_with_cache_policies.default_cache_behavior.cache_policy_id == '658327ea-f89d-4fab-a63d-7e88639e58f6' + - update_distribution_with_cache_policies.default_cache_behavior.origin_request_policy_id == '88a5eaf4-2fd4-4709-b370-b4c650ea3fcf' + always: # TEARDOWN STARTS HERE - name: delete the s3 bucket diff --git a/tests/integration/targets/cloudfront_reponse_headers_policy/task/main.yml b/tests/integration/targets/cloudfront_reponse_headers_policy/task/main.yml index cf48e89c4ba..5bab44f9fb9 100644 --- a/tests/integration/targets/cloudfront_reponse_headers_policy/task/main.yml +++ b/tests/integration/targets/cloudfront_reponse_headers_policy/task/main.yml @@ -24,7 +24,7 @@ that: - create_result is changed - create_result is not failed - - create_result.response_headers_policy.response_headers_policy_config.name == "{{ resource_prefix }}-my-header-policy" + - create_result.response_headers_policy.response_headers_policy_config.name == resource_prefix ~ '-my-header-policy' - name: Rerun same task to ensure idempotence cloudfront_response_headers_policy: diff --git a/tests/integration/targets/codecommit_repository/tasks/main.yml b/tests/integration/targets/codecommit_repository/tasks/main.yml index 20c09fd8b6d..62dd1653bc9 100644 --- a/tests/integration/targets/codecommit_repository/tasks/main.yml +++ b/tests/integration/targets/codecommit_repository/tasks/main.yml @@ -27,7 +27,7 @@ - assert: that: - output is changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - output.repository_metadata.repository_description == 'original comment' - name: No-op update to repository @@ -39,7 +39,7 @@ - assert: that: - output is not changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - output.repository_metadata.repository_description == 'original comment' - name: Update repository description (CHECK MODE) @@ -52,7 +52,7 @@ - assert: that: - output is changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - output.repository_metadata.repository_description == 'original comment' - name: Update repository description @@ -64,7 +64,7 @@ - assert: that: - output is changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - output.repository_metadata.repository_description == 'new comment' # ============================================================ @@ -104,7 +104,7 @@ - assert: that: - output is changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - name: No-op update to repository without description codecommit_repository: @@ -114,7 +114,7 @@ - assert: that: - output is not changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - name: Delete a repository without description codecommit_repository: diff --git a/tests/integration/targets/codepipeline/tasks/main.yml b/tests/integration/targets/codepipeline/tasks/main.yml index 4e6e4368315..57353ed8a58 100644 --- a/tests/integration/targets/codepipeline/tasks/main.yml +++ b/tests/integration/targets/codepipeline/tasks/main.yml @@ -66,7 +66,7 @@ - assert: that: - output.changed == True - - output.pipeline.name == "{{ codepipeline_name }}" + - output.pipeline.name == codepipeline_name - output.pipeline.stages|length > 1 - name: idempotence check rerunning same CodePipeline task diff --git a/tests/integration/targets/config/tasks/main.yaml b/tests/integration/targets/config/tasks/main.yaml index 244c4b29b7b..54037080398 100644 --- a/tests/integration/targets/config/tasks/main.yaml +++ b/tests/integration/targets/config/tasks/main.yaml @@ -173,7 +173,7 @@ config_recorder: name: '{{ resource_prefix }}-recorder' state: present - role_arn: "{{ config_iam_role.arn }}" + role_arn: "{{ config_iam_role.iam_role.arn }}" recording_group: all_supported: true include_global_types: true @@ -236,7 +236,7 @@ account_sources: [] organization_source: all_aws_regions: true - role_arn: "{{ config_iam_role.arn }}" + role_arn: "{{ config_iam_role.iam_role.arn }}" register: output - name: assert success @@ -251,7 +251,7 @@ account_sources: [] organization_source: all_aws_regions: true - role_arn: "{{ config_iam_role.arn }}" + role_arn: "{{ config_iam_role.iam_role.arn }}" register: output - name: assert not changed @@ -266,7 +266,7 @@ config_recorder: name: '{{ resource_prefix }}-recorder' state: present - role_arn: "{{ config_iam_role.arn }}" + role_arn: "{{ config_iam_role.iam_role.arn }}" recording_group: all_supported: false include_global_types: false @@ -348,7 +348,7 @@ all_aws_regions: false aws_regions: - '{{ aws_region }}' - role_arn: "{{ config_iam_role.arn }}" + role_arn: "{{ config_iam_role.iam_role.arn }}" register: output - name: assert success @@ -365,7 +365,7 @@ all_aws_regions: false aws_regions: - '{{ aws_region }}' - role_arn: "{{ config_iam_role.arn }}" + role_arn: "{{ config_iam_role.iam_role.arn }}" register: output - name: assert success @@ -380,7 +380,7 @@ config_recorder: name: '{{ resource_prefix }}-recorder' state: present - role_arn: "{{ config_iam_role.arn }}" + role_arn: "{{ config_iam_role.iam_role.arn }}" recording_group: all_supported: false include_global_types: false diff --git a/tests/integration/targets/connection/test_assume.yml b/tests/integration/targets/connection/test_assume.yml index e8c6aab0a09..f979ef2d432 100644 --- a/tests/integration/targets/connection/test_assume.yml +++ b/tests/integration/targets/connection/test_assume.yml @@ -13,4 +13,4 @@ - assert: that: - - id_cmd.stdout == '{{ user_name }}' + - id_cmd.stdout == user_name diff --git a/tests/integration/targets/connection_aws_ssm_addressing/aliases b/tests/integration/targets/connection_aws_ssm_addressing/aliases index eb6b8d08bcd..eb8e0b8914b 100644 --- a/tests/integration/targets/connection_aws_ssm_addressing/aliases +++ b/tests/integration/targets/connection_aws_ssm_addressing/aliases @@ -1,5 +1,4 @@ time=10m -disabled cloud/aws connection_aws_ssm diff --git a/tests/integration/targets/connection_aws_ssm_addressing/aws_ssm_integration_test_setup.yml b/tests/integration/targets/connection_aws_ssm_addressing/aws_ssm_integration_test_setup.yml index db519fb631e..9e2f3fd01f2 100644 --- a/tests/integration/targets/connection_aws_ssm_addressing/aws_ssm_integration_test_setup.yml +++ b/tests/integration/targets/connection_aws_ssm_addressing/aws_ssm_integration_test_setup.yml @@ -2,7 +2,7 @@ roles: - role: ../setup_connection_aws_ssm vars: - target_os: fedora + target_os: centos encrypted_bucket: False s3_bucket_region: 'eu-central-1' s3_addressing_style: virtual diff --git a/tests/integration/targets/connection_aws_ssm_fedora/aliases b/tests/integration/targets/connection_aws_ssm_centos/aliases similarity index 81% rename from tests/integration/targets/connection_aws_ssm_fedora/aliases rename to tests/integration/targets/connection_aws_ssm_centos/aliases index eb6b8d08bcd..eb8e0b8914b 100644 --- a/tests/integration/targets/connection_aws_ssm_fedora/aliases +++ b/tests/integration/targets/connection_aws_ssm_centos/aliases @@ -1,5 +1,4 @@ time=10m -disabled cloud/aws connection_aws_ssm diff --git a/tests/integration/targets/connection_aws_ssm_fedora/aws_ssm_integration_test_setup.yml b/tests/integration/targets/connection_aws_ssm_centos/aws_ssm_integration_test_setup.yml similarity index 75% rename from tests/integration/targets/connection_aws_ssm_fedora/aws_ssm_integration_test_setup.yml rename to tests/integration/targets/connection_aws_ssm_centos/aws_ssm_integration_test_setup.yml index 353757e332c..d64cdabb608 100644 --- a/tests/integration/targets/connection_aws_ssm_fedora/aws_ssm_integration_test_setup.yml +++ b/tests/integration/targets/connection_aws_ssm_centos/aws_ssm_integration_test_setup.yml @@ -2,4 +2,4 @@ roles: - role: ../setup_connection_aws_ssm vars: - target_os: fedora + target_os: centos diff --git a/tests/integration/targets/connection_aws_ssm_fedora/aws_ssm_integration_test_teardown.yml b/tests/integration/targets/connection_aws_ssm_centos/aws_ssm_integration_test_teardown.yml similarity index 100% rename from tests/integration/targets/connection_aws_ssm_fedora/aws_ssm_integration_test_teardown.yml rename to tests/integration/targets/connection_aws_ssm_centos/aws_ssm_integration_test_teardown.yml diff --git a/tests/integration/targets/connection_aws_ssm_fedora/meta/main.yml b/tests/integration/targets/connection_aws_ssm_centos/meta/main.yml similarity index 100% rename from tests/integration/targets/connection_aws_ssm_fedora/meta/main.yml rename to tests/integration/targets/connection_aws_ssm_centos/meta/main.yml diff --git a/tests/integration/targets/connection_aws_ssm_fedora/runme.sh b/tests/integration/targets/connection_aws_ssm_centos/runme.sh similarity index 100% rename from tests/integration/targets/connection_aws_ssm_fedora/runme.sh rename to tests/integration/targets/connection_aws_ssm_centos/runme.sh diff --git a/tests/integration/targets/connection_aws_ssm_cross_region/aliases b/tests/integration/targets/connection_aws_ssm_cross_region/aliases index eb6b8d08bcd..eb8e0b8914b 100644 --- a/tests/integration/targets/connection_aws_ssm_cross_region/aliases +++ b/tests/integration/targets/connection_aws_ssm_cross_region/aliases @@ -1,5 +1,4 @@ time=10m -disabled cloud/aws connection_aws_ssm diff --git a/tests/integration/targets/connection_aws_ssm_cross_region/aws_ssm_integration_test_setup.yml b/tests/integration/targets/connection_aws_ssm_cross_region/aws_ssm_integration_test_setup.yml index 1f223757c81..eff5f538699 100644 --- a/tests/integration/targets/connection_aws_ssm_cross_region/aws_ssm_integration_test_setup.yml +++ b/tests/integration/targets/connection_aws_ssm_cross_region/aws_ssm_integration_test_setup.yml @@ -2,7 +2,7 @@ roles: - role: ../setup_connection_aws_ssm vars: - target_os: fedora + target_os: centos s3_bucket_region: 'eu-central-1' # Post 2019 regions behave differently from other regions # they're worth testing but it's not possible in CI today. diff --git a/tests/integration/targets/connection_aws_ssm_encrypted_s3/aliases b/tests/integration/targets/connection_aws_ssm_encrypted_s3/aliases index eb6b8d08bcd..eb8e0b8914b 100644 --- a/tests/integration/targets/connection_aws_ssm_encrypted_s3/aliases +++ b/tests/integration/targets/connection_aws_ssm_encrypted_s3/aliases @@ -1,5 +1,4 @@ time=10m -disabled cloud/aws connection_aws_ssm diff --git a/tests/integration/targets/connection_aws_ssm_encrypted_s3/aws_ssm_integration_test_setup.yml b/tests/integration/targets/connection_aws_ssm_encrypted_s3/aws_ssm_integration_test_setup.yml index bfea0d0dc79..d6e650cd316 100644 --- a/tests/integration/targets/connection_aws_ssm_encrypted_s3/aws_ssm_integration_test_setup.yml +++ b/tests/integration/targets/connection_aws_ssm_encrypted_s3/aws_ssm_integration_test_setup.yml @@ -2,6 +2,6 @@ roles: - role: ../setup_connection_aws_ssm vars: - target_os: fedora + target_os: centos encrypted_bucket: True test_suffix: encrypteds3 diff --git a/tests/integration/targets/connection_aws_ssm_endpoint/aliases b/tests/integration/targets/connection_aws_ssm_endpoint/aliases index eb6b8d08bcd..eb8e0b8914b 100644 --- a/tests/integration/targets/connection_aws_ssm_endpoint/aliases +++ b/tests/integration/targets/connection_aws_ssm_endpoint/aliases @@ -1,5 +1,4 @@ time=10m -disabled cloud/aws connection_aws_ssm diff --git a/tests/integration/targets/connection_aws_ssm_endpoint/aws_ssm_integration_test_setup.yml b/tests/integration/targets/connection_aws_ssm_endpoint/aws_ssm_integration_test_setup.yml index 71c850e9d8f..e0296c7d6e8 100644 --- a/tests/integration/targets/connection_aws_ssm_endpoint/aws_ssm_integration_test_setup.yml +++ b/tests/integration/targets/connection_aws_ssm_endpoint/aws_ssm_integration_test_setup.yml @@ -2,6 +2,6 @@ roles: - role: ../setup_connection_aws_ssm vars: - target_os: fedora + target_os: centos test_suffix: endpoint endpoint_url: 'https://s3.dualstack.{{ aws_region }}.amazonaws.com' diff --git a/tests/integration/targets/connection_aws_ssm_profile/aliases b/tests/integration/targets/connection_aws_ssm_profile/aliases index eb6b8d08bcd..eb8e0b8914b 100644 --- a/tests/integration/targets/connection_aws_ssm_profile/aliases +++ b/tests/integration/targets/connection_aws_ssm_profile/aliases @@ -1,5 +1,4 @@ time=10m -disabled cloud/aws connection_aws_ssm diff --git a/tests/integration/targets/connection_aws_ssm_profile/aws_ssm_integration_test_setup.yml b/tests/integration/targets/connection_aws_ssm_profile/aws_ssm_integration_test_setup.yml index 3f4c2e47db4..b8169d2c61c 100644 --- a/tests/integration/targets/connection_aws_ssm_profile/aws_ssm_integration_test_setup.yml +++ b/tests/integration/targets/connection_aws_ssm_profile/aws_ssm_integration_test_setup.yml @@ -2,5 +2,5 @@ roles: - role: ../setup_connection_aws_ssm vars: - target_os: fedora + target_os: centos profile_name: test_profile diff --git a/tests/integration/targets/connection_aws_ssm_ssm_document/aliases b/tests/integration/targets/connection_aws_ssm_ssm_document/aliases index eb6b8d08bcd..eb8e0b8914b 100644 --- a/tests/integration/targets/connection_aws_ssm_ssm_document/aliases +++ b/tests/integration/targets/connection_aws_ssm_ssm_document/aliases @@ -1,5 +1,4 @@ time=10m -disabled cloud/aws connection_aws_ssm diff --git a/tests/integration/targets/connection_aws_ssm_ssm_document/aws_ssm_integration_test_setup.yml b/tests/integration/targets/connection_aws_ssm_ssm_document/aws_ssm_integration_test_setup.yml index 992426976b8..6ef4dfd47c4 100644 --- a/tests/integration/targets/connection_aws_ssm_ssm_document/aws_ssm_integration_test_setup.yml +++ b/tests/integration/targets/connection_aws_ssm_ssm_document/aws_ssm_integration_test_setup.yml @@ -2,6 +2,6 @@ roles: - role: ../setup_connection_aws_ssm vars: - target_os: fedora + target_os: centos use_ssm_document: True test_suffix: document diff --git a/tests/integration/targets/connection_aws_ssm_vars/aliases b/tests/integration/targets/connection_aws_ssm_vars/aliases index eb6b8d08bcd..eb8e0b8914b 100644 --- a/tests/integration/targets/connection_aws_ssm_vars/aliases +++ b/tests/integration/targets/connection_aws_ssm_vars/aliases @@ -1,5 +1,4 @@ time=10m -disabled cloud/aws connection_aws_ssm diff --git a/tests/integration/targets/connection_aws_ssm_vars/aws_ssm_integration_test_setup.yml b/tests/integration/targets/connection_aws_ssm_vars/aws_ssm_integration_test_setup.yml index ff67bc2c3e5..2b3755b8880 100644 --- a/tests/integration/targets/connection_aws_ssm_vars/aws_ssm_integration_test_setup.yml +++ b/tests/integration/targets/connection_aws_ssm_vars/aws_ssm_integration_test_setup.yml @@ -2,5 +2,5 @@ roles: - role: ../setup_connection_aws_ssm vars: - target_os: fedora + target_os: centos credential_vars: True diff --git a/tests/integration/targets/dynamodb_table/tasks/main.yml b/tests/integration/targets/dynamodb_table/tasks/main.yml index 268e61baeff..5b3592f3081 100644 --- a/tests/integration/targets/dynamodb_table/tasks/main.yml +++ b/tests/integration/targets/dynamodb_table/tasks/main.yml @@ -30,6 +30,16 @@ that: - create_table is successful - create_table is changed + + - name: Ensure the table was not created + dynamodb_table_info: + name: "{{ table_name }}" + register: table_info + + - name: Assert the table was not created + assert: + that: + - not table_info.table - name: Create table dynamodb_table: @@ -65,6 +75,17 @@ - create_table.table_name == table_name - create_table.write_capacity == 1 + - name: Ensure the table was created + dynamodb_table_info: + name: "{{ table_name }}" + register: table_info + + - name: Assert the table was created + assert: + that: + - table_info.table + - 'table_info.table.attribute_definitions == [{"attribute_name": table_index, "attribute_type": table_index_type[0]}]' + - name: Create table - idempotent - check_mode dynamodb_table: state: present diff --git a/tests/integration/targets/dynamodb_table/tasks/test_pay_per_request.yml b/tests/integration/targets/dynamodb_table/tasks/test_pay_per_request.yml index b469a1b51ca..301d22c06e8 100644 --- a/tests/integration/targets/dynamodb_table/tasks/test_pay_per_request.yml +++ b/tests/integration/targets/dynamodb_table/tasks/test_pay_per_request.yml @@ -15,6 +15,16 @@ - create_table is successful - create_table is changed +- name: Ensure the table was not created + dynamodb_table_info: + name: "{{ table_name_on_demand }}" + register: _table + +- name: Assert the table does not exist + assert: + that: + - not _table.table + - name: Create table - pay-per-request dynamodb_table: state: present @@ -32,6 +42,17 @@ - create_table is changed - create_table.billing_mode == "PAY_PER_REQUEST" +- name: Ensure the table was created + dynamodb_table_info: + name: "{{ table_name_on_demand }}" + register: _table + +- name: Assert the table has been created with the expected billing mode + assert: + that: + - _table.table + - _table.table.billing_mode == 'PAY_PER_REQUEST' + - name: Create table - pay-per-request - check failure dynamodb_table: state: present @@ -71,6 +92,16 @@ - create_complex_table is successful - create_complex_table is changed +- name: Ensure the table was not created + dynamodb_table_info: + name: "{{ table_name_on_demand_complex }}" + register: _complex_table + +- name: Assert the table does not exist + assert: + that: + - not _complex_table.table + - name: Create complex table - check failure on index dynamodb_table: state: present @@ -120,6 +151,17 @@ - create_complex_table.table_name == table_name_on_demand_complex - create_complex_table.tags == tags_default +- name: Ensure the table was created + dynamodb_table_info: + name: "{{ table_name_on_demand_complex }}" + register: _complex_table + +- name: Assert the table has been created + assert: + that: + - _complex_table.table + - _complex_table.table.billing_mode == 'PAY_PER_REQUEST' + - name: Update complex table billing_mode dynamodb_table: state: present @@ -140,3 +182,13 @@ - convert_complex_table is changed - '"billing_mode" in convert_complex_table' - convert_complex_table.billing_mode == "PROVISIONED" + +- name: Read table info + dynamodb_table_info: + name: "{{ table_name_on_demand_complex }}" + register: _complex_table + +- name: Assert the table has been updated + assert: + that: + - _complex_table.table.billing_mode == 'PROVISIONED' 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 c26b96d69c0..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.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.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.arn.replace(":role/", ":instance-profile/")' - - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.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.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.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.arn.replace(":role/", ":instance-profile/")' - - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == 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.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.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 4f42a9df28d..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 c7353cfc0a6..00000000000 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ /dev/null @@ -1,138 +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 - - # ==== 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: "{{ tgw_description }}" - state: absent - ignore_errors: yes 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/ecs_cluster/tasks/20_ecs_service.yml b/tests/integration/targets/ecs_cluster/tasks/20_ecs_service.yml index 8d055c0ac22..e04cfe6acd5 100644 --- a/tests/integration/targets/ecs_cluster/tasks/20_ecs_service.yml +++ b/tests/integration/targets/ecs_cluster/tasks/20_ecs_service.yml @@ -348,7 +348,7 @@ assert: that: - ecs_service_creation_hcgp.changed - - "{{ecs_service_creation_hcgp.service.healthCheckGracePeriodSeconds}} == 30" + - ecs_service_creation_hcgp.service.healthCheckGracePeriodSeconds == 30 - name: update ecs_service using health_check_grace_period_seconds ecs_service: @@ -368,7 +368,7 @@ assert: that: - ecs_service_creation_hcgp2.changed - - "{{ecs_service_creation_hcgp2.service.healthCheckGracePeriodSeconds}} == 10" + - ecs_service_creation_hcgp2.service.healthCheckGracePeriodSeconds == 10 - name: update ecs_service using REPLICA scheduling_strategy ecs_service: @@ -453,8 +453,8 @@ assert: that: - ecs_task_definition_constraints is changed - - ecs_task_definition_constraints.taskdefinition.placementConstraints[0].type == "{{ ecs_taskdefinition_placement_constraints[0].type }}" - - ecs_task_definition_constraints.taskdefinition.placementConstraints[0].expression == "{{ ecs_taskdefinition_placement_constraints[0].expression }}" + - ecs_task_definition_constraints.taskdefinition.placementConstraints[0].type == ecs_taskdefinition_placement_constraints[0].type + - ecs_task_definition_constraints.taskdefinition.placementConstraints[0].expression == ecs_taskdefinition_placement_constraints[0].expression - name: Remove ecs task definition with placement constraints ecs_taskdefinition: @@ -547,7 +547,7 @@ >> "rolloutStateReason": "ECS deployment ecs-svc/5156684577543126023 in progress.", constraints and placement strategies are only changeable if the rollout state is "COMPLETED" - + a) ecs_service has currently no waiter function. so this is a DIY waiter b) the state reached never "COMPLETED" because something if wrong with the ECS EC2 Instances or the network setup. The EC2 instance never arrived as an active instance in the cluster. @@ -555,9 +555,9 @@ >> no container instance met all of its requirements. Reason: No Container Instances were found in your cluster. >> For more information, see the Troubleshooting section of the Amazon ECS Developer Guide. >> ec2_instance networking does not work correctly, no instance available for the cluster - + Because all of this, all following tasks, that test the change of a constraint or placement stragegy are - using `force_new_deployment: true`. That ignores a) and b). + using `force_new_deployment: true`. That ignores a) and b). ignore_errors: true ecs_service_info: name: "{{ ecs_service_name }}-constraint" @@ -736,7 +736,7 @@ launch_type: FARGATE cpu: 512 memory: 1024 - execution_role_arn: "{{ iam_execution_role.arn }}" + execution_role_arn: "{{ iam_execution_role.iam_role.arn }}" state: present vars: ecs_task_host_port: 8080 @@ -750,7 +750,7 @@ launch_type: EC2 cpu: 512 memory: 1024 - execution_role_arn: "{{ iam_execution_role.arn }}" + execution_role_arn: "{{ iam_execution_role.iam_role.arn }}" state: present vars: ecs_task_host_port: 8080 @@ -916,7 +916,7 @@ launch_type: FARGATE cpu: 512 memory: 1024 - execution_role_arn: "{{ iam_execution_role.arn }}" + execution_role_arn: "{{ iam_execution_role.iam_role.arn }}" state: present runtime_platform: cpuArchitecture: "ARM64" @@ -938,7 +938,7 @@ launch_type: FARGATE cpu: 512 memory: 1024 - execution_role_arn: "{{ iam_execution_role.arn }}" + execution_role_arn: "{{ iam_execution_role.iam_role.arn }}" state: present runtime_platform: cpuArchitecture: "ARM64" @@ -960,7 +960,7 @@ launch_type: FARGATE cpu: 512 memory: 1024 - execution_role_arn: "{{ iam_execution_role.arn }}" + execution_role_arn: "{{ iam_execution_role.iam_role.arn }}" state: present runtime_platform: cpuArchitecture: "ARM64" diff --git a/tests/integration/targets/ecs_ecr/tasks/main.yml b/tests/integration/targets/ecs_ecr/tasks/main.yml index 88a31fbe9ff..68750e06e09 100644 --- a/tests/integration/targets/ecs_ecr/tasks/main.yml +++ b/tests/integration/targets/ecs_ecr/tasks/main.yml @@ -597,7 +597,7 @@ - name: it should use the provided KMS key assert: that: - - result.repository.encryptionConfiguration.kmsKey == '{{ kms_test_key.key_arn }}' + - result.repository.encryptionConfiguration.kmsKey == kms_test_key.key_arn always: diff --git a/tests/integration/targets/ecs_tag/tasks/main.yml b/tests/integration/targets/ecs_tag/tasks/main.yml index 597caaaa202..2c5614eb8bc 100644 --- a/tests/integration/targets/ecs_tag/tasks/main.yml +++ b/tests/integration/targets/ecs_tag/tasks/main.yml @@ -73,7 +73,7 @@ assert: that: - taglist.changed == true - - taglist.added_tags.Name == "{{ resource_prefix }}" + - taglist.added_tags.Name == resource_prefix - taglist.added_tags.another == "foobar" - name: cluster tags - Add tags to cluster again @@ -162,8 +162,8 @@ assert: that: - taglist.changed == true - - taglist.added_tags.Name == "service-{{ resource_prefix }}" - - taglist.tags.Name == "service-{{ resource_prefix }}" + - "taglist.added_tags.Name == 'service-' ~ resource_prefix" + - "taglist.tags.Name == 'service-' ~ resource_prefix" - name: services tags - Add name tag again - see no change ecs_tag: @@ -179,7 +179,7 @@ assert: that: - taglist.changed == false - - taglist.tags.Name == "service-{{ resource_prefix }}" + - "taglist.tags.Name == 'service-' ~ resource_prefix" - name: service tags - remove service tags ecs_tag: @@ -215,8 +215,8 @@ assert: that: - taglist.changed == true - - taglist.added_tags.Name == "task_definition-{{ resource_prefix }}" - - taglist.tags.Name == "task_definition-{{ resource_prefix }}" + - "taglist.added_tags.Name == 'task_definition-' ~ resource_prefix" + - "taglist.tags.Name == 'task_definition-' ~ resource_prefix" - name: task_definition tags - Add name tag again - see no change ecs_tag: @@ -232,7 +232,7 @@ assert: that: - taglist.changed == false - - taglist.tags.Name == "task_definition-{{ resource_prefix }}" + - "taglist.tags.Name == 'task_definition-' ~ resource_prefix" - name: task_definition tags - remove task_definition tags ecs_tag: diff --git a/tests/integration/targets/efs/tasks/main.yml b/tests/integration/targets/efs/tasks/main.yml index 19e0ee7a5a9..bc23f3a1199 100644 --- a/tests/integration/targets/efs/tasks/main.yml +++ b/tests/integration/targets/efs/tasks/main.yml @@ -98,7 +98,7 @@ - efs_result.efs[0].mount_targets[1].security_groups[0] == vpc_default_sg_id - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Get EFS by id @@ -107,7 +107,7 @@ register: efs_result - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Get EFS by tag @@ -117,7 +117,7 @@ register: efs_result - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Get EFS by target (subnet_id) @@ -127,7 +127,7 @@ register: efs_result - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Get EFS by target (security_group_id) @@ -137,7 +137,7 @@ register: efs_result - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Get EFS by tag and target @@ -149,7 +149,7 @@ register: efs_result - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ # Not checking efs_result.efs["throughput_mode"] here as @@ -231,7 +231,7 @@ - efs_result.efs[0].file_system_id == created_efs.efs.file_system_id - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Efs configure IA transition @@ -366,7 +366,7 @@ - efs_tag_result.tags.Env is defined - efs_tag_result.tags.Env is search("IntegrationTests") - efs_tag_result.tags.Name is defined - - efs_tag_result.tags.Name is search("{{ efs_name }}-test-tag") + - efs_tag_result.tags.Name is search(efs_name ~ '-test-tag') - efs_tag_result.tags["CamelCase"] == 'SimpleCamelCase' - efs_tag_result.tags["Title Case"] == 'Hello Cruel World' - efs_tag_result.tags["lowercase spaced"] == 'hello cruel world' @@ -464,7 +464,7 @@ - efs_tag_result.tags.Env is defined - efs_tag_result.tags.Env is search("IntegrationTests") - efs_tag_result.tags.Name is defined - - efs_tag_result.tags.Name is search("{{ efs_name }}-test-tag") + - efs_tag_result.tags.Name is search(efs_name ~ '-test-tag') - not efs_tag_result.tags["CamelCase"] is defined - not efs_tag_result.tags["Title Case"] is defined - not efs_tag_result.tags["lowercase spaced"] is defined diff --git a/tests/integration/targets/eks_cluster/tasks/full_test.yml b/tests/integration/targets/eks_cluster/tasks/full_test.yml index 71cc1fc87e5..d3f7dfbe6fd 100644 --- a/tests/integration/targets/eks_cluster/tasks/full_test.yml +++ b/tests/integration/targets/eks_cluster/tasks/full_test.yml @@ -79,7 +79,7 @@ name: "{{ eks_cluster_name }}" security_groups: "{{ eks_security_groups | map(attribute='name') }}" subnets: "{{ setup_subnets.results | map(attribute='subnet.id') }}" - role_arn: "{{ iam_role.arn }}" + role_arn: "{{ iam_role.iam_role.arn }}" tags: Name: "{{ resource_prefix }}" another: foobar @@ -97,7 +97,7 @@ name: "{{ eks_cluster_name }}" security_groups: "{{ eks_security_groups | map(attribute='name') }}" subnets: "{{ setup_subnets.results | map(attribute='subnet.id') }}" - role_arn: "{{ iam_role.arn }}" + role_arn: "{{ iam_role.iam_role.arn }}" wait: yes register: eks_create @@ -117,7 +117,7 @@ name: "{{ eks_cluster_name }}" security_groups: "{{ setup_security_groups.results | map(attribute='group_id') }}" subnets: "{{ setup_subnets.results | map(attribute='subnet.id') }}" - role_arn: "{{ iam_role.arn }}" + role_arn: "{{ iam_role.iam_role.arn }}" register: eks_create - name: check that EKS cluster did not change @@ -143,7 +143,7 @@ name: "{{ eks_cluster_name }}" security_groups: "{{ eks_security_groups | map(attribute='name') }}" subnets: "{{ setup_subnets.results | map(attribute='subnet.id') }}" - role_arn: "{{ iam_role.arn }}" + role_arn: "{{ iam_role.iam_role.arn }}" wait: yes register: eks_create @@ -169,7 +169,7 @@ name: "{{ eks_cluster_short_name }}" security_groups: "{{ eks_security_groups | map(attribute='name') }}" subnets: "{{ setup_subnets.results | map(attribute='subnet.id') }}" - role_arn: "{{ iam_role.arn }}" + role_arn: "{{ iam_role.iam_role.arn }}" register: eks_create - name: check that EKS cluster was created with short name diff --git a/tests/integration/targets/eks_fargate_profile/tasks/create_eks_cluster.yml b/tests/integration/targets/eks_fargate_profile/tasks/create_eks_cluster.yml index 48fbbef8017..1402ad0a137 100644 --- a/tests/integration/targets/eks_fargate_profile/tasks/create_eks_cluster.yml +++ b/tests/integration/targets/eks_fargate_profile/tasks/create_eks_cluster.yml @@ -87,7 +87,7 @@ name: '{{ eks_cluster_name }}' security_groups: '{{ eks_security_groups | map(attribute=''name'') }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' - role_arn: '{{ iam_role.arn }}' + role_arn: '{{ iam_role.iam_role.arn }}' wait: true register: eks_create diff --git a/tests/integration/targets/eks_fargate_profile/tasks/full_test.yml b/tests/integration/targets/eks_fargate_profile/tasks/full_test.yml index b992125b334..6b513b9b59b 100644 --- a/tests/integration/targets/eks_fargate_profile/tasks/full_test.yml +++ b/tests/integration/targets/eks_fargate_profile/tasks/full_test.yml @@ -1,5 +1,5 @@ # Creating dependencies -- name: create IAM instance role +- name: create IAM instance role iam_role: name: 'ansible-test-aws_eks_fargate_profile' assume_role_policy_document: '{{ lookup(''file'',''eks-fargate-profile-trust-policy.json'') }}' @@ -19,7 +19,7 @@ name: '{{ eks_fargate_profile_name_a }}' state: present cluster_name: fake_cluster - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -38,7 +38,7 @@ name: fake_profile cluster_name: '{{ eks_cluster_name }}' state: absent - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -57,7 +57,7 @@ name: '{{ eks_fargate_profile_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'public') | map(attribute='subnet.id') }} @@ -72,13 +72,13 @@ - not eks_fargate_profile_create.changed - eks_fargate_profile_create.msg.endswith("provided in Fargate Profile is not a private subnet") -# Create Fargate_profile with wait +# Create Fargate_profile with wait - name: create Fargate Profile with wait (check mode) eks_fargate_profile: name: '{{ eks_fargate_profile_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -99,7 +99,7 @@ name: '{{ eks_fargate_profile_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -120,7 +120,7 @@ name: '{{ eks_fargate_profile_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -141,7 +141,7 @@ name: '{{ eks_fargate_profile_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -162,7 +162,7 @@ name: '{{ eks_fargate_profile_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -185,7 +185,7 @@ name: '{{ eks_fargate_profile_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -207,7 +207,7 @@ name: '{{ eks_fargate_profile_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -230,7 +230,7 @@ name: '{{ eks_fargate_profile_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -253,7 +253,7 @@ name: '{{ eks_fargate_profile_name_b }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -272,7 +272,7 @@ name: '{{ eks_fargate_profile_name_b }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -291,7 +291,7 @@ name: '{{ eks_fargate_profile_name_b }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -310,7 +310,7 @@ name: '{{ eks_fargate_profile_name_b }}' state: present cluster_name: '{{ eks_cluster_name }}' - role_arn: '{{ iam_role_fargate.arn }}' + role_arn: '{{ iam_role_fargate.iam_role.arn }}' subnets: >- {{setup_subnets.results|selectattr('subnet.tags.Name', 'contains', 'private') | map(attribute='subnet.id') }} @@ -389,7 +389,7 @@ that: - eks_fargate_profile_b_delete.changed -- name: delete a fargate profile b +- name: delete a fargate profile b eks_fargate_profile: name: '{{ eks_fargate_profile_name_b }}' cluster_name: '{{ eks_cluster_name }}' @@ -426,4 +426,4 @@ - name: check that eks_fargate_profile did nothing (idempotency) assert: that: - - not eks_fargate_profile_b_delete.changed \ No newline at end of file + - not eks_fargate_profile_b_delete.changed diff --git a/tests/integration/targets/eks_nodegroup/aliases b/tests/integration/targets/eks_nodegroup/aliases index 0b84301d76c..2a23e632d67 100644 --- a/tests/integration/targets/eks_nodegroup/aliases +++ b/tests/integration/targets/eks_nodegroup/aliases @@ -1 +1,2 @@ -cloud/aws \ No newline at end of file +cloud/aws +time=55m diff --git a/tests/integration/targets/eks_nodegroup/tasks/dependecies.yml b/tests/integration/targets/eks_nodegroup/tasks/dependecies.yml index 882d45dd7af..f2e591a139a 100644 --- a/tests/integration/targets/eks_nodegroup/tasks/dependecies.yml +++ b/tests/integration/targets/eks_nodegroup/tasks/dependecies.yml @@ -67,7 +67,7 @@ name: '{{ eks_cluster_name }}' security_groups: '{{ eks_security_groups | map(attribute=''name'') }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' - role_arn: '{{ iam_role.arn }}' + role_arn: '{{ iam_role.iam_role.arn }}' wait: true register: eks_create @@ -95,16 +95,10 @@ # Dependecies to test eks nodegroup with launch_template - name: create instance template - ec2_launch_template: - name: "{{ resource_prefix }}-simple" - instance_type: t3.nano - register: lt_default - -- name: update simple instance template ec2_launch_template: name: "{{ resource_prefix }}-simple" default_version: 1 - instance_type: t3.micro + instance_type: t3a.micro register: lt - name: Create securitygroup for node access diff --git a/tests/integration/targets/eks_nodegroup/tasks/full_test.yml b/tests/integration/targets/eks_nodegroup/tasks/full_test.yml index 9accc8e8f29..30eb5266f6d 100644 --- a/tests/integration/targets/eks_nodegroup/tasks/full_test.yml +++ b/tests/integration/targets/eks_nodegroup/tasks/full_test.yml @@ -4,7 +4,7 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: fake_cluster - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' scaling_config: min_size: 1 @@ -38,10 +38,10 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' wait: True - launch_template: + launch_template: id: 'lt-0824c69cafa69ac81' disk_size: 30 register: eks_nodegroup_result @@ -60,18 +60,18 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' scaling_config: min_size: 1 max_size: 3 desired_size: 2 - disk_size: 30 + disk_size: 30 instance_types: ['t3.small'] ami_type: 'AL2_x86_64' update_config: max_unavailable_percentage: 50 - labels: + labels: 'env': 'test' taints: - key: 'env' @@ -84,7 +84,7 @@ ec2_ssh_key: "{{ ec2_key_eks_nodegroup.key.name }}" source_sg: - "{{ securitygroup_eks_nodegroup.group_id }}" - wait: True + wait: False register: eks_nodegroup_result check_mode: True @@ -98,18 +98,18 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' scaling_config: min_size: 1 max_size: 3 desired_size: 2 - disk_size: 30 + disk_size: 30 instance_types: ['t3.small'] ami_type: 'AL2_x86_64' update_config: max_unavailable_percentage: 50 - labels: + labels: 'env': 'test' taints: - key: 'env' @@ -123,6 +123,7 @@ source_sg: - "{{ securitygroup_eks_nodegroup.group_id }}" wait: True + wait_timeout: 1500 register: eks_nodegroup_result - name: check that eks_nodegroup is created @@ -135,18 +136,18 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' scaling_config: min_size: 1 max_size: 3 desired_size: 2 - disk_size: 30 + disk_size: 30 instance_types: ['t3.small'] ami_type: 'AL2_x86_64' update_config: max_unavailable_percentage: 50 - labels: + labels: 'env': 'test' taints: - key: 'env' @@ -173,18 +174,18 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' scaling_config: min_size: 1 max_size: 3 desired_size: 2 - disk_size: 30 + disk_size: 30 instance_types: ['t3.small'] ami_type: 'AL2_x86_64' update_config: max_unavailable_percentage: 50 - labels: + labels: 'env': 'test' taints: - key: 'env' @@ -214,7 +215,7 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' wait: True disk_size: 40 @@ -231,7 +232,7 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' wait: True instance_types: ['t3.small'] @@ -251,18 +252,18 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' scaling_config: min_size: 1 max_size: 4 desired_size: 2 - disk_size: 30 + disk_size: 30 instance_types: ['t3.small'] ami_type: 'AL2_x86_64' update_config: max_unavailable_percentage: 50 - labels: + labels: 'env': 'changeit' taints: - key: 'env' @@ -289,18 +290,18 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' scaling_config: min_size: 1 max_size: 4 desired_size: 2 - disk_size: 30 + disk_size: 30 instance_types: ['t3.small'] ami_type: 'AL2_x86_64' update_config: max_unavailable_percentage: 50 - labels: + labels: 'env': 'changeit' taints: - key: 'env' @@ -326,18 +327,18 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' scaling_config: min_size: 1 max_size: 4 desired_size: 2 - disk_size: 30 + disk_size: 30 instance_types: ['t3.small'] ami_type: 'AL2_x86_64' update_config: max_unavailable_percentage: 50 - labels: + labels: 'env': 'changeit' taints: - key: 'env' @@ -364,18 +365,18 @@ name: '{{ eks_nodegroup_name_a }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' scaling_config: min_size: 1 max_size: 4 desired_size: 2 - disk_size: 30 + disk_size: 30 instance_types: ['t3.small'] ami_type: 'AL2_x86_64' update_config: max_unavailable_percentage: 50 - labels: + labels: 'env': 'changeit' taints: - key: 'env' @@ -405,7 +406,7 @@ name: '{{ eks_nodegroup_name_a }}' state: absent cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' register: eks_nodegroup_result check_mode: True @@ -459,11 +460,11 @@ name: '{{ eks_nodegroup_name_lt }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' launch_template: name: '{{ lt.template.launch_template_name }}' - wait: True + wait: False register: eks_nodegroup_result check_mode: True @@ -477,7 +478,7 @@ name: '{{ eks_nodegroup_name_lt }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' launch_template: name: '{{ lt.template.launch_template_name }}' @@ -494,7 +495,7 @@ name: '{{ eks_nodegroup_name_lt }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' launch_template: name: '{{ lt.template.launch_template_name }}' @@ -512,7 +513,7 @@ name: '{{ eks_nodegroup_name_lt }}' state: present cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' subnets: '{{ setup_subnets.results | map(attribute=''subnet.id'') }}' launch_template: name: '{{ lt.template.launch_template_name }}' @@ -533,7 +534,7 @@ name: '{{ eks_nodegroup_name_lt }}' state: absent cluster_name: '{{ eks_cluster_name }}' - node_role: '{{ iam_role_eks_nodegroup.arn }}' + node_role: '{{ iam_role_eks_nodegroup.iam_role.arn }}' wait: True register: eks_nodegroup_result check_mode: True diff --git a/tests/integration/targets/eks_nodegroup/tasks/main.yml b/tests/integration/targets/eks_nodegroup/tasks/main.yml index 5c1a76f5764..2ccf8dfe4fb 100644 --- a/tests/integration/targets/eks_nodegroup/tasks/main.yml +++ b/tests/integration/targets/eks_nodegroup/tasks/main.yml @@ -2,7 +2,7 @@ - name: 'eks_nodegroup integration tests' collections: - amazon.aws - - amozon.community + - amazon.community module_defaults: group/aws: access_key: '{{ aws_access_key }}' @@ -13,4 +13,4 @@ - include_tasks: dependecies.yml - include_tasks: full_test.yml always: - - include_tasks: cleanup.yml \ No newline at end of file + - include_tasks: cleanup.yml diff --git a/tests/integration/targets/elasticache/tasks/main.yml b/tests/integration/targets/elasticache/tasks/main.yml index 6e567fe687c..9664a70f14e 100644 --- a/tests/integration/targets/elasticache/tasks/main.yml +++ b/tests/integration/targets/elasticache/tasks/main.yml @@ -60,8 +60,8 @@ that: - elasticache_redis is changed - elasticache_redis.elasticache.data is defined - - elasticache_redis.elasticache.name == "{{ elasticache_redis_test_name }}" - - elasticache_redis.elasticache.data.CacheSubnetGroupName == "{{ elasticache_subnet_group_name }}" + - elasticache_redis.elasticache.name == elasticache_redis_test_name + - elasticache_redis.elasticache.data.CacheSubnetGroupName == elasticache_subnet_group_name - name: Add security group for Redis access in Elasticache ec2_security_group: 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 dc099388648..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/elb_network_lb/tasks/test_modifying_nlb_listeners.yml b/tests/integration/targets/elb_network_lb/tasks/test_modifying_nlb_listeners.yml index 9877e3f1b7c..9189fba28dd 100644 --- a/tests/integration/targets/elb_network_lb/tasks/test_modifying_nlb_listeners.yml +++ b/tests/integration/targets/elb_network_lb/tasks/test_modifying_nlb_listeners.yml @@ -73,3 +73,83 @@ that: - nlb.changed - not nlb.listeners + +# TLS listeners +- name: Add a TLS listener + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + listeners: + - Protocol: TLS + Port: 443 + Certificates: + - CertificateArn: "{{ cert.arn }}" + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + SslPolicy: ELBSecurityPolicy-TLS-1-0-2015-04 + AlpnPolicy: HTTP2Optional + register: _add + +- assert: + that: + - _add.listeners[0].alpn_policy == ["HTTP2Optional"] + - _add.listeners[0].ssl_policy == "ELBSecurityPolicy-TLS-1-0-2015-04" + +- name: Add a TLS listener (idempotency) + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + listeners: + - Protocol: TLS + Port: 443 + Certificates: + - CertificateArn: "{{ cert.arn }}" + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + SslPolicy: ELBSecurityPolicy-TLS-1-0-2015-04 + AlpnPolicy: HTTP2Optional + register: _idempotency + +- assert: + that: + - _idempotency is not changed + - _idempotency.listeners[0].alpn_policy == ["HTTP2Optional"] + - _idempotency.listeners[0].ssl_policy == "ELBSecurityPolicy-TLS-1-0-2015-04" + +- name: Update TLS listener of NLB + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + listeners: + - Protocol: TLS + Port: 443 + Certificates: + - CertificateArn: "{{ cert.arn }}" + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + SslPolicy: ELBSecurityPolicy-TLS13-1-2-FIPS-2023-04 + AlpnPolicy: HTTP1Only + register: _update + +- assert: + that: + - _update is changed + - _update.listeners[0].alpn_policy == ["HTTP1Only"] + - _update.listeners[0].ssl_policy == "ELBSecurityPolicy-TLS13-1-2-FIPS-2023-04" + +- name: remove listener from NLB + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + listeners: [] + register: nlb + +- assert: + that: + - nlb.changed + - not nlb.listeners diff --git a/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml b/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml index b55a0777f79..f1e920de8f7 100644 --- a/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml +++ b/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml @@ -34,7 +34,7 @@ - assert: that: - nlb.changed - - 'nlb.tags.created_by == "NLB test {{ resource_prefix }}"' + - nlb.tags.created_by == 'NLB test ' ~ resource_prefix - name: test tags are not removed if unspecified elb_network_lb: @@ -46,7 +46,7 @@ - assert: that: - not nlb.changed - - 'nlb.tags.created_by == "NLB test {{ resource_prefix }}"' + - nlb.tags.created_by == 'NLB test ' ~ resource_prefix - name: remove tags from NLB elb_network_lb: diff --git a/tests/integration/targets/elb_target/tasks/ec2_target.yml b/tests/integration/targets/elb_target/tasks/ec2_target.yml index af11b655f9e..20931f1d7de 100644 --- a/tests/integration/targets/elb_target/tasks/ec2_target.yml +++ b/tests/integration/targets/elb_target/tasks/ec2_target.yml @@ -147,7 +147,7 @@ - result.health_check_protocol == 'TCP' - '"tags" in result' - '"target_group_arn" in result' - - result.target_group_name == "{{ tg_name }}-nlb" + - result.target_group_name == tg_name ~ '-nlb' - result.target_type == 'instance' - result.deregistration_delay_timeout_seconds == '60' - result.deregistration_delay_connection_termination_enabled @@ -214,7 +214,7 @@ - '"load_balancer_arn" in result' - '"tags" in result' - result.type == 'network' - - result.vpc_id == '{{ vpc.vpc.id }}' + - result.vpc_id == vpc.vpc.id - name: modify up testing target group for NLB (preserve_client_ip_enabled=false) elb_target_group: diff --git a/tests/integration/targets/elb_target/tasks/lambda_target.yml b/tests/integration/targets/elb_target/tasks/lambda_target.yml index abc4cc5d084..7e6b54cef5d 100644 --- a/tests/integration/targets/elb_target/tasks/lambda_target.yml +++ b/tests/integration/targets/elb_target/tasks/lambda_target.yml @@ -23,8 +23,8 @@ name: "{{ lambda_name }}" state: present zip_file: /tmp/lambda.zip - runtime: python3.7 - role: "{{ ROLE_ARN.arn }}" + runtime: python3.12 + role: "{{ ROLE_ARN.iam_role.arn }}" handler: ansible_lambda_target.lambda_handler timeout: 30 register: lambda_function diff --git a/tests/integration/targets/elb_target_info/tasks/main.yml b/tests/integration/targets/elb_target_info/tasks/main.yml index 031a1c7177c..fadce2135e2 100644 --- a/tests/integration/targets/elb_target_info/tasks/main.yml +++ b/tests/integration/targets/elb_target_info/tasks/main.yml @@ -207,9 +207,9 @@ - assert: that: - - "{{ alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ idle_target_group.target_group_arn not in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "idle_target_group.target_group_arn not in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" - (target_facts.instance_target_groups | length) == 2 msg: "target facts showed the target in the right target groups" @@ -228,9 +228,9 @@ - assert: that: - - "{{ alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ idle_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "idle_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" - (target_facts.instance_target_groups | length) == 3 msg: "target facts reflected the addition of the target to the idle group" @@ -242,9 +242,9 @@ - assert: that: - - "{{ alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ idle_target_group.target_group_arn not in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "idle_target_group.target_group_arn not in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" - (target_facts.instance_target_groups | length) == 2 msg: "target_facts.instance_target_groups did not gather unused target groups when variable was set" diff --git a/tests/integration/targets/inventory_aws_mq/playbooks/test_inventory_with_hostvars_prefix_suffix.yml b/tests/integration/targets/inventory_aws_mq/playbooks/test_inventory_with_hostvars_prefix_suffix.yml index b0598b1088c..2db7f76ab15 100644 --- a/tests/integration/targets/inventory_aws_mq/playbooks/test_inventory_with_hostvars_prefix_suffix.yml +++ b/tests/integration/targets/inventory_aws_mq/playbooks/test_inventory_with_hostvars_prefix_suffix.yml @@ -16,9 +16,9 @@ - name: assert the hostvars are defined with prefix and/or suffix assert: that: - - "hostvars[broker_name].{{ vars_prefix }}host_instance_type{{ vars_suffix }} == 'mq.t3.micro'" - - "hostvars[broker_name].{{ vars_prefix }}engine_type{{ vars_suffix }} == '{{ engine }}'" - - "hostvars[broker_name].{{ vars_prefix }}broker_state{{ vars_suffix }} in ('CREATION_IN_PROGRESS', 'RUNNING')" + - "hostvars[broker_name][vars_prefix ~ 'host_instance_type' ~ vars_suffix] == 'mq.t3.micro'" + - "hostvars[broker_name][vars_prefix ~ 'engine_type' ~ vars_suffix] == engine" + - "hostvars[broker_name][vars_prefix ~ 'broker_state' ~ vars_suffix] in ('CREATION_IN_PROGRESS', 'RUNNING')" - "'host_instance_type' not in hostvars[broker_name]" - "'engine_type' not in hostvars[broker_name]" - "'broker_state' not in hostvars[broker_name]" diff --git a/tests/integration/targets/inventory_aws_mq/playbooks/test_populating_inventory.yml b/tests/integration/targets/inventory_aws_mq/playbooks/test_populating_inventory.yml index d138b76ac41..a71043c709c 100644 --- a/tests/integration/targets/inventory_aws_mq/playbooks/test_populating_inventory.yml +++ b/tests/integration/targets/inventory_aws_mq/playbooks/test_populating_inventory.yml @@ -14,4 +14,4 @@ that: - "'aws_mq' in groups" - "groups.aws_mq | length == 1" - - "groups.aws_mq.0 == '{{ broker_name }}'" + - groups.aws_mq.0 == broker_name diff --git a/tests/integration/targets/lightsail/tasks/main.yml b/tests/integration/targets/lightsail/tasks/main.yml index 13c029e554c..18e76756d36 100644 --- a/tests/integration/targets/lightsail/tasks/main.yml +++ b/tests/integration/targets/lightsail/tasks/main.yml @@ -32,7 +32,7 @@ - "'instance' in result and result.instance.name == instance_name" - "result.instance.state.name == 'running'" - "result.instance.networking.ports[0].from_port == 50" - - "{{ result.instance.networking.ports|length }} == 1" + - result.instance.networking.ports|length == 1 - name: Check if it does not delete public ports config when no value is provided lightsail: diff --git a/tests/integration/targets/lightsail_snapshot/tasks/main.yml b/tests/integration/targets/lightsail_snapshot/tasks/main.yml index 4b5eddc17eb..98553d27864 100644 --- a/tests/integration/targets/lightsail_snapshot/tasks/main.yml +++ b/tests/integration/targets/lightsail_snapshot/tasks/main.yml @@ -30,7 +30,7 @@ - assert: that: - result.changed == True - - "'instance_snapshot' in result and result.instance_snapshot.name == '{{ snapshot_name }}'" + - "'instance_snapshot' in result and result.instance_snapshot.name == snapshot_name" - "result.instance_snapshot.state == 'available'" - name: Make sure instance snapshot creation is idempotent diff --git a/tests/integration/targets/mq/tasks/broker_tests.yml b/tests/integration/targets/mq/tasks/broker_tests.yml index d4d399da7c1..515306abfa1 100644 --- a/tests/integration/targets/mq/tasks/broker_tests.yml +++ b/tests/integration/targets/mq/tasks/broker_tests.yml @@ -4,6 +4,7 @@ security_groups: "{{ broker_sg_ids.split(',') }}" subnet_ids: "{{ broker_subnet_ids.split(',') }}" tags: "{{ tags }}" + wait: true register: result - set_fact: broker_id: "{{ result.broker['broker_id'] }}" @@ -19,20 +20,10 @@ - ( result.changed | bool ) - result_c1.broker['broker_id'] == broker_id - result_c1.broker['broker_name'] == broker_name - - result_c1.broker['broker_state'] == 'CREATION_IN_PROGRESS' + - result_c1.broker['broker_state'] == 'RUNNING' - ( result_c1.broker['storage_type'] | upper ) == 'EFS' - result_c1.broker['tags'] == tags when: not ansible_check_mode -- debug: - msg: "Wait until broker {{ broker_name }} ({{ broker_id }}) enters running state. This may take several minutes" -- name: wait for startup - mq_broker_info: - broker_id: "{{ broker_id }}" - register: result - until: result.broker['broker_state'] == 'RUNNING' - retries: 15 - delay: 60 - when: not ansible_check_mode - name: repeat creation mq_broker: broker_name: "{{ broker_name }}" diff --git a/tests/integration/targets/msk_cluster-auth/tasks/test_create_auth.yml b/tests/integration/targets/msk_cluster-auth/tasks/test_create_auth.yml index 0ef0f157ccb..9535c235fb9 100644 --- a/tests/integration/targets/msk_cluster-auth/tasks/test_create_auth.yml +++ b/tests/integration/targets/msk_cluster-auth/tasks/test_create_auth.yml @@ -62,7 +62,7 @@ # Not always returned by API # - "msk_cluster.cluster_info.client_authentication.unauthenticated.enabled == false" - "msk_cluster.cluster_info.open_monitoring.prometheus.jmx_exporter.enabled_in_broker == false" - - "msk_cluster.cluster_info.cluster_arn.startswith('arn:aws:kafka:{{ aws_region }}:')" + - "msk_cluster.cluster_info.cluster_arn.startswith('arn:aws:kafka:' ~ aws_region ~ ':')" - name: create a msk cluster with authentication flipped from default (idempotency) msk_cluster: diff --git a/tests/integration/targets/msk_cluster/aliases b/tests/integration/targets/msk_cluster/aliases index c9cac54c218..d0a8d6e9449 100644 --- a/tests/integration/targets/msk_cluster/aliases +++ b/tests/integration/targets/msk_cluster/aliases @@ -1,2 +1,5 @@ +# reason: integration tests are too slow +disabled + cloud/aws time=46m diff --git a/tests/integration/targets/msk_cluster/tasks/test_create.yml b/tests/integration/targets/msk_cluster/tasks/test_create.yml index 5569762bc8e..f6845059fb3 100644 --- a/tests/integration/targets/msk_cluster/tasks/test_create.yml +++ b/tests/integration/targets/msk_cluster/tasks/test_create.yml @@ -50,7 +50,7 @@ - "msk_cluster.cluster_info.broker_node_group_info.instance_type == 'kafka.t3.small'" - "msk_cluster.cluster_info.broker_node_group_info.storage_info.ebs_storage_info.volume_size == 10" - "msk_cluster.cluster_info.open_monitoring.prometheus.jmx_exporter.enabled_in_broker == false" - - "msk_cluster.cluster_info.cluster_arn.startswith('arn:aws:kafka:{{ aws_region }}:')" + - "msk_cluster.cluster_info.cluster_arn.startswith('arn:aws:kafka:' ~ aws_region ~ ':')" - name: create msk cluster (idempotency) msk_cluster: diff --git a/tests/integration/targets/msk_config/tasks/main.yml b/tests/integration/targets/msk_config/tasks/main.yml index 095ec21c2d8..5f7f6c78204 100644 --- a/tests/integration/targets/msk_config/tasks/main.yml +++ b/tests/integration/targets/msk_config/tasks/main.yml @@ -53,7 +53,7 @@ assert: that: - msk_config.revision == 1 - - "msk_config.arn.startswith('arn:aws:kafka:{{ aws_region }}:')" + - "msk_config.arn.startswith('arn:aws:kafka:' ~ aws_region ~ ':')" - "'auto.create.topics.enable=True' in msk_config.server_properties" - "'zookeeper.session.timeout.ms=18000' in msk_config.server_properties" diff --git a/tests/integration/targets/redshift/tasks/main.yml b/tests/integration/targets/redshift/tasks/main.yml index 91ca39f4d78..a50c0372e2a 100644 --- a/tests/integration/targets/redshift/tasks/main.yml +++ b/tests/integration/targets/redshift/tasks/main.yml @@ -120,7 +120,7 @@ assert: that: - 'result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.tags.foo == "bar"' - 'result.cluster.tags.Tizio == "Caio"' @@ -143,7 +143,7 @@ assert: that: - 'not result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.tags.foo == "bar"' - 'result.cluster.tags.Tizio == "Caio"' - 'result.cluster.tags | count() == 2' @@ -166,7 +166,7 @@ assert: that: - 'result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}-modified"' + - result.cluster.identifier == redshift_cluster_name ~ '-modified' - 'result.cluster.enhanced_vpc_routing == True' - 'result.cluster.tags | count() == 1' - 'result.cluster.tags.foo == "bar"' @@ -234,7 +234,7 @@ assert: that: - 'result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.db_name == "integration_test"' # ============================================================ @@ -260,7 +260,7 @@ assert: that: - 'result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.db_name == "integration_test"' - 'result.cluster.tags.foo == "bar"' @@ -289,7 +289,7 @@ assert: that: - 'result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.db_name == "integration_test"' - 'result.cluster.tags.test1 == "value1"' - 'result.cluster.tags.foo == "bar"' @@ -318,7 +318,7 @@ assert: that: - 'not result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.db_name == "integration_test"' - 'result.cluster.tags | count() == 2' diff --git a/tests/integration/targets/s3_bucket_notification/tasks/test_lambda_notifications.yml b/tests/integration/targets/s3_bucket_notification/tasks/test_lambda_notifications.yml index 23ed32e3215..b4cc8a6e037 100644 --- a/tests/integration/targets/s3_bucket_notification/tasks/test_lambda_notifications.yml +++ b/tests/integration/targets/s3_bucket_notification/tasks/test_lambda_notifications.yml @@ -41,7 +41,7 @@ name: '{{ lambda_name }}' state: present role: "{{ lambda_role_name }}" - runtime: python3.7 + runtime: python3.12 zip_file: '{{function_res.dest}}' handler: lambda_function.lambda_handler memory_size: '128' diff --git a/tests/integration/targets/s3_sync/tasks/main.yml b/tests/integration/targets/s3_sync/tasks/main.yml index 2263df2bf54..600490706a4 100644 --- a/tests/integration/targets/s3_sync/tasks/main.yml +++ b/tests/integration/targets/s3_sync/tasks/main.yml @@ -23,7 +23,7 @@ - assert: that: - output.changed - - output.name == "{{ test_bucket }}" + - output.name == test_bucket - not output.requester_pays # ============================================================ - name: Prepare fixtures folder @@ -67,7 +67,7 @@ - assert: that: - output.changed - - output.name == "{{ test_bucket_2 }}" + - output.name == test_bucket_2 - not output.requester_pays - name: Sync files with remote bucket using glacier storage class @@ -113,7 +113,7 @@ - assert: that: - output.changed - - output.name == "{{ test_bucket_3 }}" + - output.name == test_bucket_3 - not output.requester_pays - name: Sync individual file with remote bucket diff --git a/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml b/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml index 697c5ecc279..77151227dc8 100644 --- a/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml +++ b/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml @@ -55,7 +55,7 @@ name: "{{ lambda_name }}" state: present zip_file: "{{ tmp.path }}/hello_world.zip" - runtime: 'python3.9' + runtime: 'python3.12' role: "{{ iam_role_output.arn }}" handler: 'hello_world.lambda_handler' register: lambda_output @@ -169,7 +169,7 @@ name: "{{ lambda_name }}" state: absent zip_file: "{{ tmp.path }}/hello_world.zip" - runtime: 'python3.9' + runtime: 'python3.12' role: "{{ secret_manager_role }}" handler: 'hello_world.lambda_handler' ignore_errors: yes 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/integration/targets/setup_connection_aws_ssm/defaults/main.yml b/tests/integration/targets/setup_connection_aws_ssm/defaults/main.yml index 5ee1f753507..f7ac20eeefd 100644 --- a/tests/integration/targets/setup_connection_aws_ssm/defaults/main.yml +++ b/tests/integration/targets/setup_connection_aws_ssm/defaults/main.yml @@ -4,7 +4,15 @@ instance_type: t3.micro ami_details: fedora: owner: 125523088429 - name: Fedora-Cloud-Base-34-1.2.x86_64* + name: 'Fedora-Cloud-Base-41-1.2.x86_64*' + user_data: | + #!/bin/sh + sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm + sudo systemctl start amazon-ssm-agent + os_type: linux + centos: + owner: 125523088429 + name: 'CentOS Stream 9 x86_64*' user_data: | #!/bin/sh sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm diff --git a/tests/integration/targets/setup_sshkey/files/ec2-fingerprint.py b/tests/integration/targets/setup_sshkey/files/ec2-fingerprint.py index f2740554d7a..04d2eb1ea54 100644 --- a/tests/integration/targets/setup_sshkey/files/ec2-fingerprint.py +++ b/tests/integration/targets/setup_sshkey/files/ec2-fingerprint.py @@ -8,28 +8,26 @@ (but without needing the OpenSSL CLI) """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - -__metaclass__ = type import hashlib import sys -from Crypto.PublicKey import RSA +from cryptography.hazmat.primitives import serialization if len(sys.argv) == 0: ssh_public_key = "id_rsa.pub" else: ssh_public_key = sys.argv[1] -with open(ssh_public_key, "r") as key_fh: - data = key_fh.read() - -# Convert from SSH format to DER format -public_key = RSA.importKey(data).exportKey("DER") -md5digest = hashlib.md5(public_key).hexdigest() +with open(ssh_public_key, "rb") as key_file: + public_key = serialization.load_ssh_public_key( + key_file.read(), + ) +pub_der = public_key.public_bytes( + encoding=serialization.Encoding.DER, + format=serialization.PublicFormat.SubjectPublicKeyInfo, +) +md5digest = hashlib.md5(pub_der).hexdigest() # Format the md5sum into the normal format pairs = zip(md5digest[::2], md5digest[1::2]) md5string = ":".join(["".join(pair) for pair in pairs]) diff --git a/tests/integration/targets/sns_topic/tasks/main.yml b/tests/integration/targets/sns_topic/tasks/main.yml index c05ad3b5373..25f6368320a 100644 --- a/tests/integration/targets/sns_topic/tasks/main.yml +++ b/tests/integration/targets/sns_topic/tasks/main.yml @@ -62,7 +62,7 @@ that: - sns_topic_info is successful - "'result' in sns_topic_info" - - sns_topic_info.result["sns_arn"] == "{{ sns_arn }}" + - sns_topic_info.result["sns_arn"] == sns_arn - "'sns_topic' in sns_topic_info.result" - "'display_name' in sns_topic_info.result['sns_topic']" - sns_topic_info.result["sns_topic"]["display_name"] == "My topic name" @@ -79,7 +79,7 @@ that: - sns_topic_info is successful - "'result' in sns_topic_info" - - sns_topic_info.result["sns_arn"] == "{{ sns_arn }}" + - sns_topic_info.result["sns_arn"] == sns_arn - "'sns_topic' in sns_topic_info.result" - "'display_name' in sns_topic_info.result['sns_topic']" - sns_topic_info.result["sns_topic"]["display_name"] == "My topic name" @@ -110,7 +110,7 @@ that: - sns_fifo_topic.changed - sns_fifo_topic.sns_topic.topic_type == 'fifo' - - sns_fifo_topic.sns_topic.name == '{{ sns_topic_topic_name }}-fifo' + - sns_fifo_topic.sns_topic.name == sns_topic_topic_name ~ '-fifo' - name: Run create a FIFO topic again for idempotence test (with .fifo) sns_topic: @@ -309,7 +309,7 @@ name: '{{ sns_topic_lambda_name }}' state: present zip_file: '{{ tempdir.path }}/{{ sns_topic_lambda_function }}.zip' - runtime: python3.9 + runtime: python3.12 role: '{{ sns_topic_lambda_role }}' handler: '{{ sns_topic_lambda_function }}.handler' register: lambda_result diff --git a/tests/integration/targets/sqs_queue/tasks/main.yml b/tests/integration/targets/sqs_queue/tasks/main.yml index d5a9dd60370..4c16be31340 100644 --- a/tests/integration/targets/sqs_queue/tasks/main.yml +++ b/tests/integration/targets/sqs_queue/tasks/main.yml @@ -19,7 +19,7 @@ assert: that: - create_result.changed - - create_result.region == "{{ aws_region }}" + - create_result.region == aws_region always: - name: Test deleting SQS queue diff --git a/tests/integration/targets/ssm_parameter/tasks/main.yml b/tests/integration/targets/ssm_parameter/tasks/main.yml index efc09bc4b5b..7c0e27fee33 100644 --- a/tests/integration/targets/ssm_parameter/tasks/main.yml +++ b/tests/integration/targets/ssm_parameter/tasks/main.yml @@ -523,7 +523,7 @@ - name: Create parameter with tags case - Ensure tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_orig['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_orig[item.key] loop: "{{ simple_tags_orig | dict2items }}" - name: Create parameter with tags case - Ensure no missing or additional tags @@ -578,7 +578,7 @@ - name: Update description only case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_orig['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_orig[item.key] loop: "{{ simple_tags_orig | dict2items }}" - name: Update description only case - Ensure no missing or additional tags @@ -633,7 +633,7 @@ - name: Add tag to existing parameter case - Ensure tags correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_add_owner['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_add_owner[item.key] loop: "{{ simple_tags_add_owner | dict2items }}" - name: Add tag to existing parameter case - Ensure no missing or additional tags @@ -704,7 +704,7 @@ - name: Change single tag case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_change_environment['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_change_environment[item.key] loop: "{{ simple_tags_change_environment | dict2items }}" - name: Change single tag case - Ensure no missing or additional tags @@ -775,7 +775,7 @@ - name: Delete single tag case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_delete_version['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_delete_version[item.key] loop: "{{ simple_tags_delete_version | dict2items }}" - name: Delete single tag case - Ensure no missing or additional tags @@ -846,7 +846,7 @@ - name: Delete single tag w/ spaces case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_delete_tag_with_space['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_delete_tag_with_space[item.key] loop: "{{ simple_tags_delete_tag_with_space | dict2items }}" - name: Delete single tag w/ spaces case - Ensure no missing or additional tags @@ -917,7 +917,7 @@ - name: Add/delete/change tags case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_add_delete_change['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_add_delete_change[item.key] loop: "{{ simple_tags_add_delete_change | dict2items }}" - name: Add/delete/change tags case - Ensure no missing or additional tags @@ -988,7 +988,7 @@ - name: Delete all tags case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_delete_all_tags['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_delete_all_tags[item.key] loop: "{{ simple_tags_delete_all_tags | dict2items }}" - name: Delete all tags case - Ensure no missing or additional tags @@ -1062,8 +1062,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == - (simple_tags_orig | combine(simple_tags_purge_false_add_owner))['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == + (simple_tags_orig | combine(simple_tags_purge_false_add_owner))[item.key] loop: > {{ simple_tags_orig | combine(simple_tags_purge_false_add_owner) | dict2items }} @@ -1071,8 +1071,8 @@ assert: that: - > - result.parameter_metadata.tags | length == {{ simple_tags_orig | - combine(simple_tags_purge_false_add_owner) | dict2items }} | length + result.parameter_metadata.tags | length == simple_tags_orig | + combine(simple_tags_purge_false_add_owner) | dict2items | length - name: Add tag case (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1140,8 +1140,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == - (simple_tags_orig | combine(simple_tags_purge_false_add_multiple))['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == + (simple_tags_orig | combine(simple_tags_purge_false_add_multiple))[item.key] loop: > {{ simple_tags_orig | combine(simple_tags_purge_false_add_multiple) | dict2items }} @@ -1149,8 +1149,8 @@ assert: that: - > - result.parameter_metadata.tags | length == {{ simple_tags_orig | - combine(simple_tags_purge_false_add_multiple) | dict2items }} | length + result.parameter_metadata.tags | length == simple_tags_orig | + combine(simple_tags_purge_false_add_multiple) | dict2items | length - name: Add multiple tags case (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1218,8 +1218,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == - (simple_tags_orig | combine(simple_tags_purge_false_change_environment))['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == + (simple_tags_orig | combine(simple_tags_purge_false_change_environment))[item.key] loop: > {{ simple_tags_orig | combine(simple_tags_purge_false_change_environment) | dict2items }} loop_control: @@ -1230,8 +1230,8 @@ assert: that: - > - result.parameter_metadata.tags | length == {{ simple_tags_orig | - combine(simple_tags_purge_false_change_environment) | dict2items }} | length + result.parameter_metadata.tags | length == simple_tags_orig | + combine(simple_tags_purge_false_change_environment) | dict2items | length - name: Change tag case (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1299,8 +1299,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == - (simple_tags_orig | combine(simple_tags_purge_false_change_multiple))['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == + (simple_tags_orig | combine(simple_tags_purge_false_change_multiple))[item.key] loop: > {{ simple_tags_orig | combine(simple_tags_purge_false_change_multiple) | dict2items }} loop_control: @@ -1311,8 +1311,8 @@ assert: that: - > - result.parameter_metadata.tags | length == {{ simple_tags_orig | - combine(simple_tags_purge_false_change_multiple) | dict2items }} | length + result.parameter_metadata.tags | length == simple_tags_orig | + combine(simple_tags_purge_false_change_multiple) | dict2items | length - name: Change multiple tags (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1380,8 +1380,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == - (simple_tags_orig | combine(simple_tags_purge_false_add_and_change))['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == + (simple_tags_orig | combine(simple_tags_purge_false_add_and_change))[item.key] loop: > {{ simple_tags_orig | combine(simple_tags_purge_false_add_and_change) | dict2items }} loop_control: @@ -1392,8 +1392,8 @@ assert: that: - > - result.parameter_metadata.tags | length == {{ simple_tags_orig | - combine(simple_tags_purge_false_add_and_change) | dict2items }} | length + result.parameter_metadata.tags | length == simple_tags_orig | + combine(simple_tags_purge_false_add_and_change) | dict2items | length - name: Add/Change multiple tags (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1461,7 +1461,7 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_orig['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == simple_tags_orig[item.key] loop: > {{ simple_tags_orig | dict2items }} loop_control: @@ -1472,7 +1472,7 @@ that: - > result.parameter_metadata.tags | length - == {{ simple_tags_orig | dict2items }} | length + == simple_tags_orig | dict2items | length - name: Empty tags dict (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1538,8 +1538,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] - == simple_tags_orig['{{ item.key }}'] + result.parameter_metadata.tags[item.key] + == simple_tags_orig[item.key] loop: > {{ simple_tags_orig | dict2items }} loop_control: @@ -1550,7 +1550,7 @@ that: - > result.parameter_metadata.tags | length - == {{ simple_tags_orig | dict2items }} | length + == simple_tags_orig | dict2items | length - name: No tags parameter (purge_tags=true) - Lookup a tagged parameter set_fact: diff --git a/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml b/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml index a1919f1aedf..061acb2c369 100644 --- a/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml +++ b/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml @@ -112,7 +112,7 @@ - assert: that: - update_check.changed == True - - "update_check.output == 'State machine would be updated: {{ creation_output.state_machine_arn }}'" + - "update_check.output == 'State machine would be updated: ' ~ creation_output.state_machine_arn" - name: Update an existing state machine stepfunctions_state_machine: @@ -265,7 +265,7 @@ - assert: that: - deletion_check.changed == True - - "deletion_check.output == 'State machine would be deleted: {{ creation_output.state_machine_arn }}'" + - "deletion_check.output == 'State machine would be deleted: ' ~ creation_output.state_machine_arn" - name: Remove state machine stepfunctions_state_machine: diff --git a/tests/integration/targets/waf_web_acl/tasks/main.yml b/tests/integration/targets/waf_web_acl/tasks/main.yml index 285ee2b3742..acbf1f29c85 100644 --- a/tests/integration/targets/waf_web_acl/tasks/main.yml +++ b/tests/integration/targets/waf_web_acl/tasks/main.yml @@ -561,7 +561,7 @@ assert: that: - remove_in_use_condition.failed - - "'Condition {{ resource_prefix }}_size_condition is in use' in remove_in_use_condition.msg" + - "'Condition ' ~ resource_prefix ~ '_size_condition is in use' in remove_in_use_condition.msg" - name: create WAF Regional rule waf_rule: @@ -674,7 +674,7 @@ assert: that: - remove_in_use_condition.failed - - "'Condition {{ resource_prefix }}_size_condition is in use' in remove_in_use_condition.msg" + - "'Condition ' ~ resource_prefix ~ '_size_condition is in use' in remove_in_use_condition.msg" ################################################## # aws_waf_web_acl tests diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index e69de29bb2d..67d3693df63 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -0,0 +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 diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index e69de29bb2d..67d3693df63 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -0,0 +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 diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt new file mode 100644 index 00000000000..67d3693df63 --- /dev/null +++ b/tests/sanity/ignore-2.16.txt @@ -0,0 +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 diff --git a/tests/integration/targets/autoscaling_instance_refresh/vars/main.yml b/tests/sanity/ignore-2.17.txt similarity index 100% rename from tests/integration/targets/autoscaling_instance_refresh/vars/main.yml rename to tests/sanity/ignore-2.17.txt diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.18.txt similarity index 100% rename from tests/sanity/ignore-2.10.txt rename to tests/sanity/ignore-2.18.txt diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.19.txt similarity index 100% rename from tests/sanity/ignore-2.11.txt rename to tests/sanity/ignore-2.19.txt diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt deleted file mode 100644 index e69de29bb2d..00000000000 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"]) diff --git a/tox.ini b/tox.ini index e425f3a6494..179ed761c7c 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ envlist = clean,ansible{2.12,2.13}-py{38,39,310}-{with_constraints,without_const # Tox4 supports labels which allow us to group the environments rather than dumping all commands into a single environment labels = format = flynt, black, isort - lint = complexity-report, black-lint, isort-lint, flake8-lint, flynt-lint + lint = complexity-report, ansible-lint, black-lint, isort-lint, flake8-lint, flynt-lint units = ansible{2.12,2.13}-py{38,39,310}-{with_constraints,without_constraints} [common] @@ -36,6 +36,12 @@ deps = flake8-html commands = -flake8 --select C90 --max-complexity 10 --format=html --htmldir={posargs:complexity} plugins +[testenv:ansible-lint] +deps = + ansible-lint +commands = + ansible-lint {toxinidir}/plugins + [testenv:black] depends = flynt, isort