diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py
new file mode 100644
index 0000000000..c7e4b52671
--- /dev/null
+++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py
@@ -0,0 +1,721 @@
+#!/usr/bin/python
+# Copyright (c) 2017 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+
+DOCUMENTATION = """
+---
+module: ec2_vpc_vpn
+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.
+version_added: "2.4"
+requirements: ['boto3', 'botocore']
+author: "Sloane Hertel (@s-hertel)"
+options:
+ state:
+ description:
+ - The desired state of the VPN connection.
+ choices: ['present', 'absent']
+ default: present
+ required: no
+ customer_gateway_id:
+ description:
+ - The ID of the customer gateway.
+ connection_type:
+ description:
+ - The type of VPN connection.
+ choices: ['ipsec.1']
+ default: ipsec.1
+ vpn_gateway_id:
+ description:
+ - The ID of the virtual private gateway.
+ 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.
+ tags:
+ description:
+ - Tags to attach to the VPN connection.
+ purge_tags:
+ description:
+ - Whether or not to delete VPN connections tags that are associated with the connection but not specified in the task.
+ type: bool
+ default: false
+ 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
+ required: no
+ filters:
+ description:
+ - An alternative to using 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 'cidr' is ['194.168.2.0/24', '192.168.2.0/24'] and the VPN route only has the
+ destination cidr block of '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 'vpn' is equal to ['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; true or 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.
+ routes:
+ description:
+ - Routes to add to the connection.
+ purge_routes:
+ description:
+ - Whether or not to delete VPN connections routes that are not specified in the task.
+"""
+
+EXAMPLES = """
+# Note: None of these examples set aws_access_key, aws_secret_key, or region.
+# It is assumed that their matching environment variables are set.
+
+- name: create a VPN connection
+ ec2_vpc_vpn:
+ state: present
+ vpn_gateway_id: vgw-XXXXXXXX
+ customer_gateway_id: cgw-XXXXXXXX
+
+- name: modify VPN connection tags
+ ec2_vpc_vpn:
+ state: present
+ vpn_connection_id: vpn-XXXXXXXX
+ tags:
+ Name: ansible-tag-1
+ Other: ansible-tag-2
+
+- name: delete a connection
+ ec2_vpc_vpn:
+ vpn_connection_id: vpn-XXXXXXXX
+ state: absent
+
+- name: modify VPN tags (identifying VPN by filters)
+ 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: add routes and remove any preexisting ones
+ 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
+ ec2_vpc_vpn:
+ state: present
+ vpn_connection_id: vpn-XXXXXXXX
+ routes: []
+ purge_routes: true
+
+- name: delete a VPN identified by filters
+ ec2_vpc_vpn:
+ state: absent
+ filters:
+ tags:
+ Ansible: Tag
+"""
+
+RETURN = """
+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
+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: string
+ 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
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils._text import to_text
+from ansible.module_utils import ec2 as ec2_utils
+import traceback
+
+try:
+ import boto3
+ import botocore
+except ImportError:
+ # will be caught in main
+ pass
+
+
+class VPNConnectionException(Exception):
+ def __init__(self, msg, exception=None, response=None):
+ self.msg = msg
+ self.error_traceback = exception
+ self.response = response
+
+
+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(DryRun=False,
+ VpnConnectionIds=vpn_connection_id,
+ Filters=formatted_filter)
+ else:
+ existing_conn = connection.describe_vpn_connections(DryRun=False,
+ Filters=formatted_filter)
+ except botocore.exceptions.ClientError as e:
+ raise VPNConnectionException(msg="Failed while describing VPN connection.",
+ exception=traceback.format_exc(),
+ **ec2_utils.camel_dict_to_snake_dict(e.response))
+
+ 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(VpnConnectionId=vpn_connection_id,
+ DestinationCidrBlock=route)
+ except botocore.exceptions.ClientError as e:
+ raise VPNConnectionException(msg="Failed while adding route {0} to the VPN connection {1}.".format(route, vpn_connection_id),
+ exception=traceback.format_exc(),
+ response=e.response)
+
+
+def remove_routes(connection, vpn_connection_id, routes_to_remove):
+ for route in routes_to_remove:
+ try:
+ connection.delete_vpn_connection_route(VpnConnectionId=vpn_connection_id,
+ DestinationCidrBlock=route)
+ except botocore.exceptions.ClientError as e:
+ raise VPNConnectionException(msg="Failed to remove route {0} from the VPN connection {1}.".format(route, vpn_connection_id),
+ exception=traceback.format_exc(),
+ response=e.response)
+
+
+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",
+ "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="{0} is not a valid filter.".format(raw_param))
+
+ # 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, connection_type):
+ """ Creates a VPN connection """
+ if not (customer_gateway_id and vpn_gateway_id):
+ raise VPNConnectionException(msg="No matching connection was found. To create a new connection you must provide "
+ "both vpn_gateway_id and customer_gateway_id.")
+ try:
+ vpn = connection.create_vpn_connection(DryRun=False,
+ Type=connection_type,
+ CustomerGatewayId=customer_gateway_id,
+ VpnGatewayId=vpn_gateway_id,
+ Options={'StaticRoutesOnly': static_only})
+ except botocore.exceptions.ClientError as e:
+ raise VPNConnectionException(msg="Failed to create VPN connection: {0}".format(e.message),
+ exception=traceback.format_exc(),
+ response=e.response)
+
+ return vpn['VpnConnection']
+
+
+def delete_connection(connection, vpn_connection_id):
+ """ Deletes a VPN connection """
+ try:
+ connection.delete_vpn_connection(DryRun=False,
+ VpnConnectionId=vpn_connection_id)
+ except botocore.exceptions.ClientError as e:
+ raise VPNConnectionException(msg="Failed to delete the VPN connection: {0}".format(e.message),
+ exception=traceback.format_exc(),
+ response=e.response)
+
+
+def add_tags(connection, vpn_connection_id, add):
+ try:
+ connection.create_tags(DryRun=False,
+ Resources=[vpn_connection_id],
+ Tags=add)
+ except botocore.exceptions.ClientError as e:
+ raise VPNConnectionException(msg="Failed to add the tags: {0}.".format(add),
+ exception=traceback.format_exc(),
+ response=e.response)
+
+
+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(DryRun=False,
+ Resources=[vpn_connection_id],
+ Tags=key_dict_list)
+ except botocore.exceptions.ClientError as e:
+ raise VPNConnectionException(msg="Failed to remove the tags: {0}.".format(remove),
+ exception=traceback.format_exc(),
+ response=e.response)
+
+
+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 = ec2_utils.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
+ if 'tags' in current_attrs:
+ current_tags = ec2_utils.boto3_tag_list_to_ansible_dict(current_attrs['tags'], u'key', u'value')
+ tags_to_add, changes['tags_to_remove'] = ec2_utils.compare_aws_tags(current_tags, tags, purge_tags)
+ changes['tags_to_add'] = ec2_utils.ansible_dict_to_boto3_tag_list(tags_to_add)
+ elif tags:
+ current_tags = {}
+ tags_to_add, changes['tags_to_remove'] = ec2_utils.compare_aws_tags(current_tags, tags, purge_tags)
+ changes['tags_to_add'] = ec2_utils.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="You cannot modify {0}, the current value of which is {1}. Modifiable VPN "
+ "connection attributes are tags and routes. The value you tried to change it to "
+ "is {2}.".format(attribute, is_now, 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'),
+ '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 current_state and 'Tags' in current_state:
+ current_tags = ec2_utils.boto3_tag_list_to_ansible_dict(current_state['Tags'])
+ if module_params.get('purge_tags'):
+ if current_tags != present_tags:
+ changed = True
+ elif current_tags != present_tags:
+ if not set(present_tags.keys()) < set(current_tags.keys()):
+ changed = True
+ # add preexisting tags that new tags didn't overwrite
+ present_tags.update((tag, current_tags[tag]) for tag in current_tags if tag not in present_tags)
+ elif current_tags.keys() == present_tags.keys() and set(present_tags.values()) != set(current_tags.values()):
+ changed = True
+ 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
+
+ # 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'),
+ connection_type=module_params.get('connection_type'))
+ 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'] = ec2_utils.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)
+
+ if vpn_connection:
+ delete_connection(connection, vpn_connection['VpnConnectionId'])
+ changed = True
+ else:
+ changed = False
+
+ return changed, {}
+
+
+def main():
+ argument_spec = ec2_utils.ec2_argument_spec()
+ argument_spec.update(
+ dict(
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ filters=dict(type='dict', default={}),
+ vpn_gateway_id=dict(type='str'),
+ tags=dict(default={}, type='dict'),
+ connection_type=dict(default='ipsec.1', type='str'),
+ 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=False),
+ routes=dict(type='list', default=[]),
+ purge_routes=dict(type='bool', default=False),
+ )
+ )
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True)
+
+ if not ec2_utils.HAS_BOTO3:
+ module.fail_json(msg='boto3 required for this module')
+
+ # Retrieve any AWS settings from the environment.
+ region, ec2_url, aws_connect_kwargs = ec2_utils.get_aws_connection_info(module, boto3=True)
+
+ if not region:
+ module.fail_json(msg="Either region or AWS_REGION or EC2_REGION environment variable or boto config aws_region or ec2_region must be set.")
+
+ connection = ec2_utils.boto3_conn(module, conn_type='client',
+ resource='ec2', region=region,
+ endpoint=ec2_url, **aws_connect_kwargs)
+
+ 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.response and e.error_traceback:
+ module.fail_json(msg=e.msg, exception=e.error_traceback, **ec2_utils.camel_dict_to_snake_dict(e.response))
+ elif e.error_traceback:
+ module.fail_json(msg=e.msg, exception=e.error_traceback)
+ else:
+ module.fail_json(msg=e.msg)
+
+ facts_result = dict(changed=changed, **ec2_utils.camel_dict_to_snake_dict(response))
+
+ module.exit_json(**facts_result)
+
+if __name__ == '__main__':
+ main()
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json
new file mode 100644
index 0000000000..4d37e2109e
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "cd85ac52-d6bb-4359-a3f9-2a38da538ba2",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:29 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json
new file mode 100644
index 0000000000..5cbdb7296d
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "317446c6-62c4-4204-9987-d9a203bd71f8",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:29 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..b63456e638
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-c0d1cad2",
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 34.208.26.210\n \n \n 169.254.12.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 4PcswUCk9jOKcg0x6aVID9o5w73l0d0f\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.170\n 255.255.255.252\n 30\n \n \n \n \n 35.166.98.185\n \n \n 169.254.14.169\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n SGvO3U_dG.ofdKmpsDZsXsnZj7iWoZ.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "c02e6144-46bc-4da3-a15b-0695e6ef1fa4",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:28 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..bef6f808b5
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "0e3d9efd-85ad-4942-b2e8-85ceaf577cf8",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:31 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..087b3b80bb
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,140 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ddd1cacf",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-c2d1cad0",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-c3d1cad1",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "63558231-3b8b-4ee1-ab6c-cb0816524784",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:27 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..a57b1512ff
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-c0d1cad2",
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 34.208.26.210\n \n \n 169.254.12.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 4PcswUCk9jOKcg0x6aVID9o5w73l0d0f\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.170\n 255.255.255.252\n 30\n \n \n \n \n 35.166.98.185\n \n \n 169.254.14.169\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n SGvO3U_dG.ofdKmpsDZsXsnZj7iWoZ.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.208.26.210",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 28,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.166.98.185",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 28,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "5947bc65-4a3f-4b20-898c-47cc8e72d05b",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:29 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..33ab4bd0f0
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-c0d1cad2",
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 34.208.26.210\n \n \n 169.254.12.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 4PcswUCk9jOKcg0x6aVID9o5w73l0d0f\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.170\n 255.255.255.252\n 30\n \n \n \n \n 35.166.98.185\n \n \n 169.254.14.169\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n SGvO3U_dG.ofdKmpsDZsXsnZj7iWoZ.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.208.26.210",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 28,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.166.98.185",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 28,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "cd32e7fa-7f6f-45c4-8397-26e4be66a2e3",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:29 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json
new file mode 100644
index 0000000000..207e6fb4fc
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json
@@ -0,0 +1,195 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ddd1cacf",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-c2d1cad0",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-c3d1cad1",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-c0d1cad2",
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 34.208.26.210\n \n \n 169.254.12.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 4PcswUCk9jOKcg0x6aVID9o5w73l0d0f\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.170\n 255.255.255.252\n 30\n \n \n \n \n 35.166.98.185\n \n \n 169.254.14.169\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n SGvO3U_dG.ofdKmpsDZsXsnZj7iWoZ.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [
+ {
+ "DestinationCidrBlock": "196.168.2.0/24",
+ "State": "available"
+ },
+ {
+ "DestinationCidrBlock": "195.168.2.0/24",
+ "State": "available"
+ }
+ ],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 2,
+ "OutsideIpAddress": "34.208.26.210",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 28,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 2,
+ "OutsideIpAddress": "35.166.98.185",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 28,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "36ccb71c-af2a-4c5f-b002-98e30c42f083",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:30 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json
new file mode 100644
index 0000000000..962d3af3b5
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "e897639f-7728-4cc7-b04e-6837d4b54bd0",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:14 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..b60b82cc98
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-c2d1cad0",
+ "CustomerGatewayConfiguration": "\n\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.66\n 255.255.255.252\n 30\n \n \n \n \n 52.26.111.81\n \n \n 169.254.14.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n RkrJYFTeDYWquAgtuNhYpVE8DBSyVmXP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.250\n 255.255.255.252\n 30\n \n \n \n \n 52.41.226.200\n \n \n 169.254.13.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n UL8iJhwcFcSI8fm_VqPVm9NiBtjmCbCC\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "16749092-9188-43a5-a888-283ed45873e7",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:13 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..27e812b96b
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "8ed4bf62-d2b4-4a0d-9e4a-43bb51f04be2",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:15 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..4073e7a0af
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,118 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ddd1cacf",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "0c723ac9-9eb8-486e-94e0-28753d78b191",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:12 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..9f098e5f46
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-c2d1cad0",
+ "CustomerGatewayConfiguration": "\n\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.66\n 255.255.255.252\n 30\n \n \n \n \n 52.26.111.81\n \n \n 169.254.14.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n RkrJYFTeDYWquAgtuNhYpVE8DBSyVmXP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.250\n 255.255.255.252\n 30\n \n \n \n \n 52.41.226.200\n \n \n 169.254.13.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n UL8iJhwcFcSI8fm_VqPVm9NiBtjmCbCC\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.26.111.81",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 14,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.41.226.200",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 14,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "d8126b94-4b79-4636-8cd3-780f95752ebe",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:14 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..233329f859
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-c2d1cad0",
+ "CustomerGatewayConfiguration": "\n\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.66\n 255.255.255.252\n 30\n \n \n \n \n 52.26.111.81\n \n \n 169.254.14.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n RkrJYFTeDYWquAgtuNhYpVE8DBSyVmXP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.250\n 255.255.255.252\n 30\n \n \n \n \n 52.41.226.200\n \n \n 169.254.13.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n UL8iJhwcFcSI8fm_VqPVm9NiBtjmCbCC\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.26.111.81",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 14,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.41.226.200",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 14,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "a200d727-f66f-4bd1-af1a-c9e5b57763b0",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:14 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json
new file mode 100644
index 0000000000..6841253a3f
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json
@@ -0,0 +1,170 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ddd1cacf",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-c2d1cad0",
+ "Tags": [
+ {
+ "Value": "VPN",
+ "Key": "Ansible-Test"
+ }
+ ],
+ "CustomerGatewayConfiguration": "\n\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.66\n 255.255.255.252\n 30\n \n \n \n \n 52.26.111.81\n \n \n 169.254.14.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n RkrJYFTeDYWquAgtuNhYpVE8DBSyVmXP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.250\n 255.255.255.252\n 30\n \n \n \n \n 52.41.226.200\n \n \n 169.254.13.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n UL8iJhwcFcSI8fm_VqPVm9NiBtjmCbCC\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.26.111.81",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 14,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.41.226.200",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 14,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "5406a662-9a2a-41ac-aed1-7aa4ca87d236",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:15 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..5dc6a6d4d4
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-ddd1cacf",
+ "CustomerGatewayConfiguration": "\n\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.186\n 255.255.255.252\n 30\n \n \n \n \n 35.165.127.130\n \n \n 169.254.13.185\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PiBZrBwBpHPjQJxL2zLH12WDOSbIX8lv\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.18\n 255.255.255.252\n 30\n \n \n \n \n 52.37.57.18\n \n \n 169.254.15.17\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n TpmJttQ9t2E7J2JHiU4LBSRQ4pfdUUOv\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "a8072f03-db43-4afa-aee0-00c12792a5bf",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:08 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..b8215b0c70
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "a89de9ea-6e3c-44c4-9c16-bd9e41ebfa07",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:09 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..c0559e4bb0
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,107 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "a28c742b-c924-430d-a993-2fd52e0850ab",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:08 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..09a54c51cf
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-ddd1cacf",
+ "CustomerGatewayConfiguration": "\n\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.186\n 255.255.255.252\n 30\n \n \n \n \n 35.165.127.130\n \n \n 169.254.13.185\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PiBZrBwBpHPjQJxL2zLH12WDOSbIX8lv\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.18\n 255.255.255.252\n 30\n \n \n \n \n 52.37.57.18\n \n \n 169.254.15.17\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n TpmJttQ9t2E7J2JHiU4LBSRQ4pfdUUOv\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.127.130",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 9,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.37.57.18",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 9,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "a2f41704-db5d-4939-82e0-39e14f8fd9fb",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:09 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..53c30f8646
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-ddd1cacf",
+ "CustomerGatewayConfiguration": "\n\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.186\n 255.255.255.252\n 30\n \n \n \n \n 35.165.127.130\n \n \n 169.254.13.185\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PiBZrBwBpHPjQJxL2zLH12WDOSbIX8lv\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.18\n 255.255.255.252\n 30\n \n \n \n \n 52.37.57.18\n \n \n 169.254.15.17\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n TpmJttQ9t2E7J2JHiU4LBSRQ4pfdUUOv\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.127.130",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 9,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.37.57.18",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 9,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "42ba9a12-4c17-4ab4-8e6f-51ddc5ab46b7",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:09 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json
new file mode 100644
index 0000000000..281a0ad8b2
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "eb7076a9-b2ef-410b-84fc-e973749f1e4a",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:05 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..8b5e225856
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 35.160.213.236\n \n \n 169.254.15.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n wMZl5SKvXhcUddu7GjrWLkFVXNIZEPS_\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.40.96.196\n \n \n 169.254.12.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n NhVDPRk1mGt1iPkTFwXAFfuZLKPNm9se\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "16dfb72e-2456-4358-a751-a07ed149b87e",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:02 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..cc7a2c5ec7
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "82ea6b05-e768-41c3-ad34-4f34ff08eb38",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:06 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..ec3659c5a4
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,96 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "85097037-302a-4d4a-9422-9f7080bc3fda",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:01 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..1f25fbb75c
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 35.160.213.236\n \n \n 169.254.15.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n wMZl5SKvXhcUddu7GjrWLkFVXNIZEPS_\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.40.96.196\n \n \n 169.254.12.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n NhVDPRk1mGt1iPkTFwXAFfuZLKPNm9se\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.160.213.236",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.40.96.196",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "f1f0d604-1259-4c11-aa9b-42deee0d281f",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:02 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..5cf084474a
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 35.160.213.236\n \n \n 169.254.15.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n wMZl5SKvXhcUddu7GjrWLkFVXNIZEPS_\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.40.96.196\n \n \n 169.254.12.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n NhVDPRk1mGt1iPkTFwXAFfuZLKPNm9se\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.160.213.236",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.40.96.196",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "d4c54530-c478-4988-9239-8f1cc20493a1",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:03 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json
new file mode 100644
index 0000000000..6cb8dbd9dc
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json
@@ -0,0 +1,142 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 35.160.213.236\n \n \n 169.254.15.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n wMZl5SKvXhcUddu7GjrWLkFVXNIZEPS_\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.40.96.196\n \n \n 169.254.12.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n NhVDPRk1mGt1iPkTFwXAFfuZLKPNm9se\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.160.213.236",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.40.96.196",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "d162c9cb-b175-4b5c-a715-88c8eb6e17f0",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:04 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json
new file mode 100644
index 0000000000..fcf015019e
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 35.160.213.236\n \n \n 169.254.15.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n wMZl5SKvXhcUddu7GjrWLkFVXNIZEPS_\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.40.96.196\n \n \n 169.254.12.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n NhVDPRk1mGt1iPkTFwXAFfuZLKPNm9se\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.160.213.236",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.40.96.196",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "b101d28f-94a1-4c81-8e45-5a7af98c15cc",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:04 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json
new file mode 100644
index 0000000000..7e336d84cc
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json
@@ -0,0 +1,75 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "Tags": [
+ {
+ "Value": "one",
+ "Key": "One"
+ },
+ {
+ "Value": "two",
+ "Key": "Two"
+ }
+ ],
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 35.160.213.236\n \n \n 169.254.15.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n wMZl5SKvXhcUddu7GjrWLkFVXNIZEPS_\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.40.96.196\n \n \n 169.254.12.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n NhVDPRk1mGt1iPkTFwXAFfuZLKPNm9se\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.160.213.236",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.40.96.196",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "6286c7c0-7697-4a50-ae0e-41a8c87f3a41",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:05 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json
new file mode 100644
index 0000000000..9234c0140e
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json
@@ -0,0 +1,75 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "Tags": [
+ {
+ "Value": "one",
+ "Key": "One"
+ },
+ {
+ "Value": "two",
+ "Key": "Two"
+ }
+ ],
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 35.160.213.236\n \n \n 169.254.15.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n wMZl5SKvXhcUddu7GjrWLkFVXNIZEPS_\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.40.96.196\n \n \n 169.254.12.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n NhVDPRk1mGt1iPkTFwXAFfuZLKPNm9se\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.160.213.236",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.40.96.196",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "b2ac8baa-3f10-4968-89d3-1fd2d5259b3d",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:05 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json
new file mode 100644
index 0000000000..74f048dcee
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json
@@ -0,0 +1,75 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "Tags": [
+ {
+ "Value": "one",
+ "Key": "One"
+ },
+ {
+ "Value": "two",
+ "Key": "Two"
+ }
+ ],
+ "CustomerGatewayConfiguration": "\n\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.250\n 255.255.255.252\n 30\n \n \n \n \n 35.160.213.236\n \n \n 169.254.15.249\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n wMZl5SKvXhcUddu7GjrWLkFVXNIZEPS_\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.40.96.196\n \n \n 169.254.12.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n NhVDPRk1mGt1iPkTFwXAFfuZLKPNm9se\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.160.213.236",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.40.96.196",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 2,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "b31af8f6-705c-491f-982f-ec59237daece",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:05 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..77d8b14935
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "CustomerGatewayConfiguration": "\n\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.18\n 255.255.255.252\n 30\n \n \n \n \n 35.161.20.177\n \n \n 169.254.13.17\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n D5B4Y.dutl2Z4I3uChHN7NcgQAd_PFcH\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.170\n 255.255.255.252\n 30\n \n \n \n \n 35.166.123.146\n \n \n 169.254.15.169\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .RsAAZ92ymhAD3Pys_tMdZFGaosxQmMo\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "01e716ac-65d9-4247-864c-f750f8c025a0",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:36 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..dd11f4b0af
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "a09068c5-75bd-4292-8b79-05607d8f9cf7",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:37 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..fa493796a6
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,52 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "8340a216-1c4b-4cea-b19e-83b661c227f0",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:35 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..ee9b2dd8e9
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "CustomerGatewayConfiguration": "\n\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.18\n 255.255.255.252\n 30\n \n \n \n \n 35.161.20.177\n \n \n 169.254.13.17\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n D5B4Y.dutl2Z4I3uChHN7NcgQAd_PFcH\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.170\n 255.255.255.252\n 30\n \n \n \n \n 35.166.123.146\n \n \n 169.254.15.169\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .RsAAZ92ymhAD3Pys_tMdZFGaosxQmMo\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.20.177",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 36,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.166.123.146",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 36,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "6b5f3e76-8538-4467-8d39-c5afe2248182",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:36 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..b0e0fe5446
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "CustomerGatewayConfiguration": "\n\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.18\n 255.255.255.252\n 30\n \n \n \n \n 35.161.20.177\n \n \n 169.254.13.17\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n D5B4Y.dutl2Z4I3uChHN7NcgQAd_PFcH\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.170\n 255.255.255.252\n 30\n \n \n \n \n 35.166.123.146\n \n \n 169.254.15.169\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .RsAAZ92ymhAD3Pys_tMdZFGaosxQmMo\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.20.177",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 36,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.166.123.146",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 36,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "5f2cb472-c561-4989-81c9-8570e8cca1e4",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:37 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..86bd3b7c09
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "CustomerGatewayConfiguration": "\n\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.222\n 255.255.255.252\n 30\n \n \n \n \n 35.161.209.3\n \n \n 169.254.15.221\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n pdQedpvQ23fYYft2kc38kV3oE4YybIZD\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.10\n 255.255.255.252\n 30\n \n \n \n \n 52.35.122.12\n \n \n 169.254.12.9\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n MZq6_Ah81mZF7XaHXtDCdHLMkmEv8Yq2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "9b3dcbc2-7213-47f6-b92d-32dc0aba29c4",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:41 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..06a88ceaed
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "f0431d86-cd4a-47b9-96bb-fabedb356c3d",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:43 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..4dd3de7f62
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,63 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "84ff7cb7-6581-4c27-8cc7-65c658a7d9e6",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:40 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..3e60a6114e
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "CustomerGatewayConfiguration": "\n\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.222\n 255.255.255.252\n 30\n \n \n \n \n 35.161.209.3\n \n \n 169.254.15.221\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n pdQedpvQ23fYYft2kc38kV3oE4YybIZD\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.10\n 255.255.255.252\n 30\n \n \n \n \n 52.35.122.12\n \n \n 169.254.12.9\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n MZq6_Ah81mZF7XaHXtDCdHLMkmEv8Yq2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.209.3",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.35.122.12",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "b1f60afb-bd9c-4b8c-8182-1b21655550c7",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:41 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..024751e313
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "CustomerGatewayConfiguration": "\n\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.222\n 255.255.255.252\n 30\n \n \n \n \n 35.161.209.3\n \n \n 169.254.15.221\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n pdQedpvQ23fYYft2kc38kV3oE4YybIZD\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.10\n 255.255.255.252\n 30\n \n \n \n \n 52.35.122.12\n \n \n 169.254.12.9\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n MZq6_Ah81mZF7XaHXtDCdHLMkmEv8Yq2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.209.3",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.35.122.12",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "2e2e9ee2-8285-4b3e-8ce7-9436c87ace48",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:41 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json
new file mode 100644
index 0000000000..b2f8d7c6a2
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json
@@ -0,0 +1,109 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "CustomerGatewayConfiguration": "\n\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.222\n 255.255.255.252\n 30\n \n \n \n \n 35.161.209.3\n \n \n 169.254.15.221\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n pdQedpvQ23fYYft2kc38kV3oE4YybIZD\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.10\n 255.255.255.252\n 30\n \n \n \n \n 52.35.122.12\n \n \n 169.254.12.9\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n MZq6_Ah81mZF7XaHXtDCdHLMkmEv8Yq2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.209.3",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.35.122.12",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "6b736669-c831-4b81-9ca4-79d915eb4312",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:42 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json
new file mode 100644
index 0000000000..ea0ac2948a
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "CustomerGatewayConfiguration": "\n\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.222\n 255.255.255.252\n 30\n \n \n \n \n 35.161.209.3\n \n \n 169.254.15.221\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n pdQedpvQ23fYYft2kc38kV3oE4YybIZD\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.10\n 255.255.255.252\n 30\n \n \n \n \n 52.35.122.12\n \n \n 169.254.12.9\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n MZq6_Ah81mZF7XaHXtDCdHLMkmEv8Yq2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.209.3",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.35.122.12",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "84ed029a-19b6-4b2a-b586-3fedfa75c4f8",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:42 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json
new file mode 100644
index 0000000000..4e0a55a620
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "CustomerGatewayConfiguration": "\n\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.222\n 255.255.255.252\n 30\n \n \n \n \n 35.161.209.3\n \n \n 169.254.15.221\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n pdQedpvQ23fYYft2kc38kV3oE4YybIZD\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.10\n 255.255.255.252\n 30\n \n \n \n \n 52.35.122.12\n \n \n 169.254.12.9\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n MZq6_Ah81mZF7XaHXtDCdHLMkmEv8Yq2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.209.3",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.35.122.12",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "181271e4-ac0b-4598-81d8-7fc1b91d8bbe",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:42 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json
new file mode 100644
index 0000000000..477f60bbd4
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "CustomerGatewayConfiguration": "\n\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.222\n 255.255.255.252\n 30\n \n \n \n \n 35.161.209.3\n \n \n 169.254.15.221\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n pdQedpvQ23fYYft2kc38kV3oE4YybIZD\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.10\n 255.255.255.252\n 30\n \n \n \n \n 52.35.122.12\n \n \n 169.254.12.9\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n MZq6_Ah81mZF7XaHXtDCdHLMkmEv8Yq2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.209.3",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.35.122.12",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 41,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "d4ee7e72-1c6a-4460-b0cd-6676ed3f3545",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:43 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..739a2a41f7
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "CustomerGatewayConfiguration": "\n\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.162\n 255.255.255.252\n 30\n \n \n \n \n 35.165.73.3\n \n \n 169.254.12.161\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n aMIxfFrw7FiyaYn8OaA9a5sZzP4VN1mS\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.242\n 255.255.255.252\n 30\n \n \n \n \n 52.89.34.226\n \n \n 169.254.12.241\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n btRxqLWsAA8MAZ6XRI3CQJFmMDh1scIB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "53ceea07-78f5-4baf-b4c3-7c4cbb141117",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:54 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..92198fd8e5
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "7c15f17a-6c94-4c68-93dc-e03b8cda47de",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:56 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..8643e4f0f6
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,85 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "bcd53725-0a26-408a-be7a-3d392c7c908e",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:53 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..00718ccb4c
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "CustomerGatewayConfiguration": "\n\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.162\n 255.255.255.252\n 30\n \n \n \n \n 35.165.73.3\n \n \n 169.254.12.161\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n aMIxfFrw7FiyaYn8OaA9a5sZzP4VN1mS\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.242\n 255.255.255.252\n 30\n \n \n \n \n 52.89.34.226\n \n \n 169.254.12.241\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n btRxqLWsAA8MAZ6XRI3CQJFmMDh1scIB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.73.3",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 55,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.89.34.226",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 55,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "ebdd2503-3b5a-43c3-bf4d-c2486490e559",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:54 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..3d071e5e36
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "CustomerGatewayConfiguration": "\n\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.162\n 255.255.255.252\n 30\n \n \n \n \n 35.165.73.3\n \n \n 169.254.12.161\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n aMIxfFrw7FiyaYn8OaA9a5sZzP4VN1mS\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.242\n 255.255.255.252\n 30\n \n \n \n \n 52.89.34.226\n \n \n 169.254.12.241\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n btRxqLWsAA8MAZ6XRI3CQJFmMDh1scIB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.73.3",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 55,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.89.34.226",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 55,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "a4d4d91e-a03f-4def-b4dd-ab70b8f16439",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:55 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json
new file mode 100644
index 0000000000..17f933fc37
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json
@@ -0,0 +1,131 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "CustomerGatewayConfiguration": "\n\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.162\n 255.255.255.252\n 30\n \n \n \n \n 35.165.73.3\n \n \n 169.254.12.161\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n aMIxfFrw7FiyaYn8OaA9a5sZzP4VN1mS\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.242\n 255.255.255.252\n 30\n \n \n \n \n 52.89.34.226\n \n \n 169.254.12.241\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n btRxqLWsAA8MAZ6XRI3CQJFmMDh1scIB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.73.3",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 55,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.89.34.226",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 55,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "b3546f46-72a0-4f50-af9e-c4db2e3fdd8a",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:56 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..6c4075ef02
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,18 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "907abc1f-5f95-44ca-b5f2-f5151cda3f7a",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:58 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json
new file mode 100644
index 0000000000..fd4f500054
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "3d25206a-61fc-41d3-983c-e82e9124d39a",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:15 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json
new file mode 100644
index 0000000000..8d5ddac943
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "c7565d5c-72a5-4351-b987-efb022a1438a",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:17 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..ff7ef8e271
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "CustomerGatewayConfiguration": "\n\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.174\n 255.255.255.252\n 30\n \n \n \n \n 34.208.63.208\n \n \n 169.254.13.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n BoicPawQq1PrbGopF.5uOIUHV8QuwlIk\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.234\n 255.255.255.252\n 30\n \n \n \n \n 52.43.238.101\n \n \n 169.254.13.233\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oVWMk0STre72RtHDSGFchlxNHCLPbQRP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "20f10b43-469a-4a3e-bde9-9b72a43892ac",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:08 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json
new file mode 100644
index 0000000000..c0c795f240
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-d5d1cac7",
+ "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.66\n 255.255.255.252\n 30\n \n \n \n \n 35.165.76.189\n \n \n 169.254.15.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Nkf85LZPueu8Vsb1eW8E0MakAcDXmam2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.34.36.2\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .eTE1ZMmoAq2kZIFy3u2QzP8yxvajM.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "70469ace-bc8a-4a4c-862a-56f4d16f07bf",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:11 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..5b7aac6981
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "94ead0e4-dbb1-416d-a16e-b7207df52b26",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:20 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json
new file mode 100644
index 0000000000..13d2b49757
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "9b1b23ef-e912-4636-9f69-d8241168ef6d",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:20 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..f8b6dccc80
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,30 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "2f5a8a9d-25fb-44f9-b638-bdf8873dd790",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:06 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json
new file mode 100644
index 0000000000..96f4f707b2
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json
@@ -0,0 +1,71 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Tags": [
+ {
+ "Value": "Tag",
+ "Key": "Wrong"
+ }
+ ],
+ "CustomerGatewayConfiguration": "\n\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.174\n 255.255.255.252\n 30\n \n \n \n \n 34.208.63.208\n \n \n 169.254.13.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n BoicPawQq1PrbGopF.5uOIUHV8QuwlIk\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.234\n 255.255.255.252\n 30\n \n \n \n \n 52.43.238.101\n \n \n 169.254.13.233\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oVWMk0STre72RtHDSGFchlxNHCLPbQRP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.208.63.208",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.43.238.101",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "4e52d197-7903-46ce-84c6-c0cc734a4992",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:16 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json
new file mode 100644
index 0000000000..91c293d6a2
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json
@@ -0,0 +1,76 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d7d1cac5",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d5d1cac7",
+ "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.66\n 255.255.255.252\n 30\n \n \n \n \n 35.165.76.189\n \n \n 169.254.15.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Nkf85LZPueu8Vsb1eW8E0MakAcDXmam2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.34.36.2\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .eTE1ZMmoAq2kZIFy3u2QzP8yxvajM.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.76.189",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.34.36.2",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "4b0c1efa-7a13-4ace-924a-e3af5647eda3",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:16 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json
new file mode 100644
index 0000000000..72921c4b6a
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d5d1cac7",
+ "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.66\n 255.255.255.252\n 30\n \n \n \n \n 35.165.76.189\n \n \n 169.254.15.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Nkf85LZPueu8Vsb1eW8E0MakAcDXmam2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.34.36.2\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .eTE1ZMmoAq2kZIFy3u2QzP8yxvajM.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.76.189",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.34.36.2",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "80442f20-0375-48b7-bb67-41f78cfe6fe4",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:16 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json
new file mode 100644
index 0000000000..2e7396351a
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json
@@ -0,0 +1,71 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d5d1cac7",
+ "Tags": [
+ {
+ "Value": "Tag",
+ "Key": "Correct"
+ }
+ ],
+ "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.66\n 255.255.255.252\n 30\n \n \n \n \n 35.165.76.189\n \n \n 169.254.15.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Nkf85LZPueu8Vsb1eW8E0MakAcDXmam2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.34.36.2\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .eTE1ZMmoAq2kZIFy3u2QzP8yxvajM.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.76.189",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.34.36.2",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "9989fff5-6d49-4ac8-a56a-c2a9dfbd6781",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:17 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json
new file mode 100644
index 0000000000..6715debc65
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json
@@ -0,0 +1,71 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d5d1cac7",
+ "Tags": [
+ {
+ "Value": "Tag",
+ "Key": "Correct"
+ }
+ ],
+ "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.66\n 255.255.255.252\n 30\n \n \n \n \n 35.165.76.189\n \n \n 169.254.15.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Nkf85LZPueu8Vsb1eW8E0MakAcDXmam2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.34.36.2\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .eTE1ZMmoAq2kZIFy3u2QzP8yxvajM.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.76.189",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.34.36.2",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "7bc4bca5-c8e7-4c6e-be09-d009c31f52f5",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:18 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json
new file mode 100644
index 0000000000..aa7871ca53
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json
@@ -0,0 +1,71 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d5d1cac7",
+ "Tags": [
+ {
+ "Value": "Tag",
+ "Key": "Correct"
+ }
+ ],
+ "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.66\n 255.255.255.252\n 30\n \n \n \n \n 35.165.76.189\n \n \n 169.254.15.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Nkf85LZPueu8Vsb1eW8E0MakAcDXmam2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.34.36.2\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .eTE1ZMmoAq2kZIFy3u2QzP8yxvajM.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.76.189",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.34.36.2",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "5851a62c-eb26-448f-b1c4-559a54a118b3",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:19 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..b556e92fee
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "CustomerGatewayConfiguration": "\n\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.174\n 255.255.255.252\n 30\n \n \n \n \n 34.208.63.208\n \n \n 169.254.13.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n BoicPawQq1PrbGopF.5uOIUHV8QuwlIk\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.234\n 255.255.255.252\n 30\n \n \n \n \n 52.43.238.101\n \n \n 169.254.13.233\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oVWMk0STre72RtHDSGFchlxNHCLPbQRP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.208.63.208",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.43.238.101",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "bef248f5-e474-44a9-a612-d58be45208cb",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:09 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..ae7dfd43b3
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "CustomerGatewayConfiguration": "\n\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.174\n 255.255.255.252\n 30\n \n \n \n \n 34.208.63.208\n \n \n 169.254.13.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n BoicPawQq1PrbGopF.5uOIUHV8QuwlIk\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.234\n 255.255.255.252\n 30\n \n \n \n \n 52.43.238.101\n \n \n 169.254.13.233\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oVWMk0STre72RtHDSGFchlxNHCLPbQRP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.208.63.208",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.43.238.101",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "28d92ba7-d092-4ae7-9600-fee96fc8e714",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:10 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json
new file mode 100644
index 0000000000..48bef48b0e
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json
@@ -0,0 +1,30 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d7d1cac5",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "1c9af9df-3a21-44d2-ab2c-7aa31dc0c842",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:10 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json
new file mode 100644
index 0000000000..f498bb3b50
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d5d1cac7",
+ "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.66\n 255.255.255.252\n 30\n \n \n \n \n 35.165.76.189\n \n \n 169.254.15.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Nkf85LZPueu8Vsb1eW8E0MakAcDXmam2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.34.36.2\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .eTE1ZMmoAq2kZIFy3u2QzP8yxvajM.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.76.189",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.34.36.2",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "65e2647e-081a-4f5f-8c21-cf6b841d05fb",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:12 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json
new file mode 100644
index 0000000000..34f59a5643
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d5d1cac7",
+ "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.66\n 255.255.255.252\n 30\n \n \n \n \n 35.165.76.189\n \n \n 169.254.15.65\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Nkf85LZPueu8Vsb1eW8E0MakAcDXmam2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 52.34.36.2\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n .eTE1ZMmoAq2kZIFy3u2QzP8yxvajM.F\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.165.76.189",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.34.36.2",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 11,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "f045d2e0-e396-46af-be77-8541f3204cae",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:13 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json
new file mode 100644
index 0000000000..dc0ce5877c
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json
@@ -0,0 +1,76 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "CustomerGatewayConfiguration": "\n\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.174\n 255.255.255.252\n 30\n \n \n \n \n 34.208.63.208\n \n \n 169.254.13.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n BoicPawQq1PrbGopF.5uOIUHV8QuwlIk\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.234\n 255.255.255.252\n 30\n \n \n \n \n 52.43.238.101\n \n \n 169.254.13.233\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oVWMk0STre72RtHDSGFchlxNHCLPbQRP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.208.63.208",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.43.238.101",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "a7d7c15c-9b96-4c50-bf1c-1a4aa9cf1d5c",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:14 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json
new file mode 100644
index 0000000000..a746a94339
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "CustomerGatewayConfiguration": "\n\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.174\n 255.255.255.252\n 30\n \n \n \n \n 34.208.63.208\n \n \n 169.254.13.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n BoicPawQq1PrbGopF.5uOIUHV8QuwlIk\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.234\n 255.255.255.252\n 30\n \n \n \n \n 52.43.238.101\n \n \n 169.254.13.233\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oVWMk0STre72RtHDSGFchlxNHCLPbQRP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.208.63.208",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.43.238.101",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "44c8dba1-4d16-4126-8e06-12b9ca6d8d99",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:14 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json
new file mode 100644
index 0000000000..f5d550843f
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json
@@ -0,0 +1,71 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Tags": [
+ {
+ "Value": "Tag",
+ "Key": "Wrong"
+ }
+ ],
+ "CustomerGatewayConfiguration": "\n\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.174\n 255.255.255.252\n 30\n \n \n \n \n 34.208.63.208\n \n \n 169.254.13.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n BoicPawQq1PrbGopF.5uOIUHV8QuwlIk\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.234\n 255.255.255.252\n 30\n \n \n \n \n 52.43.238.101\n \n \n 169.254.13.233\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oVWMk0STre72RtHDSGFchlxNHCLPbQRP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.208.63.208",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.43.238.101",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 8,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "0efe07c4-1553-4a4e-b829-ff66cc99d4b6",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:16 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json
new file mode 100644
index 0000000000..3c1a8f9d66
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "9e21c5d7-8be2-413a-8211-bed94de38e47",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:24 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json
new file mode 100644
index 0000000000..4dd7894f09
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "b871e67a-4507-4859-b690-b28d6488397a",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:28 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..ab23047c29
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "CustomerGatewayConfiguration": "\n\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.110\n 255.255.255.252\n 30\n \n \n \n \n 52.26.198.124\n \n \n 169.254.13.109\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 51Mah1x0ibaJnZk0GV7MNijJKBtEPKWL\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.150\n 255.255.255.252\n 30\n \n \n \n \n 52.39.71.179\n \n \n 169.254.15.149\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n lY27_pTs_9cqHl.MhalLgXsclxA4Ei9T\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "3205fb79-ffa9-4982-83b9-7772d62a5c81",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:24 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json
new file mode 100644
index 0000000000..a9f649c225
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-dbd1cac9",
+ "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.146\n 255.255.255.252\n 30\n \n \n \n \n 34.210.151.74\n \n \n 169.254.12.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 1nmmvzBlufrj_vueJvPiIBTUJWI.UAuL\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.14.142\n 255.255.255.252\n 30\n \n \n \n \n 52.41.102.69\n \n \n 169.254.14.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n CQtqQDcVcNan0gWNfv4LLANSVZwq6Zv2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "f12fa28a-7a66-47fb-9730-3555a42f6f1e",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:25 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..26d3261303
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "13d95a20-f2df-4e2f-b2a9-d090f418504e",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:31 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json
new file mode 100644
index 0000000000..ec2af1a722
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "ab0fd4fb-32d3-4ec8-9ebe-c81989ec7bf4",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:31 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..433718ee9a
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,41 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "98700ca4-7ab6-484f-ac58-63413c89ca71",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:23 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..6c8de0d739
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "CustomerGatewayConfiguration": "\n\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.110\n 255.255.255.252\n 30\n \n \n \n \n 52.26.198.124\n \n \n 169.254.13.109\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 51Mah1x0ibaJnZk0GV7MNijJKBtEPKWL\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.150\n 255.255.255.252\n 30\n \n \n \n \n 52.39.71.179\n \n \n 169.254.15.149\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n lY27_pTs_9cqHl.MhalLgXsclxA4Ei9T\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.26.198.124",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 24,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.39.71.179",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 24,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "4e7c321b-1ab1-418d-bafd-c2d6af70bdac",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:24 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..15126a5bca
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,71 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Tags": [
+ {
+ "Value": "Tag",
+ "Key": "Correct"
+ }
+ ],
+ "CustomerGatewayConfiguration": "\n\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.110\n 255.255.255.252\n 30\n \n \n \n \n 52.26.198.124\n \n \n 169.254.13.109\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 51Mah1x0ibaJnZk0GV7MNijJKBtEPKWL\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.150\n 255.255.255.252\n 30\n \n \n \n \n 52.39.71.179\n \n \n 169.254.15.149\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n lY27_pTs_9cqHl.MhalLgXsclxA4Ei9T\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.26.198.124",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 24,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.39.71.179",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 24,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "cfce2cb4-9475-4ce6-91fe-7bd0a16472a5",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:25 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json
new file mode 100644
index 0000000000..6aba711174
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json
@@ -0,0 +1,41 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d7d1cac5",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d5d1cac7",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "312ddaf3-437c-4a61-973b-1c9eca412cb0",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:25 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json
new file mode 100644
index 0000000000..e9b23e2bc6
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dbd1cac9",
+ "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.146\n 255.255.255.252\n 30\n \n \n \n \n 34.210.151.74\n \n \n 169.254.12.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 1nmmvzBlufrj_vueJvPiIBTUJWI.UAuL\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.14.142\n 255.255.255.252\n 30\n \n \n \n \n 52.41.102.69\n \n \n 169.254.14.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n CQtqQDcVcNan0gWNfv4LLANSVZwq6Zv2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.210.151.74",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 26,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.41.102.69",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 26,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "bf8580db-3ddd-4c80-b7eb-ec0cef43527e",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:26 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json
new file mode 100644
index 0000000000..64b7188043
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json
@@ -0,0 +1,71 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dbd1cac9",
+ "Tags": [
+ {
+ "Value": "Tag",
+ "Key": "Correct"
+ }
+ ],
+ "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.146\n 255.255.255.252\n 30\n \n \n \n \n 34.210.151.74\n \n \n 169.254.12.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 1nmmvzBlufrj_vueJvPiIBTUJWI.UAuL\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.14.142\n 255.255.255.252\n 30\n \n \n \n \n 52.41.102.69\n \n \n 169.254.14.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n CQtqQDcVcNan0gWNfv4LLANSVZwq6Zv2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.210.151.74",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 26,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.41.102.69",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 26,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "4e60c4cf-950c-458b-8a5e-083744e09a91",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:29 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json
new file mode 100644
index 0000000000..7abb9ae5bf
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json
@@ -0,0 +1,123 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Tags": [
+ {
+ "Value": "Tag",
+ "Key": "Correct"
+ }
+ ],
+ "CustomerGatewayConfiguration": "\n\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.110\n 255.255.255.252\n 30\n \n \n \n \n 52.26.198.124\n \n \n 169.254.13.109\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 51Mah1x0ibaJnZk0GV7MNijJKBtEPKWL\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.150\n 255.255.255.252\n 30\n \n \n \n \n 52.39.71.179\n \n \n 169.254.15.149\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n lY27_pTs_9cqHl.MhalLgXsclxA4Ei9T\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.26.198.124",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 24,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.39.71.179",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 24,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dbd1cac9",
+ "Tags": [
+ {
+ "Value": "Tag",
+ "Key": "Correct"
+ }
+ ],
+ "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.146\n 255.255.255.252\n 30\n \n \n \n \n 34.210.151.74\n \n \n 169.254.12.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 1nmmvzBlufrj_vueJvPiIBTUJWI.UAuL\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.14.142\n 255.255.255.252\n 30\n \n \n \n \n 52.41.102.69\n \n \n 169.254.14.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n CQtqQDcVcNan0gWNfv4LLANSVZwq6Zv2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "34.210.151.74",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 26,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.41.102.69",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 26,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "01fb2a9f-d22f-4971-bd27-6064474945b7",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:30 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..9e4a335ae9
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,18 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "9771e3f2-7127-4a53-8c9d-38836325ec98",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:31 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..7ea9e57095
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "CustomerGatewayConfiguration": "\n\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.154\n 255.255.255.252\n 30\n \n \n \n \n 35.167.147.42\n \n \n 169.254.12.153\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n aX9p2u82Bs2pibGbe9zba5yNMvyrNzLs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.101.242\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 Be4ZkSyc82x446zI4.Bw2VS1aAGjCTkh\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "6525291e-6e01-4ce8-af1a-95aeaa58c4ba",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:21:58 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json
new file mode 100644
index 0000000000..41445caeed
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-d7d1cac5",
+ "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.14.238\n 255.255.255.252\n 30\n \n \n \n \n 35.167.61.147\n \n \n 169.254.14.237\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Ugp4SR29pwnm61Cph1uqcPFQ_VK__AEg\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 54.71.100.208\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n s9AlLUdC1zCXkUgamTAiRk5lcpdIg9y5\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "e9506512-d780-4bb7-ac6f-6e28d14694a9",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:00 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..0dd6b47dfd
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "990ab5ce-57da-4e15-bd7c-83e17aeb306e",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:03 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json
new file mode 100644
index 0000000000..e41a6b4174
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "ff6789cc-0a68-4f2f-ac37-6f3ec9c3b91c",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:03 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..11d86b7d2e
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,18 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "156ff25d-5297-4e60-b7f1-ef588e3fb5b7",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:21:57 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..cbd71827a9
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "CustomerGatewayConfiguration": "\n\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.154\n 255.255.255.252\n 30\n \n \n \n \n 35.167.147.42\n \n \n 169.254.12.153\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n aX9p2u82Bs2pibGbe9zba5yNMvyrNzLs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.101.242\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 Be4ZkSyc82x446zI4.Bw2VS1aAGjCTkh\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.167.147.42",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 58,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 21
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.11.101.242",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 58,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 21
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "963457ae-af51-4a4d-818f-4b50a034182b",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:21:58 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..27a552e4d6
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "CustomerGatewayConfiguration": "\n\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.154\n 255.255.255.252\n 30\n \n \n \n \n 35.167.147.42\n \n \n 169.254.12.153\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n aX9p2u82Bs2pibGbe9zba5yNMvyrNzLs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.101.242\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 Be4ZkSyc82x446zI4.Bw2VS1aAGjCTkh\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.167.147.42",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 58,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 21
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.11.101.242",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 58,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 21
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "05d64b71-f28d-48de-b433-a73525b413aa",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:21:59 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json
new file mode 100644
index 0000000000..4a8b2e9f55
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json
@@ -0,0 +1,18 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "42dd58a6-a3c8-4630-9ee2-c2c831774bc7",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:21:59 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json
new file mode 100644
index 0000000000..c4e48b30a4
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d7d1cac5",
+ "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.14.238\n 255.255.255.252\n 30\n \n \n \n \n 35.167.61.147\n \n \n 169.254.14.237\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Ugp4SR29pwnm61Cph1uqcPFQ_VK__AEg\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 54.71.100.208\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n s9AlLUdC1zCXkUgamTAiRk5lcpdIg9y5\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.167.61.147",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 0,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "54.71.100.208",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 0,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "9586d887-1653-4116-bc91-38fbb53f5bd8",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:01 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json
new file mode 100644
index 0000000000..3b07336586
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d7d1cac5",
+ "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.14.238\n 255.255.255.252\n 30\n \n \n \n \n 35.167.61.147\n \n \n 169.254.14.237\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n Ugp4SR29pwnm61Cph1uqcPFQ_VK__AEg\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\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.94\n 255.255.255.252\n 30\n \n \n \n \n 54.71.100.208\n \n \n 169.254.15.93\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n s9AlLUdC1zCXkUgamTAiRk5lcpdIg9y5\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.167.61.147",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 0,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "54.71.100.208",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 0,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-32d70c2c",
+ "CustomerGatewayId": "cgw-9e13c880",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "01747a02-2849-4c94-951e-63126a1de23a",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:02 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json
new file mode 100644
index 0000000000..ac499b78a2
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "CustomerGatewayConfiguration": "\n\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.154\n 255.255.255.252\n 30\n \n \n \n \n 35.167.147.42\n \n \n 169.254.12.153\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n aX9p2u82Bs2pibGbe9zba5yNMvyrNzLs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.101.242\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 Be4ZkSyc82x446zI4.Bw2VS1aAGjCTkh\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.167.147.42",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 58,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 21
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "52.11.101.242",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 58,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 21
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "520d6c88-f5c4-4cad-b8b1-9190517aa318",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:03 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..22e38567f0
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "CustomerGatewayConfiguration": "\n\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.222\n 255.255.255.252\n 30\n \n \n \n \n 35.163.70.159\n \n \n 169.254.12.221\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n q0QiYHyByq4qZDcghFdPV.t4bLDpYgkX\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.170\n 255.255.255.252\n 30\n \n \n \n \n 54.69.128.94\n \n \n 169.254.13.169\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5EvTuoMPkkW3LJuPcZZ0y7jqTlOpz6r.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "b9478b55-7b46-43c6-b490-97044a554e58",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:48 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..b69f55d43b
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "0c03aa63-a3f8-4112-8d78-a2449d5d86b0",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:51 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..17d3494ef5
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,74 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "50884462-74be-47ce-b807-c3dc95627d56",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:48 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..89d003185a
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "CustomerGatewayConfiguration": "\n\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.222\n 255.255.255.252\n 30\n \n \n \n \n 35.163.70.159\n \n \n 169.254.12.221\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n q0QiYHyByq4qZDcghFdPV.t4bLDpYgkX\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.170\n 255.255.255.252\n 30\n \n \n \n \n 54.69.128.94\n \n \n 169.254.13.169\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5EvTuoMPkkW3LJuPcZZ0y7jqTlOpz6r.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.163.70.159",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 49,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "54.69.128.94",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 49,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "a88f4e98-f186-484e-b24e-bf3c8bf87fd3",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:49 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..848102a456
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "CustomerGatewayConfiguration": "\n\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.222\n 255.255.255.252\n 30\n \n \n \n \n 35.163.70.159\n \n \n 169.254.12.221\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n q0QiYHyByq4qZDcghFdPV.t4bLDpYgkX\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.170\n 255.255.255.252\n 30\n \n \n \n \n 54.69.128.94\n \n \n 169.254.13.169\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5EvTuoMPkkW3LJuPcZZ0y7jqTlOpz6r.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.163.70.159",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 49,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "54.69.128.94",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 49,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 22
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "583422b3-6730-48e9-8529-4d73d3ac245d",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:50 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json
new file mode 100644
index 0000000000..fa73b0ba7a
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json
@@ -0,0 +1,30 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "61a042a1-25d7-4c7d-bb05-f4bb25edee1e",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:22:51 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json
new file mode 100644
index 0000000000..ec7a38f722
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json
@@ -0,0 +1,28 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnection": {
+ "VpnConnectionId": "vpn-c3d1cad1",
+ "CustomerGatewayConfiguration": "\n\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.150\n 255.255.255.252\n 30\n \n \n \n \n 35.161.37.166\n \n \n 169.254.14.149\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n zFFl0n8Gzdo_lUUxBVq5olSB26IItCOn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.238\n 255.255.255.252\n 30\n \n \n \n \n 35.163.39.95\n \n \n 169.254.14.237\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DBf239oVB9dPWGnhJjDQkGNrhUGkPRPK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "ed4f8d6a-e9cf-4f71-9b42-b3fe24a7fc51",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:20 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json
new file mode 100644
index 0000000000..e5e648bdc0
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "8f963e2f-1049-4b47-a7e5-9c721bd64bd9",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:22 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json
new file mode 100644
index 0000000000..24ae510732
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json
@@ -0,0 +1,17 @@
+{
+ "status_code": 200,
+ "data": {
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "c0f8ab11-60bd-4d05-88bf-90a35243b5d7",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:23 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json
new file mode 100644
index 0000000000..0103bb8498
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json
@@ -0,0 +1,129 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ddd1cacf",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-c2d1cad0",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "6e8bb9f0-077a-4205-9f63-fc0bb35a08f5",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:20 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json
new file mode 100644
index 0000000000..5391cae3e5
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-c3d1cad1",
+ "CustomerGatewayConfiguration": "\n\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.150\n 255.255.255.252\n 30\n \n \n \n \n 35.161.37.166\n \n \n 169.254.14.149\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n zFFl0n8Gzdo_lUUxBVq5olSB26IItCOn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.238\n 255.255.255.252\n 30\n \n \n \n \n 35.163.39.95\n \n \n 169.254.14.237\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DBf239oVB9dPWGnhJjDQkGNrhUGkPRPK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.37.166",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 21,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.163.39.95",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 21,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "44120906-afb3-46bb-bce9-72676f8fd605",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:21 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json
new file mode 100644
index 0000000000..9c51ce55cd
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json
@@ -0,0 +1,65 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-c3d1cad1",
+ "CustomerGatewayConfiguration": "\n\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.150\n 255.255.255.252\n 30\n \n \n \n \n 35.161.37.166\n \n \n 169.254.14.149\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n zFFl0n8Gzdo_lUUxBVq5olSB26IItCOn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.238\n 255.255.255.252\n 30\n \n \n \n \n 35.163.39.95\n \n \n 169.254.14.237\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DBf239oVB9dPWGnhJjDQkGNrhUGkPRPK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.37.166",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 21,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.163.39.95",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 21,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "644cba92-8580-4c1c-a53e-25d2f0c7a7d9",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:22 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json
new file mode 100644
index 0000000000..c2fa087e48
--- /dev/null
+++ b/test/units/modules/cloud/amazon/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json
@@ -0,0 +1,175 @@
+{
+ "status_code": 200,
+ "data": {
+ "VpnConnections": [
+ {
+ "VpnConnectionId": "vpn-d6d1cac4",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d4d1cac6",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dad1cac8",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d8d1caca",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-d9d1cacb",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ded1cacc",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dfd1cacd",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-dcd1cace",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-ddd1cacf",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-c2d1cad0",
+ "Routes": [],
+ "State": "deleted",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ },
+ {
+ "VpnConnectionId": "vpn-c3d1cad1",
+ "CustomerGatewayConfiguration": "\n\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.150\n 255.255.255.252\n 30\n \n \n \n \n 35.161.37.166\n \n \n 169.254.14.149\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n zFFl0n8Gzdo_lUUxBVq5olSB26IItCOn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n 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.238\n 255.255.255.252\n 30\n \n \n \n \n 35.163.39.95\n \n \n 169.254.14.237\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DBf239oVB9dPWGnhJjDQkGNrhUGkPRPK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n\n",
+ "Routes": [],
+ "VgwTelemetry": [
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.161.37.166",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 21,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ },
+ {
+ "Status": "DOWN",
+ "AcceptedRouteCount": 0,
+ "OutsideIpAddress": "35.163.39.95",
+ "LastStatusChange": {
+ "hour": 20,
+ "__class__": "datetime",
+ "month": 6,
+ "second": 21,
+ "microsecond": 0,
+ "year": 2017,
+ "day": 12,
+ "minute": 23
+ },
+ "StatusMessage": ""
+ }
+ ],
+ "State": "pending",
+ "VpnGatewayId": "vgw-35d70c2b",
+ "CustomerGatewayId": "cgw-6113c87f",
+ "Type": "ipsec.1",
+ "Options": {
+ "StaticRoutesOnly": true
+ }
+ }
+ ],
+ "ResponseMetadata": {
+ "RetryAttempts": 0,
+ "HTTPStatusCode": 200,
+ "RequestId": "1303865c-0809-450a-8058-fc12a9dc5294",
+ "HTTPHeaders": {
+ "transfer-encoding": "chunked",
+ "vary": "Accept-Encoding",
+ "server": "AmazonEC2",
+ "content-type": "text/xml;charset=UTF-8",
+ "date": "Mon, 12 Jun 2017 20:23:22 GMT"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py b/test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py
new file mode 100644
index 0000000000..87cd8e7011
--- /dev/null
+++ b/test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py
@@ -0,0 +1,358 @@
+# (c) 2017 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see .
+
+import pytest
+import os
+from . placebo_fixtures import placeboify, maybe_sleep
+from ansible.modules.cloud.amazon import ec2_vpc_vpn
+from ansible.module_utils._text import to_text
+from ansible.module_utils.ec2 import get_aws_connection_info, boto3_conn, boto3_tag_list_to_ansible_dict
+
+
+class FakeModule(object):
+ def __init__(self, **kwargs):
+ self.params = kwargs
+
+ def fail_json(self, *args, **kwargs):
+ self.exit_args = args
+ self.exit_kwargs = kwargs
+ raise Exception('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')
+ m = FakeModule(**params)
+ return m, conn
+
+
+def make_params(cgw, vgw, tags={}, filters={}, 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}
+
+
+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']
+ check_mode = module.params['check_mode']
+ 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)
+
+
+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)
+ _, vpn2 = ec2_vpc_vpn.ensure_present(conn2, m2.params)
+
+ # reset the parameters so only filtering by tags will occur
+ m.params = {'filters': {'tags': {'Correct': 'Tag'}}}
+
+ # assert that multiple matching connections have been found
+ with pytest.raises(Exception) as error_message:
+ ec2_vpc_vpn.find_connection(conn, m.params)
+ assert error_message == "More than one matching VPN connection was found.To modify or delete a VPN please specify vpn_connection_id or add filters."
+
+ # 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'])
+ with pytest.raises(Exception) as error_message:
+ ec2_vpc_vpn.ensure_present(conn, m.params)
+ assert error_message == "There is no VPN connection available or pending with that id. Did you delete it?"
+
+
+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'}}}
+ 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")
+
+ err = 'You cannot modify vpn_gateway_id, the current value of which is {0}. Modifiable VPN connection attributes are tags.'.format(current_vgw)
+ with pytest.raises(Exception) as error_message:
+ ec2_vpc_vpn.check_for_update(m, conn, vpn['VpnConnectionId'])
+ assert error_message == err
+
+ # 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'])
+
+
+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)
+
+ results.append({'module': m, 'connection': conn, 'vpn': vpn, 'params': params})
+ if number_of_results == 1:
+ return results[0]
+ else:
+ return results[0], results[1]