diff options
Diffstat (limited to 'collections-debian-merged/ansible_collections/community/aws/tests')
1024 files changed, 73990 insertions, 0 deletions
diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/.gitignore b/collections-debian-merged/ansible_collections/community/aws/tests/.gitignore new file mode 100644 index 00000000..e17f1f38 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/.gitignore @@ -0,0 +1,3 @@ +output/ +integration/cloud-config-aws.ini +integration/cloud-config-aws.yml diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/constraints.txt b/collections-debian-merged/ansible_collections/community/aws/tests/integration/constraints.txt new file mode 100644 index 00000000..c105f290 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/constraints.txt @@ -0,0 +1,3 @@ +boto3 >= 1.9.250, <= 1.15.18 # minimum version that supports botocore 1.13.3, max that will work with ansible 2.9's other constraints +botocore<1.19.0,>=1.13.3 # adds support for ECR image scanning + diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/requirements.txt b/collections-debian-merged/ansible_collections/community/aws/tests/integration/requirements.txt new file mode 100644 index 00000000..2fb8f547 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/requirements.txt @@ -0,0 +1,5 @@ +# netaddr is needed for ansible.netcommon.ipv6 +netaddr +virtualenv +boto3 +botocore diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/aliases new file mode 100644 index 00000000..c5a973f8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/aliases @@ -0,0 +1,4 @@ +cloud/aws +aws_acm_info +shippable/aws/group2 +unstable diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/defaults/main.yml new file mode 100644 index 00000000..5d3648f8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/defaults/main.yml @@ -0,0 +1,40 @@ +--- +# we'll generate 3 certificates locally for the test +# Upload the first +# overwrite it with the second +# and the third is unrelated, to check we only get info about the first when we want +local_certs: + - priv_key: "{{ remote_tmp_dir }}/private-1.pem" + cert: "{{ remote_tmp_dir }}/public-1.pem" + csr: "{{ remote_tmp_dir }}/csr-1.csr" + domain: "acm1.{{ aws_acm_test_uuid }}.ansible.com" + name: "{{ resource_prefix }}_{{ aws_acm_test_uuid }}_1" + + - priv_key: "{{ remote_tmp_dir }}/private-2.pem" + cert: "{{ remote_tmp_dir }}/public-2.pem" + csr: "{{ remote_tmp_dir }}/csr-2.csr" + domain: "acm2.{{ aws_acm_test_uuid }}.ansible.com" + name: "{{ resource_prefix }}_{{ aws_acm_test_uuid }}_2" + + - priv_key: "{{ remote_tmp_dir }}/private-3.pem" + cert: "{{ remote_tmp_dir }}/public-3.pem" + csr: "{{ remote_tmp_dir }}/csr-3.csr" + domain: "acm3.{{ aws_acm_test_uuid }}.ansible.com" + name: "{{ resource_prefix }}_{{ aws_acm_test_uuid }}_3" + +# we'll have one private key +# make 2 chains using it +# so we can test what happens when you change just the chain +# not the domain or key +chained_cert: + priv_key: "{{ remote_tmp_dir }}/private-ch-0.pem" + domain: "acm-ch.{{ aws_acm_test_uuid }}.ansible.com" + name: "{{ resource_prefix }}_{{ aws_acm_test_uuid }}_4" + chains: + - cert: "{{ remote_tmp_dir }}/public-ch-0.pem" + csr: "{{ remote_tmp_dir }}/csr-ch-0.csr" + ca: 0 # index into local_certs + - cert: "{{ remote_tmp_dir }}/public-ch-1.pem" + csr: "{{ remote_tmp_dir }}/csr-ch-1.csr" + ca: 1 # index into local_certs +
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/meta/main.yml new file mode 100644 index 00000000..1810d4be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_remote_tmp_dir diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/tasks/full_acm_test.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/tasks/full_acm_test.yml new file mode 100644 index 00000000..88c24356 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/tasks/full_acm_test.yml @@ -0,0 +1,401 @@ +- name: AWS ACM integration test + module_defaults: + group/aws: + aws_region: '{{ aws_region }}' + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + block: + - name: list certs + aws_acm_info: null + register: list_all + failed_when: list_all.certificates is not defined + - name: ensure absent cert which doesn't exist - first time + aws_acm: + name_tag: '{{ item.name }}' + state: absent + with_items: '{{ local_certs }}' + - name: ensure absent cert which doesn't exist - second time + aws_acm: + name_tag: '{{ item.name }}' + state: absent + with_items: '{{ local_certs }}' + register: absent_start_two + failed_when: absent_start_two.changed + - name: list cert which shouldn't exist + aws_acm_info: + tags: + Name: '{{ item.name }}' + register: list_tag + with_items: '{{ local_certs }}' + failed_when: list_tag.certificates | length > 0 + - name: check directory was made + assert: + that: + - remote_tmp_dir is defined + - name: Generate private key for local certs + with_items: '{{ local_certs }}' + community.crypto.openssl_privatekey: + path: '{{ item.priv_key }}' + type: RSA + size: 2048 + - name: Generate an OpenSSL Certificate Signing Request for own certs + with_items: '{{ local_certs }}' + community.crypto.openssl_csr: + path: '{{ item.csr }}' + privatekey_path: '{{ item.priv_key }}' + common_name: '{{ item.domain }}' + - name: Generate a Self Signed OpenSSL certificate for own certs + with_items: '{{ local_certs }}' + community.crypto.openssl_certificate: + provider: selfsigned + path: '{{ item.cert }}' + csr_path: '{{ item.csr }}' + privatekey_path: '{{ item.priv_key }}' + signature_algorithms: + - sha256WithRSAEncryption + - name: upload certificates first time + aws_acm: + name_tag: '{{ item.name }}' + certificate: '{{ lookup(''file'', item.cert ) }}' + private_key: '{{ lookup(''file'', item.priv_key ) }}' + state: present + register: upload + with_items: '{{ local_certs }}' + until: upload is succeeded + retries: 5 + delay: 10 + - assert: + that: + - prev_task.certificate.arn is defined + - ('arn:aws:acm:123' | regex_search( 'arn:aws:acm:' )) is defined + - (prev_task.certificate.arn | regex_search( 'arn:aws:acm:' )) is defined + - prev_task.certificate.domain_name == original_cert.domain + - prev_task.changed + with_items: '{{ upload.results }}' + vars: + original_cert: '{{ item.item }}' + prev_task: '{{ item }}' + - name: fetch data about cert just uploaded, by ARN + aws_acm_info: + certificate_arn: '{{ item.certificate.arn }}' + register: fetch_after_up + with_items: '{{ upload.results }}' + - name: check output of prior task (fetch data about cert just uploaded, by ARN) + assert: + that: + - fetch_after_up_result.certificates | length == 1 + - fetch_after_up_result.certificates[0].certificate_arn == upload_result.certificate.arn + - fetch_after_up_result.certificates[0].domain_name == original_cert.domain + - (fetch_after_up_result.certificates[0].certificate | replace( ' ', '' ) | replace( '\n', '')) == (lookup( 'file', original_cert.cert ) | replace( ' ', '' ) | replace( '\n', '' )) + - '''Name'' in fetch_after_up_result.certificates[0].tags' + - fetch_after_up_result.certificates[0].tags['Name'] == original_cert.name + with_items: '{{ fetch_after_up.results }}' + vars: + fetch_after_up_result: '{{ item }}' + upload_result: '{{ item.item }}' + original_cert: '{{ item.item.item }}' + - name: fetch data about cert just uploaded, by name + aws_acm_info: + tags: + Name: '{{ original_cert.name }}' + register: fetch_after_up_name + with_items: '{{ upload.results }}' + vars: + upload_result: '{{ item }}' + original_cert: '{{ item.item }}' + - name: check fetched data of cert we just uploaded + assert: + that: + - fetch_after_up_name_result.certificates | length == 1 + - fetch_after_up_name_result.certificates[0].certificate_arn == upload_result.certificate.arn + - fetch_after_up_name_result.certificates[0].domain_name == original_cert.domain + - (fetch_after_up_name_result.certificates[0].certificate | replace( ' ', '' ) | replace( '\n', '')) == (lookup('file', original_cert.cert ) | replace( ' ', '' ) | replace( '\n', '')) + - '''Name'' in fetch_after_up_name_result.certificates[0].tags' + - fetch_after_up_name_result.certificates[0].tags['Name'] == original_cert.name + with_items: '{{ fetch_after_up_name.results }}' + vars: + fetch_after_up_name_result: '{{ item }}' + upload_result: '{{ item.item }}' + original_cert: '{{ item.item.item }}' + - name: fetch data about cert just uploaded, by domain name + aws_acm_info: + domain_name: '{{ original_cert.domain }}' + register: fetch_after_up_domain + with_items: '{{ upload.results }}' + vars: + original_cert: '{{ item.item }}' + - name: compare fetched data of cert just uploaded to upload task + assert: + that: + - fetch_after_up_domain_result.certificates | length == 1 + - fetch_after_up_domain_result.certificates[0].certificate_arn == upload_result.certificate.arn + - fetch_after_up_domain_result.certificates[0].domain_name == original_cert.domain + - (fetch_after_up_domain_result.certificates[0].certificate | replace( ' ', '' ) | replace( '\n', '')) == (lookup('file', original_cert.cert ) | replace( ' ', '' ) | replace( '\n', '')) + - '''Name'' in fetch_after_up_domain_result.certificates[0].tags' + - fetch_after_up_domain_result.certificates[0].tags['Name'] == original_cert.name + with_items: '{{ fetch_after_up_domain.results }}' + vars: + fetch_after_up_domain_result: '{{ item }}' + upload_result: '{{ item.item }}' + original_cert: '{{ item.item.item }}' + - name: upload certificates again, check not changed + aws_acm: + name_tag: '{{ item.name }}' + certificate: '{{ lookup(''file'', item.cert ) }}' + private_key: '{{ lookup(''file'', item.priv_key ) }}' + state: present + register: upload2 + with_items: '{{ local_certs }}' + failed_when: upload2.changed + - name: update first cert with body of the second, first time + aws_acm: + state: present + name_tag: '{{ local_certs[0].name }}' + certificate: '{{ lookup(''file'', local_certs[1].cert ) }}' + private_key: '{{ lookup(''file'', local_certs[1].priv_key ) }}' + register: overwrite + - name: check output of previous task (update first cert with body of the second, first time) + assert: + that: + - overwrite.certificate.arn is defined + - overwrite.certificate.arn | regex_search( 'arn:aws:acm:' ) is defined + - overwrite.certificate.arn == upload.results[0].certificate.arn + - overwrite.certificate.domain_name == local_certs[1].domain + - overwrite.changed + - name: check update was sucessfull + aws_acm_info: + tags: + Name: '{{ local_certs[0].name }}' + register: fetch_after_overwrite + - name: check output of update fetch + assert: + that: + - fetch_after_overwrite.certificates | length == 1 + - fetch_after_overwrite.certificates[0].certificate_arn == fetch_after_up.results[0].certificates[0].certificate_arn + - fetch_after_overwrite.certificates[0].domain_name == local_certs[1].domain + - (fetch_after_overwrite.certificates[0].certificate | replace( ' ', '' ) | replace( '\n', '')) == (lookup('file', local_certs[1].cert )| replace( ' ', '' ) | replace( '\n', '')) + - '''Name'' in fetch_after_overwrite.certificates[0].tags' + - fetch_after_overwrite.certificates[0].tags['Name'] == local_certs[0].name + - name: fetch other cert + aws_acm_info: + tags: + Name: '{{ local_certs[1].name }}' + register: check_after_overwrite + - name: check other cert unaffected + assert: + that: + - check_after_overwrite.certificates | length == 1 + - check_after_overwrite.certificates[0].certificate_arn == fetch_after_up.results[1].certificates[0].certificate_arn + - check_after_overwrite.certificates[0].domain_name == local_certs[1].domain + - (check_after_overwrite.certificates[0].certificate | replace( ' ', '' ) | replace( '\n', '')) == (lookup('file', local_certs[1].cert ) | replace( ' ', '' ) | replace( '\n', '')) + - '''Name'' in check_after_overwrite.certificates[0].tags' + - check_after_overwrite.certificates[0].tags['Name'] == local_certs[1].name + - name: update first cert with body of the second again + aws_acm: + state: present + name_tag: '{{ local_certs[0].name }}' + certificate: '{{ lookup(''file'', local_certs[1].cert ) }}' + private_key: '{{ lookup(''file'', local_certs[1].priv_key ) }}' + register: overwrite2 + - name: check output of previous task (update first cert with body of the second again) + assert: + that: + - overwrite2.certificate.arn is defined + - overwrite2.certificate.arn | regex_search( 'arn:aws:acm:' ) is defined + - overwrite2.certificate.arn == upload.results[0].certificate.arn + - overwrite2.certificate.domain_name == local_certs[1].domain + - not overwrite2.changed + - name: delete certs 1 and 2 + aws_acm: + state: absent + domain_name: '{{ local_certs[1].domain }}' + register: delete_both + - name: test prev task + assert: + that: + - delete_both.arns is defined + - check_after_overwrite.certificates[0].certificate_arn in delete_both.arns + - upload.results[0].certificate.arn in delete_both.arns + - delete_both.changed + - name: fetch info for certs 1 and 2 + aws_acm_info: + tags: + Name: '{{ local_certs[item].name }}' + register: check_del_one + with_items: + - 0 + - 1 + retries: 2 + until: + - check_del_one is not failed + - check_del_one.certificates | length == 0 + delay: 10 + - name: check certs 1 and 2 were already deleted + with_items: '{{ check_del_one.results }}' + assert: + that: item.certificates | length == 0 + - name: check cert 3 not deleted + aws_acm_info: + tags: + Name: '{{ local_certs[2].name }}' + register: check_del_one_remain + failed_when: check_del_one_remain.certificates | length != 1 + - name: delete cert 3 + aws_acm: + state: absent + domain_name: '{{ local_certs[2].domain }}' + register: delete_third + - name: check cert 3 deletion went as expected + assert: + that: + - delete_third.arns is defined + - delete_third.arns | length == 1 + - delete_third.arns[0] == upload.results[2].certificate.arn + - delete_third.changed + - name: check cert 3 was deleted + aws_acm_info: + tags: + Name: '{{ local_certs[2].name }}' + register: check_del_three + failed_when: check_del_three.certificates | length != 0 + - name: delete cert 3 again + aws_acm: + state: absent + domain_name: '{{ local_certs[2].domain }}' + register: delete_third + - name: check deletion of cert 3 not changed, because already deleted + assert: + that: + - delete_third.arns is defined + - delete_third.arns | length == 0 + - not delete_third.changed + - name: check directory was made + assert: + that: + - remote_tmp_dir is defined + - name: Generate private key for cert to be chained + community.crypto.openssl_privatekey: + path: '{{ chained_cert.priv_key }}' + type: RSA + size: 2048 + - name: Generate two OpenSSL Certificate Signing Requests for cert to be chained + with_items: '{{ chained_cert.chains }}' + community.crypto.openssl_csr: + path: '{{ item.csr }}' + privatekey_path: '{{ chained_cert.priv_key }}' + common_name: '{{ chained_cert.domain }}' + - name: Sign new certs with cert 0 and 1 + with_items: '{{ chained_cert.chains }}' + community.crypto.openssl_certificate: + provider: ownca + path: '{{ item.cert }}' + csr_path: '{{ item.csr }}' + ownca_path: '{{ local_certs[item.ca].cert }}' + ownca_privatekey_path: '{{ local_certs[item.ca].priv_key }}' + signature_algorithms: + - sha256WithRSAEncryption + - name: check files exist (for next task) + file: + path: '{{ item }}' + state: file + with_items: + - '{{ local_certs[chained_cert.chains[0].ca].cert }}' + - '{{ local_certs[chained_cert.chains[1].ca].cert }}' + - '{{ chained_cert.chains[0].cert }}' + - '{{ chained_cert.chains[1].cert }}' + - name: Find chains + with_items: '{{ chained_cert.chains }}' + register: chains + community.crypto.certificate_complete_chain: + input_chain: '{{ lookup(''file'', item.cert ) }}' + root_certificates: + - '{{ local_certs[item.ca].cert }}' + - name: upload chained cert, first chain, first time + aws_acm: + name_tag: '{{ chained_cert.name }}' + certificate: '{{ lookup(''file'', chained_cert.chains[0].cert ) }}' + certificate_chain: '{{ chains.results[0].complete_chain | join('' + + '') }}' + private_key: '{{ lookup(''file'', chained_cert.priv_key ) }}' + state: present + register: upload_chain + failed_when: not upload_chain.changed + - name: fetch chain of cert we just uploaded + aws_acm_info: + tags: + Name: '{{ chained_cert.name }}' + register: check_chain + - name: check chain of cert we just uploaded + assert: + that: + - (check_chain.certificates[0].certificate_chain | replace( ' ', '' ) | replace( '\n', '')) == ( chains.results[0].complete_chain | join( '\n' ) | replace( ' ', '' ) | replace( '\n', '') ) + - (check_chain.certificates[0].certificate | replace( ' ', '' ) | replace( '\n', '')) == ( lookup('file', chained_cert.chains[0].cert ) | replace( ' ', '' ) | replace( '\n', '') ) + - name: upload chained cert again, check not changed + aws_acm: + name_tag: '{{ chained_cert.name }}' + certificate: '{{ lookup(''file'', chained_cert.chains[0].cert ) }}' + certificate_chain: '{{ chains.results[0].complete_chain | join('' + + '') }}' + private_key: '{{ lookup(''file'', chained_cert.priv_key ) }}' + state: present + register: upload_chain_2 + - name: check previous task not changed + assert: + that: + - upload_chain_2.certificate.arn == upload_chain.certificate.arn + - not upload_chain_2.changed + - name: upload chained cert, different chain + aws_acm: + name_tag: '{{ chained_cert.name }}' + certificate: '{{ lookup(''file'', chained_cert.chains[1].cert ) }}' + certificate_chain: '{{ chains.results[1].complete_chain | join('' + + '') }}' + private_key: '{{ lookup(''file'', chained_cert.priv_key ) }}' + state: present + register: upload_chain_3 + - name: check uploading with different chain is changed + assert: + that: + - upload_chain_3.changed + - upload_chain_3.certificate.arn == upload_chain.certificate.arn + - name: fetch info about chain of cert we just updated + aws_acm_info: + tags: + Name: '{{ chained_cert.name }}' + register: check_chain_2 + - name: check chain of cert we just uploaded + assert: + that: + - (check_chain_2.certificates[0].certificate_chain | replace( ' ', '' ) | replace( '\n', '')) == ( chains.results[1].complete_chain | join( '\n' ) | replace( ' ', '' ) | replace( '\n', '') ) + - (check_chain_2.certificates[0].certificate | replace( ' ', '' ) | replace( '\n', '')) == ( lookup('file', chained_cert.chains[1].cert ) | replace( ' ', '' ) | replace( '\n', '') ) + - name: delete chained cert + aws_acm: + name_tag: '{{ chained_cert.name }}' + state: absent + register: delete_chain_3 + - name: check deletion of chained cert 3 is changed + assert: + that: + - delete_chain_3.changed + - upload_chain.certificate.arn in delete_chain_3.arns + always: + - name: delete first bunch of certificates + aws_acm: + name_tag: '{{ item.name }}' + state: absent + with_items: '{{ local_certs }}' + ignore_errors: true + - name: delete chained cert + aws_acm: + state: absent + name_tag: '{{ chained_cert.name }}' + ignore_errors: true + - name: deleting local directory with test artefacts + file: + path: '{{ remote_tmp_dir }}' + state: directory + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/tasks/main.yml new file mode 100644 index 00000000..cec5e92f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_acm/tasks/main.yml @@ -0,0 +1,39 @@ +- name: AWS ACM integration test virtualenv wrapper + block: + - set_fact: + virtualenv: "{{ remote_tmp_dir }}/virtualenv" + virtualenv_command: "{{ ansible_python_interpreter }} -m virtualenv" + + - set_fact: + virtualenv_interpreter: "{{ virtualenv }}/bin/python" + + # The CI runs many of these tests in parallel + # Use this random ID to differentiate which resources + # are from which test + - set_fact: + aws_acm_test_uuid: "{{ (10**9) | random }}" + + - pip: + name: virtualenv + + - pip: + name: + - 'botocore<1.13.0,>=1.12.211' + - boto3 + - coverage<5 + - jinja2 + - pyyaml + - 'pyopenssl>=0.15' + - 'cryptography>=1.6' + virtualenv: "{{ virtualenv }}" + virtualenv_command: "{{ virtualenv_command }}" + virtualenv_site_packages: no + + - include_tasks: full_acm_test.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + + always: + - file: + path: "{{ virtualenv }}" + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/tasks/main.yml new file mode 100644 index 00000000..5c6047c3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/tasks/main.yml @@ -0,0 +1,207 @@ +- block: + + # ====================== testing failure cases: ================================== + + - name: test with no parameters + aws_api_gateway: + register: result + ignore_errors: true + + - name: assert failure when called with no parameters + assert: + that: + - 'result.failed' + - 'result.msg.startswith("The aws_api_gateway module requires a region")' + + - name: test with minimal parameters but no region + aws_api_gateway: + api_id: 'fake-api-doesnt-exist' + register: result + ignore_errors: true + + - name: assert failure when called with with minimal parameters but no region + assert: + that: + - 'result.failed' + - 'result.msg.startswith("The aws_api_gateway module requires a region")' + + - name: test for disallowing multiple swagger sources + aws_api_gateway: + api_id: 'fake-api-doesnt-exist' + region: '{{ec2_region}}' + swagger_file: foo.yml + swagger_text: "this is not really an API" + register: result + ignore_errors: true + + - name: assert failure when called with with minimal parameters but no region + assert: + that: + - 'result.failed' + - 'result.msg.startswith("parameters are mutually exclusive")' + + + # ====================== regular testing: =================================== + + - name: build API file + template: + src: minimal-swagger-api.yml.j2 + dest: "{{output_dir}}/minimal-swagger-api.yml" + + - name: deploy new API + aws_api_gateway: + api_file: "{{output_dir}}/minimal-swagger-api.yml" + stage: "minimal" + endpoint_type: 'REGIONAL' + state: present + region: '{{ec2_region}}' + aws_access_key: '{{ec2_access_key}}' + aws_secret_key: '{{ec2_secret_key}}' + security_token: '{{security_token}}' + register: create_result + + - name: assert deploy new API worked + assert: + that: + - 'create_result.changed == True' + - 'create_result.failed == False' + - 'create_result.deploy_response.description == "Automatic deployment by Ansible."' + - 'create_result.configure_response.id == create_result.api_id' + - '"apigateway:CreateRestApi" in create_result.resource_actions' + - 'create_result.configure_response.endpoint_configuration.types.0 == "REGIONAL"' + + - name: check if API endpoint works + uri: url="https://{{create_result.api_id}}.execute-api.{{ec2_region}}.amazonaws.com/minimal" + register: uri_result + + - name: assert API works success + assert: + that: + - 'uri_result.status == 200' + + - name: check if nonexistent endpoint causes error + uri: url="https://{{create_result.api_id}}.execute-api.{{ec2_region}}.amazonaws.com/nominal" + register: bad_uri_result + ignore_errors: true + + - name: assert + assert: + that: + - bad_uri_result is failed + + - name: Update API to test params effect + aws_api_gateway: + api_id: '{{create_result.api_id}}' + api_file: "{{output_dir}}/minimal-swagger-api.yml" + cache_enabled: true + cache_size: '1.6' + tracing_enabled: true + state: present + region: '{{ec2_region}}' + aws_access_key: '{{ec2_access_key}}' + aws_secret_key: '{{ec2_secret_key}}' + security_token: '{{security_token}}' + register: update_result + + - name: assert update result + assert: + that: + - 'update_result.changed == True' + - 'update_result.failed == False' + - '"apigateway:PutRestApi" in update_result.resource_actions' + + # ==== additional create/delete tests ==== + + - name: deploy first API + aws_api_gateway: + api_file: "{{output_dir}}/minimal-swagger-api.yml" + stage: "minimal" + cache_enabled: false + state: present + region: '{{ec2_region}}' + aws_access_key: '{{ec2_access_key}}' + aws_secret_key: '{{ec2_secret_key}}' + security_token: '{{security_token}}' + register: create_result_1 + + - name: deploy second API rapidly after first + aws_api_gateway: + api_file: "{{output_dir}}/minimal-swagger-api.yml" + stage: "minimal" + state: present + region: '{{ec2_region}}' + aws_access_key: '{{ec2_access_key}}' + aws_secret_key: '{{ec2_secret_key}}' + security_token: '{{security_token}}' + register: create_result_2 + + - name: assert both APIs deployed successfully + assert: + that: + - 'create_result_1.changed == True' + - 'create_result_2.changed == True' + - '"api_id" in create_result_1' + - '"api_id" in create_result_1' + - 'create_result_1.configure_response.endpoint_configuration.types.0 == "EDGE"' + + - name: destroy first API + aws_api_gateway: + state: absent + api_id: '{{create_result_1.api_id}}' + region: '{{ec2_region}}' + aws_access_key: '{{ec2_access_key}}' + aws_secret_key: '{{ec2_secret_key}}' + security_token: '{{security_token}}' + register: destroy_result_1 + + - name: destroy second API rapidly after first + aws_api_gateway: + state: absent + api_id: '{{create_result_2.api_id}}' + region: '{{ec2_region}}' + aws_access_key: '{{ec2_access_key}}' + aws_secret_key: '{{ec2_secret_key}}' + security_token: '{{security_token}}' + register: destroy_result_2 + + - name: assert both APIs deployed successfully + assert: + that: + - 'destroy_result_1.changed == True' + - 'destroy_result_2.changed == True' + - '"apigateway:DeleteRestApi" in destroy_result_1.resource_actions' + - '"apigateway:DeleteRestApi" in destroy_result_2.resource_actions' + + # ================= end testing ==================================== + + always: + + - name: Ensure cleanup of API deploy + aws_api_gateway: + state: absent + api_id: '{{create_result.api_id}}' + ec2_region: '{{ec2_region}}' + aws_access_key: '{{ec2_access_key}}' + aws_secret_key: '{{ec2_secret_key}}' + security_token: '{{security_token}}' + ignore_errors: true + + - name: Ensure cleanup of API deploy 1 + aws_api_gateway: + state: absent + api_id: '{{create_result_1.api_id}}' + ec2_region: '{{ec2_region}}' + aws_access_key: '{{ec2_access_key}}' + aws_secret_key: '{{ec2_secret_key}}' + security_token: '{{security_token}}' + ignore_errors: true + + - name: Ensure cleanup of API deploy 2 + aws_api_gateway: + state: absent + api_id: '{{create_result_2.api_id}}' + ec2_region: '{{ec2_region}}' + aws_access_key: '{{ec2_access_key}}' + aws_secret_key: '{{ec2_secret_key}}' + security_token: '{{security_token}}' + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/templates/minimal-swagger-api.yml.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/templates/minimal-swagger-api.yml.j2 new file mode 100644 index 00000000..8c5c0581 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_api_gateway/templates/minimal-swagger-api.yml.j2 @@ -0,0 +1,33 @@ +--- +swagger: "2.0" +info: + version: "2017-05-11T12:14:59Z" + title: "{{resource_prefix}}Empty_API" +host: "fakeexample.execute-api.us-east-1.amazonaws.com" +basePath: "/minimal" +schemes: +- "https" +paths: + /: + get: + consumes: + - "application/json" + produces: + - "application/json" + responses: + 200: + description: "200 response" + schema: + $ref: "#/definitions/Empty" + x-amazon-apigateway-integration: + responses: + default: + statusCode: "200" + requestTemplates: + application/json: "{\"statusCode\": 200}" + passthroughBehavior: "when_no_match" + type: "mock" +definitions: + Empty: + type: "object" + title: "Empty Schema" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/aliases new file mode 100644 index 00000000..a112c3d1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group1 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/defaults/main.yml new file mode 100644 index 00000000..a36eb3de --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/defaults/main.yml @@ -0,0 +1,10 @@ +--- +# defaults file for aws_codebuild + +# IAM role names have to be less than 64 characters +# The 8 digit identifier at the end of resource_prefix helps determine during +# which test something was created and allows tests to be run in parallel +# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases +# we need both sets of digits to keep the resource name unique +unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +iam_role_name: "ansible-test-sts-{{ unique_id }}-codebuild-service-role" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/files/codebuild_iam_trust_policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/files/codebuild_iam_trust_policy.json new file mode 100644 index 00000000..3af7c641 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/files/codebuild_iam_trust_policy.json @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "codebuild.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/tasks/main.yml new file mode 100644 index 00000000..2e4a622e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/tasks/main.yml @@ -0,0 +1,122 @@ +--- +# tasks file for aws_codebuild + +- name: Run aws_codebuild integration tests. + + collections: + - amazon.aws + + block: + + # ==================== preparations ======================================== + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: create IAM role needed for CodeBuild + iam_role: + name: "{{ iam_role_name }}" + description: Role with permissions for CodeBuild actions. + assume_role_policy_document: "{{ lookup('file', 'codebuild_iam_trust_policy.json') }}" + state: present + <<: *aws_connection_info + register: codebuild_iam_role + + - name: Set variable with aws account id + set_fact: + aws_account_id: "{{ codebuild_iam_role.iam_role.arn.split(':')[4] }}" + + # ================== integration test ========================================== + + - name: create CodeBuild project + aws_codebuild: + name: "{{ resource_prefix }}-test-ansible-codebuild" + description: Build project for testing the Ansible aws_codebuild module + service_role: "{{ codebuild_iam_role.iam_role.arn }}" + timeout_in_minutes: 30 + source: + type: CODEPIPELINE + buildspec: '' + artifacts: + namespace_type: NONE + packaging: NONE + type: CODEPIPELINE + name: test + environment: + compute_type: BUILD_GENERAL1_SMALL + privileged_mode: true + image: 'aws/codebuild/docker:17.09.0' + type: LINUX_CONTAINER + environment_variables: + - { name: 'FOO_ENV', value: 'other' } + tags: + - { key: 'purpose', value: 'ansible-test' } + state: present + <<: *aws_connection_info + register: output + retries: 10 + delay: 5 + until: output is success + + - assert: + that: + - "output.project.description == 'Build project for testing the Ansible aws_codebuild module'" + + - name: idempotence check rerunning same Codebuild task + aws_codebuild: + name: "{{ resource_prefix }}-test-ansible-codebuild" + description: Build project for testing the Ansible aws_codebuild module + service_role: "{{ codebuild_iam_role.iam_role.arn }}" + timeout_in_minutes: 30 + source: + type: CODEPIPELINE + buildspec: '' + artifacts: + namespace_type: NONE + packaging: NONE + type: CODEPIPELINE + name: test + encryption_key: 'arn:aws:kms:{{ aws_region }}:{{ aws_account_id }}:alias/aws/s3' + environment: + compute_type: BUILD_GENERAL1_SMALL + privileged_mode: true + image: 'aws/codebuild/docker:17.09.0' + type: LINUX_CONTAINER + environment_variables: + - { name: 'FOO_ENV', value: 'other' } + tags: + - { key: 'purpose', value: 'ansible-test' } + state: present + <<: *aws_connection_info + register: rerun_test_output + + - assert: + that: + - "rerun_test_output.project.created == output.project.created" + + - name: delete CodeBuild project + aws_codebuild: + name: "{{ output.project.name }}" + source: + type: CODEPIPELINE + buildspec: '' + artifacts: {} + state: absent + <<: *aws_connection_info + async: 300 + + # ============================== cleanup ====================================== + + always: + + - name: cleanup IAM role created for CodeBuild test + iam_role: + name: "{{ iam_role_name }}" + state: absent + <<: *aws_connection_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/vars/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/vars/main.yml new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codebuild/vars/main.yml diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codecommit/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codecommit/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codecommit/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codecommit/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codecommit/tasks/main.yml new file mode 100644 index 00000000..acf194e1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codecommit/tasks/main.yml @@ -0,0 +1,134 @@ +--- +- module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + block: + # ============================================================ + - name: Create a repository (CHECK MODE) + aws_codecommit: + name: "{{ resource_prefix }}_repo" + description: original comment + state: present + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: Create a repository + aws_codecommit: + name: "{{ resource_prefix }}_repo" + description: original comment + state: present + register: output + - assert: + that: + - output is changed + - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_description == 'original comment' + + - name: No-op update to repository + aws_codecommit: + name: "{{ resource_prefix }}_repo" + description: original comment + state: present + register: output + - assert: + that: + - output is not changed + - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_description == 'original comment' + + - name: Update repository description (CHECK MODE) + aws_codecommit: + name: "{{ resource_prefix }}_repo" + description: new comment + state: present + register: output + check_mode: yes + - assert: + that: + - output is changed + - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_description == 'original comment' + + - name: Update repository description + aws_codecommit: + name: "{{ resource_prefix }}_repo" + description: new comment + state: present + register: output + - assert: + that: + - output is changed + - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_description == 'new comment' + + # ============================================================ + - name: Delete a repository (CHECK MODE) + aws_codecommit: + name: "{{ resource_prefix }}_repo" + state: absent + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: Delete a repository + aws_codecommit: + name: "{{ resource_prefix }}_repo" + state: absent + register: output + - assert: + that: + - output is changed + + - name: Delete a non-existent repository + aws_codecommit: + name: "{{ resource_prefix }}_repo" + state: absent + register: output + - assert: + that: + - output is not changed + + - name: Create a repository without description + aws_codecommit: + name: "{{ resource_prefix }}_repo" + state: present + register: output + - assert: + that: + - output is changed + - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + + - name: No-op update to repository without description + aws_codecommit: + name: "{{ resource_prefix }}_repo" + state: present + register: output + - assert: + that: + - output is not changed + - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + + - name: Delete a repository without description + aws_codecommit: + name: "{{ resource_prefix }}_repo" + state: absent + register: output + - assert: + that: + - output is changed + + always: + ###### TEARDOWN STARTS HERE ###### + - name: Delete a repository + aws_codecommit: + name: "{{ resource_prefix }}_repo" + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/aliases new file mode 100644 index 00000000..a112c3d1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group1 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/defaults/main.yml new file mode 100644 index 00000000..5f735ba6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/defaults/main.yml @@ -0,0 +1,12 @@ +--- +# defaults file for aws_codepipeline + +codepipeline_name: "{{ resource_prefix }}-test-codepipeline" + +# IAM role names have to be less than 64 characters +# The 8 digit identifier at the end of resource_prefix helps determine during +# which test something was created and allows tests to be run in parallel +# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases +# we need both sets of digits to keep the resource name unique +unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +codepipeline_service_role_name: "ansible-test-sts-{{ unique_id }}-codepipeline-role" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/files/codepipeline_iam_trust_policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/files/codepipeline_iam_trust_policy.json new file mode 100644 index 00000000..9be3f72b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/files/codepipeline_iam_trust_policy.json @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "codepipeline.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/tasks/main.yml new file mode 100644 index 00000000..f5fe7b41 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_codepipeline/tasks/main.yml @@ -0,0 +1,156 @@ +--- +# tasks file for aws_codepipeline + +- name: Run aws_codebuild module integration tests + + block: + + # ==================== preparaions ======================================== + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: create IAM role needed for CodePipeline test + iam_role: + name: "{{ codepipeline_service_role_name }}" + description: Role with permissions for CodePipeline actions. + assume_role_policy_document: "{{ lookup('file', 'codepipeline_iam_trust_policy.json') }}" + state: present + <<: *aws_connection_info + register: codepipeline_iam_role + + # ================== integration test ========================================== + + - name: create CodePipeline + aws_codepipeline: + name: "{{ codepipeline_name }}" + role_arn: "{{ codepipeline_iam_role.iam_role.arn }}" + artifact_store: + type: S3 + location: foo + stages: + - name: step_1 + actions: + - name: action + actionTypeId: + category: Source + owner: AWS + provider: S3 + version: '1' + configuration: + S3Bucket: foo + S3ObjectKey: bar + outputArtifacts: + - { name: step_one_output } + - name: step_2 + actions: + - name: action + actionTypeId: + category: Build + owner: AWS + provider: CodeBuild + version: '1' + inputArtifacts: + - { name: step_one_output } + outputArtifacts: + - { name: step_two_output } + configuration: + ProjectName: foo + state: present + <<: *aws_connection_info + register: output + retries: 10 + delay: 5 + until: output is success + + - assert: + that: + - output.changed == True + - output.pipeline.name == "{{ codepipeline_name }}" + - output.pipeline.stages|length > 1 + + - name: idempotence check rerunning same CodePipeline task + aws_codepipeline: + name: "{{ codepipeline_name }}" + role_arn: "{{ codepipeline_iam_role.iam_role.arn }}" + artifact_store: + type: S3 + location: foo + stages: + - name: step_1 + actions: + - name: action + actionTypeId: + category: Source + owner: AWS + provider: S3 + version: '1' + configuration: + S3Bucket: foo + S3ObjectKey: bar + outputArtifacts: + - { name: step_one_output } + - name: step_2 + actions: + - name: action + actionTypeId: + category: Build + owner: AWS + provider: CodeBuild + version: '1' + inputArtifacts: + - { name: step_one_output } + outputArtifacts: + - { name: step_two_output } + configuration: + ProjectName: foo + state: present + <<: *aws_connection_info + register: rerun_test_output + + - assert: + that: + - rerun_test_output.changed == False + - rerun_test_output.pipeline == output.pipeline + + - name: Test deletion of CodePipeline + aws_codepipeline: + name: "{{ codepipeline_name }}" + role_arn: '' + artifact_store: {} + stages: [] + state: absent + <<: *aws_connection_info + register: absent_test_output + + - assert: + that: + - absent_test_output.changed == True + - absent_test_output.pipeline is undefined + + # ==================== cleanup ======================= + + always: + + - name: Cleanup - delete test CodePipeline + aws_codepipeline: + name: "{{ codepipeline_name }}" + role_arn: '' + artifact_store: {} + stages: [] + state: absent + <<: *aws_connection_info + ignore_errors: true + + - name: Cleanup - delete IAM role needed for CodePipeline test + iam_role: + name: "{{ codepipeline_name }}" + state: absent + <<: *aws_connection_info + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/aliases new file mode 100644 index 00000000..c598f3e8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/aliases @@ -0,0 +1,8 @@ +cloud/aws +disabled +shippable/aws/group2 +aws_config_aggregation_authorization +aws_config_aggregator +aws_config_delivery_channel +aws_config_recorder +aws_config_rule diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/defaults/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/defaults/main.yaml new file mode 100644 index 00000000..da7b735d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/defaults/main.yaml @@ -0,0 +1,4 @@ +--- +config_s3_bucket: '{{ resource_prefix }}-config-records' +config_sns_name: '{{ resource_prefix }}-delivery-channel-test-topic' +config_role_name: 'config-recorder-test-{{ resource_prefix }}' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/files/config-trust-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/files/config-trust-policy.json new file mode 100644 index 00000000..532b3ed5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/files/config-trust-policy.json @@ -0,0 +1,13 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Allow", + "Principal": { + "Service": "config.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/tasks/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/tasks/main.yaml new file mode 100644 index 00000000..34e3449f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/tasks/main.yaml @@ -0,0 +1,405 @@ +--- +- block: + + # ============================================================ + # Prerequisites + # ============================================================ + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: true + + - name: ensure IAM role exists + iam_role: + <<: *aws_connection_info + name: '{{ config_role_name }}' + assume_role_policy_document: "{{ lookup('file','config-trust-policy.json') }}" + state: present + create_instance_profile: no + managed_policy: + - 'arn:aws:iam::aws:policy/service-role/AWSConfigRole' + register: config_iam_role + + - name: ensure SNS topic exists + sns_topic: + <<: *aws_connection_info + name: '{{ config_sns_name }}' + state: present + subscriptions: + - endpoint: "rando_email_address@rando.com" + protocol: "email" + register: config_sns_topic + + - name: ensure S3 bucket exists + s3_bucket: + <<: *aws_connection_info + name: "{{ config_s3_bucket }}" + + - name: ensure S3 access for IAM role + iam_policy: + <<: *aws_connection_info + iam_type: role + iam_name: '{{ config_role_name }}' + policy_name: AwsConfigRecorderTestRoleS3Policy + state: present + policy_json: "{{ lookup( 'template', 'config-s3-policy.json.j2') }}" + + # ============================================================ + # Module requirement testing + # ============================================================ + - name: test rule with no source parameter + aws_config_rule: + <<: *aws_connection_info + name: random_name + state: present + register: output + ignore_errors: true + + - name: assert failure when called with no source parameter + assert: + that: + - output.failed + - 'output.msg.startswith("missing required arguments:")' + + - name: test resource_type delivery_channel with no s3_bucket parameter + aws_config_delivery_channel: + <<: *aws_connection_info + name: random_name + state: present + register: output + ignore_errors: true + + - name: assert failure when called with no s3_bucket parameter + assert: + that: + - output.failed + - 'output.msg.startswith("missing required arguments:")' + + - name: test resource_type configuration_recorder with no role_arn parameter + aws_config_recorder: + <<: *aws_connection_info + name: random_name + state: present + register: output + ignore_errors: true + + - name: assert failure when called with no role_arn parameter + assert: + that: + - output.failed + - 'output.msg.startswith("state is present but all of the following are missing")' + + - name: test resource_type configuration_recorder with no recording_group parameter + aws_config_recorder: + <<: *aws_connection_info + name: random_name + state: present + role_arn: 'arn:aws:iam::123456789012:role/AwsConfigRecorder' + register: output + ignore_errors: true + + - name: assert failure when called with no recording_group parameter + assert: + that: + - output.failed + - 'output.msg.startswith("state is present but all of the following are missing")' + + - name: test resource_type aggregation_authorization with no authorized_account_id parameter + aws_config_aggregation_authorization: + state: present + <<: *aws_connection_info + register: output + ignore_errors: true + + - name: assert failure when called with no authorized_account_id parameter + assert: + that: + - output.failed + - 'output.msg.startswith("missing required arguments:")' + + - name: test resource_type aggregation_authorization with no authorized_aws_region parameter + aws_config_aggregation_authorization: + <<: *aws_connection_info + state: present + authorized_account_id: '123456789012' + register: output + ignore_errors: true + + - name: assert failure when called with no authorized_aws_region parameter + assert: + that: + - output.failed + - 'output.msg.startswith("missing required arguments:")' + + - name: test resource_type configuration_aggregator with no account_sources parameter + aws_config_aggregator: + <<: *aws_connection_info + name: random_name + state: present + register: output + ignore_errors: true + + - name: assert failure when called with no account_sources parameter + assert: + that: + - output.failed + - 'output.msg.startswith("missing required arguments: account_sources")' + + - name: test resource_type configuration_aggregator with no organization_source parameter + aws_config_aggregator: + <<: *aws_connection_info + name: random_name + state: present + account_sources: [] + register: output + ignore_errors: true + + - name: assert failure when called with no organization_source parameter + assert: + that: + - output.failed + - 'output.msg.startswith("missing required arguments: organization_source")' + + # ============================================================ + # Creation testing + # ============================================================ + - name: Create Configuration Recorder for AWS Config + aws_config_recorder: + <<: *aws_connection_info + name: test_configuration_recorder + state: present + role_arn: "{{ config_iam_role.arn }}" + recording_group: + all_supported: true + include_global_types: true + register: output + + - assert: + that: + - output.changed + + - name: Create Delivery Channel for AWS Config + aws_config_delivery_channel: + <<: *aws_connection_info + name: test_delivery_channel + state: present + s3_bucket: "{{ config_s3_bucket }}" + s3_prefix: "foo/bar" + sns_topic_arn: "{{ config_sns_topic.sns_arn }}" + delivery_frequency: 'Twelve_Hours' + register: output + + - assert: + that: + - output.changed + + - name: Create Config Rule for AWS Config + aws_config_rule: + <<: *aws_connection_info + name: test_config_rule + state: present + description: 'This AWS Config rule checks for public write access on S3 buckets' + scope: + compliance_types: + - 'AWS::S3::Bucket' + source: + owner: AWS + identifier: 'S3_BUCKET_PUBLIC_WRITE_PROHIBITED' + register: output + + - assert: + that: + - output.changed + + # ============================================================ + # Update testing + # ============================================================ + - name: Update Configuration Recorder + aws_config_recorder: + <<: *aws_connection_info + name: test_configuration_recorder + state: present + role_arn: "{{ config_iam_role.arn }}" + recording_group: + all_supported: false + include_global_types: false + resource_types: + - 'AWS::S3::Bucket' + register: output + + - assert: + that: + - output.changed + + - name: Update Delivery Channel + aws_config_delivery_channel: + <<: *aws_connection_info + name: test_delivery_channel + state: present + s3_bucket: "{{ config_s3_bucket }}" + sns_topic_arn: "{{ config_sns_topic.sns_arn }}" + delivery_frequency: 'TwentyFour_Hours' + register: output + + - assert: + that: + - output.changed + + - name: Update Config Rule + aws_config_rule: + <<: *aws_connection_info + name: test_config_rule + state: present + description: 'This AWS Config rule checks for public write access on S3 buckets' + scope: + compliance_types: + - 'AWS::S3::Bucket' + source: + owner: AWS + identifier: 'S3_BUCKET_PUBLIC_READ_PROHIBITED' + register: output + + - assert: + that: + - output.changed + + # ============================================================ + # Read testing + # ============================================================ + - name: Don't update Configuration Recorder + aws_config_recorder: + <<: *aws_connection_info + name: test_configuration_recorder + state: present + role_arn: "{{ config_iam_role.arn }}" + recording_group: + all_supported: false + include_global_types: false + resource_types: + - 'AWS::S3::Bucket' + register: output + + - assert: + that: + - not output.changed + + - name: Don't update Delivery Channel + aws_config_delivery_channel: + <<: *aws_connection_info + name: test_delivery_channel + state: present + s3_bucket: "{{ config_s3_bucket }}" + sns_topic_arn: "{{ config_sns_topic.sns_arn }}" + delivery_frequency: 'TwentyFour_Hours' + register: output + + - assert: + that: + - not output.changed + + - name: Don't update Config Rule + aws_config_rule: + <<: *aws_connection_info + name: test_config_rule + state: present + description: 'This AWS Config rule checks for public write access on S3 buckets' + scope: + compliance_types: + - 'AWS::S3::Bucket' + source: + owner: AWS + identifier: 'S3_BUCKET_PUBLIC_READ_PROHIBITED' + register: output + + - assert: + that: + - not output.changed + + always: + # ============================================================ + # Destroy testing + # ============================================================ + - name: Destroy Configuration Recorder + aws_config_recorder: + <<: *aws_connection_info + name: test_configuration_recorder + state: absent + register: output + ignore_errors: yes + +# - assert: +# that: +# - output.changed + + - name: Destroy Delivery Channel + aws_config_delivery_channel: + <<: *aws_connection_info + name: test_delivery_channel + state: absent + s3_bucket: "{{ config_s3_bucket }}" + sns_topic_arn: "{{ config_sns_topic.sns_arn }}" + delivery_frequency: 'TwentyFour_Hours' + register: output + ignore_errors: yes + +# - assert: +# that: +# - output.changed + + - name: Destroy Config Rule + aws_config_rule: + <<: *aws_connection_info + name: test_config_rule + state: absent + description: 'This AWS Config rule checks for public write access on S3 buckets' + scope: + compliance_types: + - 'AWS::S3::Bucket' + source: + owner: AWS + identifier: 'S3_BUCKET_PUBLIC_READ_PROHIBITED' + register: output + ignore_errors: yes + +# - assert: +# that: +# - output.changed + + # ============================================================ + # Clean up prerequisites + # ============================================================ + - name: remove S3 access from IAM role + iam_policy: + <<: *aws_connection_info + iam_type: role + iam_name: '{{ config_role_name }}' + policy_name: AwsConfigRecorderTestRoleS3Policy + state: absent + policy_json: "{{ lookup( 'template', 'config-s3-policy.json.j2') }}" + ignore_errors: yes + + - name: remove IAM role + iam_role: + <<: *aws_connection_info + name: '{{ config_role_name }}' + state: absent + ignore_errors: yes + + - name: remove SNS topic + sns_topic: + <<: *aws_connection_info + name: '{{ config_sns_name }}' + state: absent + ignore_errors: yes + + - name: remove S3 bucket + s3_bucket: + <<: *aws_connection_info + name: "{{ config_s3_bucket }}" + state: absent + force: yes + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/templates/config-s3-policy.json.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/templates/config-s3-policy.json.j2 new file mode 100644 index 00000000..53093300 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_config/templates/config-s3-policy.json.j2 @@ -0,0 +1,23 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sns:Publish", + "Resource": "{{ config_sns_topic.sns_arn }}", + "Effect": "Allow", + "Sid": "PublishToSNS" + }, + { + "Action": "s3:PutObject", + "Resource": "arn:aws:s3:::{{ config_s3_bucket }}/*", + "Effect": "Allow", + "Sid": "AllowPutS3Object" + }, + { + "Action": "s3:GetBucketAcl", + "Resource": "arn:aws:s3:::{{ config_s3_bucket }}", + "Effect": "Allow", + "Sid": "AllowGetS3Acl" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/defaults/main.yml new file mode 100644 index 00000000..214f2496 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/defaults/main.yml @@ -0,0 +1,33 @@ +eks_cluster_name: "{{ resource_prefix }}" +eks_subnets: + - zone: a + cidr: 10.0.1.0/24 + - zone: b + cidr: 10.0.2.0/24 + - zone: c + cidr: 10.0.3.0/24 + +eks_security_groups: + - name: "{{ eks_cluster_name }}-control-plane-sg" + description: "EKS Control Plane Security Group" + rules: + - group_name: "{{ eks_cluster_name }}-workers-sg" + group_desc: "EKS Worker Security Group" + ports: 443 + proto: tcp + rules_egress: + - group_name: "{{ eks_cluster_name }}-workers-sg" + group_desc: "EKS Worker Security Group" + from_port: 1025 + to_port: 65535 + proto: tcp + - name: "{{ eks_cluster_name }}-workers-sg" + description: "EKS Worker Security Group" + rules: + - group_name: "{{ eks_cluster_name }}-workers-sg" + proto: tcp + from_port: 1 + to_port: 65535 + - group_name: "{{ eks_cluster_name }}-control-plane-sg" + ports: 10250 + proto: tcp diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/files/eks-trust-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/files/eks-trust-policy.json new file mode 100644 index 00000000..85cfb59d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/files/eks-trust-policy.json @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "eks.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/meta/main.yml new file mode 100644 index 00000000..1810d4be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_remote_tmp_dir diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/botocore_lt_1.10.1.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/botocore_lt_1.10.1.yml new file mode 100644 index 00000000..e4c4b31f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/botocore_lt_1.10.1.yml @@ -0,0 +1,12 @@ +- name: try and use aws_eks_cluster module + aws_eks_cluster: + state: absent + name: my_cluster + ignore_errors: yes + register: aws_eks_cluster + +- name: ensure that aws_eks fails with friendly error message + assert: + that: + - '"msg" in aws_eks_cluster' + - aws_eks_cluster is failed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/botocore_lt_1.12.38.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/botocore_lt_1.12.38.yml new file mode 100644 index 00000000..4feb7ab4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/botocore_lt_1.12.38.yml @@ -0,0 +1,13 @@ +- name: try using aws_eks_cluster wait with state=absent + aws_eks_cluster: + state: absent + name: my_cluster + wait: yes + ignore_errors: yes + register: aws_eks_cluster + +- name: ensure that aws_eks fails with friendly error message + assert: + that: + - '"msg" in aws_eks_cluster' + - aws_eks_cluster is failed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/full_test.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/full_test.yml new file mode 100644 index 00000000..43b1c801 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/full_test.yml @@ -0,0 +1,247 @@ +--- +# tasks file for aws_eks modules +- name: aws_eks_cluster tests + collections: + - amazon.aws + block: + # If us-west-1 does become supported, change this test to use an unsupported region + # or if all regions are supported, delete this test + - name: attempt to use eks in unsupported region + aws_eks_cluster: + name: "{{ eks_cluster_name }}" + state: absent + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: us-west-1 + register: aws_eks_unsupported_region + ignore_errors: yes + + - name: check that aws_eks_cluster did nothing + assert: + that: + - aws_eks_unsupported_region is failed + - '"msg" in aws_eks_unsupported_region' + + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: delete an as yet non-existent EKS cluster + aws_eks_cluster: + name: "{{ eks_cluster_name }}" + state: absent + <<: *aws_connection_info + register: aws_eks_delete_non_existent + + - name: check that aws_eks_cluster did nothing + assert: + that: + - aws_eks_delete_non_existent is not changed + + - name: ensure IAM instance role exists + iam_role: + name: aws_eks_cluster_role + assume_role_policy_document: "{{ lookup('file','eks-trust-policy.json') }}" + state: present + create_instance_profile: no + managed_policies: + - AmazonEKSServicePolicy + - AmazonEKSClusterPolicy + <<: *aws_connection_info + register: iam_role + + - name: create a VPC to work in + ec2_vpc_net: + cidr_block: 10.0.0.0/16 + state: present + name: '{{ resource_prefix }}_aws_eks' + resource_tags: + Name: '{{ resource_prefix }}_aws_eks' + <<: *aws_connection_info + register: setup_vpc + + - name: create subnets + ec2_vpc_subnet: + az: '{{ aws_region }}{{ item.zone }}' + tags: + Name: '{{ resource_prefix }}_aws_eks-subnet-{{ item.zone }}' + vpc_id: '{{ setup_vpc.vpc.id }}' + cidr: "{{ item.cidr }}" + state: present + <<: *aws_connection_info + register: setup_subnets + with_items: + - "{{ eks_subnets }}" + + - name: create security groups to use for EKS + ec2_group: + name: "{{ item.name }}" + description: "{{ item.description }}" + state: present + rules: "{{ item.rules }}" + rules_egress: "{{ item.rules_egress|default(omit) }}" + vpc_id: '{{ setup_vpc.vpc.id }}' + <<: *aws_connection_info + with_items: "{{ eks_security_groups }}" + register: setup_security_groups + + - name: create EKS cluster + aws_eks_cluster: + name: "{{ eks_cluster_name }}" + security_groups: "{{ eks_security_groups | community.general.json_query('[].name') }}" + subnets: "{{ setup_subnets.results | community.general.json_query('[].subnet.id') }}" + role_arn: "{{ iam_role.arn }}" + <<: *aws_connection_info + register: eks_create + + - name: check that EKS cluster was created + assert: + that: + - eks_create is changed + - eks_create.name == eks_cluster_name + + - name: create EKS cluster with same details but wait for it to become active + aws_eks_cluster: + name: "{{ eks_cluster_name }}" + security_groups: "{{ eks_security_groups | community.general.json_query('[].name') }}" + subnets: "{{ setup_subnets.results | community.general.json_query('[].subnet.id') }}" + role_arn: "{{ iam_role.arn }}" + wait: yes + <<: *aws_connection_info + register: eks_create + + - name: Check that EKS cluster is active and has CA and endpoint data + assert: + that: + - eks_create is not changed + - eks_create.name == eks_cluster_name + - eks_create.status == "ACTIVE" + - eks_create.certificate_authority.data is defined + - eks_create.certificate_authority.data != "" + - eks_create.endpoint is defined + - eks_create.endpoint != "" + + - name: create EKS cluster with same details but using SG ids + aws_eks_cluster: + name: "{{ eks_cluster_name }}" + security_groups: "{{ setup_security_groups.results | community.general.json_query('[].group_id') }}" + subnets: "{{ setup_subnets.results | community.general.json_query('[].subnet.id') }}" + role_arn: "{{ iam_role.arn }}" + <<: *aws_connection_info + register: eks_create + + - name: check that EKS cluster did not change + assert: + that: + - eks_create is not changed + - eks_create.name == eks_cluster_name + + - name: remove EKS cluster, waiting until complete + aws_eks_cluster: + name: "{{ eks_cluster_name }}" + state: absent + wait: yes + <<: *aws_connection_info + register: eks_delete + + - name: check that EKS cluster was removed + assert: + that: + - eks_delete is changed + + - name: create EKS cluster with same details but wait for it to become active + aws_eks_cluster: + name: "{{ eks_cluster_name }}" + security_groups: "{{ eks_security_groups | community.general.json_query('[].name') }}" + subnets: "{{ setup_subnets.results | community.general.json_query('[].subnet.id') }}" + role_arn: "{{ iam_role.arn }}" + wait: yes + <<: *aws_connection_info + register: eks_create + + - name: check that EKS cluster was created + assert: + that: + - eks_create is changed + - eks_create.name == eks_cluster_name + + - name: remove EKS cluster, without waiting this time + aws_eks_cluster: + name: "{{ eks_cluster_name }}" + state: absent + <<: *aws_connection_info + register: eks_delete + + - name: check that EKS cluster remove has started + assert: + that: + - eks_delete is changed + + always: + - name: Announce teardown start + debug: + msg: "***** TESTING COMPLETE. COMMENCE TEARDOWN *****" + + - name: remove EKS cluster + aws_eks_cluster: + name: "{{ eks_cluster_name }}" + state: absent + wait: yes + <<: *aws_connection_info + register: eks_delete + ignore_errors: yes + + - debug: + msg: "{{ eks_security_groups|reverse|list }}" + + - name: create list of all additional EKS security groups + set_fact: + additional_eks_sg: + - name: "{{ eks_cluster_name }}-workers-sg" + + - name: set all security group rule lists to empty to remove circular dependency + ec2_group: + name: "{{ item.name }}" + description: "{{ item.description }}" + state: present + rules: [] + rules_egress: [] + purge_rules: yes + purge_rules_egress: yes + vpc_id: '{{ setup_vpc.vpc.id }}' + <<: *aws_connection_info + with_items: "{{ eks_security_groups }}" + ignore_errors: yes + + - name: remove security groups + ec2_group: + name: '{{ item.name }}' + state: absent + vpc_id: '{{ setup_vpc.vpc.id }}' + <<: *aws_connection_info + with_items: "{{ eks_security_groups|reverse|list + additional_eks_sg }}" + ignore_errors: yes + + - name: remove setup subnet + ec2_vpc_subnet: + az: '{{ aws_region }}{{ item.zone }}' + vpc_id: '{{ setup_vpc.vpc.id }}' + cidr: "{{ item.cidr}}" + state: absent + <<: *aws_connection_info + with_items: "{{ eks_subnets }}" + ignore_errors: yes + + - name: remove setup VPC + ec2_vpc_net: + cidr_block: 10.0.0.0/16 + state: absent + name: '{{ resource_prefix }}_aws_eks' + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/main.yml new file mode 100644 index 00000000..f26e11db --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_eks_cluster/tasks/main.yml @@ -0,0 +1,66 @@ +- set_fact: + virtualenv: "{{ remote_tmp_dir }}/virtualenv" + virtualenv_command: "{{ ansible_python_interpreter }} -m virtualenv" + +- set_fact: + virtualenv_interpreter: "{{ virtualenv }}/bin/python" + +- pip: + name: virtualenv + +# Test graceful failure for missing kubernetes-validate + +- pip: + name: + - 'botocore<1.10.1' + - boto3 + - coverage<5 + virtualenv: "{{ virtualenv }}" + virtualenv_command: "{{ virtualenv_command }}" + virtualenv_site_packages: no + +- include_tasks: botocore_lt_1.10.1.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + +- file: + path: "{{ virtualenv }}" + state: absent + +# Test graceful failures when botocore<1.12.38 + +- pip: + name: + - 'botocore>1.10.1,<1.12.38' + - boto3 + - coverage<5 + virtualenv: "{{ virtualenv }}" + virtualenv_command: "{{ virtualenv_command }}" + virtualenv_site_packages: no + +- include_tasks: botocore_lt_1.12.38.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + +- file: + path: "{{ virtualenv }}" + state: absent + +# Test validate with kubernetes-validate + +- pip: + name: + - 'botocore>=1.10.1' + - boto3 + virtualenv: "{{ virtualenv }}" + virtualenv_command: "{{ virtualenv_command }}" + virtualenv_site_packages: no + +- include_tasks: full_test.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + playbook_namespace: ansible-test-k8s-validate + +- file: + path: "{{ virtualenv }}" + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/defaults/main.yml new file mode 100644 index 00000000..3f38e1a8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/defaults/main.yml @@ -0,0 +1,5 @@ +--- +# defaults file for aws_elasticbeanstalk_app +app_name: '{{ resource_prefix }}_eb_ansible_test' +description: 'eb_ansible_test app description' +alternate_description: 'eb_ansible_test app alternate_description' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/tasks/main.yml new file mode 100644 index 00000000..56f77d3d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_elasticbeanstalk_app/tasks/main.yml @@ -0,0 +1,156 @@ +--- +# tasks file for aws_elasticbeanstalk_app +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + # ============================================================ + - name: test with no parameters + aws_elasticbeanstalk_app: + register: result + ignore_errors: true + + - name: assert failure when called with no parameters + assert: + that: + - 'result.failed' + + # ============================================================ + - name: test create app + aws_elasticbeanstalk_app: + app_name: "{{ app_name }}" + description: "{{ description }}" + state: present + <<: *aws_connection_info + register: result + + - name: assert changed is True + assert: + that: + - result.changed == True + + # ============================================================ + - name: test create when app already exists + aws_elasticbeanstalk_app: + app_name: "{{ app_name }}" + description: "{{ description }}" + state: present + <<: *aws_connection_info + register: result + + - name: assert changed is False since the app already exists + assert: + that: + - result.changed == False + + # ============================================================ + - name: make an update to an existing app + aws_elasticbeanstalk_app: + app_name: "{{ app_name }}" + description: "{{ alternate_description }}" + state: present + <<: *aws_connection_info + register: result + + - name: assert changed is True + assert: + that: + - result.changed == True + +# # ============================================================ +# - name: fail deleting an app that has environments that exist +# aws_elasticbeanstalk_app: +# app_name: "non_app" +# state: absent +# <<: *aws_connection_info +# register: result +# ignore_errors: true +# +# - name: assert deleteing app with running environments fail +# assert: +# that: +# - result.changed == False + +# # ============================================================ +# - name: deleting an app that has environments that exist with terminate_by_force True +# aws_elasticbeanstalk_app: +# app_name: "non_app" +# state: absent +# terminate_by_force: True +# <<: *aws_connection_info +# register: result +# +# - name: assert deleteing app with running environments with terminate_by_force True +# assert: +# that: +# - result.changed == True +# + # ============================================================ +# - name: retrieve a list of apps +# aws_elasticbeanstalk_app_facts: +# <<: *aws_connection_info +# register: result + +# - name: assert changed is True +# assert: +# that: +# - result is success + +# # ============================================================ +# - name: deleting an app that has environments that exist with terminate_by_force True +# aws_elasticbeanstalk_app: +# app_name: "non_app" +# state: absent +# terminate_by_force: True +# <<: *aws_connection_info +# register: result +# +# - name: assert deleteing app with running environments with terminate_by_force True +# assert: +# that: +# - result.changed == True +# + # ============================================================ + - name: delete non existent app + aws_elasticbeanstalk_app: + app_name: "non_app" + state: absent + <<: *aws_connection_info + register: result + ignore_errors: true + + - name: assert deleteing non existant app fails + assert: + that: + - result.changed == False + - 'result.output.startswith("Application not found")' + + # ============================================================ + - name: delete existing app + aws_elasticbeanstalk_app: + app_name: "{{ app_name }}" + state: absent + <<: *aws_connection_info + register: result + + - name: assert changed is True + assert: + that: + - result.changed == True + + # ============================================================ + + always: + + - name: delete existing app + aws_elasticbeanstalk_app: + app_name: "{{ app_name }}" + state: absent + <<: *aws_connection_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_glue_connection/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_glue_connection/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_glue_connection/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_glue_connection/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_glue_connection/tasks/main.yml new file mode 100644 index 00000000..84ca6e5e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_glue_connection/tasks/main.yml @@ -0,0 +1,87 @@ +- block: + + # TODO: description, match_criteria, security_groups, and subnet_id are unused module options + + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: create glue connection + aws_glue_connection: + name: "{{ resource_prefix }}" + connection_properties: + JDBC_CONNECTION_URL: "jdbc:mysql://mydb:3306/{{ resource_prefix }}" + USERNAME: my-username + PASSWORD: my-password + state: present + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + - name: test idempotence creating glue connection + aws_glue_connection: + name: "{{ resource_prefix }}" + connection_properties: + JDBC_CONNECTION_URL: "jdbc:mysql://mydb:3306/{{ resource_prefix }}" + USERNAME: my-username + PASSWORD: my-password + state: present + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + + - name: test updating JDBC connection url + aws_glue_connection: + name: "{{ resource_prefix }}" + connection_properties: + JDBC_CONNECTION_URL: "jdbc:mysql://mydb:3306/{{ resource_prefix }}-updated" + USERNAME: my-username + PASSWORD: my-password + state: present + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + - name: delete glue connection + aws_glue_connection: + name: "{{ resource_prefix }}" + state: absent + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + - name: test idempotence removing glue connection + aws_glue_connection: + name: "{{ resource_prefix }}" + state: absent + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + + always: + + - name: delete glue connection + aws_glue_connection: + name: "{{ resource_prefix }}" + state: absent + <<: *aws_connection_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_inspector_target/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_inspector_target/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_inspector_target/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_inspector_target/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_inspector_target/defaults/main.yml new file mode 100644 index 00000000..8777873f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_inspector_target/defaults/main.yml @@ -0,0 +1,3 @@ +--- + +aws_inspector_scan_name: "aws_inspector_scan-{{ ansible_date_time.epoch }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_inspector_target/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_inspector_target/tasks/main.yml new file mode 100644 index 00000000..36a3cfca --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_inspector_target/tasks/main.yml @@ -0,0 +1,96 @@ +--- + +- name: Set Connexion Information for All Tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + +- block: + - name: Create AWS Inspector Target Group + aws_inspector_target: + name: "{{ aws_inspector_scan_name }}" + state: present + tags: + Name: "{{ aws_inspector_scan_name }}" + changed: "no" + <<: *aws_connection_info + register: target_group_create + + - name: Create AWS Inspector Target Group (Verify) + aws_inspector_target: + name: "{{ aws_inspector_scan_name }}" + state: present + tags: + Name: "{{ aws_inspector_scan_name }}" + changed: "no" + <<: *aws_connection_info + register: target_group_create_verify + + - name: Assert Successful AWS Inspector Target Group Creation + assert: + that: + - target_group_create is changed + - target_group_create.name == aws_inspector_scan_name + - target_group_create.tags.Name == aws_inspector_scan_name + - target_group_create.tags.changed == "no" + - target_group_create_verify is not changed + - target_group_create_verify.name == aws_inspector_scan_name + - target_group_create_verify.tags.Name == aws_inspector_scan_name + - target_group_create_verify.tags.changed == "no" + + - name: Change AWS Inspector Target Group Tags + aws_inspector_target: + name: "{{ aws_inspector_scan_name }}" + state: present + tags: + Name: "{{ aws_inspector_scan_name }}" + changed: "yes" + <<: *aws_connection_info + register: target_group_tag_change + + - name: Change AWS Inspector Target Group Tags (Verify) + aws_inspector_target: + name: "{{ aws_inspector_scan_name }}" + state: present + tags: + Name: "{{ aws_inspector_scan_name }}" + changed: "yes" + <<: *aws_connection_info + register: target_group_tag_change_verify + + - name: Assert Successful AWS Inspector Target Group Tag Change + assert: + that: + - target_group_tag_change is changed + - target_group_tag_change.name == aws_inspector_scan_name + - target_group_tag_change.tags.Name == aws_inspector_scan_name + - target_group_tag_change.tags.changed == "yes" + - target_group_tag_change_verify is not changed + - target_group_tag_change_verify.name == aws_inspector_scan_name + - target_group_tag_change_verify.tags.Name == aws_inspector_scan_name + - target_group_tag_change_verify.tags.changed == "yes" + + always: + - name: Delete AWS Inspector Target Group + aws_inspector_target: + name: "{{ aws_inspector_scan_name }}" + state: absent + <<: *aws_connection_info + register: target_group_delete + + - name: Delete AWS Inspector Target Group (Verify) + aws_inspector_target: + name: "{{ aws_inspector_scan_name }}" + state: absent + <<: *aws_connection_info + register: target_group_delete_verify + + - name: Assert Successful AWS Inspector Target Group Deletion + assert: + that: + - target_group_delete is changed + - target_group_delete_verify is not changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/aliases new file mode 100644 index 00000000..7ed9252c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/aliases @@ -0,0 +1,3 @@ +cloud/aws +aws_kms_info +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/tasks/main.yml new file mode 100644 index 00000000..a27475c5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/tasks/main.yml @@ -0,0 +1,424 @@ +- module_defaults: + group/aws: + region: "{{ aws_region }}" + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + collections: + - amazon.aws + + block: + # ============================================================ + # PREPARATION + # + # Get some information about who we are before starting our tests + # we'll need this as soon as we start working on the policies + - name: get ARN of calling user + aws_caller_info: + register: aws_caller_info + + # IAM Roles completes before the Role is fully instantiated, create it here + # to ensure it exists when we need it for updating the policies + - name: create an IAM role that can do nothing + iam_role: + name: "{{ resource_prefix }}-kms-role" + state: present + assume_role_policy_document: '{"Version": "2012-10-17", "Statement": {"Action": "sts:AssumeRole", "Principal": {"Service": "ec2.amazonaws.com"}, "Effect": "Deny"} }' + register: iam_role_result + # ============================================================ + # TESTS + - name: See whether key exists and its current state + aws_kms_info: + filters: + alias: "{{ resource_prefix }}-kms" + + - name: create a key in check mode + check_mode: yes + aws_kms: + alias: "{{ resource_prefix }}-kms-check" + tags: + Hello: World + state: present + enabled: yes + register: create_kms_check + + - name: find facts about the check mode key + aws_kms_info: + filters: + alias: "{{ resource_prefix }}-kms-check" + register: check_key + + - name: ensure that check mode worked as expected + assert: + that: + - check_key["keys"]|length == 0 + - create_kms_check is changed + + - name: create a key + aws_kms: + alias: "{{ resource_prefix }}-kms" + tags: + Hello: World + state: present + enabled: yes + register: create_kms + + - name: assert that state is enabled + assert: + that: + - create_kms.key_state == "Enabled" + - create_kms.tags['Hello'] == 'World' + - create_kms.enable_key_rotation == false + + - name: enable key rotation + aws_kms: + alias: "{{ resource_prefix }}-kms" + tags: + Hello: World + state: present + enabled: yes + enable_key_rotation: yes + register: create_kms + + - name: assert that key rotation is enabled + assert: + that: + - create_kms.key_state == "Enabled" + - create_kms.tags['Hello'] == 'World' + - create_kms.enable_key_rotation == true + + - name: delete the key in check mode + check_mode: yes + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: absent + register: delete_kms_check + + - assert: + that: + - delete_kms_check is changed + + - name: find facts about the key + aws_kms_info: + filters: + alias: "{{ resource_prefix }}-kms" + register: new_key + + - name: check that a key was found + assert: + that: + - new_key["keys"]|length == 1 + - new_key["keys"][0]["enable_key_rotation"] == true + - new_key["keys"][0]["key_state"] != PendingDeletion + + - name: Update Policy on key to match AWS Console generate policy + aws_kms: + key_id: '{{ new_key["keys"][0]["key_id"] }}' + policy: "{{ lookup('template', 'console-policy.j2') | to_json }}" + register: kms_policy_changed + + - name: Policy should have been changed + assert: + that: + - kms_policy_changed is changed + + - name: Attempt to re-assert the same policy + aws_kms: + alias: "alias/{{ resource_prefix }}-kms" + policy: "{{ lookup('template', 'console-policy.j2') | to_json }}" + register: kms_policy_changed + + - name: Policy should not have changed since it was last set + assert: + that: + - kms_policy_changed is succeeded + + - name: grant user-style access to production secrets + aws_kms: + mode: grant + alias: "alias/{{ resource_prefix }}-kms" + role_name: "{{ resource_prefix }}-kms-role" + grant_types: "role,role grant" + + - name: find facts about the key + aws_kms_info: + filters: + alias: "{{ resource_prefix }}-kms" + register: new_key + + - name: remove access to production secrets from role + aws_kms: + mode: deny + alias: "alias/{{ resource_prefix }}-kms" + role_arn: "{{ iam_role_result.iam_role.arn }}" + + - name: find facts about the key + aws_kms_info: + filters: + alias: "{{ resource_prefix }}-kms" + register: new_key + + - name: Allow the IAM role to use a specific Encryption Context + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: present + purge_grants: yes + purge_tags: yes + grants: + - name: test_grant + grantee_principal: "{{ iam_role_result.iam_role.arn }}" + retiring_principal: "{{ aws_caller_info.arn }}" + constraints: + encryption_context_equals: + environment: test + application: testapp + operations: + - Decrypt + - RetireGrant + register: grant_one + + - name: assert grant added + assert: + that: + - grant_one.changed + - grant_one.grants|length == 1 + + - name: Add a second grant + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: present + grants: + - name: another_grant + grantee_principal: "{{ iam_role_result.iam_role.arn }}" + retiring_principal: "{{ aws_caller_info.arn }}" + constraints: + encryption_context_equals: + Environment: second + Application: anotherapp + operations: + - Decrypt + - RetireGrant + register: grant_two + + - name: assert grant added + assert: + that: + - grant_two.changed + - grant_two.grants|length == 2 + + - name: Add a second grant again + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: present + grants: + - name: another_grant + grantee_principal: "{{ iam_role_result.iam_role.arn }}" + retiring_principal: "{{ aws_caller_info.arn }}" + constraints: + encryption_context_equals: + Environment: second + Application: anotherapp + operations: + - Decrypt + - RetireGrant + register: grant_two_again + + - name: assert grant added + assert: + that: + - not grant_two_again.changed + - grant_two_again.grants|length == 2 + + - name: Update the grants with purge_grants set + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: present + purge_grants: yes + grants: + - name: third_grant + grantee_principal: "{{ iam_role_result.iam_role.arn }}" + retiring_principal: "{{ aws_caller_info.arn }}" + constraints: + encryption_context_equals: + environment: third + application: onemoreapp + operations: + - Decrypt + - RetireGrant + register: grant_three + + - name: assert grants replaced + assert: + that: + - grant_three.changed + - grant_three.grants|length == 1 + + - name: update third grant to change encryption context equals to subset + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: present + grants: + - name: third_grant + grantee_principal: "{{ iam_role_result.iam_role.arn }}" + retiring_principal: "{{ aws_caller_info.arn }}" + constraints: + encryption_context_subset: + environment: third + application: onemoreapp + operations: + - Decrypt + - RetireGrant + register: grant_three_update + + - name: assert grants replaced + assert: + that: + - "grant_three_update.changed" + - "grant_three_update.grants|length == 1" + - "'encryption_context_equals' not in grant_three_update.grants[0].constraints" + - "'encryption_context_subset' in grant_three_update.grants[0].constraints" + + - name: tag encryption key + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: present + tags: + tag_one: tag_one + tag_two: tag_two + register: tag_kms + + - name: assert tags added and grants remain in place + assert: + that: + - "tag_kms.changed" + - "tag_kms.grants|length == 1" + - "'tag_one' in tag_kms.tags" + - "'tag_two' in tag_kms.tags" + + - name: add, replace, remove tags + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: present + purge_tags: yes + tags: + tag_two: tag_two_updated + tag_three: tag_three + register: tag_kms_update + + - name: assert tags correctly changed + assert: + that: + - "tag_kms_update.changed" + - "'tag_one' not in tag_kms_update.tags" + - "'tag_two' in tag_kms_update.tags" + - "tag_kms_update.tags.tag_two == 'tag_two_updated'" + - "'tag_three' in tag_kms_update.tags" + + - name: make no real tag change + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: present + register: tag_kms_no_update + + - name: assert no change to tags + assert: + that: + - "not tag_kms_no_update.changed" + - "'tag_one' not in tag_kms_no_update.tags" + - "'tag_two' in tag_kms_no_update.tags" + - "tag_kms_no_update.tags.tag_two == 'tag_two_updated'" + - "'tag_three' in tag_kms_no_update.tags" + + - name: update the key's description and disable it + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: present + description: test key for testing + enabled: no + register: update_key + + - name: assert that state is enabled + assert: + that: + - update_key.description == "test key for testing" + - update_key.key_state == "Disabled" + - update_key.changed + + - name: update policy to remove access to key rotation status + aws_kms: + alias: "alias/{{ resource_prefix }}-kms" + policy: "{{ lookup('template', 'console-policy-no-key-rotation.j2') | to_json }}" + + - name: find facts about the key without key rotation status + aws_kms_info: + filters: + alias: "{{ resource_prefix }}-kms" + register: update_key + + - name: assert that key rotation status is set to None + assert: + that: + - update_key.enable_key_rotation is undefined + + - name: delete the key + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: absent + register: delete_kms + + - name: assert that state is pending deletion + assert: + that: + - delete_kms.key_state == "PendingDeletion" + - delete_kms.changed + + - name: re-delete the key + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: absent + register: delete_kms + + - name: assert that state is pending deletion + assert: + that: + - delete_kms.key_state == "PendingDeletion" + - delete_kms is not changed + + - name: undelete and enable the key + aws_kms: + alias: "{{ resource_prefix }}-kms" + state: present + enabled: yes + register: undelete_kms + + - name: assert that state is enabled + assert: + that: + - undelete_kms.key_state == "Enabled" + - undelete_kms.changed + + - name: delete a non-existant key + aws_kms: + key_id: '00000000-0000-0000-0000-000000000000' + state: absent + register: delete_kms + + - name: assert that state is unchanged + assert: + that: + - delete_kms is not changed + + always: + # ============================================================ + # CLEAN-UP + - name: finish off by deleting key + aws_kms: + state: absent + alias: "{{ resource_prefix }}-kms" + register: destroy_result + + - name: remove the IAM role + iam_role: + name: "{{ resource_prefix }}-kms-role" + state: absent + register: iam_role_result diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/templates/console-policy-no-key-rotation.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/templates/console-policy-no-key-rotation.j2 new file mode 100644 index 00000000..0e019d20 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/templates/console-policy-no-key-rotation.j2 @@ -0,0 +1,81 @@ +{ + "Id": "key-consolepolicy-3", + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "Enable IAM User Permissions", + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::{{ aws_caller_info.account }}:root" + }, + "Action": "kms:*", + "Resource": "*" + }, + { + "Sid": "Allow access for Key Administrators", + "Effect": "Allow", + "Principal": { + "AWS": "{{ aws_caller_info.arn }}" + }, + "Action": [ + "kms:Create*", + "kms:Describe*", + "kms:Enable*", + "kms:List*", + "kms:Put*", + "kms:Update*", + "kms:Revoke*", + "kms:Disable*", + "kms:Get*", + "kms:Delete*", + "kms:TagResource", + "kms:UntagResource", + "kms:ScheduleKeyDeletion", + "kms:CancelKeyDeletion" + ], + "Resource": "*" + }, + { + "Sid": "Allow use of the key", + "Effect": "Allow", + "Principal": { + "AWS": "{{ aws_caller_info.arn }}" + }, + "Action": [ + "kms:Encrypt", + "kms:Decrypt", + "kms:ReEncrypt*", + "kms:GenerateDataKey*", + "kms:DescribeKey" + ], + "Resource": "*" + }, + { + "Sid": "Allow attachment of persistent resources", + "Effect": "Allow", + "Principal": { + "AWS": "{{ aws_caller_info.arn }}" + }, + "Action": [ + "kms:CreateGrant", + "kms:ListGrants", + "kms:RevokeGrant" + ], + "Resource": "*", + "Condition": { + "Bool": { + "kms:GrantIsForAWSResource": "true" + } + } + }, + { + "Sid": "Disable access to key rotation status", + "Effect": "Deny", + "Principal": { + "AWS": "{{ aws_caller_info.arn }}" + }, + "Action": "kms:GetKeyRotationStatus", + "Resource": "*" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/templates/console-policy.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/templates/console-policy.j2 new file mode 100644 index 00000000..4b60ba58 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_kms/templates/console-policy.j2 @@ -0,0 +1,72 @@ +{ + "Id": "key-consolepolicy-3", + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "Enable IAM User Permissions", + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::{{ aws_caller_info.account }}:root" + }, + "Action": "kms:*", + "Resource": "*" + }, + { + "Sid": "Allow access for Key Administrators", + "Effect": "Allow", + "Principal": { + "AWS": "{{ aws_caller_info.arn }}" + }, + "Action": [ + "kms:Create*", + "kms:Describe*", + "kms:Enable*", + "kms:List*", + "kms:Put*", + "kms:Update*", + "kms:Revoke*", + "kms:Disable*", + "kms:Get*", + "kms:Delete*", + "kms:TagResource", + "kms:UntagResource", + "kms:ScheduleKeyDeletion", + "kms:CancelKeyDeletion" + ], + "Resource": "*" + }, + { + "Sid": "Allow use of the key", + "Effect": "Allow", + "Principal": { + "AWS": "{{ aws_caller_info.arn }}" + }, + "Action": [ + "kms:Encrypt", + "kms:Decrypt", + "kms:ReEncrypt*", + "kms:GenerateDataKey*", + "kms:DescribeKey" + ], + "Resource": "*" + }, + { + "Sid": "Allow attachment of persistent resources", + "Effect": "Allow", + "Principal": { + "AWS": "{{ aws_caller_info.arn }}" + }, + "Action": [ + "kms:CreateGrant", + "kms:ListGrants", + "kms:RevokeGrant" + ], + "Resource": "*", + "Condition": { + "Bool": { + "kms:GrantIsForAWSResource": "true" + } + } + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/aliases new file mode 100644 index 00000000..72a9fb4f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group4 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/main.yml new file mode 100644 index 00000000..abffda91 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/main.yml @@ -0,0 +1,5 @@ +- hosts: localhost + connection: local + environment: "{{ ansible_test.environment }}" + tasks: + - include_tasks: 'tasks/tests.yml' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/meta/main.yml new file mode 100644 index 00000000..1810d4be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_remote_tmp_dir diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/tasks/main.yml new file mode 100644 index 00000000..3edbbade --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_region_info/tasks/main.yml @@ -0,0 +1,107 @@ +--- +- module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key | default(omit) }}' + aws_secret_key: '{{ aws_secret_key | default(omit) }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region | default(omit) }}' + + block: + - name: 'List available Regions' + aws_region_info: + register: regions + + - name: check task return attributes + vars: + first_region: '{{ regions.regions[0] }}' + assert: + that: + - regions is successful + - regions is not changed + - '"regions" in regions' + - '"endpoint" in first_region' + - '"opt_in_status" in first_region' + - '"region_name" in first_region' + + - name: 'List available Regions - check_mode' + aws_region_info: + register: check_regions + + - name: check task return attributes - check_mode + vars: + first_region: '{{ check_regions.regions[0] }}' + assert: + that: + - check_regions is successful + - check_regions is not changed + - '"regions" in check_regions' + - '"endpoint" in first_region' + - '"opt_in_status" in first_region' + - '"region_name" in first_region' + + - name: 'Filter available Regions using - ("region-name")' + aws_region_info: + filters: + region-name: 'us-west-1' + register: us_west_1 + + - name: check task return attributes - filtering using - + vars: + first_region: '{{ us_west_1.regions[0] }}' + assert: + that: + - us_west_1 is successful + - us_west_1 is not changed + - '"regions" in us_west_1' + - us_west_1.regions | length == 1 + - '"endpoint" in first_region' + - first_region.endpoint == 'ec2.us-west-1.amazonaws.com' + - '"opt_in_status" in first_region' + - first_region.opt_in_status == 'opt-in-not-required' + - '"region_name" in first_region' + - first_region.region_name == 'us-west-1' + + - name: 'Filter available Regions using _ ("region_name")' + aws_region_info: + filters: + region_name: 'us-west-2' + register: us_west_2 + + - name: check task return attributes - filtering using _ + vars: + first_region: '{{ us_west_2.regions[0] }}' + assert: + that: + - us_west_2 is successful + - us_west_2 is not changed + - '"regions" in us_west_2' + - us_west_2.regions | length == 1 + - '"endpoint" in first_region' + - first_region.endpoint == 'ec2.us-west-2.amazonaws.com' + - '"opt_in_status" in first_region' + - first_region.opt_in_status == 'opt-in-not-required' + - '"region_name" in first_region' + - first_region.region_name == 'us-west-2' + + - name: 'Filter available Regions using _ and - to check precedence' + aws_region_info: + filters: + region-name: 'eu-west-1' + region_name: 'eu-central-1' + register: regions_prededence + + - name: check task return attributes - precedence + vars: + first_region: '{{ regions_prededence.regions[0] }}' + assert: + that: + - regions_prededence is successful + - regions_prededence is not changed + - '"regions" in regions_prededence' + - regions_prededence.regions | length == 1 + - '"endpoint" in first_region' + - first_region.endpoint == 'ec2.eu-central-1.amazonaws.com' + - '"opt_in_status" in first_region' + - first_region.opt_in_status == 'opt-in-not-required' + - '"region_name" in first_region' + - first_region.region_name == 'eu-central-1' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/defaults/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/defaults/main.yaml new file mode 100644 index 00000000..cfdab552 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/defaults/main.yaml @@ -0,0 +1,5 @@ +--- +super_secret_string: 'Test12345' +secret_manager_role: "{{ resource_prefix }}-secrets-manager" +secret_name: "{{ resource_prefix }}-test-secret-string" +lambda_name: "{{ resource_prefix }}-hello-world" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/files/hello_world.zip b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/files/hello_world.zip Binary files differnew file mode 100644 index 00000000..8fd9e058 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/files/hello_world.zip diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/files/secretsmanager-trust-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/files/secretsmanager-trust-policy.json new file mode 100644 index 00000000..c53e3096 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/files/secretsmanager-trust-policy.json @@ -0,0 +1,19 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + }, + "Action": "sts:AssumeRole" + }, + { + "Effect": "Allow", + "Principal": { + "Service": "secretsmanager.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/tasks/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/tasks/main.yaml new file mode 100644 index 00000000..483be475 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_secret/tasks/main.yaml @@ -0,0 +1,253 @@ +--- +- module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + + block: + - name: retrieve caller facts + aws_caller_info: + register: test_caller_facts + + - name: ensure IAM role exists + iam_role: + name: "{{ secret_manager_role }}" + assume_role_policy_document: "{{ lookup('file','secretsmanager-trust-policy.json') }}" + state: present + create_instance_profile: no + managed_policy: + - 'arn:aws:iam::aws:policy/SecretsManagerReadWrite' + register: iam_role + ignore_errors: yes + + - name: wait 10 seconds for role to become available + pause: + seconds: 10 + when: iam_role.changed + + # CI does not remove the role and comparing policies has a bug on Python3; fall back to use iam_role_info + - name: get IAM role + iam_role_info: + name: "{{ secret_manager_role }}" + register: iam_role_info + + - name: set iam_role_output + set_fact: + iam_role_output: "{{ iam_role_info.iam_roles[0] }}" + when: iam_role_info is defined + + - name: create a temporary directory + tempfile: + state: directory + register: tmp + + - name: move lambda into place for upload + copy: + src: "files/hello_world.zip" + dest: "{{ tmp.path }}/hello_world.zip" + + - name: dummy lambda for testing + lambda: + name: "{{ lambda_name }}" + state: present + zip_file: "{{ tmp.path }}/hello_world.zip" + runtime: 'python2.7' + role: "{{ iam_role_output.arn }}" + handler: 'hello_world.lambda_handler' + register: lambda_output + until: not lambda_output.failed + retries: 10 + delay: 5 + + - debug: + var: lambda_output + + # ============================================================ + # Module parameter testing + # ============================================================ + - name: test with no parameters + aws_secret: + register: result + ignore_errors: true + check_mode: true + + - name: assert failure when called with no parameters + assert: + that: + - result.failed + - 'result.msg.startswith("missing required arguments:")' + + # ============================================================ + # Creation/Deletion testing + # ============================================================ + - name: add secret to AWS Secrets Manager + aws_secret: + name: "{{ secret_name }}" + state: present + secret_type: 'string' + secret: "{{ super_secret_string }}" + register: result + + - name: assert correct keys are returned + assert: + that: + - result.changed + - result.arn is not none + - result.name is not none + - result.tags is not none + - result.version_ids_to_stages is not none + + - name: no changes to secret + aws_secret: + name: "{{ secret_name }}" + state: present + secret_type: 'string' + secret: "{{ super_secret_string }}" + register: result + + - name: assert correct keys are returned + assert: + that: + - not result.changed + - result.arn is not none + + - name: make change to secret + aws_secret: + name: "{{ secret_name }}" + description: 'this is a change to this secret' + state: present + secret_type: 'string' + secret: "{{ super_secret_string }}" + register: result + + - debug: + var: result + + - name: assert correct keys are returned + assert: + that: + - result.changed + - result.arn is not none + - result.name is not none + - result.tags is not none + - result.version_ids_to_stages is not none + + - name: add tags to secret + aws_secret: + name: "{{ secret_name }}" + description: 'this is a change to this secret' + state: present + secret_type: 'string' + secret: "{{ super_secret_string }}" + tags: + Foo: 'Bar' + Test: 'Tag' + register: result + + - name: assert correct keys are returned + assert: + that: + - result.changed + + - name: remove tags from secret + aws_secret: + name: "{{ secret_name }}" + description: 'this is a change to this secret' + state: present + secret_type: 'string' + secret: "{{ super_secret_string }}" + register: result + + - name: assert correct keys are returned + assert: + that: + - result.changed + + - name: lambda policy for secrets manager + lambda_policy: + state: present + function_name: "{{ lambda_name }}" + statement_id: LambdaSecretsManagerTestPolicy + action: 'lambda:InvokeFunction' + principal: "secretsmanager.amazonaws.com" + + - name: add rotation lambda to secret + aws_secret: + name: "{{ secret_name }}" + description: 'this is a change to this secret' + state: present + secret_type: 'string' + secret: "{{ super_secret_string }}" + rotation_lambda: "arn:aws:lambda:{{ aws_region }}:{{ test_caller_facts.account }}:function:{{ lambda_name }}" + register: result + retries: 100 + delay: 5 + until: not result.failed + + - name: assert correct keys are returned + assert: + that: + - result.changed + + - name: remove rotation lambda from secret + aws_secret: + name: "{{ secret_name }}" + description: 'this is a change to this secret' + state: present + secret_type: 'string' + secret: "{{ super_secret_string }}" + register: result + + - name: assert correct keys are returned + assert: + that: + - result.changed + + always: + - name: remove secret + aws_secret: + name: "{{ secret_name }}" + state: absent + secret_type: 'string' + secret: "{{ super_secret_string }}" + recovery_window: 0 + ignore_errors: yes + + - name: remove lambda policy + lambda_policy: + state: absent + function_name: "{{ lambda_name }}" + statement_id: lambda-secretsmanager-test-policy + action: lambda:InvokeFunction + principal: secretsmanager.amazonaws.com + ignore_errors: yes + + - name: remove dummy lambda + lambda: + name: "{{ lambda_name }}" + state: absent + zip_file: "{{ tmp.path }}/hello_world.zip" + runtime: 'python2.7' + role: "{{ secret_manager_role }}" + handler: 'hello_world.lambda_handler' + ignore_errors: yes + + # CI does not remove the IAM role + - name: remove IAM role + iam_role: + name: "{{ secret_manager_role }}" + assume_role_policy_document: "{{ lookup('file','secretsmanager-trust-policy.json') }}" + state: absent + create_instance_profile: no + managed_policy: + - 'arn:aws:iam::aws:policy/SecretsManagerReadWrite' + ignore_errors: yes + + - name: remove temporary dir + file: + path: "{{ tmp.path }}" + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/aliases new file mode 100644 index 00000000..157ce0c9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group3 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/defaults/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/defaults/main.yaml new file mode 100644 index 00000000..f36d0179 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/defaults/main.yaml @@ -0,0 +1,4 @@ +--- +email_identity: "{{ resource_prefix }}@example.com" +domain_identity: "{{ resource_prefix }}.example.com" +notification_queue_name: "{{ resource_prefix }}-notification-queue" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/meta/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/meta/main.yaml new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/meta/main.yaml diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/tasks/assert_defaults.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/tasks/assert_defaults.yaml new file mode 100644 index 00000000..0f74d2f0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/tasks/assert_defaults.yaml @@ -0,0 +1,23 @@ +- name: assert returned identity + assert: + that: + - result.identity == identity +- name: assert returned identity_arn + assert: + that: + - "result.identity_arn|regex_search('^arn:aws:ses:' + ec2_region + ':[0-9]*:identity/' + identity + '$')" + msg: "'{{ result.identity_arn}}' doesn't match regex '^arn:aws:ses:{{ ec2_region }}:[0-9]*:identity/{{ identity }}'" +- name: assert verification_attributes.verification_status == 'Pending' + assert: + that: + - result.verification_attributes.verification_status == 'Pending' +- name: assert notification defaults + assert: + that: + - result.notification_attributes.forwarding_enabled == True + - result.notification_attributes.headers_in_bounce_notifications_enabled == False + - result.notification_attributes.headers_in_complaint_notifications_enabled == False + - result.notification_attributes.headers_in_delivery_notifications_enabled == False + - "'bounce_topic' not in result.notification_attributes" + - "'complaint_topic' not in result.notification_attributes" + - "'delivery_topic' not in result.notification_attributes" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/tasks/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/tasks/main.yaml new file mode 100644 index 00000000..1be6c954 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity/tasks/main.yaml @@ -0,0 +1,648 @@ +--- +# ============================================================ +- name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + +- name: test register email identity + block: + - name: register email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + <<: *aws_connection_info + register: result + - name: assert changed is True + assert: + that: + - result.changed == True + - import_tasks: assert_defaults.yaml + vars: + identity: "{{ email_identity }}" + always: + - name: cleanup email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test register domain identity + block: + - name: register domain identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: result + - name: assert changed is True + assert: + that: + - result.changed == True + - import_tasks: assert_defaults.yaml + vars: + identity: "{{ domain_identity }}" + - name: assert verification_attributes.verification_token is defined + assert: + that: + - result.verification_attributes.verification_token + always: + - name: cleanup domain identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test email_identity unchanged when already existing + block: + - name: register identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + <<: *aws_connection_info + - name: duplicate register identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + <<: *aws_connection_info + register: result + - name: assert changed is False + assert: + that: + - result.changed == False + - import_tasks: assert_defaults.yaml + vars: + identity: "{{ email_identity }}" + always: + - name: cleanup identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test domain_identity unchanged when already existing + block: + - name: register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + - name: duplicate register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: result + - name: assert changed is False + assert: + that: + - result.changed == False + - import_tasks: assert_defaults.yaml + vars: + identity: "{{ domain_identity }}" + always: + - name: cleanup identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +# Test for https://github.com/ansible/ansible/issues/51531 +# because aws region is explicitly used rather than just to +# obtain a connection, make sure this still works when +# region comes from an environment rather than a parameter. +- name: test register identity without explicit region + block: + - name: register email identity without explicit region + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + <<: *aws_connection_info + region: "{{ omit }}" + register: result + environment: + AWS_DEFAULT_REGION: "{{ aws_region }}" + - name: assert changed is True + assert: + that: + - result.changed == True + - import_tasks: assert_defaults.yaml + vars: + identity: "{{ email_identity }}" + always: + - name: cleanup email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test register email identity check mode + block: + - name: register email identity check mode + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + <<: *aws_connection_info + register: result + check_mode: True + + - name: assert changed is True + assert: + that: + - result.changed == True + + - import_tasks: assert_defaults.yaml + vars: + identity: "{{ email_identity }}" + + always: + - name: cleanup email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info + register: result + + - name: assert nothing to clean up since check mode + assert: + that: + - result.changed == False +# ============================================================ +- name: test register domain identity check mode + block: + - name: register domain identity check mode + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: result + check_mode: True + + - name: assert changed is True + assert: + that: + - result.changed == True + + - import_tasks: assert_defaults.yaml + vars: + identity: "{{ domain_identity }}" + + always: + - name: cleanup domain identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info + register: result + + - name: assert nothing to clean up since check mode + assert: + that: + - result.changed == False +# ============================================================ +- name: remove non-existent email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info + register: result +- name: assert changed is False + assert: + that: + - result.changed == False +# ============================================================ +- name: remove non-existent domain identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info + register: result +- name: assert changed is False + assert: + that: + - result.changed == False +# ============================================================ +- name: test remove email identity check mode + block: + - name: register email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + <<: *aws_connection_info + register: result + + - name: remove email identity check mode + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info + register: result + check_mode: True + + - name: assert changed is True + assert: + that: + - result.changed == True + always: + - name: cleanup email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info + register: result + + - name: assert something to clean up since remove was check mode + assert: + that: + - result.changed == True +# ============================================================ +- name: test remove domain identity check mode + block: + - name: register domain identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: result + + - name: remove domain identity check mode + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info + register: result + check_mode: True + + - name: assert changed is True + assert: + that: + - result.changed == True + always: + - name: cleanup domain identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info + register: result + + - name: assert something to clean up since remove was check mode + assert: + that: + - result.changed == True +# ============================================================ +- name: test set notification queues + block: + - name: test topic + sns_topic: + name: "{{ notification_queue_name }}-{{ item }}" + state: present + <<: *aws_connection_info + register: topic_info + with_items: + - bounce + - complaint + - delivery + - name: register email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + bounce_notifications: + topic: "{{ topic_info.results[0].sns_arn }}" + complaint_notifications: + topic: "{{ topic_info.results[1].sns_arn }}" + delivery_notifications: + topic: "{{ topic_info.results[2].sns_arn }}" + <<: *aws_connection_info + register: result + - name: assert notification settings + assert: + that: + - result.notification_attributes.bounce_topic == topic_info.results[0].sns_arn + - result.notification_attributes.complaint_topic == topic_info.results[1].sns_arn + - result.notification_attributes.delivery_topic == topic_info.results[2].sns_arn + - name: assert notification headers unchanged + assert: + that: + - result.notification_attributes.headers_in_bounce_notifications_enabled == False + - result.notification_attributes.headers_in_complaint_notifications_enabled == False + - result.notification_attributes.headers_in_delivery_notifications_enabled == False + always: + - name: cleanup topics + sns_topic: + name: "{{ notification_queue_name }}-{{ item }}" + state: absent + <<: *aws_connection_info + with_items: + - bounce + - complaint + - delivery + - name: cleanup email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test change notification queues after create + block: + - name: test topic + sns_topic: + name: "{{ notification_queue_name }}-{{ item }}" + state: present + <<: *aws_connection_info + register: topic_info + with_items: + - bounce + - complaint + - delivery + - name: register email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + <<: *aws_connection_info + - name: set notification topics + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + bounce_notifications: + topic: "{{ topic_info.results[0].sns_arn }}" + complaint_notifications: + topic: "{{ topic_info.results[1].sns_arn }}" + delivery_notifications: + topic: "{{ topic_info.results[2].sns_arn }}" + <<: *aws_connection_info + register: result + - name: assert changed is True + assert: + that: + - result.changed == True + - name: assert notification settings + assert: + that: + - result.notification_attributes.bounce_topic == topic_info.results[0].sns_arn + - result.notification_attributes.complaint_topic == topic_info.results[1].sns_arn + - result.notification_attributes.delivery_topic == topic_info.results[2].sns_arn + always: + - name: cleanup topics + sns_topic: + name: "{{ notification_queue_name }}-{{ item }}" + state: absent + <<: *aws_connection_info + with_items: + - bounce + - complaint + - delivery + - name: cleanup email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test change notification settings check mode + block: + - name: test topic + sns_topic: + name: "{{ notification_queue_name }}-{{ item }}" + state: present + <<: *aws_connection_info + register: topic_info + with_items: + - bounce + - complaint + - delivery + + - name: register email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + <<: *aws_connection_info + + - name: set notification settings check mode + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + bounce_notifications: + topic: "{{ topic_info.results[0].sns_arn }}" + include_headers: Yes + complaint_notifications: + topic: "{{ topic_info.results[1].sns_arn }}" + include_headers: Yes + delivery_notifications: + topic: "{{ topic_info.results[2].sns_arn }}" + include_headers: Yes + feedback_forwarding: No + <<: *aws_connection_info + register: result + check_mode: True + + - name: assert changed is True + assert: + that: + - result.changed == True + + - name: assert notification settings + assert: + that: + - result.notification_attributes.bounce_topic == topic_info.results[0].sns_arn + - result.notification_attributes.headers_in_bounce_notifications_enabled == True + - result.notification_attributes.delivery_topic == topic_info.results[2].sns_arn + - result.notification_attributes.headers_in_delivery_notifications_enabled == True + - result.notification_attributes.complaint_topic == topic_info.results[1].sns_arn + - result.notification_attributes.headers_in_complaint_notifications_enabled == True + - result.notification_attributes.forwarding_enabled == False + + - name: re-register base email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + <<: *aws_connection_info + register: result + + - name: assert no change since notifications were check mode + assert: + that: + - result.changed == False + - "'bounce_topic' not in result.notification_attributes" + - result.notification_attributes.headers_in_bounce_notifications_enabled == False + - "'delivery_topic' not in result.notification_attributes" + - result.notification_attributes.headers_in_delivery_notifications_enabled == False + - "'complaint_topic' not in result.notification_attributes" + - result.notification_attributes.headers_in_complaint_notifications_enabled == False + - result.notification_attributes.forwarding_enabled == True + + always: + - name: cleanup topics + sns_topic: + name: "{{ notification_queue_name }}-{{ item }}" + state: absent + <<: *aws_connection_info + with_items: + - bounce + - complaint + - delivery + + - name: cleanup email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test include headers on notification queues + block: + - name: register email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + bounce_notifications: + include_headers: Yes + complaint_notifications: + include_headers: Yes + delivery_notifications: + include_headers: Yes + <<: *aws_connection_info + register: result + - name: assert notification headers enabled + assert: + that: + - result.notification_attributes.headers_in_bounce_notifications_enabled == True + - result.notification_attributes.headers_in_complaint_notifications_enabled == True + - result.notification_attributes.headers_in_delivery_notifications_enabled == True + always: + - name: cleanup email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test disable feedback forwarding + block: + - name: test topic + sns_topic: + name: "{{ notification_queue_name }}-{{ item }}" + state: present + <<: *aws_connection_info + register: topic_info + with_items: + - bounce + - complaint + - name: register email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + bounce_notifications: + topic: "{{ topic_info.results[0].sns_arn }}" + complaint_notifications: + topic: "{{ topic_info.results[1].sns_arn }}" + feedback_forwarding: No + <<: *aws_connection_info + register: result + - name: assert feedback_forwarding == False + assert: + that: + - result.notification_attributes.forwarding_enabled == False + always: + - name: cleanup topics + sns_topic: + name: "{{ notification_queue_name }}-{{ item }}" + state: absent + <<: *aws_connection_info + with_items: + - bounce + - complaint + - name: cleanup email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test disable feedback forwarding fails if no topics + block: + - name: register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + feedback_forwarding: No + <<: *aws_connection_info + register: result + failed_when: result.failed == False + - name: assert error message starts with "Invalid Parameter Value" + assert: + that: + - '"Invalid Parameter Value" in result.msg' + always: + - name: cleanup identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test disable feedback forwarding fails if no complaint topic + block: + - name: test topic + sns_topic: + name: "{{ notification_queue_name }}-bounce" + state: present + <<: *aws_connection_info + register: topic_info + - name: register email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + bounce_notifications: + topic: "{{ topic_info.sns_arn }}" + feedback_forwarding: No + <<: *aws_connection_info + register: result + failed_when: result.failed == False + - name: assert error message starts with "Invalid Parameter Value" + assert: + that: + - '"Invalid Parameter Value" in result.msg' + always: + - name: cleanup topics + sns_topic: + name: "{{ notification_queue_name }}-bounce" + state: absent + <<: *aws_connection_info + - name: cleanup identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test disable feedback forwarding fails if no bounce topic + block: + - name: test topic + sns_topic: + name: "{{ notification_queue_name }}-complaint" + state: present + <<: *aws_connection_info + register: topic_info + - name: register email identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: present + complaint_notifications: + topic: "{{ topic_info.sns_arn }}" + feedback_forwarding: No + <<: *aws_connection_info + register: result + failed_when: result.failed == False + - name: assert error message starts with "Invalid Parameter Value" + assert: + that: + - '"Invalid Parameter Value" in result.msg' + always: + - name: cleanup topics + sns_topic: + name: "{{ notification_queue_name }}-complaint" + state: absent + <<: *aws_connection_info + - name: cleanup identity + aws_ses_identity: + identity: "{{ email_identity }}" + state: absent + <<: *aws_connection_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/aliases new file mode 100644 index 00000000..a112c3d1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group1 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/defaults/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/defaults/main.yaml new file mode 100644 index 00000000..e77f32d0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/defaults/main.yaml @@ -0,0 +1,3 @@ +--- +domain_identity: "{{ resource_prefix }}.example.com" +policy_name: "TestPolicy" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/tasks/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/tasks/main.yaml new file mode 100644 index 00000000..ee10c0b8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/tasks/main.yaml @@ -0,0 +1,334 @@ +--- +# ============================================================ +- name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes +# ============================================================ +- name: test add identity policy + block: + - name: register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: identity_info + + - name: register identity policy + aws_ses_identity_policy: + identity: "{{ domain_identity }}" + policy_name: "{{ policy_name }}" + policy: "{{ lookup('template', 'policy.json.j2') }}" + state: present + <<: *aws_connection_info + register: result + + - name: assert result.changed == True + assert: + that: + - result.changed == True + + - name: assert result.policies contains only policy + assert: + that: + - result.policies|length == 1 + - result.policies|select('equalto', policy_name)|list|length == 1 + + always: + - name: clean-up identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test add duplicate identity policy + block: + - name: register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: identity_info + + - name: register identity policy + aws_ses_identity_policy: + identity: "{{ domain_identity }}" + policy_name: "{{ policy_name }}" + policy: "{{ lookup('template', 'policy.json.j2') }}" + state: present + <<: *aws_connection_info + + - name: register duplicate identity policy + aws_ses_identity_policy: + identity: "{{ domain_identity }}" + policy_name: "{{ policy_name }}" + policy: "{{ lookup('template', 'policy.json.j2') }}" + state: present + <<: *aws_connection_info + register: result + + - name: assert result.changed == False + assert: + that: + - result.changed == False + + - name: assert result.policies contains only policy + assert: + that: + - result.policies|length == 1 + - result.policies|select('equalto', policy_name)|list|length == 1 + + always: + - name: clean-up identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test add identity policy by identity arn + block: + - name: register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: identity_info + + - name: register identity policy + aws_ses_identity_policy: + identity: "{{ identity_info.identity_arn }}" + policy_name: "{{ policy_name }}" + policy: "{{ lookup('template', 'policy.json.j2') }}" + state: present + <<: *aws_connection_info + register: result + + - name: assert result.changed == True + assert: + that: + - result.changed == True + + - name: assert result.policies contains only policy + assert: + that: + - result.policies|length == 1 + - result.policies|select('equalto', policy_name)|list|length == 1 + + always: + - name: clean-up identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test add multiple identity policies + block: + - name: register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: identity_info + + - name: register identity policy + aws_ses_identity_policy: + identity: "{{ domain_identity }}" + policy_name: "{{ policy_name }}-{{ item }}" + policy: "{{ lookup('template', 'policy.json.j2') }}" + state: present + <<: *aws_connection_info + with_items: + - 1 + - 2 + register: result + + - name: assert result.policies contains policies + assert: + that: + - result.results[1].policies|length == 2 + - result.results[1].policies|select('equalto', policy_name + '-1')|list|length == 1 + - result.results[1].policies|select('equalto', policy_name + '-2')|list|length == 1 + + always: + - name: clean-up identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test add inline identity policy + block: + - name: register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: identity_info + + - name: register identity policy + aws_ses_identity_policy: + identity: "{{ domain_identity }}" + policy_name: "{{ policy_name }}" + policy: + Id: SampleAuthorizationPolicy + Version: "2012-10-17" + Statement: + - Sid: DenyAll + Effect: Deny + Resource: "{{ identity_info.identity_arn }}" + Principal: "*" + Action: "*" + state: present + <<: *aws_connection_info + register: result + + - name: assert result.changed == True + assert: + that: + - result.changed == True + + - name: assert result.policies contains only policy + assert: + that: + - result.policies|length == 1 + - result.policies|select('equalto', policy_name)|list|length == 1 + + - name: register duplicate identity policy + aws_ses_identity_policy: + identity: "{{ domain_identity }}" + policy_name: "{{ policy_name }}" + policy: + Id: SampleAuthorizationPolicy + Version: "2012-10-17" + Statement: + - Sid: DenyAll + Effect: Deny + Resource: "{{ identity_info.identity_arn }}" + Principal: "*" + Action: "*" + state: present + <<: *aws_connection_info + register: result + + - name: assert result.changed == False + assert: + that: + - result.changed == False + + always: + - name: clean-up identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test remove identity policy + block: + - name: register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: identity_info + + - name: register identity policy + aws_ses_identity_policy: + identity: "{{ domain_identity }}" + policy_name: "{{ policy_name }}" + policy: "{{ lookup('template', 'policy.json.j2') }}" + state: present + <<: *aws_connection_info + + - name: delete identity policy + aws_ses_identity_policy: + identity: "{{ domain_identity }}" + policy_name: "{{ policy_name }}" + state: absent + <<: *aws_connection_info + register: result + + - name: assert result.changed == True + assert: + that: + - result.changed == True + + - name: assert result.policies empty + assert: + that: + - result.policies|length == 0 + + always: + - name: clean-up identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test remove missing identity policy + block: + - name: register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: identity_info + + - name: delete identity policy + aws_ses_identity_policy: + identity: "{{ domain_identity }}" + policy_name: "{{ policy_name }}" + state: absent + <<: *aws_connection_info + register: result + + - name: assert result.changed == False + assert: + that: + - result.changed == False + + - name: assert result.policies empty + assert: + that: + - result.policies|length == 0 + + always: + - name: clean-up identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info +# ============================================================ +- name: test add identity policy with invalid policy + block: + - name: register identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: present + <<: *aws_connection_info + register: identity_info + + - name: register identity policy + aws_ses_identity_policy: + identity: "{{ domain_identity }}" + policy_name: "{{ policy_name }}" + policy: '{"noSuchAttribute": 2}' + state: present + <<: *aws_connection_info + register: result + failed_when: result.failed == False + + - name: assert error.code == InvalidPolicy + assert: + that: + - result.error.code == 'InvalidPolicy' + + always: + - name: clean-up identity + aws_ses_identity: + identity: "{{ domain_identity }}" + state: absent + <<: *aws_connection_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/templates/policy.json.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/templates/policy.json.j2 new file mode 100644 index 00000000..b198e38f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_identity_policy/templates/policy.json.j2 @@ -0,0 +1,13 @@ +{ + "Id": "SampleAuthorizationPolicy", + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "DenyAll", + "Effect": "Deny", + "Resource": "{{ identity_info.identity_arn }}", + "Principal": "*", + "Action": "*" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/defaults/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/defaults/main.yaml new file mode 100644 index 00000000..f9fecf7b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/defaults/main.yaml @@ -0,0 +1,9 @@ +--- +default_rule_set: "{{ resource_prefix }}-default-rule-set" +second_rule_set: "{{ resource_prefix }}-second-rule-set" + +# See comment in obtain-lock.yaml for definitions of these variables +max_obtain_lock_attempts: 10 +obtain_lock_delay_seconds: 30 +lock_timeout_seconds: 900 +lock_log_group_prefix: "ansible-testing-locks/aws_ses_rule_set" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/active-rule-set-tests.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/active-rule-set-tests.yaml new file mode 100644 index 00000000..99655e85 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/active-rule-set-tests.yaml @@ -0,0 +1,349 @@ +--- +# ============================================================ +# These tests all rely on making rule sets active. There can only be +# a single active rule set so multiple builds must not run these tests +# in parallel or they will fail intermittently. +# See the locking block in main.yaml for how this restriction is enforced +# ============================================================ + +- name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + +# ============================================================ +- name: mark rule set active + block: + - name: create rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + <<: *aws_connection_info + - name: mark rule set active + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + register: result + - name: assert changed to active + assert: + that: + - result.changed == True + - result.active == True + - name: remark rule set active + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + register: result + - name: assert changed is False + assert: + that: + - result.changed == False + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + +# ============================================================ +- name: create rule set active + block: + - name: create rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + register: result + - name: assert changed to existing and active + assert: + that: + - result.changed == True + - result.active == True + - "default_rule_set in result.rule_sets|map(attribute='name')" + - name: remark rule set active + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + register: result + - name: assert changed is False + assert: + that: + - result.changed == False + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + +# ============================================================ +- name: mark rule set inactive + block: + - name: create active rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + - name: mark rule set inactive + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: False + <<: *aws_connection_info + register: result + - name: assert changed to inactive + assert: + that: + - result.changed == True + - result.active == False + - name: remark rule set inactive + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: False + <<: *aws_connection_info + register: result + - name: assert changed is False + assert: + that: + - result.changed == False + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + +# ============================================================ +- name: Absent active flag does not change active status + block: + - name: create active rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + - name: recreate rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + <<: *aws_connection_info + register: result + - name: assert not changed and still active + assert: + that: + - result.changed == False + - result.active == True + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + +# ============================================================ +- name: Cannot Remove Active Rule Set + block: + - name: create active rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + - name: remove rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + <<: *aws_connection_info + register: result + failed_when: "result.error.code != 'CannotDelete'" + - name: assert error code is CannotDelete + assert: + that: + - "result.error.code == 'CannotDelete'" + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + +# ============================================================ +- name: Remove Active Rule Set with Force + block: + - name: create active rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + - name: force remove rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + register: result + - name: assert changed and absent + assert: + that: + - result.changed == True + - "default_rule_set not in result.rule_sets|map(attribute='name')" + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + +# ============================================================ +- name: Force Remove of Inactive Rule Set does Not Affect Active Rule Set + block: + - name: create active rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + - name: create inactive rule set + aws_ses_rule_set: + name: "{{ second_rule_set }}" + active: False + <<: *aws_connection_info + - name: force remove inactiave rule set + aws_ses_rule_set: + name: "{{ second_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + register: result + - name: assert changed and absent + assert: + that: + - result.changed == True + - "second_rule_set not in result.rule_sets|map(attribute='name')" + - name: remark active rule set active + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + register: result + - name: assert no change + assert: + that: + - result.changed == False + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ item }}" + state: absent + force: True + <<: *aws_connection_info + loop: + - "{{ default_rule_set }}" + - "{{ second_rule_set }}" + +# ============================================================ +- name: mark rule set inactive in check mode + block: + - name: create rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + - name: mark rule set inactive in check mode + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: False + <<: *aws_connection_info + register: result + check_mode: True + - name: assert changed to inactive + assert: + that: + - result.changed == True + - result.active == False + - name: remark rule set inactive + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: False + <<: *aws_connection_info + register: result + - name: assert changed is True since previous inactive was in check mode + assert: + that: + - result.changed == True + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + +# ============================================================ +- name: Cannot Remove Active Rule Set in check mode + block: + - name: create active rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + - name: remove rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + <<: *aws_connection_info + register: result + failed_when: "result.error.code != 'CannotDelete'" + check_mode: True + - name: assert error code is CannotDelete + assert: + that: + - "result.error.code == 'CannotDelete'" + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + +# ============================================================ +- name: Remove Active Rule Set with Force in check mode + block: + - name: create active rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + - name: force remove rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + register: result + check_mode: True + - name: assert changed and absent + assert: + that: + - result.changed == True + - "default_rule_set not in result.rule_sets|map(attribute='name')" + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + register: result + - name: assert changed is True since previous removal was in check mode + assert: + that: + - result.changed == True diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/cleanup-lock.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/cleanup-lock.yaml new file mode 100644 index 00000000..155bf472 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/cleanup-lock.yaml @@ -0,0 +1,15 @@ +--- +# ============================================================ +# Release a lock obtained using obtain-lock.yaml +# This should be included in the always clause of a block to +# ensure the lock is released. See obtain-lock.yaml for more +# details of how the locking works. +# ============================================================ + +- cloudwatchlogs_log_group: + log_group_name: "{{ lock_attempt_log_group_name }}" + state: absent + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/inactive-rule-set-tests.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/inactive-rule-set-tests.yaml new file mode 100644 index 00000000..4bd5250a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/inactive-rule-set-tests.yaml @@ -0,0 +1,187 @@ +--- +# ============================================================ +# These tests work on rule sets without making them active. +# so multiple builds can safely run these tests as is normal. +# +# DO NOT ADD TESTS THAT RELY ON ACTIVE RULE SETS TO THIS FILE +# +# Any test that make rule sets active must be added in +# active-rule-set-tests.yaml or you will have intermittent failures +# from multiple builds interacting +# ============================================================ + +- name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + +# ============================================================ +- name: test create rule sets + block: + - name: create rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + <<: *aws_connection_info + register: result + - name: assert changed to exists inactive + assert: + that: + - result.changed == True + - result.active == False + - "default_rule_set in result.rule_sets|map(attribute='name')" + - name: recreate rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + <<: *aws_connection_info + register: result + - name: assert changed is False + assert: + that: + - result.changed == False + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info +# ============================================================ +- name: Remove No Such Rules Set + block: + - name: remove ruleset + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + <<: *aws_connection_info + register: result + - name: assert not changed and absent + assert: + that: + - result.changed == False + - "default_rule_set not in result.rule_sets|map(attribute='name')" +# ============================================================ +- name: Remove Inactive Rule Set + block: + - name: create rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + <<: *aws_connection_info + - name: remove rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + <<: *aws_connection_info + register: result + - name: assert changed and removed + assert: + that: + - result.changed == True + - "default_rule_set not in result.rule_sets|map(attribute='name')" + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info +# ============================================================ +- name: test create in check mode + block: + - name: create rule set in check mode + aws_ses_rule_set: + name: "{{ default_rule_set }}" + <<: *aws_connection_info + register: result + check_mode: True + - name: assert changed inactive and present + assert: + that: + - result.changed == True + - result.active == False + - "default_rule_set in result.rule_sets|map(attribute='name')" + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + register: result + - name: assert nothing to clean up since create was in check mode + assert: + that: + - result.changed == False +# ============================================================ +- name: mark rule set active in check mode + block: + - name: create rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + <<: *aws_connection_info + - name: mark rule set active in check mode + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: True + <<: *aws_connection_info + register: result + check_mode: True + - name: assert changed and active + assert: + that: + - result.changed == True + - result.active == True + # We check the rule set is still inactive rather than making + # it active again as that way this test can be run in + # parallel + - name: Ensure rule set is inactive + aws_ses_rule_set: + name: "{{ default_rule_set }}" + active: False + <<: *aws_connection_info + register: result + - name: assert unchanged since activation was in check mode + assert: + that: + - result.changed == False + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info +# ============================================================ +- name: Remove Inactive Rule Set in check mode + block: + - name: create rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + <<: *aws_connection_info + - name: remove rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + <<: *aws_connection_info + register: result + check_mode: True + - name: assert changed and removed + assert: + that: + - result.changed == True + - "default_rule_set not in result.rule_sets|map(attribute='name')" + always: + - name: cleanup rule set + aws_ses_rule_set: + name: "{{ default_rule_set }}" + state: absent + force: True + <<: *aws_connection_info + register: result + - name: assert changed is True since previous removal was in check mode + assert: + that: + - result.changed == True diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/main.yaml new file mode 100644 index 00000000..fe0e7877 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/main.yaml @@ -0,0 +1,36 @@ +--- +- include_tasks: inactive-rule-set-tests.yaml + +# ============================================================ +# There can only be a single active rule set, tests that +# relies on the active state of the rule cannot be run in +# parallel. +# To prevent failures due to parallel runs in the integration +# builds, the below block creates a lock to ensure that only +# one process will be running these tests in the same region +# and same AWS account. +# See obtain-lock.yaml for explanation of how the lock is +# constructed. +# ============================================================ +- name: Active Rule Set Tests + block: + - name: Obtain Lock + include_tasks: obtain-lock-wrapper.yaml + # Use of loop here is a workaround for lack of support for + # do-until loops on includes. See: + # https://github.com/ansible/ansible/issues/17098 + loop: "{{ range(0, max_obtain_lock_attempts, 1)|list }}" + loop_control: + loop_var: obtain_lock_attempt + + # Because of the above workaround we have to explicitly check + # that the lock was obtained + - name: Check Obtained Lock + assert: + msg: "Could not obtain lock after {{ max_obtain_lock_attempts }} attempts." + that: won_lock|bool + + - include_tasks: active-rule-set-tests.yaml + + always: + - include_tasks: cleanup-lock.yaml diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/obtain-lock-wrapper.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/obtain-lock-wrapper.yaml new file mode 100644 index 00000000..36969897 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/obtain-lock-wrapper.yaml @@ -0,0 +1,26 @@ +# ============================================================ +# Do While loops cannot be used on task includes. +# See: https://github.com/ansible/ansible/issues/17098 +# +# So as a workaround we use a regular loop to repeatedly attempt +# obtaining a lock. +# +# For this to work we need to skip the subsequent iterations +# once we get a lock, and delay between iterations if we +# did not obtain the lock. +# +# This file encapsulates this logic to reduce the spam from +# skipped tasks in the ansible log. +# ============================================================ + +- include_tasks: obtain-lock.yaml + # Skip obtaining a lock if we've already succeeded in getting it + when: "not won_lock|default(False)|bool" + +- name: Lock Retry Delay + wait_for: + # Add some random jitter to the delay to reduce lock contention + timeout: "{{ obtain_lock_delay_seconds + 15|random }}" + # Only delay if we're retrying, so skip the delay if we're + # on the last attempt or have got the lock + when: "obtain_lock_attempt < (max_obtain_lock_attempts - 1) and not won_lock|bool" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/obtain-lock.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/obtain-lock.yaml new file mode 100644 index 00000000..d12c57c6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ses_rule_set/tasks/obtain-lock.yaml @@ -0,0 +1,126 @@ +# ============================================================ +# This file attempts to obtain a global lock (for a given +# region / account combination. +# +# This makes one attempt to get the lock and will set the +# won_lock variable to True or False to indicate whether +# or not we got the lock. +# +# It's expected that this will be executed in a retry loop +# so that if we don't get the lock we delay then try again. +# +# This should only be used in a block with cleanup-lock.yaml +# included in the always clause to ensure the lock is released. +# +# There are several variables that control the locking behaviour: +# * lock_timeout_seconds +# How old a lock must be before it's assumed to be an expired +# lock that was not cleaned up by the owner. Any locks older +# than this will not prevent a lock being obtained and will +# be deleted when a new process obtains the lock. +# * lock_log_group_prefix +# The log_group prefix that represents the lock being obtained. +# This must be the same across all processes trying to obtain +# the lock. +# * lock_process_id +# A unique identifier of this process. Each process that might +# attempt to lock the process must have a different identifier. +# This defaults to the resource_prefix which is generally +# appropriate. +# * max_obtain_lock_attempts +# How many attempts to make to get the lock before giving up +# NB: This is actually done in main.yaml +# * obtain_lock_delay_seconds: +# How long to delay after failing to get the lock before +# trying again. +# NB: This is actually done in obtain-lock-wrapper.yaml +# +# The locking here is based around creating cloudwatch log groups. +# This resource was chosen because: +# A) it's free +# B) we have a built in grouping concept because of the hierarchy +# that allows us to easily group attempts for the same lock +# C) the creation time is tracked and returned which gives us +# a mechanism for deterministically picking a winner +# +# Each lock is represented by a log group prefix. Each attempt +# to obtain the lock is a log group of the lock_process_id below +# that prefix. +# +# The winning lock is the one with the earliest creation time. +# +# To prevent a hanging lock from permanently hanging the build +# lock attempts older than the lock timeout are ignored and +# cleaned up by the next process to win the lock. +# ============================================================ + +- name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + +- name: Set lock_attempt_log_group_name + set_fact: + lock_attempt_log_group_name: "{{ lock_log_group_prefix }}/{{ lock_process_id|default(resource_prefix) }}" + + # Note the overwrite below to ensure that the creation time + # is upated. This is important as we calculate expiry relative + # the attempt creation. + # + # Because of this it's imporatnt that we delete the attempt + # if we don't get the lock. Otherwise we can get a deadlock + # where the stale atttempt from one process wins, but then + # because that process updates the creation date it doesn't + # consider its self to havewone. +- name: Create Lock Attempt Log Group + cloudwatchlogs_log_group: + log_group_name: "{{ lock_attempt_log_group_name }}" + state: present + overwrite: True + <<: *aws_connection_info + register: lock_attempt_log_group_result + +- name: Get Lock Attempt Lock Groups + cloudwatchlogs_log_group_info: + log_group_name: "{{ lock_log_group_prefix }}/" + <<: *aws_connection_info + register: lock_attempt_log_groups + +- name: Calculate Expired Lock Attempt Timestamp + set_fact: + expired_lock_timestamp: "{{ lock_attempt_log_group_result.creation_time - (lock_timeout_seconds * 1000) }}" + +- name: Get Expired and Active Lock Attempts + set_fact: + expired_lock_attempts: "{{ lock_attempt_log_groups.log_groups|selectattr('creation_time', 'lt', expired_lock_timestamp|int)|list }}" + active_lock_attempts: "{{ lock_attempt_log_groups.log_groups|selectattr('creation_time', 'ge', expired_lock_timestamp|int)|list }}" + +- name: Pick Winning Lock Attempt + set_fact: + winning_lock_attempt: "{{ active_lock_attempts|sort(attribute='creation_time')|first }}" + +- name: Determine if Won Lock + set_fact: + won_lock: "{{ winning_lock_attempt.log_group_name == lock_attempt_log_group_name }}" + + # Remove the lock attempt if we didn't get the lock. This prevents + # our stale lock attempt blocking another process from getting the lock. + # See more detailed comment above Create Lock Attempt Log Group +- name: Remove Failed Lock Attempt Log Group + cloudwatchlogs_log_group: + log_group_name: "{{ lock_attempt_log_group_name }}" + state: absent + <<: *aws_connection_info + when: "not won_lock|bool" + +- name: Delete Expired Lock Attempts + cloudwatchlogs_log_group: + log_group_name: "{{ item.log_group_name }}" + state: absent + <<: *aws_connection_info + when: "won_lock|bool" + loop: "{{ expired_lock_attempts }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ssm_parameter_store/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ssm_parameter_store/aliases new file mode 100644 index 00000000..72a9fb4f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ssm_parameter_store/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group4 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ssm_parameter_store/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ssm_parameter_store/defaults/main.yml new file mode 100644 index 00000000..13f8ba31 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ssm_parameter_store/defaults/main.yml @@ -0,0 +1,3 @@ +--- +# defaults file for aws_lambda test +ssm_key_prefix: '{{resource_prefix}}' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ssm_parameter_store/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ssm_parameter_store/tasks/main.yml new file mode 100644 index 00000000..0f538df9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_ssm_parameter_store/tasks/main.yml @@ -0,0 +1,132 @@ +--- +# +# Author: Michael De La Rue +# based on aws_lambda test cases + +- block: + + # ============================================================ + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + # ============================================================ + - name: Create or update key/value pair in aws parameter store + aws_ssm_parameter_store: + name: "/{{ssm_key_prefix}}/Hello" + description: "This is your first key" + value: "World" + <<: *aws_connection_info + + - name: Check that parameter was stored correctly + assert: + that: + - "'{{lookup('amazon.aws.aws_ssm', '/' ~ ssm_key_prefix ~ '/Hello', region=ec2_region, aws_access_key=ec2_access_key, aws_secret_key=ec2_secret_key, aws_security_token=security_token )}}' == 'World'" + + # ============================================================ + - name: Create or update key/value pair in aws parameter store + aws_ssm_parameter_store: + name: "/{{ssm_key_prefix}}/path/wonvar" + description: "This is your first key" + value: "won value" + <<: *aws_connection_info + + - name: Create or update key/value pair in aws parameter store + aws_ssm_parameter_store: + name: "/{{ssm_key_prefix}}/path/toovar" + description: "This is your first key" + value: "too value" + <<: *aws_connection_info + + - name: Create or update key/value pair in aws parameter store + aws_ssm_parameter_store: + name: "/{{ssm_key_prefix}}/path/tree/treevar" + description: "This is your first key" + value: "tree value" + <<: *aws_connection_info + + # ============================================================ + - name: Create or update key/value pair in aws parameter store + aws_ssm_parameter_store: + name: "/{{ssm_key_prefix}}/deeppath/wondir/samevar" + description: "This is your first key" + value: "won value" + <<: *aws_connection_info + + - name: Create or update key/value pair in aws parameter store + aws_ssm_parameter_store: + name: "/{{ssm_key_prefix}}/deeppath/toodir/samevar" + description: "This is your first key" + value: "too value" + <<: *aws_connection_info + + # ============================================================ + - name: debug the lookup + debug: + msg: "{{lookup('amazon.aws.aws_ssm', '/' ~ ssm_key_prefix ~ '/path', region=ec2_region, aws_access_key=ec2_access_key, aws_secret_key=ec2_secret_key, aws_security_token=security_token, bypath=True )}}'" + + - name: Check that parameter path is stored and retrieved + assert: + that: + - "'{{lookup('amazon.aws.aws_ssm', '/' ~ ssm_key_prefix ~ '/path', region=ec2_region, aws_access_key=ec2_access_key, aws_secret_key=ec2_secret_key, aws_security_token=security_token, bypath=True, shortnames=true ) | to_json }}' == '{\"toovar\": \"too value\", \"wonvar\": \"won value\"}'" + + # ============================================================ + - name: Returns empty value in case we don't find a named parameter and default filter works + assert: + that: + - "'{{lookup('amazon.aws.aws_ssm', '/' ~ ssm_key_prefix ~ '/Goodbye', region=ec2_region, aws_access_key=ec2_access_key, aws_secret_key=ec2_secret_key, aws_security_token=security_token )}}' == ''" + - "'{{lookup('amazon.aws.aws_ssm', '/' ~ ssm_key_prefix ~ '/Goodbye', region=ec2_region, aws_access_key=ec2_access_key, aws_secret_key=ec2_secret_key, aws_security_token=security_token ) | default('I_can_has_default', true)}}' == 'I_can_has_default'" + + # ============================================================ + - name: Handle multiple paths with one that doesn't exist - default to full names. + assert: + that: + - "'{{lookup('amazon.aws.aws_ssm', '/' ~ ssm_key_prefix ~ '/path', '/' ~ ssm_key_prefix ~ '/dont_create_this_path_you_will_break_the_ansible_tests', region=ec2_region, aws_access_key=ec2_access_key, aws_secret_key=ec2_secret_key, aws_security_token=security_token, bypath=True ) | to_json }}' in ( '[{\"/' ~ ssm_key_prefix ~ '/path/toovar\": \"too value\", \"/' ~ ssm_key_prefix ~ '/path/wonvar\": \"won value\"}, {}]', '[{\"/' ~ ssm_key_prefix ~ '/path/wonvar\": \"won value\", \"/' ~ ssm_key_prefix ~ '/path/toovar\": \"too value\"}, {}]' )" + + + # ============================================================ + # this may be a bit of a nasty test case; we should perhaps accept _either_ value that was stored + # in the two variables named 'samevar' + + - name: Handle multiple paths with one that doesn't exist - shortnames - including overlap. + assert: + that: + - "'{{lookup('amazon.aws.aws_ssm', '/' ~ ssm_key_prefix ~ '/path', '/' ~ ssm_key_prefix ~ '/dont_create_this_path_you_will_break_the_ansible_tests', '/' ~ ssm_key_prefix ~ '/deeppath', region=ec2_region, aws_access_key=ec2_access_key, aws_secret_key=ec2_secret_key, aws_security_token=security_token, bypath=True, shortnames=true, recursive=true ) | to_json }}' == '[{\"toovar\": \"too value\", \"treevar\": \"tree value\", \"wonvar\": \"won value\"}, {}, {\"samevar\": \"won value\"}]'" + + + # ============================================================ + - name: Delete key/value pair in aws parameter store + aws_ssm_parameter_store: + name: "/{{ssm_key_prefix}}/Hello" + state: absent + <<: *aws_connection_info + + # ============================================================ + - name: Attempt delete key/value pair in aws parameter store again + aws_ssm_parameter_store: + name: "/{{ssm_key_prefix}}/Hello" + state: absent + <<: *aws_connection_info + register: result + + - name: assert that changed is False since parameter should be deleted + assert: + that: + - result.changed == False + always: + # ============================================================ + - name: Delete remaining key/value pairs in aws parameter store + aws_ssm_parameter_store: + name: "{{item}}" + state: absent + <<: *aws_connection_info + with_items: + - "/{{ssm_key_prefix}}/Hello" + - "/{{ssm_key_prefix}}/path/wonvar" + - "/{{ssm_key_prefix}}/path/toovar" + - "/{{ssm_key_prefix}}/path/tree/treevar" + - "/{{ssm_key_prefix}}/deeppath/wondir/samevar" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/aliases new file mode 100644 index 00000000..65b315eb --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/aliases @@ -0,0 +1,3 @@ +cloud/aws +shippable/aws/group2 +aws_step_functions_state_machine_execution diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/defaults/main.yml new file mode 100644 index 00000000..273a0c78 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/defaults/main.yml @@ -0,0 +1,4 @@ +# the random_num is generated in a set_fact task at the start of the testsuite +state_machine_name: "{{ resource_prefix }}_step_functions_state_machine_ansible_test_{{ random_num }}" +step_functions_role_name: "ansible-test-sts-{{ resource_prefix }}-step_functions-role" +execution_name: "{{ resource_prefix }}_sfn_execution" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/files/alternative_state_machine.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/files/alternative_state_machine.json new file mode 100644 index 00000000..7b51bebb --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/files/alternative_state_machine.json @@ -0,0 +1,15 @@ +{ + "StartAt": "HelloWorld", + "States": { + "HelloWorld": { + "Type": "Pass", + "Result": "Some other result", + "Next": "Wait" + }, + "Wait": { + "Type": "Wait", + "Seconds": 30, + "End": true + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/files/state_machine.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/files/state_machine.json new file mode 100644 index 00000000..c07d5ceb --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/files/state_machine.json @@ -0,0 +1,10 @@ +{ + "StartAt": "HelloWorld", + "States": { + "HelloWorld": { + "Type": "Pass", + "Result": "Hello World!", + "End": true + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/files/state_machines_iam_trust_policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/files/state_machines_iam_trust_policy.json new file mode 100644 index 00000000..48d62722 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/files/state_machines_iam_trust_policy.json @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/tasks/main.yml new file mode 100644 index 00000000..005af35f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_step_functions_state_machine/tasks/main.yml @@ -0,0 +1,303 @@ +--- + +- name: Integration test for AWS Step Function state machine module + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + + block: + + # ==== Setup ================================================== + + - name: Create IAM service role needed for Step Functions + iam_role: + name: "{{ step_functions_role_name }}" + description: Role with permissions for AWS Step Functions actions. + assume_role_policy_document: "{{ lookup('file', 'state_machines_iam_trust_policy.json') }}" + state: present + register: step_functions_role + + - name: Pause a few seconds to ensure IAM role is available to next task + pause: + seconds: 10 + + # ==== Tests =================================================== + + - name: Create a random component for state machine name + set_fact: + random_num: "{{ 999999999 | random }}" + + - name: Create a new state machine -- check_mode + aws_step_functions_state_machine: + name: "{{ state_machine_name }}" + definition: "{{ lookup('file','state_machine.json') }}" + role_arn: "{{ step_functions_role.iam_role.arn }}" + tags: + project: helloWorld + state: present + register: creation_check + check_mode: yes + + - assert: + that: + - creation_check.changed == True + - creation_check.output == 'State machine would be created.' + + - name: Create a new state machine + aws_step_functions_state_machine: + name: "{{ state_machine_name }}" + definition: "{{ lookup('file','state_machine.json') }}" + role_arn: "{{ step_functions_role.iam_role.arn }}" + tags: + project: helloWorld + state: present + register: creation_output + + - assert: + that: + - creation_output.changed == True + + - name: Pause a few seconds to ensure state machine role is available + pause: + seconds: 5 + + - name: Idempotent rerun of same state function -- check_mode + aws_step_functions_state_machine: + name: "{{ state_machine_name }}" + definition: "{{ lookup('file','state_machine.json') }}" + role_arn: "{{ step_functions_role.iam_role.arn }}" + tags: + project: helloWorld + state: present + register: result + check_mode: yes + + - assert: + that: + - result.changed == False + - result.output == 'State is up-to-date.' + + - name: Idempotent rerun of same state function + aws_step_functions_state_machine: + name: "{{ state_machine_name }}" + definition: "{{ lookup('file','state_machine.json') }}" + role_arn: "{{ step_functions_role.iam_role.arn }}" + tags: + project: helloWorld + state: present + register: result + + - assert: + that: + - result.changed == False + + - name: Update an existing state machine -- check_mode + aws_step_functions_state_machine: + name: "{{ state_machine_name }}" + definition: "{{ lookup('file','alternative_state_machine.json') }}" + role_arn: "{{ step_functions_role.iam_role.arn }}" + tags: + differentTag: different_tag + state: present + register: update_check + check_mode: yes + + - assert: + that: + - update_check.changed == True + - "update_check.output == 'State machine would be updated: {{ creation_output.state_machine_arn }}'" + + - name: Update an existing state machine + aws_step_functions_state_machine: + name: "{{ state_machine_name }}" + definition: "{{ lookup('file','alternative_state_machine.json') }}" + role_arn: "{{ step_functions_role.iam_role.arn }}" + tags: + differentTag: different_tag + state: present + register: update_output + + - assert: + that: + - update_output.changed == True + - update_output.state_machine_arn == creation_output.state_machine_arn + + - name: Start execution of state machine -- check_mode + aws_step_functions_state_machine_execution: + name: "{{ execution_name }}" + execution_input: "{}" + state_machine_arn: "{{ creation_output.state_machine_arn }}" + register: start_execution_output + check_mode: yes + + - assert: + that: + - start_execution_output.changed == True + - "start_execution_output.output == 'State machine execution would be started.'" + + - name: Start execution of state machine + aws_step_functions_state_machine_execution: + name: "{{ execution_name }}" + execution_input: "{}" + state_machine_arn: "{{ creation_output.state_machine_arn }}" + register: start_execution_output + + - assert: + that: + - start_execution_output.changed + - "'execution_arn' in start_execution_output" + - "'start_date' in start_execution_output" + + - name: Start execution of state machine (check for idempotency) (check mode) + aws_step_functions_state_machine_execution: + name: "{{ execution_name }}" + execution_input: "{}" + state_machine_arn: "{{ creation_output.state_machine_arn }}" + register: start_execution_output_idem_check + check_mode: yes + + - assert: + that: + - not start_execution_output_idem_check.changed + - "start_execution_output_idem_check.output == 'State machine execution already exists.'" + + - name: Start execution of state machine (check for idempotency) + aws_step_functions_state_machine_execution: + name: "{{ execution_name }}" + execution_input: "{}" + state_machine_arn: "{{ creation_output.state_machine_arn }}" + register: start_execution_output_idem + + - assert: + that: + - not start_execution_output_idem.changed + + - name: Stop execution of state machine -- check_mode + aws_step_functions_state_machine_execution: + action: stop + execution_arn: "{{ start_execution_output.execution_arn }}" + cause: "cause of the failure" + error: "error code of the failure" + register: stop_execution_output + check_mode: yes + + - assert: + that: + - stop_execution_output.changed + - "stop_execution_output.output == 'State machine execution would be stopped.'" + + - name: Stop execution of state machine + aws_step_functions_state_machine_execution: + action: stop + execution_arn: "{{ start_execution_output.execution_arn }}" + cause: "cause of the failure" + error: "error code of the failure" + register: stop_execution_output + + - assert: + that: + - stop_execution_output.changed + - "'stop_date' in stop_execution_output" + + - name: Stop execution of state machine (check for idempotency) + aws_step_functions_state_machine_execution: + action: stop + execution_arn: "{{ start_execution_output.execution_arn }}" + cause: "cause of the failure" + error: "error code of the failure" + register: stop_execution_output + + - assert: + that: + - not stop_execution_output.changed + + - name: Try stopping a non-running execution -- check_mode + aws_step_functions_state_machine_execution: + action: stop + execution_arn: "{{ start_execution_output.execution_arn }}" + cause: "cause of the failure" + error: "error code of the failure" + register: stop_execution_output + check_mode: yes + + - assert: + that: + - not stop_execution_output.changed + - "stop_execution_output.output == 'State machine execution is not running.'" + + - name: Try stopping a non-running execution + aws_step_functions_state_machine_execution: + action: stop + execution_arn: "{{ start_execution_output.execution_arn }}" + cause: "cause of the failure" + error: "error code of the failure" + register: stop_execution_output + check_mode: yes + + - assert: + that: + - not stop_execution_output.changed + + - name: Start execution of state machine with the same execution name + aws_step_functions_state_machine_execution: + name: "{{ execution_name }}" + state_machine_arn: "{{ creation_output.state_machine_arn }}" + register: start_execution_output_again + + - assert: + that: + - not start_execution_output_again.changed + + - name: Remove state machine -- check_mode + aws_step_functions_state_machine: + name: "{{ state_machine_name }}" + state: absent + register: deletion_check + check_mode: yes + + - assert: + that: + - deletion_check.changed == True + - "deletion_check.output == 'State machine would be deleted: {{ creation_output.state_machine_arn }}'" + + - name: Remove state machine + aws_step_functions_state_machine: + name: "{{ state_machine_name }}" + state: absent + register: deletion_output + + - assert: + that: + - deletion_output.changed == True + - deletion_output.state_machine_arn == creation_output.state_machine_arn + + - name: Non-existent state machine is absent + aws_step_functions_state_machine: + name: "non_existing_state_machine" + state: absent + register: result + + - assert: + that: + - result.changed == False + + # ==== Cleanup ==================================================== + + always: + + - name: Cleanup - delete state machine + aws_step_functions_state_machine: + name: "{{ state_machine_name }}" + state: absent + ignore_errors: true + + - name: Cleanup - delete IAM role needed for Step Functions test + iam_role: + name: "{{ step_functions_role_name }}" + state: absent + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_waf_web_acl/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_waf_web_acl/aliases new file mode 100644 index 00000000..ed291667 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_waf_web_acl/aliases @@ -0,0 +1,6 @@ +cloud/aws +aws_waf_info +aws_waf_web_acl +aws_waf_web_match +aws_waf_web_rule +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_waf_web_acl/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_waf_web_acl/tasks/main.yml new file mode 100644 index 00000000..7d0c8f97 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/aws_waf_web_acl/tasks/main.yml @@ -0,0 +1,1201 @@ +- name: aws_waf_condition tests + collections: + - amazon.aws + block: + - name: set yaml anchor + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + no_log: yes + + ################################################## + # aws_waf_condition tests + ################################################## + + - name: create WAF IP condition + aws_waf_condition: + name: "{{ resource_prefix }}_ip_condition" + filters: + - ip_address: "10.0.0.0/8" + type: ip + <<: *aws_connection_info + register: create_waf_ip_condition + + - name: add an IP address to WAF condition + aws_waf_condition: + name: "{{ resource_prefix }}_ip_condition" + filters: + - ip_address: "10.0.0.0/8" + - ip_address: "192.168.0.0/24" + type: ip + <<: *aws_connection_info + register: add_ip_address_to_waf_condition + + - name: check expected waf filter length + assert: + that: + - add_ip_address_to_waf_condition.condition.ip_set_descriptors|length == 2 + + - name: add an IP address to WAF condition (rely on purge_filters defaulting to false) + aws_waf_condition: + name: "{{ resource_prefix }}_ip_condition" + filters: + - ip_address: "192.168.10.0/24" + type: ip + <<: *aws_connection_info + register: add_ip_address_to_waf_condition_no_purge + + - name: check waf filter length has increased + assert: + that: + - add_ip_address_to_waf_condition_no_purge.condition.ip_set_descriptors|length == 3 + - add_ip_address_to_waf_condition_no_purge.changed + + - name: add an IP address to WAF condition (set purge_filters) + aws_waf_condition: + name: "{{ resource_prefix }}_ip_condition" + filters: + - ip_address: "192.168.20.0/24" + purge_filters: yes + type: ip + <<: *aws_connection_info + register: add_ip_address_to_waf_condition_purge + + - name: check waf filter length has reduced + assert: + that: + - add_ip_address_to_waf_condition_purge.condition.ip_set_descriptors|length == 1 + - add_ip_address_to_waf_condition_purge.changed + + - name: create WAF byte condition + aws_waf_condition: + name: "{{ resource_prefix }}_byte_condition" + filters: + - field_to_match: header + position: STARTS_WITH + target_string: Hello + header: Content-type + type: byte + <<: *aws_connection_info + register: create_waf_byte_condition + + - name: recreate WAF byte condition + aws_waf_condition: + name: "{{ resource_prefix }}_byte_condition" + filters: + - field_to_match: header + position: STARTS_WITH + target_string: Hello + header: Content-type + type: byte + <<: *aws_connection_info + register: recreate_waf_byte_condition + + - name: assert that no change was made + assert: + that: + - not recreate_waf_byte_condition.changed + + - name: create WAF geo condition + aws_waf_condition: + name: "{{ resource_prefix }}_geo_condition" + filters: + - country: US + - country: AU + - country: AT + type: geo + <<: *aws_connection_info + register: create_waf_geo_condition + + - name: create WAF size condition + aws_waf_condition: + name: "{{ resource_prefix }}_size_condition" + filters: + - field_to_match: query_string + size: 300 + comparison: GT + type: size + <<: *aws_connection_info + register: create_waf_size_condition + + - name: create WAF sql condition + aws_waf_condition: + name: "{{ resource_prefix }}_sql_condition" + filters: + - field_to_match: query_string + transformation: url_decode + type: sql + <<: *aws_connection_info + register: create_waf_sql_condition + + - name: create WAF xss condition + aws_waf_condition: + name: "{{ resource_prefix }}_xss_condition" + filters: + - field_to_match: query_string + transformation: url_decode + type: xss + <<: *aws_connection_info + register: create_waf_xss_condition + + - name: create WAF regex condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition" + filters: + - field_to_match: query_string + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + <<: *aws_connection_info + register: create_waf_regex_condition + + - name: create a second WAF regex condition with the same regex + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition_part_2" + filters: + - field_to_match: header + header: cookie + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + <<: *aws_connection_info + register: create_second_waf_regex_condition + + - name: check that the pattern is shared + assert: + that: + - > + create_waf_regex_condition.condition.regex_match_tuples[0].regex_pattern_set_id == + create_second_waf_regex_condition.condition.regex_match_tuples[0].regex_pattern_set_id + - create_second_waf_regex_condition.changed + + + - name: delete first WAF regex condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition" + filters: + - field_to_match: query_string + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + state: absent + <<: *aws_connection_info + register: delete_waf_regex_condition + + - name: delete second WAF regex condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition_part_2" + filters: + - field_to_match: header + header: cookie + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + state: absent + <<: *aws_connection_info + register: delete_second_waf_regex_condition + + - name: create WAF regex condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition" + filters: + - field_to_match: query_string + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + <<: *aws_connection_info + register: recreate_waf_regex_condition + + - name: check that a new pattern is created (because the first pattern should have been deleted once unused) + assert: + that: + - > + recreate_waf_regex_condition.condition.regex_match_tuples[0].regex_pattern_set_id != + create_waf_regex_condition.condition.regex_match_tuples[0].regex_pattern_set_id + + - name: create WAF Regional IP condition + aws_waf_condition: + name: "{{ resource_prefix }}_ip_condition" + filters: + - ip_address: "10.0.0.0/8" + type: ip + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_waf_regional_ip_condition + + - name: add an IP address to WAF Regional condition + aws_waf_condition: + name: "{{ resource_prefix }}_ip_condition" + filters: + - ip_address: "10.0.0.0/8" + - ip_address: "192.168.0.0/24" + type: ip + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: add_ip_address_to_waf_regional_condition + + - name: check expected WAF Regional filter length + assert: + that: + - add_ip_address_to_waf_regional_condition.condition.ip_set_descriptors|length == 2 + + - name: add an IP address to WAF Regional condition (rely on purge_filters defaulting to false) + aws_waf_condition: + name: "{{ resource_prefix }}_ip_condition" + filters: + - ip_address: "192.168.10.0/24" + type: ip + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: add_ip_address_to_waf_regional_condition_no_purge + + - name: check WAF Regional filter length has increased + assert: + that: + - add_ip_address_to_waf_regional_condition_no_purge.condition.ip_set_descriptors|length == 3 + - add_ip_address_to_waf_regional_condition_no_purge.changed + + - name: add an IP address to WAF Regional condition (set purge_filters) + aws_waf_condition: + name: "{{ resource_prefix }}_ip_condition" + filters: + - ip_address: "192.168.20.0/24" + purge_filters: yes + type: ip + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: add_ip_address_to_waf_regional_condition_purge + + - name: check WAF Regional filter length has reduced + assert: + that: + - add_ip_address_to_waf_regional_condition_purge.condition.ip_set_descriptors|length == 1 + - add_ip_address_to_waf_regional_condition_purge.changed + + - name: create WAF Regional byte condition + aws_waf_condition: + name: "{{ resource_prefix }}_byte_condition" + filters: + - field_to_match: header + position: STARTS_WITH + target_string: Hello + header: Content-type + type: byte + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_waf_regional_byte_condition + + - name: recreate WAF Regional byte condition + aws_waf_condition: + name: "{{ resource_prefix }}_byte_condition" + filters: + - field_to_match: header + position: STARTS_WITH + target_string: Hello + header: Content-type + type: byte + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: recreate_waf_regional_byte_condition + + - name: assert that no change was made + assert: + that: + - not recreate_waf_regional_byte_condition.changed + + - name: create WAF Regional geo condition + aws_waf_condition: + name: "{{ resource_prefix }}_geo_condition" + filters: + - country: US + - country: AU + - country: AT + type: geo + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_waf_regional_geo_condition + + - name: create WAF Regional size condition + aws_waf_condition: + name: "{{ resource_prefix }}_size_condition" + filters: + - field_to_match: query_string + size: 300 + comparison: GT + type: size + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_waf_regional_size_condition + + - name: create WAF Regional sql condition + aws_waf_condition: + name: "{{ resource_prefix }}_sql_condition" + filters: + - field_to_match: query_string + transformation: url_decode + type: sql + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_waf_regional_sql_condition + + - name: create WAF Regional xss condition + aws_waf_condition: + name: "{{ resource_prefix }}_xss_condition" + filters: + - field_to_match: query_string + transformation: url_decode + type: xss + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_waf_regional_xss_condition + + - name: create WAF Regional regex condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition" + filters: + - field_to_match: query_string + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_waf_regional_regex_condition + + - name: create a second WAF Regional regex condition with the same regex + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition_part_2" + filters: + - field_to_match: header + header: cookie + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_second_waf_regional_regex_condition + + - name: check that the pattern is shared + assert: + that: + - > + create_waf_regional_regex_condition.condition.regex_match_tuples[0].regex_pattern_set_id == + create_second_waf_regional_regex_condition.condition.regex_match_tuples[0].regex_pattern_set_id + - create_second_waf_regional_regex_condition.changed + + + - name: delete first WAF Regional regex condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition" + filters: + - field_to_match: query_string + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: delete_waf_regional_regex_condition + + - name: delete second WAF Regional regex condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition_part_2" + filters: + - field_to_match: header + header: cookie + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: delete_second_waf_regional_regex_condition + + - name: create WAF Regional regex condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition" + filters: + - field_to_match: query_string + regex_pattern: + name: greetings + regex_strings: + - '[hH]ello' + - '^Hi there' + - '.*Good Day to You' + type: regex + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: recreate_waf_regional_regex_condition + + - name: check that a new pattern is created (because the first pattern should have been deleted once unused) + assert: + that: + - > + recreate_waf_regional_regex_condition.condition.regex_match_tuples[0].regex_pattern_set_id != + create_waf_regional_regex_condition.condition.regex_match_tuples[0].regex_pattern_set_id + + ################################################## + # aws_waf_rule tests + ################################################## + + - name: create WAF rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + conditions: + - name: "{{ resource_prefix }}_regex_condition" + type: regex + negated: no + - name: "{{ resource_prefix }}_geo_condition" + type: geo + negated: no + - name: "{{ resource_prefix }}_byte_condition" + type: byte + negated: no + purge_conditions: yes + <<: *aws_connection_info + register: create_aws_waf_rule + + - name: check WAF rule + assert: + that: + - create_aws_waf_rule.changed + - create_aws_waf_rule.rule.predicates|length == 3 + + - name: recreate WAF rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + conditions: + - name: "{{ resource_prefix }}_regex_condition" + type: regex + negated: no + - name: "{{ resource_prefix }}_geo_condition" + type: geo + negated: no + - name: "{{ resource_prefix }}_byte_condition" + type: byte + negated: no + <<: *aws_connection_info + register: create_aws_waf_rule + + - name: check WAF rule did not change + assert: + that: + - not create_aws_waf_rule.changed + - create_aws_waf_rule.rule.predicates|length == 3 + + - name: add further WAF rules relying on purge_conditions defaulting to false + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + conditions: + - name: "{{ resource_prefix }}_ip_condition" + type: ip + negated: yes + - name: "{{ resource_prefix }}_sql_condition" + type: sql + negated: no + - name: "{{ resource_prefix }}_xss_condition" + type: xss + negated: no + <<: *aws_connection_info + register: add_conditions_to_aws_waf_rule + + - name: check WAF rule added rules + assert: + that: + - add_conditions_to_aws_waf_rule.changed + - add_conditions_to_aws_waf_rule.rule.predicates|length == 6 + + - name: remove some rules through purging conditions + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + conditions: + - name: "{{ resource_prefix }}_ip_condition" + type: ip + negated: yes + - name: "{{ resource_prefix }}_xss_condition" + type: xss + negated: no + - name: "{{ resource_prefix }}_byte_condition" + type: byte + negated: no + - name: "{{ resource_prefix }}_size_condition" + type: size + negated: no + purge_conditions: yes + <<: *aws_connection_info + register: add_and_remove_waf_rule_conditions + + - name: check WAF rules were updated as expected + assert: + that: + - add_and_remove_waf_rule_conditions.changed + - add_and_remove_waf_rule_conditions.rule.predicates|length == 4 + + - name: attempt to remove an in use condition + aws_waf_condition: + name: "{{ resource_prefix }}_size_condition" + type: size + state: absent + <<: *aws_connection_info + ignore_errors: yes + register: remove_in_use_condition + + - name: check failure was sensible + assert: + that: + - remove_in_use_condition.failed + - "'Condition {{ resource_prefix }}_size_condition is in use' in remove_in_use_condition.msg" + + - name: create WAF Regional rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + conditions: + - name: "{{ resource_prefix }}_regex_condition" + type: regex + negated: no + - name: "{{ resource_prefix }}_geo_condition" + type: geo + negated: no + - name: "{{ resource_prefix }}_byte_condition" + type: byte + negated: no + purge_conditions: yes + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_aws_waf_regional_rule + + - name: check WAF Regional rule + assert: + that: + - create_aws_waf_regional_rule.changed + - create_aws_waf_regional_rule.rule.predicates|length == 3 + + - name: recreate WAF Regional rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + conditions: + - name: "{{ resource_prefix }}_regex_condition" + type: regex + negated: no + - name: "{{ resource_prefix }}_geo_condition" + type: geo + negated: no + - name: "{{ resource_prefix }}_byte_condition" + type: byte + negated: no + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_aws_waf_regional_rule + + - name: check WAF Regional rule did not change + assert: + that: + - not create_aws_waf_regional_rule.changed + - create_aws_waf_regional_rule.rule.predicates|length == 3 + + - name: add further WAF Regional rules relying on purge_conditions defaulting to false + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + conditions: + - name: "{{ resource_prefix }}_ip_condition" + type: ip + negated: yes + - name: "{{ resource_prefix }}_sql_condition" + type: sql + negated: no + - name: "{{ resource_prefix }}_xss_condition" + type: xss + negated: no + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: add_conditions_to_aws_waf_regional_rule + + - name: check WAF Regional rule added rules + assert: + that: + - add_conditions_to_aws_waf_regional_rule.changed + - add_conditions_to_aws_waf_regional_rule.rule.predicates|length == 6 + + - name: remove some rules through purging conditions + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + conditions: + - name: "{{ resource_prefix }}_ip_condition" + type: ip + negated: yes + - name: "{{ resource_prefix }}_xss_condition" + type: xss + negated: no + - name: "{{ resource_prefix }}_byte_condition" + type: byte + negated: no + - name: "{{ resource_prefix }}_size_condition" + type: size + negated: no + purge_conditions: yes + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: add_and_remove_waf_regional_rule_conditions + + - name: check WAF Regional rules were updated as expected + assert: + that: + - add_and_remove_waf_regional_rule_conditions.changed + - add_and_remove_waf_regional_rule_conditions.rule.predicates|length == 4 + + - name: attempt to remove an WAF Regional in use condition + aws_waf_condition: + name: "{{ resource_prefix }}_size_condition" + type: size + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + register: remove_in_use_condition + + - name: check failure was sensible + assert: + that: + - remove_in_use_condition.failed + - "'Condition {{ resource_prefix }}_size_condition is in use' in remove_in_use_condition.msg" + + ################################################## + # aws_waf_web_acl tests + ################################################## + + - name: create web ACL + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + rules: + - name: "{{ resource_prefix }}_rule" + priority: 1 + action: block + default_action: block + purge_rules: yes + state: present + <<: *aws_connection_info + register: create_web_acl + + - name: recreate web acl + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + rules: + - name: "{{ resource_prefix }}_rule" + priority: 1 + action: block + default_action: block + state: present + <<: *aws_connection_info + register: recreate_web_acl + + - name: check web acl was not changed + assert: + that: + - not recreate_web_acl.changed + - recreate_web_acl.web_acl.rules|length == 1 + + - name: create a second WAF rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule_2" + conditions: + - name: "{{ resource_prefix }}_ip_condition" + type: ip + negated: yes + - name: "{{ resource_prefix }}_sql_condition" + type: sql + negated: no + - name: "{{ resource_prefix }}_xss_condition" + type: xss + negated: no + <<: *aws_connection_info + + - name: add a new rule to the web acl + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + rules: + - name: "{{ resource_prefix }}_rule_2" + priority: 2 + action: allow + default_action: block + state: present + <<: *aws_connection_info + register: web_acl_add_rule + + - name: check that rule was added to the web acl + assert: + that: + - web_acl_add_rule.changed + - web_acl_add_rule.web_acl.rules|length == 2 + + - name: use purge rules to remove the first rule + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + rules: + - name: "{{ resource_prefix }}_rule_2" + priority: 2 + action: allow + purge_rules: yes + default_action: block + state: present + <<: *aws_connection_info + register: web_acl_add_rule + + - name: check that rule was removed from the web acl + assert: + that: + - web_acl_add_rule.changed + - web_acl_add_rule.web_acl.rules|length == 1 + + - name: swap two rules of same priority + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + rules: + - name: "{{ resource_prefix }}_rule" + priority: 2 + action: allow + purge_rules: yes + default_action: block + state: present + <<: *aws_connection_info + register: web_acl_swap_rule + + - name: attempt to delete the inuse first rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + state: absent + <<: *aws_connection_info + ignore_errors: yes + register: remove_inuse_rule + + - name: check that removing in-use rule fails + assert: + that: + - remove_inuse_rule.failed + + - name: delete the web acl + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + state: absent + <<: *aws_connection_info + register: delete_web_acl + + - name: check that web acl was deleted + assert: + that: + - delete_web_acl.changed + - not delete_web_acl.web_acl + + - name: delete the no longer in use first rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + state: absent + <<: *aws_connection_info + + - name: create WAF Regional web ACL + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + rules: + - name: "{{ resource_prefix }}_rule" + priority: 1 + action: block + default_action: block + purge_rules: yes + state: present + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: create_waf_regional_web_acl + + - name: recreate WAF Regional web acl + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + rules: + - name: "{{ resource_prefix }}_rule" + priority: 1 + action: block + default_action: block + state: present + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: recreate_waf_regional_web_acl + + - name: check WAF Regional web acl was not changed + assert: + that: + - not recreate_waf_regional_web_acl.changed + - recreate_waf_regional_web_acl.web_acl.rules|length == 1 + + - name: create a second WAF Regional rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule_2" + conditions: + - name: "{{ resource_prefix }}_ip_condition" + type: ip + negated: yes + - name: "{{ resource_prefix }}_sql_condition" + type: sql + negated: no + - name: "{{ resource_prefix }}_xss_condition" + type: xss + negated: no + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + + - name: add a new rule to the WAF Regional web acl + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + rules: + - name: "{{ resource_prefix }}_rule_2" + priority: 2 + action: allow + default_action: block + state: present + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: waf_regional_web_acl_add_rule + + - name: check that rule was added to the WAF Regional web acl + assert: + that: + - waf_regional_web_acl_add_rule.changed + - waf_regional_web_acl_add_rule.web_acl.rules|length == 2 + + - name: use purge rules to remove the WAF Regional first rule + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + rules: + - name: "{{ resource_prefix }}_rule_2" + priority: 2 + action: allow + purge_rules: yes + default_action: block + state: present + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: waf_regional_web_acl_add_rule + + - name: check that rule was removed from the WAF Regional web acl + assert: + that: + - waf_regional_web_acl_add_rule.changed + - waf_regional_web_acl_add_rule.web_acl.rules|length == 1 + + - name: swap two WAF Regional rules of same priority + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + rules: + - name: "{{ resource_prefix }}_rule" + priority: 2 + action: allow + purge_rules: yes + default_action: block + state: present + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: waf_regional_web_acl_swap_rule + + - name: attempt to delete the WAF Regional inuse first rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + register: remove_waf_regional_inuse_rule + + - name: check that removing WAF Regional in-use rule fails + assert: + that: + - remove_waf_regional_inuse_rule.failed + + - name: delete the WAF Regional web acl + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + register: delete_waf_regional_web_acl + + - name: check that WAF Regional web acl was deleted + assert: + that: + - delete_waf_regional_web_acl.changed + - not delete_waf_regional_web_acl.web_acl + + - name: delete the no longer in use WAF Regional first rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + + ################################################## + # TEARDOWN + ################################################## + + always: + - debug: + msg: "****** TEARDOWN STARTS HERE ******" + + - name: delete the web acl + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + state: absent + purge_rules: yes + <<: *aws_connection_info + ignore_errors: yes + + - name: remove second WAF rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule_2" + state: absent + purge_conditions: yes + <<: *aws_connection_info + ignore_errors: yes + + - name: remove WAF rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + state: absent + purge_conditions: yes + <<: *aws_connection_info + ignore_errors: yes + + - name: remove XSS condition + aws_waf_condition: + name: "{{ resource_prefix }}_xss_condition" + type: xss + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove SQL condition + aws_waf_condition: + name: "{{ resource_prefix }}_sql_condition" + type: sql + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove size condition + aws_waf_condition: + name: "{{ resource_prefix }}_size_condition" + type: size + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove geo condition + aws_waf_condition: + name: "{{ resource_prefix }}_geo_condition" + type: geo + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove byte condition + aws_waf_condition: + name: "{{ resource_prefix }}_byte_condition" + type: byte + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ip address condition + aws_waf_condition: + name: "{{ resource_prefix }}_ip_condition" + type: ip + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove regex part 2 condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition_part_2" + type: regex + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove first regex condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition" + type: regex + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: delete the WAF Regional web acl + aws_waf_web_acl: + name: "{{ resource_prefix }}_web_acl" + state: absent + purge_rules: yes + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + + - name: remove second WAF Regional rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule_2" + state: absent + purge_conditions: yes + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + + - name: remove WAF Regional rule + aws_waf_rule: + name: "{{ resource_prefix }}_rule" + state: absent + purge_conditions: yes + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + + - name: remove WAF Regional XSS condition + aws_waf_condition: + name: "{{ resource_prefix }}_xss_condition" + type: xss + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + + - name: remove WAF Regional SQL condition + aws_waf_condition: + name: "{{ resource_prefix }}_sql_condition" + type: sql + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + + - name: remove WAF Regional size condition + aws_waf_condition: + name: "{{ resource_prefix }}_size_condition" + type: size + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + + - name: remove WAF Regional geo condition + aws_waf_condition: + name: "{{ resource_prefix }}_geo_condition" + type: geo + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + + - name: remove WAF Regional byte condition + aws_waf_condition: + name: "{{ resource_prefix }}_byte_condition" + type: byte + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + + - name: remove WAF Regional ip address condition + aws_waf_condition: + name: "{{ resource_prefix }}_ip_condition" + type: ip + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + + - name: remove WAF Regional regex part 2 condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition_part_2" + type: regex + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes + + - name: remove first WAF Regional regex condition + aws_waf_condition: + name: "{{ resource_prefix }}_regex_condition" + type: regex + state: absent + region: "{{ aws_region }}" + waf_regional: true + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/aliases new file mode 100644 index 00000000..777562fd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/aliases @@ -0,0 +1,4 @@ +cloud/aws +shippable/aws/group3 +# https://github.com/ansible-collections/community.aws/issues/157 +unstable diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/defaults/main.yml new file mode 100644 index 00000000..4edd7475 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/defaults/main.yml @@ -0,0 +1 @@ +stack_name: "{{ resource_prefix }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/files/test_stack.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/files/test_stack.yml new file mode 100644 index 00000000..f1dcba30 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/files/test_stack.yml @@ -0,0 +1,24 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: Create some item in Exports +Parameters: + TestParamValue: + Type: String + Description: A param Value to be placed in Exports + TestParamName: + Type: String + Description: A param Name for SSM Parameter Store + BucketSuffix: + Type: String +Resources: + TestBucket: + Type: AWS::S3::Bucket + Properties: + BucketName: + Fn::Sub: "cf-export-${BucketSuffix}" +Outputs: + TestParamValue: + Value: + Ref: TestParamValue + Export: + Name: + Fn::Sub: "${TestParamName}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/tasks/main.yml new file mode 100644 index 00000000..eb703d49 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_exports_info/tasks/main.yml @@ -0,0 +1,41 @@ +- name: set connection information for aws modules and run tasks + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + + block: + - name: Create a minimal stack with an export set by parameter + cloudformation: + stack_name: "{{ stack_name }}" + template_body: "{{ lookup('file','test_stack.yml') }}" + template_parameters: + TestParamName: "cf-exports-param" + TestParamValue: "Set By CF Exports" + BucketSuffix: "{{ resource_prefix }}" + register: cf_stack + - name: Read from Exports + cloudformation_exports_info: + region: "{{ aws_region }}" + register: exports_result + - set_fact: + export_items: "{{ exports_result['export_items'] }}" + - assert: + that: + - export_items is defined + - export_items['cf-exports-param'] is defined + # - export_items | length == 1 + + +# Cleanup + always: + + - name: delete stack + cloudformation: + stack_name: "{{ stack_name }}" + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/files/test_bucket_stack.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/files/test_bucket_stack.yml new file mode 100644 index 00000000..dfbc5224 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/files/test_bucket_stack.yml @@ -0,0 +1,6 @@ +AWSTemplateFormatVersion: "2010-09-09" +Parameters: {} +Resources: + Bukkit: + Type: "AWS::S3::Bucket" + Properties: {} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/files/test_modded_bucket_stack.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/files/test_modded_bucket_stack.yml new file mode 100644 index 00000000..68df61c6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/files/test_modded_bucket_stack.yml @@ -0,0 +1,9 @@ +AWSTemplateFormatVersion: "2010-09-09" +Parameters: {} +Resources: + Bukkit: + Type: "AWS::S3::Bucket" + Properties: {} + other: + Type: "AWS::SNS::Topic" + Properties: {} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/playbooks/full_test.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/playbooks/full_test.yml new file mode 100644 index 00000000..257e1e48 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/playbooks/full_test.yml @@ -0,0 +1,6 @@ +- hosts: localhost + connection: local + environment: "{{ ansible_test.environment }}" + + roles: + - ../../cloudformation_stack_set diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/runme.sh b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/runme.sh new file mode 100755 index 00000000..d499c679 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/runme.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -eux + +# Run full test suite +source virtualenv.sh +pip install 'botocore>1.10.26' boto3 +ansible-playbook -i ../../inventory -v playbooks/full_test.yml "$@" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/tasks/main.yml new file mode 100644 index 00000000..cb6aa2cc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudformation_stack_set/tasks/main.yml @@ -0,0 +1,190 @@ +--- +# tasks file for cloudformation_stack_set module tests +# These tests require access to two separate AWS accounts + +- name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + aws_secondary_connection_info: &aws_secondary_connection_info + aws_access_key: "{{ secondary_aws_access_key }}" + aws_secret_key: "{{ secondary_aws_secret_key }}" + security_token: "{{ secondary_security_token }}" + region: "{{ aws_region }}" + no_log: yes + +- name: cloudformation_stack_set tests + collections: + - amazon.aws + + block: + - name: Get current account ID + aws_caller_info: + <<: *aws_connection_info + register: whoami + - name: Get current account ID + aws_caller_info: + <<: *aws_secondary_connection_info + register: target_acct + + - name: Policy to allow assuming stackset execution role + iam_managed_policy: + policy_name: AssumeCfnStackSetExecRole + state: present + <<: *aws_connection_info + policy: + Version: '2012-10-17' + Statement: + - Action: 'sts:AssumeRole' + Effect: Allow + Resource: arn:aws:iam::*:role/CfnStackSetExecRole + policy_description: Assume CfnStackSetExecRole + + - name: Create an execution role for us to use + iam_role: + name: CfnStackSetExecRole + <<: *aws_secondary_connection_info + assume_role_policy_document: + Version: '2012-10-17' + Statement: + - Action: 'sts:AssumeRole' + Effect: Allow + Principal: + AWS: '{{ whoami.account }}' + managed_policy: + - arn:aws:iam::aws:policy/PowerUserAccess + + - name: Create an administration role for us to use + iam_role: + name: CfnStackSetAdminRole + <<: *aws_connection_info + assume_role_policy_document: + Version: '2012-10-17' + Statement: + - Action: 'sts:AssumeRole' + Effect: Allow + Principal: + Service: 'cloudformation.amazonaws.com' + managed_policy: + - arn:aws:iam::{{ whoami.account }}:policy/AssumeCfnStackSetExecRole + #- arn:aws:iam::aws:policy/PowerUserAccess + + - name: Should fail without account/regions + cloudformation_stack_set: + <<: *aws_connection_info + name: TestSetOne + description: TestStack Prime + tags: + Some: Thing + Type: Test + wait: true + template: test_bucket_stack.yml + register: result + ignore_errors: true + - name: assert that running with no account fails + assert: + that: + - result is failed + - > + "Can't create a stack set without choosing at least one account" in result.msg + - name: Should fail without roles + cloudformation_stack_set: + <<: *aws_connection_info + name: TestSetOne + description: TestStack Prime + tags: + Some: Thing + Type: Test + wait: true + regions: + - '{{ aws_region }}' + accounts: + - '{{ whoami.account }}' + template_body: '{{ lookup("file", "test_bucket_stack.yml") }}' + register: result + ignore_errors: true + - name: assert that running with no account fails + assert: + that: + - result is failed + + - name: Create an execution role for us to use + iam_role: + name: CfnStackSetExecRole + state: absent + <<: *aws_connection_info + assume_role_policy_document: + Version: '2012-10-17' + Statement: + - Action: 'sts:AssumeRole' + Effect: Allow + Principal: + AWS: arn:aws:iam::{{ whoami.account }}:root + managed_policy: + - arn:aws:iam::aws:policy/PowerUserAccess + + - name: Create stack with roles + cloudformation_stack_set: + <<: *aws_connection_info + name: TestSetTwo + description: TestStack Dos + tags: + Some: Thing + Type: Test + wait: true + regions: + - '{{ aws_region }}' + accounts: + - '{{ target_acct.account }}' + exec_role_name: CfnStackSetExecRole + admin_role_arn: arn:aws:iam::{{ whoami.account }}:role/CfnStackSetAdminRole + template_body: '{{ lookup("file", "test_bucket_stack.yml") }}' + register: result + + - name: Update stack with roles + cloudformation_stack_set: + <<: *aws_connection_info + name: TestSetTwo + description: TestStack Dos + tags: + Some: Thing + Type: Test + wait: true + regions: + - '{{ aws_region }}' + accounts: + - '{{ target_acct.account }}' + exec_role_name: CfnStackSetExecRole + admin_role_arn: arn:aws:iam::{{ whoami.account }}:role/CfnStackSetAdminRole + template_body: '{{ lookup("file", "test_modded_bucket_stack.yml") }}' + always: + - name: Clean up stack one + cloudformation_stack_set: + <<: *aws_connection_info + name: TestSetOne + wait: true + regions: + - '{{ aws_region }}' + accounts: + - '{{ whoami.account }}' + purge_stacks: true + state: absent + - name: Clean up stack two + cloudformation_stack_set: + <<: *aws_connection_info + name: TestSetTwo + description: TestStack Dos + purge_stacks: true + tags: + Some: Thing + Type: Test + wait: true + regions: + - '{{ aws_region }}' + accounts: + - '{{ target_acct.account }}' + template_body: '{{ lookup("file", "test_bucket_stack.yml") }}' + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/defaults/main.yml new file mode 100644 index 00000000..b88dbc24 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/defaults/main.yml @@ -0,0 +1,49 @@ +cloudfront_hostname: "{{ resource_prefix }}01" + +# Use a domain that has a wildcard DNS +# Using an alias requires also having an SSL cert... +#cloudfront_alias: "{{ cloudfront_hostname }}.github.io" +#cloudfront_viewer_cert: +# acm_certificate_arn: ... +# certificate: ... +# certificate_source: ... +# minimum_protocol_version: ... +# ssl_support_method: ... + +cloudfront_test_cache_behaviors: + - path_pattern: /test/path + forwarded_values: + headers: + - Host + - X-HTTP-Forwarded-For + - CloudFront-Forwarded-Proto + - Origin + - Referer + allowed_methods: + items: + - GET + - HEAD + - POST + - PATCH + - PUT + - OPTIONS + - DELETE + cached_methods: + - GET + - HEAD + - path_pattern: /another/path + forwarded_values: + cookies: + forward: whitelist + whitelisted_names: + - my_header + query_string: yes + query_string_cache_keys: + - whatever + allowed_methods: + items: + - GET + - HEAD + cached_methods: + - GET + - HEAD diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/meta/main.yml new file mode 100644 index 00000000..32cf5dda --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/meta/main.yml @@ -0,0 +1 @@ +dependencies: [] diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/tasks/main.yml new file mode 100644 index 00000000..62c141cd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudfront_distribution/tasks/main.yml @@ -0,0 +1,442 @@ +- module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + cloudfront_distribution: + alias: "{{ cloudfront_alias | default(omit) }}" + viewer_certificate: "{{ cloudfront_viewer_cert | default(omit) }}" + collections: + - amazon.aws + + block: + + - name: create cloudfront distribution using defaults + cloudfront_distribution: + origins: + - domain_name: "{{ cloudfront_hostname }}-origin.example.com" + id: "{{ cloudfront_hostname }}-origin.example.com" + default_cache_behavior: + target_origin_id: "{{ cloudfront_hostname }}-origin.example.com" + state: present + purge_origins: yes + register: cf_distribution + + - set_fact: + distribution_id: '{{ cf_distribution.id }}' + + - name: re-run cloudfront distribution with same defaults + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ cloudfront_hostname }}-origin.example.com" + state: present + register: cf_dist_no_update + + - name: ensure distribution was not updated + assert: + that: + - not cf_dist_no_update.changed + + - name: re-run cloudfront distribution using distribution id + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + purge_origins: no + state: present + register: cf_dist_with_id + + - name: ensure distribution was not updated + assert: + that: + - not cf_dist_with_id.changed + + - name: update origin http port + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ cloudfront_hostname }}-origin.example.com" + custom_origin_config: + http_port: 8080 + state: present + register: update_origin_http_port + + - name: ensure http port was updated + assert: + that: + - update_origin_http_port.changed + + - name: update restrictions + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + restrictions: + geo_restriction: + restriction_type: "whitelist" + items: + - "US" + state: present + register: update_restrictions + + - name: ensure restrictions was updated + assert: + that: + - update_restrictions.changed + + - name: set a random comment + set_fact: + comment: "{{'ABCDEFabcdef123456'|shuffle|join }}" + + - name: update comment + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + comment: "{{ comment }}" + state: present + register: cf_comment + + - name: ensure comment was updated + assert: + that: + - cf_comment.changed + - 'cf_comment.comment == comment' + + - name: create second origin + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + id: "{{ resource_prefix }}2.example.com" + default_root_object: index.html + state: present + wait: yes + register: cf_add_origin + + - name: ensure origin was added + assert: + that: + - cf_add_origin.origins.quantity == 2 + - cf_add_origin.changed + - "cf_add_origin.default_root_object == 'index.html'" + + - name: re-run second origin + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ cloudfront_hostname }}-origin.example.com" + custom_origin_config: + http_port: 8080 + - domain_name: "{{ resource_prefix }}2.example.com" + default_root_object: index.html + wait: yes + state: present + register: cf_rerun_second_origin + + - name: ensure nothing changed after re-run + assert: + that: + - cf_rerun_second_origin.origins.quantity == 2 + - not cf_rerun_second_origin.changed + + - name: run with origins in reverse order + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + - domain_name: "{{ cloudfront_hostname }}-origin.example.com" + custom_origin_config: + http_port: 8080 + state: present + register: cf_rerun_second_origin_reversed + + - name: ensure nothing changed after reversed re-run + assert: + that: + - cf_rerun_second_origin_reversed.origins.quantity == 2 + - not cf_rerun_second_origin_reversed.changed + + + - name: purge first origin + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + default_cache_behavior: + target_origin_id: "{{ resource_prefix }}2.example.com" + purge_origins: yes + state: present + register: cf_purge_origin + + - name: ensure origin was removed + assert: + that: + - cf_purge_origin.origins.quantity == 1 + - cf_purge_origin.changed + + - name: update default_root_object of existing distribution + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + default_root_object: index.php + state: present + register: cf_update_default_root_object + + - name: ensure origin was updated + assert: + that: + - "cf_update_default_root_object.default_root_object == 'index.php'" + - cf_update_default_root_object.changed + + - name: add tags to existing distribution + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + tags: + ATag: tag1 + Another: tag + default_root_object: index.php + state: present + register: cf_add_tags + + - name: ensure tags were added + assert: + that: + - cf_add_tags.changed + - cf_add_tags.tags|length == 2 + + - name: delete distribution + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + enabled: no + wait: yes + state: absent + + - name: create distribution with tags + cloudfront_distribution: + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + id: "{{ resource_prefix }}2.example.com" + tags: + ATag: tag1 + Another: tag + state: present + register: cf_second_distribution + + - set_fact: + distribution_id: '{{ cf_second_distribution.id }}' + + - name: ensure tags were set on creation + assert: + that: + - cf_second_distribution.changed + - cf_second_distribution.tags|length == 2 + - "'ATag' in cf_second_distribution.tags" + - "'Another' in cf_second_distribution.tags" + + - name: re-run create distribution with same tags and purge_tags + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + id: "{{ resource_prefix }}2.example.com" + tags: + ATag: tag1 + Another: tag + purge_tags: yes + state: present + register: rerun_with_purge_tags + + - name: ensure that re-running didn't change + assert: + that: + - not rerun_with_purge_tags.changed + - rerun_with_purge_tags.tags|length == 2 + + - name: add new tag to distribution + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + tags: + Third: thing + purge_tags: no + state: present + register: update_with_new_tag + + - name: ensure tags are correct + assert: + that: + - update_with_new_tag.changed + - "'Third' in update_with_new_tag.tags" + - "'Another' in update_with_new_tag.tags" + - "'ATag' in update_with_new_tag.tags" + - update_with_new_tag.tags|length == 3 + + - name: create some cache behaviors + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + cache_behaviors: "{{ cloudfront_test_cache_behaviors }}" + state: present + register: add_cache_behaviors + + - name: reverse some cache behaviors + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + cache_behaviors: "{{ cloudfront_test_cache_behaviors|reverse|list }}" + state: present + register: reverse_cache_behaviors + + - name: check that reversing cache behaviors changes nothing when purge_cache_behaviors unset + assert: + that: + - not reverse_cache_behaviors.changed + - reverse_cache_behaviors.cache_behaviors|length == 2 + + - name: reverse some cache behaviors properly + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}2.example.com" + cache_behaviors: "{{ cloudfront_test_cache_behaviors|reverse|list }}" + purge_cache_behaviors: yes + state: present + register: reverse_cache_behaviors_with_purge + + - name: check that reversing cache behaviors changes nothing when purge_cache_behaviors unset + assert: + that: + - reverse_cache_behaviors_with_purge.changed + - reverse_cache_behaviors_with_purge.cache_behaviors|length == 2 + + - name: update origin that changes target id (failure expected) + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}3.example.com" + id: "{{ resource_prefix }}3.example.com" + purge_origins: yes + state: present + register: remove_origin_in_use + ignore_errors: yes + + - name: check that removing in use origin fails + assert: + that: + - remove_origin_in_use.failed + + # FIXME: This currently fails due to AWS side problems + # not clear whether to hope they fix or prevent this issue from happening + #- name: update origin and update cache behavior to point to new origin + # cloudfront_distribution: + # origins: + # - domain_name: "{{ resource_prefix }}3.example.com" + # id: "{{ resource_prefix }}3.example.com" + # cache_behaviors: + # - path_pattern: /test/path + # target_origin_id: "{{ resource_prefix }}3.example.com" + # - path_pattern: /another/path + # target_origin_id: "{{ resource_prefix }}3.example.com" + # state: present + # aws_access_key: "{{ aws_access_key|default(omit) }}" + # aws_secret_key: "{{ aws_secret_key|default(omit) }}" + # security_token: "{{ security_token|default(omit) }}" + # profile: "{{ profile|default(omit) }}" + # register: update_cache_behaviors in use + + - name: create an s3 bucket for next test + # note that although public-read allows reads that we want to stop with origin_access_identity, + # we also need to test without origin_access_identity and it's hard to change bucket perms later + aws_s3: + bucket: "{{ resource_prefix }}-bucket" + mode: create + + - name: update origin to point to the s3 bucket + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}-bucket.s3.amazonaws.com" + id: "{{ resource_prefix }}3.example.com" + s3_origin_access_identity_enabled: yes + state: present + register: update_origin_to_s3 + + - name: check that s3 origin access is in result + assert: + that: + - item.s3_origin_config.origin_access_identity.startswith('origin-access-identity/cloudfront/') + when: "'s3_origin_config' in item" + loop: "{{ update_origin_to_s3.origins['items'] }}" + + - name: update origin to remove s3 origin access identity + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}-bucket.s3.amazonaws.com" + id: "{{ resource_prefix }}3.example.com" + s3_origin_access_identity_enabled: no + state: present + register: update_origin_to_s3_without_origin_access + + - name: check that s3 origin access is not in result + assert: + that: + - not item.s3_origin_config.origin_access_identity + when: "'s3_origin_config' in item" + loop: "{{ update_origin_to_s3_without_origin_access.origins['items'] }}" + + - name: delete the s3 bucket + aws_s3: + bucket: "{{ resource_prefix }}-bucket" + mode: delete + + - name: check that custom_origin_config can't be used with origin_access_identity enabled + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - domain_name: "{{ resource_prefix }}-bucket.s3.amazonaws.com" + id: "{{ resource_prefix }}3.example.com" + s3_origin_access_identity_enabled: yes + custom_origin_config: + origin_protocol_policy: 'http-only' + state: present + register: update_origin_to_s3_with_origin_access_and_with_custom_origin_config + ignore_errors: True + + - name: check that custom origin with origin access identity fails + assert: + that: + - update_origin_to_s3_with_origin_access_and_with_custom_origin_config.failed + + - name: Update distribution to use specific access identity + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + origins: + - id: "{{ resource_prefix }}" + domain_name: "{{ resource_prefix }}.s3.amazonaws.com" + s3_origin_access_identity_enabled: true + s3_origin_config: + origin_access_identity: origin-access-identity/cloudfront/ANYTHING + register: update_distribution_with_specific_access_identity + + - name: check that custom origin uses the provided origin_access_identity + assert: + that: + - update_distribution_with_specific_access_identity.changed + - update_distribution_with_specific_access_identity.origins.items[0].s3_origin_config.origin_access_identity == 'origin-access-identity/cloudfront/ANYTHING' + + always: + # TEARDOWN STARTS HERE + - name: delete the s3 bucket + aws_s3: + bucket: "{{ resource_prefix }}-bucket" + mode: delete + + - name: clean up cloudfront distribution + cloudfront_distribution: + distribution_id: "{{ distribution_id }}" + enabled: no + wait: yes + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/defaults/main.yml new file mode 100644 index 00000000..7338e364 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/defaults/main.yml @@ -0,0 +1,7 @@ +cloudtrail_name: '{{ resource_prefix }}-cloudtrail' +s3_bucket_name: '{{ resource_prefix }}-cloudtrail-bucket' +kms_alias: '{{ resource_prefix }}-cloudtrail' +sns_topic: '{{ resource_prefix }}-cloudtrail-notifications' +cloudtrail_prefix: 'test-prefix' +cloudwatch_log_group: '{{ resource_prefix }}-cloudtrail' +cloudwatch_role: '{{ resource_prefix }}-cloudtrail' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/tasks/main.yml new file mode 100644 index 00000000..8aa695b9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/tasks/main.yml @@ -0,0 +1,1425 @@ +--- +# General Tests: +# - s3_bucket_name required when state is 'present' +# - Creation / Deletion +# - Enable/Disable logging +# - Enable/Disable log file validation option +# - Manipulation of Global Event logging option +# - Manipulation of Multi-Region logging option +# - Manipulation of S3 bucket option +# - Manipulation of Encryption option +# - Manipulation of SNS options +# - Manipulation of CloudWatch Log group options +# - Manipulation of Tags +# +# Notes: +# - results include the updates, even when check_mode is true +# - Poor handling of disable global + enable multi-region +# botocore.errorfactory.InvalidParameterCombinationException: An error +# occurred (InvalidParameterCombinationException) when calling the +# UpdateTrail operation: Multi-Region trail must include global service +# events. +# - Using blank string for KMS ID doesn't remove encryption +# - Using blank string for SNS Topic doesn't remove it +# - Using blank string for CloudWatch Log Group / Role doesn't remove them +# +# Possible Bugs: +# - output.exists == false when creating +# - Changed reports true when using a KMS alias +# - Tags Keys are being lower-cased + +- module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + # Add this as a default because we (almost) always need it + cloudtrail: + s3_bucket_name: '{{ s3_bucket_name }}' + collections: + - amazon.aws + block: + + # ============================================================ + # Argument Tests + # ============================================================ + - name: 'S3 Bucket required when state is "present"' + module_defaults: { cloudtrail: {} } + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + ignore_errors: yes + - assert: + that: + - output is failed + - '"s3_bucket_name" in output.msg' + + - name: 'CloudWatch cloudwatch_logs_log_group_arn required when cloudwatch_logs_role_arn passed' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + cloudwatch_logs_role_arn: 'SomeValue' + register: output + ignore_errors: yes + - assert: + that: + - output is failed + - '"parameters are required together" in output.msg' + - '"cloudwatch_logs_log_group_arn" in output.msg' + + - name: 'CloudWatch cloudwatch_logs_role_arn required when cloudwatch_logs_log_group_arn passed' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + cloudwatch_logs_log_group_arn: 'SomeValue' + register: output + ignore_errors: yes + - assert: + that: + - output is failed + - '"parameters are required together" in output.msg' + - '"cloudwatch_logs_role_arn" in output.msg' + + #- name: 'Global Logging must be enabled when enabling Multi-region' + # cloudtrail: + # state: present + # name: '{{ cloudtrail_name }}' + # include_global_events: no + # is_multi_region_trail: yes + # register: output + # ignore_errors: yes + #- assert: + # that: + # - output is failed + + # ============================================================ + # Preparation + # ============================================================ + - name: 'Retrieve caller facts' + aws_caller_info: {} + register: aws_caller_info + + - name: 'Create S3 bucket' + vars: + bucket_name: '{{ s3_bucket_name }}' + s3_bucket: + state: present + name: '{{ bucket_name }}' + policy: '{{ lookup("template", "s3-policy.j2") }}' + - name: 'Create second S3 bucket' + vars: + bucket_name: '{{ s3_bucket_name }}-2' + s3_bucket: + state: present + name: '{{ bucket_name }}' + policy: '{{ lookup("template", "s3-policy.j2") }}' + + - name: 'Create SNS Topic' + vars: + sns_topic_name: '{{ sns_topic }}' + sns_topic: + state: present + name: '{{ sns_topic_name }}' + display_name: 'Used for testing SNS/CloudWatch integration' + policy: "{{ lookup('template', 'sns-policy.j2') | to_json }}" + register: output_sns_topic + - name: 'Create second SNS Topic' + vars: + sns_topic_name: '{{ sns_topic }}-2' + sns_topic: + state: present + name: '{{ sns_topic_name }}' + display_name: 'Used for testing SNS/CloudWatch integration' + policy: "{{ lookup('template', 'sns-policy.j2') | to_json }}" + + - name: 'Create KMS Key' + aws_kms: + state: present + alias: '{{ kms_alias }}' + enabled: yes + policy: "{{ lookup('template', 'kms-policy.j2') | to_json }}" + register: kms_key + - name: 'Create second KMS Key' + aws_kms: + state: present + alias: '{{ kms_alias }}-2' + enabled: yes + policy: "{{ lookup('template', 'kms-policy.j2') | to_json }}" + register: kms_key2 + + - name: 'Create CloudWatch IAM Role' + iam_role: + state: present + name: '{{ cloudwatch_role }}' + assume_role_policy_document: "{{ lookup('template', 'cloudwatch-assume-policy.j2') }}" + register: output_cloudwatch_role + - name: 'Create CloudWatch Log Group' + cloudwatchlogs_log_group: + state: present + log_group_name: '{{ cloudwatch_log_group }}' + retention: 1 + register: output_cloudwatch_log_group + - name: 'Create second CloudWatch Log Group' + cloudwatchlogs_log_group: + state: present + log_group_name: '{{ cloudwatch_log_group }}-2' + retention: 1 + register: output_cloudwatch_log_group2 + - name: 'Add inline policy to CloudWatch Role' + iam_policy: + state: present + iam_type: role + iam_name: '{{ cloudwatch_role }}' + policy_name: 'CloudWatch' + policy_json: "{{ lookup('template', 'cloudwatch-policy.j2') | to_json }}" + + # ============================================================ + # Tests + # ============================================================ + + - name: 'Create a trail (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Create a trail' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is changed + # XXX This appears to be a bug... + #- output.exists == True + - output.trail.name == cloudtrail_name + + - name: 'No-op update to trail' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is not changed + - output.exists == True + # Check everything is what we expect before we start making changes + - output.trail.name == cloudtrail_name + - output.trail.home_region == aws_region + - output.trail.include_global_service_events == True + - output.trail.is_multi_region_trail == False + - output.trail.is_logging == True + - output.trail.log_file_validation_enabled == False + - output.trail.s3_bucket_name == s3_bucket_name + - output.trail.s3_key_prefix is none + - output.trail.kms_key_id is none + - output.trail.sns_topic_arn is none + - output.trail.sns_topic_name is none + - output.trail.tags | length == 0 + + # ============================================================ + + - name: 'Set S3 prefix (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '{{ cloudtrail_prefix }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Set S3 prefix' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '{{ cloudtrail_prefix }}' + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.s3_key_prefix == cloudtrail_prefix + + - name: 'Set S3 prefix (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '{{ cloudtrail_prefix }}' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.s3_key_prefix == cloudtrail_prefix + + - name: 'No-op update to trail' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.s3_key_prefix == cloudtrail_prefix + + - name: 'Update S3 prefix (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '{{ cloudtrail_prefix }}-2' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Update S3 prefix' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '{{ cloudtrail_prefix }}-2' + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - 'output.trail.s3_key_prefix == "{{ cloudtrail_prefix }}-2"' + + - name: 'Update S3 prefix (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '{{ cloudtrail_prefix }}-2' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - 'output.trail.s3_key_prefix == "{{ cloudtrail_prefix }}-2"' + + - name: 'Remove S3 prefix (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '/' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Remove S3 prefix' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '/' + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.s3_key_prefix is none + + - name: 'Remove S3 prefix (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '/' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.s3_key_prefix is none + + # ============================================================ + + - name: 'Add Tag (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + tags: + tag1: Value1 + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Add Tag' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + tags: + tag1: Value1 + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.tags | length == 1 + - '("tag1" in output.trail.tags) and (output.trail.tags["tag1"] == "Value1")' + + - name: 'Add Tag (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + tags: + tag1: Value1 + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.tags | length == 1 + - '("tag1" in output.trail.tags) and (output.trail.tags["tag1"] == "Value1")' + + - name: 'Change tags (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + tags: + tag2: Value2 + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Change tags' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + tags: + tag2: Value2 + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.tags | length == 1 + - '("tag2" in output.trail.tags) and (output.trail.tags["tag2"] == "Value2")' + + - name: 'Change tags (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + tags: + tag2: Value2 + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.tags | length == 1 + - '("tag2" in output.trail.tags) and (output.trail.tags["tag2"] == "Value2")' + + - name: 'Change tags (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + tags: + tag2: Value2 + Tag3: Value3 + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Change tags' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + tags: + tag2: Value2 + Tag3: Value3 + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.tags | length == 2 + - '("tag2" in output.trail.tags) and (output.trail.tags["tag2"] == "Value2")' + #- '("Tag3" in output.trail.tags) and (output.trail.tags["Tag3"] == "Value3")' + + - name: 'Change tags (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + tags: + tag2: Value2 + Tag3: Value3 + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.tags | length == 2 + - '("tag2" in output.trail.tags) and (output.trail.tags["tag2"] == "Value2")' + #- '("Tag3" in output.trail.tags) and (output.trail.tags["Tag3"] == "Value3")' + + - name: 'Remove tags (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Remove tags' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.tags | length == 0 + + - name: 'Remove tags (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.tags | length == 0 + + # ============================================================ + + - name: 'Set SNS Topic (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + sns_topic_name: '{{ sns_topic }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Set SNS Topic' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + sns_topic_name: '{{ sns_topic }}' + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.sns_topic_name == sns_topic + + - name: 'Set SNS Topic (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + sns_topic_name: '{{ sns_topic }}' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.sns_topic_name == sns_topic + + - name: 'No-op update to trail' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.sns_topic_name == sns_topic + + - name: 'Update SNS Topic (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + sns_topic_name: '{{ sns_topic }}-2' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Update SNS Topic' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + sns_topic_name: '{{ sns_topic }}-2' + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - 'output.trail.sns_topic_name == "{{ sns_topic }}-2"' + + - name: 'Update SNS Topic (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + sns_topic_name: '{{ sns_topic }}-2' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - 'output.trail.sns_topic_name == "{{ sns_topic }}-2"' + + #- name: 'Remove SNS Topic (CHECK MODE)' + # cloudtrail: + # state: present + # name: '{{ cloudtrail_name }}' + # sns_topic_name: '' + # register: output + # check_mode: yes + #- assert: + # that: + # - output is changed + + #- name: 'Remove SNS Topic' + # cloudtrail: + # state: present + # name: '{{ cloudtrail_name }}' + # sns_topic_name: '' + # register: output + #- assert: + # that: + # - output is changed + # - output.trail.name == cloudtrail_name + # - output.trail.sns_topic_name is none + + #- name: 'Remove SNS Topic (no change)' + # cloudtrail: + # state: present + # name: '{{ cloudtrail_name }}' + # sns_topic_name: '' + # register: output + #- assert: + # that: + # - output is not changed + # - output.trail.name == cloudtrail_name + # - output.trail.sns_topic_name is none + + + # ============================================================ + + - name: 'Set CloudWatch Log Group (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + cloudwatch_logs_log_group_arn: '{{ output_cloudwatch_log_group.arn }}' + cloudwatch_logs_role_arn: '{{ output_cloudwatch_role.arn }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Set CloudWatch Log Group' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + cloudwatch_logs_log_group_arn: '{{ output_cloudwatch_log_group.arn }}' + cloudwatch_logs_role_arn: '{{ output_cloudwatch_role.arn }}' + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.cloud_watch_logs_log_group_arn == output_cloudwatch_log_group.arn + - output.trail.cloud_watch_logs_role_arn == output_cloudwatch_role.arn + + - name: 'Set CloudWatch Log Group (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + cloudwatch_logs_log_group_arn: '{{ output_cloudwatch_log_group.arn }}' + cloudwatch_logs_role_arn: '{{ output_cloudwatch_role.arn }}' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.cloud_watch_logs_log_group_arn == output_cloudwatch_log_group.arn + - output.trail.cloud_watch_logs_role_arn == output_cloudwatch_role.arn + + - name: 'No-op update to trail' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.cloud_watch_logs_log_group_arn == output_cloudwatch_log_group.arn + - output.trail.cloud_watch_logs_role_arn == output_cloudwatch_role.arn + + - name: 'Update CloudWatch Log Group (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + cloudwatch_logs_log_group_arn: '{{ output_cloudwatch_log_group2.arn }}' + cloudwatch_logs_role_arn: '{{ output_cloudwatch_role.arn }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + - output.trail.cloud_watch_logs_log_group_arn == output_cloudwatch_log_group2.arn + - output.trail.cloud_watch_logs_role_arn == output_cloudwatch_role.arn + + - name: 'Update CloudWatch Log Group' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + cloudwatch_logs_log_group_arn: '{{ output_cloudwatch_log_group2.arn }}' + cloudwatch_logs_role_arn: '{{ output_cloudwatch_role.arn }}' + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.cloud_watch_logs_log_group_arn == output_cloudwatch_log_group2.arn + - output.trail.cloud_watch_logs_role_arn == output_cloudwatch_role.arn + + - name: 'Update CloudWatch Log Group (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + cloudwatch_logs_log_group_arn: '{{ output_cloudwatch_log_group2.arn }}' + cloudwatch_logs_role_arn: '{{ output_cloudwatch_role.arn }}' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.cloud_watch_logs_log_group_arn == output_cloudwatch_log_group2.arn + - output.trail.cloud_watch_logs_role_arn == output_cloudwatch_role.arn + + #- name: 'Remove CloudWatch Log Group (CHECK MODE)' + # cloudtrail: + # state: present + # name: '{{ cloudtrail_name }}' + # cloudwatch_logs_log_group_arn: '' + # cloudwatch_logs_role_arn: '' + # register: output + # check_mode: yes + #- assert: + # that: + # - output is changed + # - output.trail.name == cloudtrail_name + # - output.trail.cloud_watch_logs_log_group_arn is none + # - output.trail.cloud_watch_logs_role_arn is none + + #- name: 'Remove CloudWatch Log Group' + # cloudtrail: + # state: present + # name: '{{ cloudtrail_name }}' + # cloudwatch_logs_log_group_arn: '' + # cloudwatch_logs_role_arn: '' + # register: output + #- assert: + # that: + # - output is changed + # - output.trail.name == cloudtrail_name + # - output.trail.cloud_watch_logs_log_group_arn is none + # - output.trail.cloud_watch_logs_role_arn is none + + #- name: 'Remove CloudWatch Log Group (no change)' + # cloudtrail: + # state: present + # name: '{{ cloudtrail_name }}' + # cloudwatch_logs_log_group_arn: '' + # cloudwatch_logs_role_arn: '' + # register: output + #- assert: + # that: + # - output is not changed + # - output.trail.name == cloudtrail_name + # - output.trail.cloud_watch_logs_log_group_arn is none + # - output.trail.cloud_watch_logs_role_arn is none + + # ============================================================ + + - name: 'Update S3 bucket (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_bucket_name: '{{ s3_bucket_name }}-2' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Update S3 bucket' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_bucket_name: '{{ s3_bucket_name }}-2' + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - 'output.trail.s3_bucket_name == "{{ s3_bucket_name }}-2"' + + - name: 'Update S3 bucket (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_bucket_name: '{{ s3_bucket_name }}-2' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - 'output.trail.s3_bucket_name == "{{ s3_bucket_name }}-2"' + + - name: 'Reset S3 bucket' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output.trail.name == cloudtrail_name + - output.trail.s3_bucket_name == s3_bucket_name + + # ============================================================ + + - name: 'Disable logging (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_logging: no + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Disable logging' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_logging: no + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.is_logging == False + + - name: 'Disable logging (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_logging: no + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.is_logging == False + + # Ansible Documentation lists logging as explicitly defaulting to enabled + + - name: 'Enable logging (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_logging: yes + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Enable logging' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_logging: yes + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.is_logging == True + + - name: 'Enable logging (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_logging: yes + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.is_logging == True + + # ============================================================ + + - name: 'Disable global logging (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + include_global_events: no + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Disable global logging' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + include_global_events: no + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.include_global_service_events == False + + - name: 'Disable global logging (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + include_global_events: no + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.include_global_service_events == False + + # Ansible Documentation lists Global-logging as explicitly defaulting to enabled + + - name: 'Enable global logging (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + include_global_events: yes + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Enable global logging' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + include_global_events: yes + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.include_global_service_events == True + + - name: 'Enable global logging (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + include_global_events: yes + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.include_global_service_events == True + + # ============================================================ + + - name: 'Enable multi-region logging (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + is_multi_region_trail: yes + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Enable multi-region logging' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + is_multi_region_trail: yes + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.is_multi_region_trail == True + + - name: 'Enable multi-region logging (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + is_multi_region_trail: yes + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.is_multi_region_trail == True + + # Ansible Documentation lists Multi-Region-logging as explicitly defaulting to disabled + + - name: 'Disable multi-region logging (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + is_multi_region_trail: no + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Disable multi-region logging' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + is_multi_region_trail: no + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.is_multi_region_trail == False + + - name: 'Disable multi-region logging (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + is_multi_region_trail: no + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.is_multi_region_trail == False + + # ============================================================ + + - name: 'Enable logfile validation (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_log_file_validation: yes + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Enable logfile validation' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_log_file_validation: yes + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.log_file_validation_enabled == True + + - name: 'Enable logfile validation (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_log_file_validation: yes + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.log_file_validation_enabled == True + + - name: 'No-op update to trail' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.log_file_validation_enabled == True + + - name: 'Disable logfile validation (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_log_file_validation: no + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Disable logfile validation' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_log_file_validation: no + register: output + - assert: + that: + - output is changed + - output.trail.name == cloudtrail_name + - output.trail.log_file_validation_enabled == False + + - name: 'Disable logfile validation (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + enable_log_file_validation: no + register: output + - assert: + that: + - output is not changed + - output.trail.name == cloudtrail_name + - output.trail.log_file_validation_enabled == False + + # ============================================================ + + - name: 'Enable logging encryption (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + kms_key_id: '{{ kms_key.key_arn }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Enable logging encryption' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + kms_key_id: '{{ kms_key.key_arn }}' + register: output + - assert: + that: + - output is changed + - output.trail.kms_key_id == kms_key.key_arn + + - name: 'Enable logging encryption (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + kms_key_id: '{{ kms_key.key_arn }}' + register: output + - assert: + that: + - output is not changed + - output.trail.kms_key_id == kms_key.key_arn + + - name: 'No-op update to trail' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is not changed + - output.trail.kms_key_id == kms_key.key_arn + + - name: 'Update logging encryption key (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + kms_key_id: '{{ kms_key2.key_arn }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Update logging encryption key' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + kms_key_id: '{{ kms_key2.key_arn }}' + register: output + - assert: + that: + - output is changed + - output.trail.kms_key_id == kms_key2.key_arn + + - name: 'Update logging encryption key (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + kms_key_id: '{{ kms_key2.key_arn }}' + register: output + - assert: + that: + - output is not changed + - output.trail.kms_key_id == kms_key2.key_arn + + - name: 'Update logging encryption to alias (CHECK MODE)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + kms_key_id: 'alias/{{ kms_alias }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Update logging encryption to alias' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + kms_key_id: 'alias/{{ kms_alias }}' + register: output + - assert: + that: + - output is changed + - output.trail.kms_key_id == kms_key.key_arn + + - name: 'Update logging encryption to alias (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + kms_key_id: 'alias/{{ kms_alias }}' + register: output + - assert: + that: + # - output is not changed + - output.trail.kms_key_id == kms_key.key_arn + + #- name: 'Disable logging encryption (CHECK MODE)' + # cloudtrail: + # state: present + # name: '{{ cloudtrail_name }}' + # kms_key_id: '' + # register: output + # check_mode: yes + #- assert: + # that: + # - output is changed + + #- name: 'Disable logging encryption' + # cloudtrail: + # state: present + # name: '{{ cloudtrail_name }}' + # kms_key_id: '' + # register: output + #- assert: + # that: + # - output.trail.kms_key_id == None + # - output is changed + + #- name: 'Disable logging encryption (no change)' + # cloudtrail: + # state: present + # name: '{{ cloudtrail_name }}' + # kms_key_id: '' + # register: output + #- assert: + # that: + # - output.kms_key_id == None + # - output is not changed + + # ============================================================ + + - name: 'Delete a trail without providing bucket_name (CHECK MODE)' + module_defaults: { cloudtrail: {} } + cloudtrail: + state: absent + name: '{{ cloudtrail_name }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Delete a trail while providing bucket_name (CHECK MODE)' + cloudtrail: + state: absent + name: '{{ cloudtrail_name }}' + register: output + check_mode: yes + - assert: + that: + - output is changed + + - name: 'Delete a trail' + cloudtrail: + state: absent + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is changed + - output.exists == False + + - name: 'Delete a non-existent trail' + cloudtrail: + state: absent + name: '{{ cloudtrail_name }}' + register: output + - assert: + that: + - output is not changed + - output.exists == False + + # ============================================================ + + - name: 'Test creation of a complex Trail (all features)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '{{ cloudtrail_prefix }}' + sns_topic_name: '{{ sns_topic }}' + cloudwatch_logs_log_group_arn: '{{ output_cloudwatch_log_group.arn }}' + cloudwatch_logs_role_arn: '{{ output_cloudwatch_role.arn }}' + is_multi_region_trail: yes + include_global_events: yes + enable_log_file_validation: yes + kms_key_id: '{{ kms_key.key_arn }}' + register: output + - assert: + that: + - output is changed + #- output.exists == True + - output.trail.name == cloudtrail_name + - output.trail.home_region == aws_region + - output.trail.include_global_service_events == True + - output.trail.is_multi_region_trail == True + - output.trail.is_logging == True + - output.trail.log_file_validation_enabled == True + - output.trail.s3_bucket_name == s3_bucket_name + - output.trail.s3_key_prefix == cloudtrail_prefix + - output.trail.kms_key_id == kms_key.key_arn + - output.trail.sns_topic_arn == output_sns_topic.sns_arn + - output.trail.sns_topic_name == sns_topic + - output.trail.tags | length == 0 + + - name: 'Test creation of a complex Trail (no change)' + cloudtrail: + state: present + name: '{{ cloudtrail_name }}' + s3_key_prefix: '{{ cloudtrail_prefix }}' + sns_topic_name: '{{ sns_topic }}' + cloudwatch_logs_log_group_arn: '{{ output_cloudwatch_log_group.arn }}' + cloudwatch_logs_role_arn: '{{ output_cloudwatch_role.arn }}' + is_multi_region_trail: yes + include_global_events: yes + enable_log_file_validation: yes + kms_key_id: '{{ kms_key.key_arn }}' + register: output + - assert: + that: + - output is not changed + - output.exists == True + - output.trail.name == cloudtrail_name + - output.trail.home_region == aws_region + - output.trail.include_global_service_events == True + - output.trail.is_multi_region_trail == True + - output.trail.is_logging == True + - output.trail.log_file_validation_enabled == True + - output.trail.s3_bucket_name == s3_bucket_name + - output.trail.s3_key_prefix == cloudtrail_prefix + - output.trail.kms_key_id == kms_key.key_arn + - output.trail.sns_topic_arn == output_sns_topic.sns_arn + - output.trail.sns_topic_name == sns_topic + - output.trail.tags | length == 0 + + always: + # ============================================================ + # Cleanup + # ============================================================ + - name: 'Delete test trail' + cloudtrail: + state: absent + name: '{{ cloudtrail_name }}' + ignore_errors: yes + - name: 'Delete S3 bucket' + s3_bucket: + state: absent + name: '{{ s3_bucket_name }}' + force: yes + ignore_errors: yes + - name: 'Delete second S3 bucket' + s3_bucket: + state: absent + name: '{{ s3_bucket_name }}-2' + force: yes + ignore_errors: yes + - name: 'Delete KMS Key' + aws_kms: + state: absent + alias: '{{ kms_alias }}' + ignore_errors: yes + - name: 'Delete second KMS Key' + aws_kms: + state: absent + alias: '{{ kms_alias }}-2' + ignore_errors: yes + - name: 'Delete SNS Topic' + sns_topic: + state: absent + name: '{{ sns_topic }}' + ignore_errors: yes + - name: 'Delete second SNS Topic' + sns_topic: + state: absent + name: '{{ sns_topic }}-2' + ignore_errors: yes + - name: 'Delete CloudWatch Log Group' + cloudwatchlogs_log_group: + state: absent + log_group_name: '{{ cloudwatch_log_group }}' + ignore_errors: yes + - name: 'Delete second CloudWatch Log Group' + cloudwatchlogs_log_group: + state: absent + log_group_name: '{{ cloudwatch_log_group }}-2' + ignore_errors: yes + - name: 'Remove inline policy to CloudWatch Role' + iam_policy: + state: absent + iam_type: role + iam_name: '{{ cloudwatch_role }}' + policy_name: 'CloudWatch' + ignore_errors: yes + - name: 'Delete CloudWatch IAM Role' + iam_role: + state: absent + name: '{{ cloudwatch_role }}' + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/cloudwatch-assume-policy.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/cloudwatch-assume-policy.j2 new file mode 100644 index 00000000..6d7fb7b8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/cloudwatch-assume-policy.j2 @@ -0,0 +1,13 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "AssumeFromCloudTrails", + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/cloudwatch-policy.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/cloudwatch-policy.j2 new file mode 100644 index 00000000..8f354a70 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/cloudwatch-policy.j2 @@ -0,0 +1,17 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "CloudTrail2CloudWatch", + "Effect": "Allow", + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": [ + "arn:aws:logs:{{ aws_region }}:{{ aws_caller_info.account }}:log-group:{{ cloudwatch_log_group }}:log-stream:*", + "arn:aws:logs:{{ aws_region }}:{{ aws_caller_info.account }}:log-group:{{ cloudwatch_log_group }}-2:log-stream:*" + ] + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/kms-policy.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/kms-policy.j2 new file mode 100644 index 00000000..35730f1d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/kms-policy.j2 @@ -0,0 +1,34 @@ +{ + "Version": "2012-10-17", + "Id": "CloudTrailPolicy", + "Statement": [ + { + "Sid": "EncryptLogs", + "Effect": "Allow", + "Principal": { "Service": "cloudtrail.amazonaws.com" }, + "Action": "kms:GenerateDataKey*", + "Resource": "*", + "Condition": { + "StringLike": { + "kms:EncryptionContext:aws:cloudtrail:arn": [ + "arn:aws:cloudtrail:*:{{ aws_caller_info.account }}:trail/{{ resource_prefix }}*" + ] + } + } + }, + { + "Sid": "DescribeKey", + "Effect": "Allow", + "Principal": { "Service": "cloudtrail.amazonaws.com" }, + "Action": "kms:DescribeKey", + "Resource": "*" + }, + { + "Sid": "AnsibleTestManage", + "Effect": "Allow", + "Principal": { "AWS": "{{ aws_caller_info.arn }}" }, + "Action": "*", + "Resource": "*" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/s3-policy.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/s3-policy.j2 new file mode 100644 index 00000000..78c056e3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/s3-policy.j2 @@ -0,0 +1,34 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "CloudTrailCheckAcl", + "Effect": "Allow", + "Principal": { "Service": "cloudtrail.amazonaws.com" }, + "Action": "s3:GetBucketAcl", + "Resource": "arn:aws:s3:::{{ bucket_name }}", + }, + { + "Sid": "CloudTrailWriteLogs", + "Effect": "Allow", + "Principal": { "Service": "cloudtrail.amazonaws.com" }, + "Action": "s3:PutObject", + "Resource": [ + "arn:aws:s3:::{{ bucket_name }}/AWSLogs/{{ aws_caller_info.account }}/*", + "arn:aws:s3:::{{ bucket_name }}/{{ cloudtrail_prefix }}*/AWSLogs/{{ aws_caller_info.account }}/*" + ], + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control" + } + } + }, + { + "Sid": "AnsibleTestManage", + "Effect": "Allow", + "Principal": { "AWS": "{{ aws_caller_info.arn }}" }, + "Action": "*", + "Resource": "arn:aws:s3:::{{ bucket_name }}" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/sns-policy.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/sns-policy.j2 new file mode 100644 index 00000000..3c267b80 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudtrail/templates/sns-policy.j2 @@ -0,0 +1,34 @@ +{ + "Version": "2008-10-17", + "Id": "AnsibleSNSTesting", + "Statement": [ + { + "Sid": "CloudTrailSNSPolicy", + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Action": "sns:Publish", + "Resource": "arn:aws:sns:{{ aws_region }}:{{ aws_caller_info.account }}:{{ sns_topic_name }}" + }, + { + "Sid": "AnsibleTestManage", + "Effect": "Allow", + "Principal": { + "AWS": "{{ aws_caller_info.arn }}" + }, + "Action": [ + "sns:Subscribe", + "sns:ListSubscriptionsByTopic", + "sns:DeleteTopic", + "sns:GetTopicAttributes", + "sns:Publish", + "sns:RemovePermission", + "sns:AddPermission", + "sns:Receive", + "sns:SetTopicAttributes" + ], + "Resource": "arn:aws:sns:{{ aws_region }}:{{ aws_caller_info.account }}:{{ sns_topic_name }}" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudwatchlogs/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudwatchlogs/aliases new file mode 100644 index 00000000..500ca9a8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudwatchlogs/aliases @@ -0,0 +1,4 @@ +cloud/aws +shippable/aws/group1 +cloudwatchlogs_log_group +cloudwatchlogs_log_group_metric_filter diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudwatchlogs/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudwatchlogs/defaults/main.yml new file mode 100644 index 00000000..c6db709f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudwatchlogs/defaults/main.yml @@ -0,0 +1,3 @@ +--- +log_group_name: '{{ resource_prefix }}/integrationtest' +filter_name: '{{ resource_prefix }}/AnsibleTest'
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudwatchlogs/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudwatchlogs/tasks/main.yml new file mode 100644 index 00000000..a36c6643 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/cloudwatchlogs/tasks/main.yml @@ -0,0 +1,157 @@ +--- + +- module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + + block: + - name: create cloudwatch log group for integration test + cloudwatchlogs_log_group: + state: present + log_group_name: '{{ log_group_name }}' + retention: 1 + + - name: check_mode set metric filter on '{{ log_group_name }}' + cloudwatchlogs_log_group_metric_filter: + log_group_name: '{{ log_group_name }}' + filter_name: '{{ filter_name }}' + filter_pattern: '{ ($.value = *) && ($.hostname = "box")}' + state: present + metric_transformation: + metric_name: box_free_space + metric_namespace: fluentd_metrics + metric_value: "$.value" + check_mode: yes + register: out + + - name: check_mode state must be changed + assert: + that: + - out is changed + - out.metric_filters | count == 1 + + - name: set metric filter on '{{ log_group_name }}' + cloudwatchlogs_log_group_metric_filter: + log_group_name: '{{ log_group_name }}' + filter_name: '{{ filter_name }}' + filter_pattern: '{ ($.value = *) && ($.hostname = "box")}' + state: present + metric_transformation: + metric_name: box_free_space + metric_namespace: fluentd_metrics + metric_value: "$.value" + register: out + + - name: create metric filter + assert: + that: + - out is changed + - out.metric_filters | count == 1 + + - name: re-set metric filter on '{{ log_group_name }}' + cloudwatchlogs_log_group_metric_filter: + log_group_name: '{{ log_group_name }}' + filter_name: '{{ filter_name }}' + filter_pattern: '{ ($.value = *) && ($.hostname = "box")}' + state: present + metric_transformation: + metric_name: box_free_space + metric_namespace: fluentd_metrics + metric_value: "$.value" + register: out + + - name: metric filter must not change + assert: + that: + - out is not changed + + - name: update metric transformation on '{{ log_group_name }}' + cloudwatchlogs_log_group_metric_filter: + log_group_name: '{{ log_group_name }}' + filter_name: '{{ filter_name }}' + filter_pattern: '{ ($.value = *) && ($.hostname = "box")}' + state: present + metric_transformation: + metric_name: box_free_space + metric_namespace: made_with_ansible + metric_value: "$.value" + default_value: 3.1415 + register: out + + - name: update metric filter + assert: + that: + - out is changed + - out.metric_filters[0].metric_namespace == "made_with_ansible" + - out.metric_filters[0].default_value == 3.1415 + + - name: update filter_pattern on '{{ log_group_name }}' + cloudwatchlogs_log_group_metric_filter: + log_group_name: '{{ log_group_name }}' + filter_name: '{{ filter_name }}' + filter_pattern: '{ ($.value = *) && ($.hostname = "ansible")}' + state: present + metric_transformation: + metric_name: box_free_space + metric_namespace: made_with_ansible + metric_value: "$.value" + register: out + + - name: update metric filter + assert: + that: + - out is changed + - out.metric_filters[0].metric_namespace == "made_with_ansible" + + - name: checkmode delete metric filter on '{{ log_group_name }}' + cloudwatchlogs_log_group_metric_filter: + log_group_name: '{{ log_group_name }}' + filter_name: '{{ filter_name }}' + state: absent + check_mode: yes + register: out + + - name: check_mode state must be changed + assert: + that: + - out is changed + + - name: delete metric filter on '{{ log_group_name }}' + cloudwatchlogs_log_group_metric_filter: + log_group_name: '{{ log_group_name }}' + filter_name: '{{ filter_name }}' + state: absent + register: out + + - name: delete metric filter + assert: + that: + - out is changed + + - name: delete metric filter on '{{ log_group_name }}' which does not exist + cloudwatchlogs_log_group_metric_filter: + log_group_name: '{{ log_group_name }}' + filter_name: '{{ filter_name }}' + state: absent + register: out + + - name: delete metric filter + assert: + that: + - out is not changed + + always: + - name: delete metric filter + cloudwatchlogs_log_group_metric_filter: + log_group_name: '{{ log_group_name }}' + filter_name: '{{ filter_name }}' + state: absent + + - name: delete cloudwatch log group for integration test + cloudwatchlogs_log_group: + state: absent + log_group_name: '{{ log_group_name }}' + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection/aliases new file mode 100644 index 00000000..136c05e0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection/aliases @@ -0,0 +1 @@ +hidden diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection/test.sh b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection/test.sh new file mode 100755 index 00000000..4e7aa8dd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection/test.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -eux + +[ -f "${INVENTORY}" ] + +# Run connection tests with both the default and C locale. + + ansible-playbook test_connection.yml -i "${INVENTORY}" "$@" +LC_ALL=C LANG=C ansible-playbook test_connection.yml -i "${INVENTORY}" "$@" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection/test_connection.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection/test_connection.yml new file mode 100644 index 00000000..21699422 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection/test_connection.yml @@ -0,0 +1,43 @@ +- hosts: "{{ target_hosts }}" + gather_facts: no + serial: 1 + tasks: + + ### raw with unicode arg and output + + - name: raw with unicode arg and output + raw: echo æ±‰è¯ + register: command + - name: check output of raw with unicode arg and output + assert: + that: + - "'汉è¯' in command.stdout" + - command is changed # as of 2.2, raw should default to changed: true for consistency w/ shell/command/script modules + + ### copy local file with unicode filename and content + + - name: create local file with unicode filename and content + local_action: lineinfile dest={{ local_tmp }}-汉è¯/汉è¯.txt create=true line=æ±‰è¯ + - name: remove remote file with unicode filename and content + action: "{{ action_prefix }}file path={{ remote_tmp }}-汉è¯/汉è¯.txt state=absent" + - name: create remote directory with unicode name + action: "{{ action_prefix }}file path={{ remote_tmp }}-æ±‰è¯ state=directory" + - name: copy local file with unicode filename and content + action: "{{ action_prefix }}copy src={{ local_tmp }}-汉è¯/汉è¯.txt dest={{ remote_tmp }}-汉è¯/汉è¯.txt" + + ### fetch remote file with unicode filename and content + + - name: remove local file with unicode filename and content + local_action: file path={{ local_tmp }}-汉è¯/汉è¯.txt state=absent + - name: fetch remote file with unicode filename and content + fetch: src={{ remote_tmp }}-汉è¯/汉è¯.txt dest={{ local_tmp }}-汉è¯/汉è¯.txt fail_on_missing=true validate_checksum=true flat=true + + ### remove local and remote temp files + + - name: remove local temp file + local_action: file path={{ local_tmp }}-æ±‰è¯ state=absent + - name: remove remote temp file + action: "{{ action_prefix }}file path={{ remote_tmp }}-æ±‰è¯ state=absent" + + ### test wait_for_connection plugin + - wait_for_connection: diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aliases new file mode 100644 index 00000000..0031909d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aliases @@ -0,0 +1,7 @@ +cloud/aws +destructive +shippable/aws/group4 +non_local +needs/root +needs/target/connection +disabled diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup.yml new file mode 100644 index 00000000..7cd735b9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup.yml @@ -0,0 +1,3 @@ +- hosts: localhost + roles: + - role: aws_ssm_integration_test_setup diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/README.md b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/README.md new file mode 100644 index 00000000..bc12a83e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/README.md @@ -0,0 +1,43 @@ +# AWS SSM Integration Test Setup + +## aws_ssm_integration_test_setup_teardown + +An Ansible role was created to perform integration test across aws_ssm connection plugin. The role performs the following actions. + +- Create AWS Resources in user specified region. +- Perform integration Test across aws_ssm connection plugin. +- TearDown/Remove AWS Resources that are created for testing plugin. + +### Prerequisites + +- Make sure the machine used for testing already has Ansible repo with ssm connection plugin. +- AWS CLI/IAM-Role configured to the machine which has permissions to spin-up AWS resources. + +### Variables referred in Ansible Role + +The following table provide details about variables referred within Ansible Role. + +| Variable Name | Details | +| ------ | ------ | +| aws_region | Name of AWS-region | +| iam_role_name | Name of IAM Role which will be attached to newly-created EC2-Instance | +| iam_policy_name | Name of IAM Policy which will be attached to the IAM role referred above | +| instance_type | Instance type user for creating EC2-Instance | +| instance_id | AWS EC2 Instance-Id (This gets populated by role) | +| bucket_name | Name of S3 buckted used by SSM (This gets populated by role) | + +### Example Playbook + +A sample example to demonstrate the usage of role within Ansible-playbook.(Make sure the respective variables are passed as parameters.) + +```yaml + - hosts: localhost + roles: + - aws_ssm_integration_test_setup_teardown +``` + +#### Author's Information + +Krishna Nand Choudhary (krishnanandchoudhary) +Nikhil Araga (araganik) +Gaurav Ashtikar (gau1991) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/defaults/main.yml new file mode 100644 index 00000000..f158bf3f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/defaults/main.yml @@ -0,0 +1,5 @@ +--- +instance_type: t2.micro +linux_ami_name: amzn-ami-hvm-2018.03.0.20190611-x86_64-ebs +# Windows AMIs get replaced every few months, don't be too specific +windows_ami_name: Windows_Server-2019-English-Full-Base-* diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/files/ec2-trust-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/files/ec2-trust-policy.json new file mode 100644 index 00000000..63d22eae --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/files/ec2-trust-policy.json @@ -0,0 +1,13 @@ +{ + "Version": "2008-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Allow", + "Principal": { + "Service": "ec2.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] + } diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/debian.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/debian.yml new file mode 100644 index 00000000..ff497ef3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/debian.yml @@ -0,0 +1,19 @@ +- name: Download SSM plugin + get_url: + url: https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb + dest: /tmp/session-manager-plugin.deb + mode: '0440' + tags: setup_infra +- name: Extract SSM plugin Deb File + shell: ar x session-manager-plugin.deb + args: + chdir: /tmp + tags: setup_infra +- name: Extract SSM Plugin Control File + shell: tar -zxvf data.tar.gz -C / + args: + chdir: /tmp + tags: setup_infra +- name: Check the SSM Plugin + shell: /usr/local/sessionmanagerplugin/bin/session-manager-plugin --version + tags: setup_infra diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml new file mode 100644 index 00000000..dae7e277 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml @@ -0,0 +1,156 @@ +--- +## Task file for setup/teardown AWS resources for aws_ssm integration testing +- block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{aws_access_key}}" + aws_secret_key: "{{aws_secret_key}}" + security_token: "{{security_token}}" + region: "{{aws_region}}" + no_log: yes + + - name: AMI Lookup + ec2_ami_info: + owners: 'amazon' + filters: + name: '{{ item }}' + <<: *aws_connection_info + register: ec2_amis + loop: + - '{{ linux_ami_name }}' + - '{{ windows_ami_name }}' + + - name: Set facts with latest AMIs + vars: + latest_linux_ami: '{{ ec2_amis.results[0].images | sort(attribute="creation_date") | last }}' + latest_windows_ami: '{{ ec2_amis.results[1].images | sort(attribute="creation_date") | last }}' + set_fact: + linux_ami_id: '{{ latest_linux_ami.image_id }}' + windows_ami_id: '{{ latest_windows_ami.image_id }}' + + - name: Install Session Manager Plugin for Debian/Ubuntu + include_tasks: debian.yml + when: ansible_distribution == "Ubuntu" or ansible_distribution == "Debian" + register: install_plugin_debian + + - name: Install Session Manager Plugin for RedHat/Amazon + include_tasks: redhat.yml + when: ansible_distribution == "CentOS" or ansible_distribution == "RedHat" or ansible_distribution == "Amazon" + register: install_plugin_redhat + + - name: Fail if the plugin was not installed + fail: + msg: The distribution does not contain the required Session Manager Plugin + when: + - install_plugin_debian is skipped + - install_plugin_redhat is skipped + + - name: Install Boto3 + pip: + name: boto3 + + - name: Install Boto + pip: + name: boto + + - name: Ensure IAM instance role exists + iam_role: + name: "ansible-test-{{resource_prefix}}-aws-ssm-role" + assume_role_policy_document: "{{ lookup('file','ec2-trust-policy.json') }}" + state: present + create_instance_profile: yes + managed_policy: + - AmazonEC2RoleforSSM + <<: *aws_connection_info + register: role_output + + - name: Create S3 bucket + s3_bucket: + name: "{{resource_prefix}}-aws-ssm-s3" + <<: *aws_connection_info + register: s3_output + + - name: Wait for IAM Role getting created + pause: + seconds: 10 + + - name: Create Linux EC2 instance + ec2: + instance_type: "{{instance_type}}" + image: "{{linux_ami_id}}" + wait: "yes" + count: 1 + instance_profile_name: "{{role_output.iam_role.role_name}}" + instance_tags: + Name: "{{resource_prefix}}-integration-test-aws-ssm-linux" + user_data: | + #!/bin/sh + sudo systemctl start amazon-ssm-agent + state: present + <<: *aws_connection_info + register: linux_output + + - name: Create Windows EC2 instance + ec2: + instance_type: "{{instance_type}}" + image: "{{windows_ami_id}}" + wait: "yes" + count: 1 + instance_profile_name: "{{role_output.iam_role.role_name}}" + instance_tags: + Name: "{{resource_prefix}}-integration-test-aws-ssm-windows" + user_data: | + <powershell> + Invoke-WebRequest -Uri "https://amazon-ssm-us-east-1.s3.amazonaws.com/latest/windows_amd64/AmazonSSMAgentSetup.exe" -OutFile "C:\AmazonSSMAgentSetup.exe" + Start-Process -FilePath C:\AmazonSSMAgentSetup.exe -ArgumentList "/S","/v","/qn" -Wait + Restart-Service AmazonSSMAgent + </powershell> + state: present + <<: *aws_connection_info + register: windows_output + + - name: Wait for EC2 to be available + wait_for_connection: + delay: 300 + + - name: Create Inventory file for Linux host + template: + dest: "{{playbook_dir}}/inventory-linux.aws_ssm" + src: inventory-linux.aws_ssm.j2 + + - name: Create Inventory file for Windows host + template: + dest: "{{playbook_dir}}/inventory-windows.aws_ssm" + src: inventory-windows.aws_ssm.j2 + + - name: Create AWS Keys Environement + template: + dest: "{{playbook_dir}}/aws-env-vars.sh" + src: aws-env-vars.j2 + no_log: yes + + always: + - name: Create EC2 Linux vars_to_delete.yml + template: + dest: "{{playbook_dir}}/ec2_linux_vars_to_delete.yml" + src: ec2_linux_vars_to_delete.yml.j2 + ignore_errors: yes + + - name: Create EC2 Windows vars_to_delete.yml + template: + dest: "{{playbook_dir}}/ec2_windows_vars_to_delete.yml" + src: ec2_windows_vars_to_delete.yml.j2 + ignore_errors: yes + + - name: Create S3 vars_to_delete.yml + template: + dest: "{{playbook_dir}}/s3_vars_to_delete.yml" + src: s3_vars_to_delete.yml.j2 + ignore_errors: yes + + - name: Create IAM Role vars_to_delete.yml + template: + dest: "{{playbook_dir}}/iam_role_vars_to_delete.yml" + src: iam_role_vars_to_delete.yml.j2 + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/redhat.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/redhat.yml new file mode 100644 index 00000000..d111b4d3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/redhat.yml @@ -0,0 +1,11 @@ +- name: Download SSM plugin + get_url: + url: https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_64bit/session-manager-plugin.rpm + dest: /tmp/session-manager-plugin.rpm + mode: '0440' + tags: setup_infra +- name: Install SSM Plugin + yum: + name: /tmp/session-manager-plugin.rpm + state: present + tags: setup_infra diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/aws-env-vars.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/aws-env-vars.j2 new file mode 100644 index 00000000..1e3821ad --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/aws-env-vars.j2 @@ -0,0 +1,4 @@ +export AWS_ACCESS_KEY_ID={{aws_access_key}} +export AWS_SECRET_ACCESS_KEY={{aws_secret_key}} +export AWS_SECURITY_TOKEN={{security_token}} +export AWS_REGION={{aws_region}} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/ec2_linux_vars_to_delete.yml.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/ec2_linux_vars_to_delete.yml.j2 new file mode 100644 index 00000000..8af1e3b5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/ec2_linux_vars_to_delete.yml.j2 @@ -0,0 +1,2 @@ +--- +linux_instance_id: {{linux_output.instance_ids[0]}} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/ec2_windows_vars_to_delete.yml.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/ec2_windows_vars_to_delete.yml.j2 new file mode 100644 index 00000000..d216f372 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/ec2_windows_vars_to_delete.yml.j2 @@ -0,0 +1,2 @@ +--- +windows_instance_id: {{windows_output.instance_ids[0]}} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/iam_role_vars_to_delete.yml.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/iam_role_vars_to_delete.yml.j2 new file mode 100644 index 00000000..0d87d3ed --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/iam_role_vars_to_delete.yml.j2 @@ -0,0 +1,2 @@ +--- +iam_role_name: {{role_output.iam_role.role_name}} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-linux.aws_ssm.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-linux.aws_ssm.j2 new file mode 100644 index 00000000..7e97e5f8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-linux.aws_ssm.j2 @@ -0,0 +1,12 @@ +[aws_ssm] +{{linux_output.instance_ids[0]}} ansible_aws_ssm_instance_id={{linux_output.instance_ids[0]}} ansible_aws_ssm_region={{aws_region}} + +[aws_ssm:vars] +ansible_connection=aws_ssm +ansible_aws_ssm_bucket_name={{s3_output.name}} +ansible_aws_ssm_plugin=/usr/local/sessionmanagerplugin/bin/session-manager-plugin +ansible_python_interpreter=/usr/bin/env python + +# support tests that target testhost +[testhost:children] +aws_ssm diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-windows.aws_ssm.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-windows.aws_ssm.j2 new file mode 100644 index 00000000..0b6a28c8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-windows.aws_ssm.j2 @@ -0,0 +1,12 @@ +[aws_ssm] +{{windows_output.instance_ids[0]}} ansible_aws_ssm_instance_id={{windows_output.instance_ids[0]}} ansible_aws_ssm_region={{aws_region}} + +[aws_ssm:vars] +ansible_shell_type=powershell +ansible_connection=aws_ssm +ansible_aws_ssm_bucket_name={{s3_output.name}} +ansible_aws_ssm_plugin=/usr/local/sessionmanagerplugin/bin/session-manager-plugin + +# support tests that target testhost +[testhost:children] +aws_ssm diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/s3_vars_to_delete.yml.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/s3_vars_to_delete.yml.j2 new file mode 100644 index 00000000..3839fb3c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/s3_vars_to_delete.yml.j2 @@ -0,0 +1,2 @@ +--- +bucket_name: {{s3_output.name}} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown.yml new file mode 100644 index 00000000..13c62c1f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown.yml @@ -0,0 +1,3 @@ +- hosts: localhost + roles: + - role: aws_ssm_integration_test_teardown diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/README.md b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/README.md new file mode 100644 index 00000000..bc12a83e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/README.md @@ -0,0 +1,43 @@ +# AWS SSM Integration Test Setup + +## aws_ssm_integration_test_setup_teardown + +An Ansible role was created to perform integration test across aws_ssm connection plugin. The role performs the following actions. + +- Create AWS Resources in user specified region. +- Perform integration Test across aws_ssm connection plugin. +- TearDown/Remove AWS Resources that are created for testing plugin. + +### Prerequisites + +- Make sure the machine used for testing already has Ansible repo with ssm connection plugin. +- AWS CLI/IAM-Role configured to the machine which has permissions to spin-up AWS resources. + +### Variables referred in Ansible Role + +The following table provide details about variables referred within Ansible Role. + +| Variable Name | Details | +| ------ | ------ | +| aws_region | Name of AWS-region | +| iam_role_name | Name of IAM Role which will be attached to newly-created EC2-Instance | +| iam_policy_name | Name of IAM Policy which will be attached to the IAM role referred above | +| instance_type | Instance type user for creating EC2-Instance | +| instance_id | AWS EC2 Instance-Id (This gets populated by role) | +| bucket_name | Name of S3 buckted used by SSM (This gets populated by role) | + +### Example Playbook + +A sample example to demonstrate the usage of role within Ansible-playbook.(Make sure the respective variables are passed as parameters.) + +```yaml + - hosts: localhost + roles: + - aws_ssm_integration_test_setup_teardown +``` + +#### Author's Information + +Krishna Nand Choudhary (krishnanandchoudhary) +Nikhil Araga (araganik) +Gaurav Ashtikar (gau1991) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml new file mode 100644 index 00000000..7993733b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml @@ -0,0 +1,85 @@ +--- +- name: Set up AWS connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{aws_access_key}}" + aws_secret_key: "{{aws_secret_key}}" + region: "{{aws_region}}" + security_token: "{{security_token}}" + no_log: true + +- name: Check if ec2_linux_vars_to_delete.yml is present + stat: + path: "{{playbook_dir}}/ec2_linux_vars_to_delete.yml" + register: ec2_linux_vars_file + +- name: Include variable file to delete EC2 Linux infra + include_vars: "{{playbook_dir}}/ec2_linux_vars_to_delete.yml" + when: ec2_linux_vars_file.stat.exists == true + +- name: Check if ec2_windows_vars_to_delete.yml is present + stat: + path: "{{playbook_dir}}/ec2_windows_vars_to_delete.yml" + register: ec2_windows_vars_file + +- name: Include variable file to delete EC2 Windows infra + include_vars: "{{playbook_dir}}/ec2_windows_vars_to_delete.yml" + when: ec2_windows_vars_file.stat.exists == true + +- name: Check if s3_vars_to_delete.yml is present + stat: + path: "{{playbook_dir}}/s3_vars_to_delete.yml" + register: s3_vars_file + +- name: Include variable file to delete S3 Infra infra + include_vars: "{{playbook_dir}}/s3_vars_to_delete.yml" + when: s3_vars_file.stat.exists == true + +- name: Check if iam_role_vars_to_delete.yml is present + stat: + path: "{{playbook_dir}}/iam_role_vars_to_delete.yml" + register: iam_role_vars_file + +- name: Include variable file to delete IAM Role infra + include_vars: "{{playbook_dir}}/iam_role_vars_to_delete.yml" + when: iam_role_vars_file.stat.exists == true + +- name: Terminate Windows EC2 instances that were previously launched + ec2: + instance_ids: + - "{{windows_instance_id}}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + when: ec2_windows_vars_file.stat.exists == true + +- name: Terminate Linux EC2 instances that were previously launched + ec2: + instance_ids: + - "{{linux_instance_id}}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + when: ec2_linux_vars_file.stat.exists == true + +- name: Delete S3 bucket + aws_s3: + bucket: "{{bucket_name}}" + mode: delete + <<: *aws_connection_info + ignore_errors: yes + when: s3_vars_file.stat.exists == true + +- name: Delete IAM role + iam_role: + name: "{{iam_role_name}}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + when: iam_role_vars_file.stat.exists == true + +- name: Delete AWS keys environement + file: + path: "{{playbook_dir}}/aws-env-vars.sh" + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/inventory.aws_ssm.template b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/inventory.aws_ssm.template new file mode 100644 index 00000000..afbee1ae --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/inventory.aws_ssm.template @@ -0,0 +1,10 @@ +[aws_ssm] +@NAME ansible_aws_ssm_instance_id=@HOST ansible_aws_ssm_region=@AWS_REGION + +[aws_ssm:vars] +ansible_connection=aws_ssm +ansible_aws_ssm_bucket_name=@S3_BUCKET + +# support tests that target testhost +[testhost:children] +aws_ssm diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/runme.sh b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/runme.sh new file mode 100755 index 00000000..1d9b3873 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/connection_aws_ssm/runme.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +set -eux + +CMD_ARGS=("$@") + +# Destroy Environment +cleanup() { + + cd ../connection_aws_ssm + + ansible-playbook -c local aws_ssm_integration_test_teardown.yml "${CMD_ARGS[@]}" + +} + +trap "cleanup" EXIT + +# Setup Environment +ansible-playbook -c local aws_ssm_integration_test_setup.yml "$@" + +# Export the AWS Keys +set +x +. ./aws-env-vars.sh +set -x + +cd ../connection + +# Execute Integration tests for Linux +INVENTORY=../connection_aws_ssm/inventory-linux.aws_ssm ./test.sh \ + -e target_hosts=aws_ssm \ + -e local_tmp=/tmp/ansible-local \ + -e remote_tmp=/tmp/ansible-remote \ + -e action_prefix= \ + "$@" + +# Execute Integration tests for Windows +INVENTORY=../connection_aws_ssm/inventory-windows.aws_ssm ./test.sh \ + -e target_hosts=aws_ssm \ + -e local_tmp=/tmp/ansible-local \ + -e remote_tmp=c:/windows/temp/ansible-remote \ + -e action_prefix=win_ \ + "$@" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_endpoint/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_endpoint/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_endpoint/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_endpoint/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_endpoint/tasks/main.yml new file mode 100644 index 00000000..18eb5728 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_endpoint/tasks/main.yml @@ -0,0 +1,139 @@ +--- + +- name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + region: "{{ aws_region }}" + dms_identifier: "{{ resource_prefix }}-dms" + no_log: yes + +- name: dms_endpoint tests + collections: + - amazon.aws + block: + - name: create endpoints + dms_endpoint: + state: present + endpointidentifier: "{{ dms_identifier }}" + endpointtype: source + enginename: aurora + username: testing + password: testint1234 + servername: "{{ resource_prefix }}.exampledomain.com" + port: 3306 + databasename: 'testdb' + sslmode: none + <<: *aws_connection_info + register: result + + - assert: + that: + - result is changed + - result is not failed + + - name: create endpoints no change + dms_endpoint: + state: present + endpointidentifier: "{{ dms_identifier }}" + endpointtype: source + enginename: aurora + username: testing + password: testint1234 + servername: "{{ resource_prefix }}.exampledomain.com" + port: 3306 + databasename: 'testdb' + sslmode: none + <<: *aws_connection_info + register: result + + - assert: + that: + - result is not changed + - result is not failed + + - name: update endpoints + dms_endpoint: + state: present + endpointidentifier: "{{ dms_identifier }}" + endpointtype: source + enginename: aurora + username: testing + password: testint1234 + servername: "{{ resource_prefix }}.exampledomain.com" + port: 3306 + databasename: 'testdb2' + sslmode: none + <<: *aws_connection_info + register: result + + - assert: + that: + - result is changed + - result is not failed + + - name: update endpoints no change + dms_endpoint: + state: present + endpointidentifier: "{{ dms_identifier }}" + endpointtype: source + enginename: aurora + username: testing + password: testint1234 + servername: "{{ resource_prefix }}.exampledomain.com" + port: 3306 + databasename: 'testdb2' + sslmode: none + <<: *aws_connection_info + register: result + + - assert: + that: + - result is not changed + - result is not failed + + always: + - name: delete endpoints + dms_endpoint: + state: absent + endpointidentifier: "{{ dms_identifier }}" + endpointtype: source + enginename: aurora + username: testing + password: testint1234 + servername: "{{ resource_prefix }}.exampledomain.com" + port: 3306 + databasename: 'testdb' + sslmode: none + wait: True + timeout: 60 + retries: 10 + <<: *aws_connection_info + register: result + + - assert: + that: + - result is changed + - result is not failed + + - name: delete endpoints no change + dms_endpoint: + state: absent + endpointidentifier: "{{ dms_identifier }}" + endpointtype: source + enginename: aurora + username: testing + password: testint1234 + servername: "{{ resource_prefix }}.exampledomain.com" + port: 3306 + databasename: 'testdb' + sslmode: none + wait: False + <<: *aws_connection_info + register: result + + - assert: + that: + - result is not changed + - result is not failed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/defaults/main.yml new file mode 100644 index 00000000..feed0f4c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/defaults/main.yml @@ -0,0 +1,2 @@ +resource_prefix: "test_dms_sg" +dms_role_role_name: dms-vpc-role
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/files/dmsAssumeRolePolicyDocument.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/files/dmsAssumeRolePolicyDocument.json new file mode 100644 index 00000000..69ee87ee --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/files/dmsAssumeRolePolicyDocument.json @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "dms.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/tasks/main.yml new file mode 100644 index 00000000..e0708c31 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/dms_replication_subnet_group/tasks/main.yml @@ -0,0 +1,192 @@ +--- + +- name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + region: "{{ aws_region }}" + dms_sg_identifier: "{{ resource_prefix }}-dms" + no_log: yes + +- name: dms_replication_subnet_group tests + collections: + - amazon.aws + block: + + - name: ensure IAM role exists + iam_role: + <<: *aws_connection_info + name: "{{ dms_role_role_name }}" + assume_role_policy_document: "{{ lookup('file','dmsAssumeRolePolicyDocument.json') }}" + state: present + create_instance_profile: no + managed_policy: + - 'arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole' + register: iam_role_output + ignore_errors: yes + + - name: Create VPC for use in testing + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.22.32.0/23 + tags: + Name: Ansible ec2_instance Testing VPC + tenancy: default + <<: *aws_connection_info + register: testing_vpc + + - name: 'Fetch AZ availability' + aws_az_info: + <<: *aws_connection_info + register: az_info + + - name: 'Assert that we have multiple AZs available to us' + assert: + that: az_info.availability_zones | length >= 2 + + - name: 'Pick AZs' + set_fact: + az_one: '{{ az_info.availability_zones[0].zone_name }}' + az_two: '{{ az_info.availability_zones[1].zone_name }}' + + - name: create subnet1 + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.32.16/28 + az: "{{ az_one }}" + <<: *aws_connection_info + register: subnet1 + + - name: create subnet2 + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.32.32/28 + az: "{{ az_two }}" + <<: *aws_connection_info + register: subnet2 + + - name: create replication subnet group + dms_replication_subnet_group: + state: present + identifier: "{{ dms_sg_identifier }}" + description: "Development Subnet Group" + subnet_ids: [ "{{ subnet1.subnet.id }}", "{{ subnet2.subnet.id }}"] + <<: *aws_connection_info + register: result + + - assert: + that: + - result is changed + - result is not failed + + - name: create subnet group no change + dms_replication_subnet_group: + state: present + identifier: "{{ dms_sg_identifier }}" + description: "Development Subnet Group" + subnet_ids: [ "{{ subnet1.subnet.id }}", "{{ subnet2.subnet.id }}"] + <<: *aws_connection_info + register: result + + - assert: + that: + - result is not changed + - result is not failed + + - name: update subnet group + dms_replication_subnet_group: + state: present + identifier: "{{ dms_sg_identifier }}" + description: "Development Subnet Group updated" + subnet_ids: [ "{{ subnet1.subnet.id }}", "{{ subnet2.subnet.id }}"] + <<: *aws_connection_info + register: result + + - assert: + that: + - result is changed + - result is not failed + + - name: update subnet group no change + dms_replication_subnet_group: + state: present + identifier: "{{ dms_sg_identifier }}" + description: "Development Subnet Group updated" + subnet_ids: [ "{{ subnet1.subnet.id }}", "{{ subnet2.subnet.id }}"] + <<: *aws_connection_info + register: result + + - assert: + that: + - result is not changed + - result is not failed + + always: + - name: delete subnet group no change + dms_replication_subnet_group: + state: absent + identifier: "{{ dms_sg_identifier }}" + description: "Development Subnet Group updated" + subnet_ids: [ "{{ subnet1.subnet.id }}", "{{ subnet2.subnet.id }}"] + <<: *aws_connection_info + register: result + + - assert: + that: + - result is changed + - result is not failed + + - name: delete subnet group no change + dms_replication_subnet_group: + state: absent + identifier: "{{ dms_sg_identifier }}" + description: "Development Subnet Group updated" + subnet_ids: [ "{{ subnet1.subnet.id }}", "{{ subnet2.subnet.id }}"] + <<: *aws_connection_info + register: result + + - assert: + that: + - result is not changed + - result is not failed + + - name: delete subnet1 + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.32.16/28 + az: "{{ az_one }}" + <<: *aws_connection_info + + - name: delete subnet2 + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.32.32/28 + az: "{{ az_two }}" + <<: *aws_connection_info + + - name: delete VPC for use in testing + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.22.32.0/23 + tags: + Name: Ansible ec2_instance Testing VPC + tenancy: default + state: absent + <<: *aws_connection_info + + - name: delete dms-vpc role + iam_role: + <<: *aws_connection_info + name: "{{ dms_role_role_name }}" + assume_role_policy_document: "{{ lookup('file','dmsAssumeRolePolicyDocument.json') }}" + state: absent + create_instance_profile: no + managed_policy: + - 'arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole' + register: iam_role_output + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/defaults/main.yml new file mode 100644 index 00000000..80bf25cd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/defaults/main.yml @@ -0,0 +1,4 @@ +--- +# defaults file for ec2_asg +# Amazon Linux 2 AMI 2019.06.12 (HVM), GP2 Volume Type +ec2_ami_name: 'amzn2-ami-hvm-2.0.20190612-x86_64-gp2' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/tasks/main.yml new file mode 100644 index 00000000..aa53e968 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/tasks/main.yml @@ -0,0 +1,787 @@ +--- +# tasks file for test_ec2_asg + +- name: Test incomplete credentials with ec2_asg + collections: + - amazon.aws + + block: + + # ============================================================ + + - name: test invalid profile + ec2_asg: + name: "{{ resource_prefix }}-asg" + region: "{{ aws_region }}" + profile: notavalidprofile + ignore_errors: yes + register: result + + - name: + assert: + that: + - "'The config profile (notavalidprofile) could not be found' in result.msg" + + - name: test partial credentials + ec2_asg: + name: "{{ resource_prefix }}-asg" + region: "{{ aws_region }}" + aws_access_key: "{{ aws_access_key }}" + ignore_errors: yes + register: result + + - name: + assert: + that: + - "'Partial credentials found in explicit, missing: aws_secret_access_key' in result.msg" + + - name: test without specifying region + ec2_asg: + name: "{{ resource_prefix }}-asg" + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + ignore_errors: yes + register: result + + - name: + assert: + that: + - result.msg == 'The ec2_asg module requires a region and none was found in configuration, environment variables or module parameters' + + # ============================================================ + +- name: Test incomplete arguments with ec2_asg + + block: + + # ============================================================ + + - name: test without specifying required module options + ec2_asg: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + ignore_errors: yes + register: result + + - name: assert name is a required module option + assert: + that: + - "result.msg == 'missing required arguments: name'" + +- name: Run ec2_asg integration tests. + + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + + collections: + - amazon.aws + + block: + + # ============================================================ + + - name: Find AMI to use + ec2_ami_info: + owners: 'amazon' + filters: + name: '{{ ec2_ami_name }}' + register: ec2_amis + - set_fact: + ec2_ami_image: '{{ ec2_amis.images[0].image_id }}' + + - name: load balancer name has to be less than 32 characters + # the 8 digit identifier at the end of resource_prefix helps determine during which test something + # was created + set_fact: + load_balancer_name: "{{ item }}-lb" + loop: "{{ resource_prefix | regex_findall('.{8}$') }}" + + # Set up the testing dependencies: VPC, subnet, security group, and two launch configurations + + - name: Create VPC for use in testing + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.55.77.0/24 + tenancy: default + register: testing_vpc + + - name: Create internet gateway for use in testing + ec2_vpc_igw: + vpc_id: "{{ testing_vpc.vpc.id }}" + state: present + register: igw + + - name: Create subnet for use in testing + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.55.77.0/24 + az: "{{ aws_region }}a" + resource_tags: + Name: "{{ resource_prefix }}-subnet" + register: testing_subnet + + - name: create routing rules + ec2_vpc_route_table: + vpc_id: "{{ testing_vpc.vpc.id }}" + tags: + created: "{{ resource_prefix }}-route" + routes: + - dest: 0.0.0.0/0 + gateway_id: "{{ igw.gateway_id }}" + subnets: + - "{{ testing_subnet.subnet.id }}" + + - name: create a security group with the vpc created in the ec2_setup + ec2_group: + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ testing_vpc.vpc.id }}" + rules: + - proto: tcp + from_port: 22 + to_port: 22 + cidr_ip: 0.0.0.0/0 + - proto: tcp + from_port: 80 + to_port: 80 + cidr_ip: 0.0.0.0/0 + register: sg + + - name: ensure launch configs exist + ec2_lc: + name: "{{ item }}" + assign_public_ip: true + image_id: "{{ ec2_ami_image }}" + user_data: | + #cloud-config + package_upgrade: true + package_update: true + packages: + - httpd + runcmd: + - "service httpd start" + security_groups: "{{ sg.group_id }}" + instance_type: t3.micro + loop: + - "{{ resource_prefix }}-lc" + - "{{ resource_prefix }}-lc-2" + + # ============================================================ + + - name: launch asg and wait for instances to be deemed healthy (no ELB) + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_config_name: "{{ resource_prefix }}-lc" + desired_capacity: 1 + min_size: 1 + max_size: 1 + vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" + state: present + wait_for_instances: yes + register: output + + - assert: + that: + - "output.viable_instances == 1" + + - name: Tag asg + ec2_asg: + name: "{{ resource_prefix }}-asg" + tags: + - tag_a: 'value 1' + propagate_at_launch: no + - tag_b: 'value 2' + propagate_at_launch: yes + register: output + + - assert: + that: + - "output.tags | length == 2" + - output is changed + + - name: Re-Tag asg (different order) + ec2_asg: + name: "{{ resource_prefix }}-asg" + tags: + - tag_b: 'value 2' + propagate_at_launch: yes + - tag_a: 'value 1' + propagate_at_launch: no + register: output + + - assert: + that: + - "output.tags | length == 2" + - output is not changed + + - name: Re-Tag asg new tags + ec2_asg: + name: "{{ resource_prefix }}-asg" + tags: + - tag_c: 'value 3' + propagate_at_launch: no + register: output + + - assert: + that: + - "output.tags | length == 1" + - output is changed + + - name: Re-Tag asg update propagate_at_launch + ec2_asg: + name: "{{ resource_prefix }}-asg" + tags: + - tag_c: 'value 3' + propagate_at_launch: yes + register: output + + - assert: + that: + - "output.tags | length == 1" + - output is changed + + - name: Enable metrics collection + ec2_asg: + name: "{{ resource_prefix }}-asg" + metrics_collection: yes + register: output + + - assert: + that: + - output is changed + + - name: Enable metrics collection (check idempotency) + ec2_asg: + name: "{{ resource_prefix }}-asg" + metrics_collection: yes + register: output + + - assert: + that: + - output is not changed + + - name: Disable metrics collection + ec2_asg: + name: "{{ resource_prefix }}-asg" + metrics_collection: no + register: output + + - assert: + that: + - output is changed + + - name: Disable metrics collection (check idempotency) + ec2_asg: + name: "{{ resource_prefix }}-asg" + metrics_collection: no + register: output + + - assert: + that: + - output is not changed + + # - name: pause for a bit to make sure that the group can't be trivially deleted + # pause: seconds=30 + - name: kill asg + ec2_asg: + name: "{{ resource_prefix }}-asg" + state: absent + wait_timeout: 800 + async: 400 + + # ============================================================ + + - name: launch asg and do not wait for instances to be deemed healthy (no ELB) + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_config_name: "{{ resource_prefix }}-lc" + desired_capacity: 1 + min_size: 1 + max_size: 1 + vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" + wait_for_instances: no + state: present + register: output + + - assert: + that: + - "output.viable_instances == 0" + + - name: kill asg + ec2_asg: + name: "{{ resource_prefix }}-asg" + state: absent + wait_timeout: 800 + register: output + retries: 3 + until: output is succeeded + delay: 10 + async: 400 + + # ============================================================ + + - name: create asg with asg metrics enabled + ec2_asg: + name: "{{ resource_prefix }}-asg" + metrics_collection: true + launch_config_name: "{{ resource_prefix }}-lc" + desired_capacity: 0 + min_size: 0 + max_size: 0 + vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" + state: present + register: output + + - assert: + that: + - "'Group' in output.metrics_collection.0.Metric" + + - name: kill asg + ec2_asg: + name: "{{ resource_prefix }}-asg" + state: absent + wait_timeout: 800 + async: 400 + + # ============================================================ + + - name: launch load balancer + ec2_elb_lb: + name: "{{ load_balancer_name }}" + state: present + security_group_ids: + - "{{ sg.group_id }}" + subnets: "{{ testing_subnet.subnet.id }}" + connection_draining_timeout: 60 + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + health_check: + ping_protocol: tcp + ping_port: 80 + ping_path: "/" + response_timeout: 5 + interval: 10 + unhealthy_threshold: 4 + healthy_threshold: 2 + register: load_balancer + + - name: launch asg and wait for instances to be deemed healthy (ELB) + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_config_name: "{{ resource_prefix }}-lc" + health_check_type: ELB + desired_capacity: 1 + min_size: 1 + max_size: 1 + health_check_period: 300 + vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" + load_balancers: "{{ load_balancer_name }}" + wait_for_instances: yes + wait_timeout: 900 + state: present + register: output + + - assert: + that: + - "output.viable_instances == 1" + + # ============================================================ + + # grow scaling group to 3 + + - name: add 2 more instances wait for instances to be deemed healthy (ELB) + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_config_name: "{{ resource_prefix }}-lc" + health_check_type: ELB + desired_capacity: 3 + min_size: 3 + max_size: 5 + health_check_period: 600 + vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" + load_balancers: "{{ load_balancer_name }}" + wait_for_instances: yes + wait_timeout: 1200 + state: present + register: output + + - assert: + that: + - "output.viable_instances == 3" + + # ============================================================ + + # Test max_instance_lifetime option + + - name: enable asg max_instance_lifetime + ec2_asg: + name: "{{ resource_prefix }}-asg" + max_instance_lifetime: 604801 + register: output + + - name: ensure max_instance_lifetime is set + assert: + that: + - output.max_instance_lifetime == 604801 + + - name: run without max_instance_lifetime + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_config_name: "{{ resource_prefix }}-lc" + + - name: ensure max_instance_lifetime not affected by defaults + assert: + that: + - output.max_instance_lifetime == 604801 + + - name: disable asg max_instance_lifetime + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_config_name: "{{ resource_prefix }}-lc" + max_instance_lifetime: 0 + register: output + + - name: ensure max_instance_lifetime is not set + assert: + that: + - not output.max_instance_lifetime + + # ============================================================ + + # # perform rolling replace with different launch configuration + + - name: perform rolling update to new AMI + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_config_name: "{{ resource_prefix }}-lc-2" + health_check_type: ELB + desired_capacity: 3 + min_size: 1 + max_size: 5 + health_check_period: 900 + load_balancers: "{{ load_balancer_name }}" + vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" + wait_for_instances: yes + replace_all_instances: yes + wait_timeout: 1800 + state: present + register: output + + # ensure that all instances have new launch config + - assert: + that: + - "item.value.launch_config_name == '{{ resource_prefix }}-lc-2'" + loop: "{{ output.instance_facts | dict2items }}" + + # assert they are all healthy and that the rolling update resulted in the appropriate number of instances + - assert: + that: + - "output.viable_instances == 3" + + # ============================================================ + + # perform rolling replace with the original launch configuration + + - name: perform rolling update to new AMI while removing the load balancer + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_config_name: "{{ resource_prefix }}-lc" + health_check_type: EC2 + desired_capacity: 3 + min_size: 1 + max_size: 5 + health_check_period: 900 + load_balancers: [] + vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" + wait_for_instances: yes + replace_all_instances: yes + wait_timeout: 1800 + state: present + register: output + + # ensure that all instances have new launch config + - assert: + that: + - "item.value.launch_config_name == '{{ resource_prefix }}-lc'" + loop: "{{ output.instance_facts | dict2items }}" + + # assert they are all healthy and that the rolling update resulted in the appropriate number of instances + # there should be the same number of instances as there were before the rolling update was performed + - assert: + that: + - "output.viable_instances == 3" + + # ============================================================ + + # perform rolling replace with new launch configuration and lc_check:false + + # Note - this is done async so we can query asg_facts during + # the execution. Issues #28087 and #35993 result in correct + # end result, but spin up extraneous instances during execution. + - name: "perform rolling update to new AMI with lc_check: false" + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_config_name: "{{ resource_prefix }}-lc-2" + health_check_type: EC2 + desired_capacity: 3 + min_size: 1 + max_size: 5 + health_check_period: 900 + load_balancers: [] + vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" + wait_for_instances: yes + replace_all_instances: yes + replace_batch_size: 3 + lc_check: false + wait_timeout: 1800 + state: present + async: 1800 + poll: 0 + register: asg_job + + - name: get ec2_asg info for 3 minutes + ec2_asg_info: + name: "{{ resource_prefix }}-asg" + register: output + loop_control: + pause: 15 + loop: "{{ range(12) | list }}" + + # Since we started with 3 servers and replace all of them. + # We should see 6 servers total. + - assert: + that: + - output | community.general.json_query(inst_id_json_query) | unique | length == 6 + vars: + inst_id_json_query: results[].results[].instances[].instance_id + + - name: Ensure ec2_asg task completes + async_status: jid="{{ asg_job.ansible_job_id }}" + register: status + until: status is finished + retries: 200 + delay: 15 + + # ============================================================ + + - name: kill asg + ec2_asg: + name: "{{ resource_prefix }}-asg" + state: absent + wait_timeout: 800 + async: 400 + + # Create new asg with replace_all_instances and lc_check:false + + # Note - this is done async so we can query asg_facts during + # the execution. Issues #28087 results in correct + # end result, but spin up extraneous instances during execution. + - name: "new asg with lc_check: false" + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_config_name: "{{ resource_prefix }}-lc" + health_check_type: EC2 + desired_capacity: 3 + min_size: 1 + max_size: 5 + health_check_period: 900 + load_balancers: [] + vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" + wait_for_instances: yes + replace_all_instances: yes + replace_batch_size: 3 + lc_check: false + wait_timeout: 1800 + state: present + async: 1800 + poll: 0 + register: asg_job + + # Collect ec2_asg_info for 3 minutes + - name: get ec2_asg information + ec2_asg_info: + name: "{{ resource_prefix }}-asg" + register: output + loop_control: + pause: 15 + loop: "{{ range(12) | list }}" + + # Get all instance_ids we saw and assert we saw number expected + # Should only see 3 (don't replace instances we just created) + - assert: + that: + - output | community.general.json_query(inst_id_json_query) | unique | length == 3 + vars: + inst_id_json_query: results[].results[].instances[].instance_id + + - name: Ensure ec2_asg task completes + async_status: jid="{{ asg_job.ansible_job_id }}" + register: status + until: status is finished + retries: 200 + delay: 15 + + # we need a launch template, otherwise we cannot test the mixed instance policy + - name: create launch template for autoscaling group to test its mixed instance policy + ec2_launch_template: + template_name: "{{ resource_prefix }}-lt" + image_id: "{{ ec2_ami_image }}" + instance_type: t3.micro + credit_specification: + cpu_credits: standard + network_interfaces: + - associate_public_ip_address: yes + delete_on_termination: yes + device_index: 0 + groups: + - "{{ sg.group_id }}" + + - name: update autoscaling group with mixed-instance policy + ec2_asg: + name: "{{ resource_prefix }}-asg" + launch_template: + launch_template_name: "{{ resource_prefix }}-lt" + desired_capacity: 1 + min_size: 1 + max_size: 1 + vpc_zone_identifier: "{{ testing_subnet.subnet.id }}" + state: present + mixed_instances_policy: + instance_types: + - t3.micro + - t3a.micro + wait_for_instances: yes + register: output + + - assert: + that: + - "output.mixed_instances_policy | length == 2" + - "output.mixed_instances_policy[0] == 't3.micro'" + - "output.mixed_instances_policy[1] == 't3a.micro'" + +# ============================================================ + + always: + + - name: kill asg + ec2_asg: + name: "{{ resource_prefix }}-asg" + state: absent + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + # Remove the testing dependencies + + - name: remove the load balancer + ec2_elb_lb: + name: "{{ load_balancer_name }}" + state: absent + security_group_ids: + - "{{ sg.group_id }}" + subnets: "{{ testing_subnet.subnet.id }}" + wait: yes + connection_draining_timeout: 60 + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + health_check: + ping_protocol: tcp + ping_port: 80 + ping_path: "/" + response_timeout: 5 + interval: 10 + unhealthy_threshold: 4 + healthy_threshold: 2 + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: remove launch configs + ec2_lc: + name: "{{ resource_prefix }}-lc" + state: absent + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + loop: + - "{{ resource_prefix }}-lc" + - "{{ resource_prefix }}-lc-2" + + - name: delete launch template + ec2_launch_template: + name: "{{ resource_prefix }}-lt" + state: absent + register: del_lt + retries: 10 + until: del_lt is not failed + ignore_errors: true + + - name: remove the security group + ec2_group: + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ testing_vpc.vpc.id }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: remove routing rules + ec2_vpc_route_table: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + tags: + created: "{{ resource_prefix }}-route" + routes: + - dest: 0.0.0.0/0 + gateway_id: "{{ igw.gateway_id }}" + subnets: + - "{{ testing_subnet.subnet.id }}" + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: remove internet gateway + ec2_vpc_igw: + vpc_id: "{{ testing_vpc.vpc.id }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: remove the subnet + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.55.77.0/24 + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: remove the VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.55.77.0/24 + state: absent + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/vars/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/vars/main.yml new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_asg/vars/main.yml diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/aliases new file mode 100644 index 00000000..6ac56ac2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/aliases @@ -0,0 +1,4 @@ +cloud/aws +shippable/aws/group2 +# https://github.com/ansible-collections/community.aws/issues/159 +unstable diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/defaults/main.yml new file mode 100644 index 00000000..8986714b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/defaults/main.yml @@ -0,0 +1,5 @@ +--- +# VPCs are identified by the CIDR. Don't hard code the CIDR. shippable will +# run multiple copies of the test concurrently (Python 2.x and Python 3.x) +vpc_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.0.0/16' +subnet_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.42.0/24' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/tasks/main.yml new file mode 100644 index 00000000..6d904003 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_eip/tasks/main.yml @@ -0,0 +1,727 @@ +- name: Integration testing for ec2_eip + module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + ec2_eip: + in_vpc: true + collections: + - amazon.aws + block: + # ===================================================== + - name: Get the current caller identity facts + aws_caller_info: null + register: caller_info + - name: list available AZs + aws_az_info: null + register: region_azs + - name: pick an AZ for testing + set_fact: + subnet_az: '{{ region_azs.availability_zones[0].zone_name }}' + - name: create a VPC + ec2_vpc_net: + name: '{{ resource_prefix }}-vpc' + state: present + cidr_block: '{{ vpc_cidr }}' + tags: + AnsibleEIPTest: Pending + AnsibleEIPTestPrefix: '{{ resource_prefix }}' + register: vpc_result + - name: create subnet + ec2_vpc_subnet: + cidr: '{{ subnet_cidr }}' + az: '{{ subnet_az }}' + vpc_id: '{{ vpc_result.vpc.id }}' + state: present + register: vpc_subnet_create + - ec2_vpc_igw: + state: present + vpc_id: '{{ vpc_result.vpc.id }}' + register: vpc_igw + - name: "Find AMI to use" + ec2_ami_info: + owners: 'amazon' + filters: + name: 'amzn2-ami-hvm-2.0.20190612-x86_64-gp2' + register: ec2_amis + - name: "create a security group" + ec2_group: + state: present + name: '{{ resource_prefix }}-sg' + description: a security group for ansible tests + vpc_id: '{{ vpc_result.vpc.id }}' + rules: + - proto: tcp + from_port: 22 + to_port: 22 + cidr_ip: 0.0.0.0/0 + register: security_group + - name: Create instance for attaching + ec2_instance: + name: '{{ resource_prefix }}-instance' + image_id: '{{ ec2_amis.images[0].image_id }}' + security_group: '{{ security_group.group_id }}' + vpc_subnet_id: '{{ vpc_subnet_create.subnet.id }}' + wait: no ## Don't delay the tests, we'll check again before we need it + register: create_ec2_instance_result + + # ===================================================== + - name: Look for signs of concurrent EIP tests. Pause if they are running or their prefix comes before ours. + vars: + running_query: vpcs[?tags.AnsibleEIPTest=='Running'] + pending_query: vpcs[?tags.AnsibleEIPTest=='Pending'].tags.AnsibleEIPTestPrefix + ec2_vpc_net_info: + filters: + tag:AnsibleEIPTest: + - Pending + - Running + register: vpc_info + retries: 120 + delay: 5 + until: + - ( vpc_info | community.general.json_query(running_query) | length == 0 ) + - ( vpc_info | community.general.json_query(pending_query) | sort | first == resource_prefix ) + - name: Make a crude lock + ec2_vpc_net: + name: '{{ resource_prefix }}-vpc' + state: present + cidr_block: '{{ vpc_cidr }}' + tags: + AnsibleEIPTest: Running + AnsibleEIPTestPrefix: '{{ resource_prefix }}' + # ===================================================== + - name: Get current state of EIPs + ec2_eip_info: null + register: eip_info_start + - name: Require that there are no free IPs when we start, otherwise we can't test things properly + assert: + that: + - eip_info_start is defined + - '"addresses" in eip_info_start' + - ( eip_info_start.addresses | length ) == ( eip_info_start | community.general.json_query("addresses[].association_id") | length ) + - name: Allocate a new eip (no conditions) + ec2_eip: + state: present + register: eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip is defined + - eip is changed + - eip.public_ip is defined and ( eip.public_ip | ansible.netcommon.ipaddr ) + - eip.allocation_id is defined and eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 1 == ( eip_info.addresses | length ) + - ec2_eip_info: + filters: + public-ip: '{{ eip.public_ip }}' + - assert: + that: + - '"addresses" in eip_info' + - eip_info.addresses | length == 1 + - eip_info.addresses[0].allocation_id == eip.allocation_id + - eip_info.addresses[0].domain == "vpc" + - eip_info.addresses[0].public_ip == eip.public_ip + - ec2_eip_info: + filters: + allocation-id: '{{ eip.allocation_id }}' + - assert: + that: + - '"addresses" in eip_info' + - eip_info.addresses | length == 1 + - eip_info.addresses[0].allocation_id == eip.allocation_id + - eip_info.addresses[0].domain == "vpc" + - eip_info.addresses[0].public_ip == eip.public_ip + - name: Release eip + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + register: eip_release + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip_release is defined + - eip_release is changed + - ( eip_info_start.addresses | length ) == ( eip_info.addresses | length ) + - name: Allocate a new eip - attempt reusing unallocated ones (none available) + ec2_eip: + state: present + reuse_existing_ip_allowed: true + register: eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip is defined + - eip is changed + - eip.public_ip is defined and ( eip.public_ip | ansible.netcommon.ipaddr ) + - eip.allocation_id is defined and eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 1 == ( eip_info.addresses | length ) + - name: Re-Allocate a new eip - attempt reusing unallocated ones (one available) + ec2_eip: + state: present + reuse_existing_ip_allowed: true + register: reallocate_eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - reallocate_eip is defined + - reallocate_eip is not changed + - reallocate_eip.public_ip is defined and ( reallocate_eip.public_ip | ansible.netcommon.ipaddr ) + - reallocate_eip.allocation_id is defined and reallocate_eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 1 == ( eip_info.addresses | length ) + - name: Release eip + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + register: eip_release + - ec2_eip_info: null + register: eip_info + - assert: + that: + - ( eip_info_start.addresses | length ) == ( eip_info.addresses | length ) + - eip_release is defined + - eip_release is changed + - name: Allocate a new eip + ec2_eip: + state: present + register: eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip is defined + - eip is changed + - eip.public_ip is defined and ( eip.public_ip | ansible.netcommon.ipaddr ) + - eip.allocation_id is defined and eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 1 == ( eip_info.addresses | length ) + - name: Match an existing eip (changed == false) + ec2_eip: + state: present + public_ip: '{{ eip.public_ip }}' + register: reallocate_eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - reallocate_eip is defined + - reallocate_eip is not changed + - reallocate_eip.public_ip is defined and ( reallocate_eip.public_ip | ansible.netcommon.ipaddr ) + - reallocate_eip.allocation_id is defined and reallocate_eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 1 == ( eip_info.addresses | length ) + - name: Release eip + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + register: eip_release + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip_release is defined + - eip_release is changed + - ( eip_info_start.addresses | length ) == ( eip_info.addresses | length ) + - name: Allocate a new eip (no tags) + ec2_eip: + state: present + register: eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip is defined + - eip is changed + - eip.public_ip is defined and ( eip.public_ip | ansible.netcommon.ipaddr ) + - eip.allocation_id is defined and eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 1 == ( eip_info.addresses | length ) + - name: attempt reusing an existing eip with a tag (No match available) + ec2_eip: + state: present + reuse_existing_ip_allowed: true + tag_name: Team + register: no_tagged_eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - no_tagged_eip is defined + - no_tagged_eip is changed + - no_tagged_eip.public_ip is defined and ( no_tagged_eip.public_ip | ansible.netcommon.ipaddr ) + - no_tagged_eip.allocation_id is defined and no_tagged_eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 2 == ( eip_info.addresses | length ) + - name: tag eip so we can try matching it + ec2_tag: + state: present + resource: '{{ eip.allocation_id }}' + tags: + Team: Frontend + - name: attempt reusing an existing eip with a tag (Match available) + ec2_eip: + state: present + reuse_existing_ip_allowed: true + tag_name: Team + register: reallocate_eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - reallocate_eip is defined + - reallocate_eip is not changed + - reallocate_eip.public_ip is defined and ( reallocate_eip.public_ip | ansible.netcommon.ipaddr ) + - reallocate_eip.allocation_id is defined and reallocate_eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 2 == ( eip_info.addresses | length ) + - name: attempt reusing an existing eip with a tag and it's value (no match available) + ec2_eip: + state: present + reuse_existing_ip_allowed: true + tag_name: Team + tag_value: Backend + register: backend_eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - backend_eip is defined + - backend_eip is changed + - backend_eip.public_ip is defined and ( backend_eip.public_ip | ansible.netcommon.ipaddr ) + - backend_eip.allocation_id is defined and backend_eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 3 == ( eip_info.addresses | length ) + - name: tag eip so we can try matching it + ec2_tag: + state: present + resource: '{{ eip.allocation_id }}' + tags: + Team: Backend + - name: attempt reusing an existing eip with a tag and it's value (match available) + ec2_eip: + state: present + reuse_existing_ip_allowed: true + tag_name: Team + tag_value: Backend + register: reallocate_eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - reallocate_eip is defined + - reallocate_eip is not changed + - reallocate_eip.public_ip is defined and reallocate_eip.public_ip != "" + - reallocate_eip.allocation_id is defined and reallocate_eip.allocation_id != "" + - ( eip_info_start.addresses | length ) + 3 == ( eip_info.addresses | length ) + - name: Release backend_eip + ec2_eip: + state: absent + public_ip: '{{ backend_eip.public_ip }}' + register: eip_release + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip_release is defined + - eip_release is changed + - ( eip_info_start.addresses | length ) + 2 == ( eip_info.addresses | length ) + - name: Release no_tagged_eip + ec2_eip: + state: absent + public_ip: '{{ no_tagged_eip.public_ip }}' + register: eip_release + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip_release is defined + - eip_release is changed + - ( eip_info_start.addresses | length ) + 1 == ( eip_info.addresses | length ) + - name: Release eip + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + register: eip_release + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip_release is defined + - eip_release is changed + - ( eip_info_start.addresses | length ) == ( eip_info.addresses | length ) + - name: allocate a new eip from a pool + ec2_eip: + state: present + public_ipv4_pool: amazon + register: eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip is defined + - eip is changed + - eip.public_ip is defined and ( eip.public_ip | ansible.netcommon.ipaddr ) + - eip.allocation_id is defined and eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 1 == ( eip_info.addresses | length ) + - name: create ENI A + ec2_eni: + subnet_id: '{{ vpc_subnet_create.subnet.id }}' + register: eni_create_a + - name: create ENI B + ec2_eni: + subnet_id: '{{ vpc_subnet_create.subnet.id }}' + register: eni_create_b + - name: Attach EIP to ENI A + ec2_eip: + public_ip: '{{ eip.public_ip }}' + device_id: '{{ eni_create_a.interface.id }}' + register: associate_eip + - ec2_eip_info: + filters: + public-ip: '{{ eip.public_ip }}' + register: eip_info + - assert: + that: + - associate_eip is defined + - associate_eip is changed + - eip_info.addresses | length == 1 + - associate_eip.public_ip is defined and eip.public_ip == associate_eip.public_ip + - associate_eip.allocation_id is defined and eip.allocation_id == associate_eip.allocation_id + - eip_info.addresses[0].allocation_id == eip.allocation_id + - eip_info.addresses[0].domain == "vpc" + - eip_info.addresses[0].public_ip == eip.public_ip + - eip_info.addresses[0].association_id is defined and eip_info.addresses[0].association_id.startswith("eipassoc-") + - eip_info.addresses[0].network_interface_id == eni_create_a.interface.id + - eip_info.addresses[0].private_ip_address is defined and ( eip_info.addresses[0].private_ip_address | ansible.netcommon.ipaddr ) + - eip_info.addresses[0].network_interface_owner_id == caller_info.account + - name: Re-Attach EIP to ENI A (no change) + ec2_eip: + public_ip: '{{ eip.public_ip }}' + device_id: '{{ eni_create_a.interface.id }}' + register: associate_eip + - ec2_eip_info: + filters: + public-ip: '{{ eip.public_ip }}' + register: eip_info + - assert: + that: + - associate_eip is defined + - associate_eip is not changed + - associate_eip.public_ip is defined and eip.public_ip == associate_eip.public_ip + - associate_eip.allocation_id is defined and eip.allocation_id == associate_eip.allocation_id + - eip_info.addresses | length == 1 + - eip_info.addresses[0].allocation_id == eip.allocation_id + - eip_info.addresses[0].domain == "vpc" + - eip_info.addresses[0].public_ip == eip.public_ip + - eip_info.addresses[0].association_id is defined and eip_info.addresses[0].association_id.startswith("eipassoc-") + - eip_info.addresses[0].network_interface_id == eni_create_a.interface.id + - eip_info.addresses[0].private_ip_address is defined and ( eip_info.addresses[0].private_ip_address | ansible.netcommon.ipaddr ) + - name: Attach EIP to ENI B (should fail, already associated) + ec2_eip: + public_ip: '{{ eip.public_ip }}' + device_id: '{{ eni_create_b.interface.id }}' + register: associate_eip + ignore_errors: true + - ec2_eip_info: + filters: + public-ip: '{{ eip.public_ip }}' + register: eip_info + - assert: + that: + - associate_eip is defined + - associate_eip is failed + - eip_info.addresses | length == 1 + - eip_info.addresses[0].allocation_id == eip.allocation_id + - eip_info.addresses[0].domain == "vpc" + - eip_info.addresses[0].public_ip == eip.public_ip + - eip_info.addresses[0].association_id is defined and eip_info.addresses[0].association_id.startswith("eipassoc-") + - eip_info.addresses[0].network_interface_id == eni_create_a.interface.id + - eip_info.addresses[0].private_ip_address is defined and ( eip_info.addresses[0].private_ip_address | ansible.netcommon.ipaddr ) + - name: Attach EIP to ENI B + ec2_eip: + public_ip: '{{ eip.public_ip }}' + device_id: '{{ eni_create_b.interface.id }}' + allow_reassociation: true + register: associate_eip + - ec2_eip_info: + filters: + public-ip: '{{ eip.public_ip }}' + register: eip_info + - assert: + that: + - associate_eip is defined + - associate_eip is changed + - associate_eip.public_ip is defined and eip.public_ip == associate_eip.public_ip + - associate_eip.allocation_id is defined and eip.allocation_id == associate_eip.allocation_id + - eip_info.addresses | length == 1 + - eip_info.addresses[0].allocation_id == eip.allocation_id + - eip_info.addresses[0].domain == "vpc" + - eip_info.addresses[0].public_ip == eip.public_ip + - eip_info.addresses[0].association_id is defined and eip_info.addresses[0].association_id.startswith("eipassoc-") + - eip_info.addresses[0].network_interface_id == eni_create_b.interface.id + - eip_info.addresses[0].private_ip_address is defined and ( eip_info.addresses[0].private_ip_address | ansible.netcommon.ipaddr ) + - name: Detach EIP from ENI B, without enabling release on disassociation + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + device_id: '{{ eni_create_b.interface.id }}' + register: disassociate_eip + - ec2_eip_info: + filters: + public-ip: '{{ eip.public_ip }}' + register: eip_info + - assert: + that: + - associate_eip is defined + - associate_eip is changed + - eip_info.addresses | length == 1 + - name: Re-detach EIP from ENI B, without enabling release on disassociation + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + device_id: '{{ eni_create_b.interface.id }}' + register: associate_eip + - ec2_eip_info: + filters: + public-ip: '{{ eip.public_ip }}' + register: eip_info + - assert: + that: + - associate_eip is defined + - associate_eip is not changed + - eip_info.addresses | length == 1 + - name: Attach EIP to ENI A + ec2_eip: + public_ip: '{{ eip.public_ip }}' + device_id: '{{ eni_create_a.interface.id }}' + register: associate_eip + - ec2_eip_info: + filters: + public-ip: '{{ eip.public_ip }}' + register: eip_info + - assert: + that: + - associate_eip is defined + - associate_eip is changed + - associate_eip.public_ip is defined and eip.public_ip == associate_eip.public_ip + - associate_eip.allocation_id is defined and eip.allocation_id == associate_eip.allocation_id + - eip_info.addresses[0].network_interface_id == eni_create_a.interface.id + - name: Detach EIP from ENI A, enabling release on disassociation + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + device_id: '{{ eni_create_a.interface.id }}' + release_on_disassociation: true + register: disassociate_eip + - ec2_eip_info: + filters: + public-ip: '{{ eip.public_ip }}' + register: eip_info + - assert: + that: + - associate_eip is defined + - associate_eip is changed + - eip_info.addresses | length == 0 + - name: Re-detach EIP from ENI A, enabling release on disassociation + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + device_id: '{{ eni_create_a.interface.id }}' + release_on_disassociation: true + register: associate_eip + - ec2_eip_info: + filters: + public-ip: '{{ eip.public_ip }}' + register: eip_info + - assert: + that: + - associate_eip is defined + - associate_eip is not changed + - eip_info.addresses | length == 0 + - ec2_eip_info: null + register: eip_info + - assert: + that: + - ( eip_info_start.addresses | length ) == ( eip_info.addresses | length ) + - name: Cleanup ENI B + ec2_eni: + state: absent + eni_id: '{{ eni_create_b.interface.id }}' + - name: Cleanup ENI A + ec2_eni: + state: absent + eni_id: '{{ eni_create_a.interface.id }}' + - name: Make sure the instance is ready + ec2_instance_info: + filters: + "tag:Name": '{{ resource_prefix }}-instance' + register: instance_info + until: instance_info.instances[0].state.name == 'running' + - name: Attach eip to an EC2 instance + ec2_eip: + device_id: '{{ instance_info.instances[0].instance_id }}' + state: present + release_on_disassociation: yes + register: instance_eip + - ec2_eip_info: + filters: + public-ip: '{{ instance_eip.public_ip }}' + register: eip_info + - assert: + that: + - instance_eip is success + - eip_info.addresses[0].allocation_id is defined + - eip_info.addresses[0].instance_id == '{{ instance_info.instances[0].instance_id }}' + # ===================================================== + - name: Cleanup instance + ec2_instance: + instance_ids: '{{ create_ec2_instance_result.instance_ids }}' + state: absent + - name: Cleanup instance eip + ec2_eip: + state: absent + public_ip: '{{ instance_eip.public_ip }}' + register: eip_cleanup + retries: 5 + delay: 5 + until: eip_cleanup is successful + - name: Cleanup IGW + ec2_vpc_igw: + state: absent + vpc_id: '{{ vpc_result.vpc.id }}' + register: vpc_igw + - name: Cleanup security group + ec2_group: + state: absent + name: '{{ resource_prefix }}-sg' + - name: Cleanup Subnet + ec2_vpc_subnet: + state: absent + cidr: '{{ subnet_cidr }}' + vpc_id: '{{ vpc_result.vpc.id }}' + - name: Release eip + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + register: eip_release + ignore_errors: true + - name: allocate a new eip + ec2_eip: + state: present + register: eip + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip is defined + - eip is changed + - eip.public_ip is defined and ( eip.public_ip | ansible.netcommon.ipaddr ) + - eip.allocation_id is defined and eip.allocation_id.startswith("eipalloc-") + - ( eip_info_start.addresses | length ) + 1 == ( eip_info.addresses | length ) + - name: Release eip + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + register: eip_release + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip_release is defined + - eip_release is changed + - ( eip_info_start.addresses | length ) == ( eip_info.addresses | length ) + - name: Rerelease eip (no change) + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + register: eip_release + - ec2_eip_info: null + register: eip_info + - assert: + that: + - eip_release is defined + - eip_release is not changed + - ( eip_info_start.addresses | length ) == ( eip_info.addresses | length ) + - name: Cleanup VPC + ec2_vpc_net: + state: absent + name: '{{ resource_prefix }}-vpc' + cidr_block: '{{ vpc_cidr }}' + # ===================================================== + always: + - name: Cleanup instance (by id) + ec2_instance: + instance_ids: '{{ create_ec2_instance_result.instance_ids }}' + state: absent + wait: true + ignore_errors: true + - name: Cleanup instance (by name) + ec2_instance: + name: '{{ resource_prefix }}-instance' + state: absent + wait: true + ignore_errors: true + - name: Cleanup ENI A + ec2_eni: + state: absent + eni_id: '{{ eni_create_a.interface.id }}' + ignore_errors: true + - name: Cleanup ENI B + ec2_eni: + state: absent + eni_id: '{{ eni_create_b.interface.id }}' + ignore_errors: true + - name: Cleanup instance eip + ec2_eip: + state: absent + public_ip: '{{ instance_eip.public_ip }}' + retries: 5 + delay: 5 + until: eip_cleanup is successful + ignore_errors: true + - name: Cleanup IGW + ec2_vpc_igw: + state: absent + vpc_id: '{{ vpc_result.vpc.id }}' + register: vpc_igw + ignore_errors: true + - name: Cleanup security group + ec2_group: + state: absent + name: '{{ resource_prefix }}-sg' + ignore_errors: true + - name: Cleanup Subnet + ec2_vpc_subnet: + state: absent + cidr: '{{ subnet_cidr }}' + vpc_id: '{{ vpc_result.vpc.id }}' + ignore_errors: true + - name: Cleanup eip + ec2_eip: + state: absent + public_ip: '{{ eip.public_ip }}' + when: eip is changed + ignore_errors: true + - name: Cleanup reallocate_eip + ec2_eip: + state: absent + public_ip: '{{ reallocate_eip.public_ip }}' + when: reallocate_eip is changed + ignore_errors: true + - name: Cleanup backend_eip + ec2_eip: + state: absent + public_ip: '{{ backend_eip.public_ip }}' + when: backend_eip is changed + ignore_errors: true + - name: Cleanup no_tagged_eip + ec2_eip: + state: absent + public_ip: '{{ no_tagged_eip.public_ip }}' + when: no_tagged_eip is changed + ignore_errors: true + - name: Cleanup VPC + ec2_vpc_net: + state: absent + name: '{{ resource_prefix }}-vpc' + cidr_block: '{{ vpc_cidr }}' + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/aliases new file mode 100644 index 00000000..62cb1d2c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/aliases @@ -0,0 +1,3 @@ +cloud/aws +shippable/aws/group3 +ec2_instance_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/inventory b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/inventory new file mode 100644 index 00000000..09bae76b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/inventory @@ -0,0 +1,18 @@ +[tests] +# Sorted fastest to slowest +version_fail_wrapper +ebs_optimized +block_devices +cpu_options +default_vpc_tests +external_resource_attach +instance_no_wait +iam_instance_role +termination_protection +tags_and_vpc_settings +checkmode_tests +security_group + +[all:vars] +ansible_connection=local +ansible_python_interpreter="{{ ansible_playbook_python }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/main.yml new file mode 100644 index 00000000..7695f7bc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/main.yml @@ -0,0 +1,43 @@ +--- +# Beware: most of our tests here are run in parallel. +# To add new tests you'll need to add a new host to the inventory and a matching +# '{{ inventory_hostname }}'.yml file in roles/ec2_instance/tasks/ + + +# Prepare the VPC and figure out which AMI to use +- hosts: all + gather_facts: no + tasks: + - module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + vars: + # We can't just use "run_once" because the facts don't propagate when + # running an 'include' that was run_once + setup_run_once: yes + block: + - include_role: + name: 'ec2_instance' + tasks_from: find_ami.yml + - include_role: + name: 'ec2_instance' + tasks_from: env_setup.yml + rescue: + - include_role: + name: 'ec2_instance' + tasks_from: env_cleanup.yml + run_once: yes + - fail: + msg: 'Environment preparation failed' + run_once: yes + +# VPC should get cleaned up once all hosts have run +- hosts: all + gather_facts: no + strategy: free + #serial: 10 + roles: + - ec2_instance diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/meta/main.yml new file mode 100644 index 00000000..38b31be0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/meta/main.yml @@ -0,0 +1,4 @@ +dependencies: + - prepare_tests + - setup_ec2 + - setup_remote_tmp_dir diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/defaults/main.yml new file mode 100644 index 00000000..8e70ab69 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/defaults/main.yml @@ -0,0 +1,14 @@ +--- +# defaults file for ec2_instance +ec2_instance_owner: 'integration-run-{{ resource_prefix }}' +ec2_instance_type: 't3.micro' +ec2_instance_tag_TestId: '{{ resource_prefix }}-{{ inventory_hostname }}' +ec2_ami_name: 'amzn2-ami-hvm-2.*-x86_64-gp2' + +vpc_name: '{{ resource_prefix }}-vpc' +vpc_seed: '{{ resource_prefix }}' +vpc_cidr: '10.{{ 256 | random(seed=vpc_seed) }}.0.0/16' +subnet_a_cidr: '10.{{ 256 | random(seed=vpc_seed) }}.32.0/24' +subnet_a_startswith: '10.{{ 256 | random(seed=vpc_seed) }}.32.' +subnet_b_cidr: '10.{{ 256 | random(seed=vpc_seed) }}.33.0/24' +subnet_b_startswith: '10.{{ 256 | random(seed=vpc_seed) }}.33.' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/files/assume-role-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/files/assume-role-policy.json new file mode 100644 index 00000000..72413abd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/files/assume-role-policy.json @@ -0,0 +1,13 @@ +{ + "Version": "2008-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Allow", + "Principal": { + "Service": "ec2.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/meta/main.yml new file mode 100644 index 00000000..77589cc2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/meta/main.yml @@ -0,0 +1,5 @@ +dependencies: + - prepare_tests + - setup_ec2 +collections: + - amazon.aws diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/block_devices.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/block_devices.yml new file mode 100644 index 00000000..0a8ab63f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/block_devices.yml @@ -0,0 +1,82 @@ +- block: + - name: "New instance with an extra block device" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-ebs-vols" + image_id: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + volumes: + - device_name: /dev/sdb + ebs: + volume_size: 20 + delete_on_termination: true + volume_type: standard + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + instance_type: "{{ ec2_instance_type }}" + wait: true + register: block_device_instances + + - name: "Gather instance info" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-ebs-vols" + register: block_device_instances_info + + - assert: + that: + - block_device_instances is not failed + - block_device_instances is changed + - block_device_instances_info.instances[0].block_device_mappings[0] + - block_device_instances_info.instances[0].block_device_mappings[1] + - block_device_instances_info.instances[0].block_device_mappings[1].device_name == '/dev/sdb' + + - name: "New instance with an extra block device (check mode)" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-ebs-vols-checkmode" + image_id: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + volumes: + - device_name: /dev/sdb + ebs: + volume_size: 20 + delete_on_termination: true + volume_type: standard + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + instance_type: "{{ ec2_instance_type }}" + check_mode: yes + + - name: "fact presented ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-ebs-vols" + "instance-state-name": "running" + register: presented_instance_fact + + - name: "fact checkmode ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-ebs-vols-checkmode" + register: checkmode_instance_fact + + - name: "Confirm whether the check mode is working normally." + assert: + that: + - "{{ presented_instance_fact.instances | length }} > 0" + - "{{ checkmode_instance_fact.instances | length }} == 0" + + - name: "Terminate instances" + ec2_instance: + state: absent + instance_ids: "{{ block_device_instances.instance_ids }}" + + always: + - name: "Terminate block_devices instances" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: yes + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/checkmode_tests.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/checkmode_tests.yml new file mode 100644 index 00000000..e13ad440 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/checkmode_tests.yml @@ -0,0 +1,201 @@ +- block: + - name: "Make basic instance" + ec2_instance: + state: present + name: "{{ resource_prefix }}-checkmode-comparison" + image_id: "{{ ec2_ami_image }}" + security_groups: "{{ sg.group_id }}" + instance_type: "{{ ec2_instance_type }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + wait: false + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + TestTag: "Some Value" + register: basic_instance + + - name: "Make basic instance (check mode)" + ec2_instance: + state: present + name: "{{ resource_prefix }}-checkmode-comparison-checkmode" + image_id: "{{ ec2_ami_image }}" + security_groups: "{{ sg.group_id }}" + instance_type: "{{ ec2_instance_type }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + TestTag: "Some Value" + check_mode: yes + + - name: "fact presented ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-checkmode-comparison" + register: presented_instance_fact + + - name: "fact checkmode ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-checkmode-comparison-checkmode" + register: checkmode_instance_fact + + - name: "Confirm whether the check mode is working normally." + assert: + that: + - "{{ presented_instance_fact.instances | length }} > 0" + - "{{ checkmode_instance_fact.instances | length }} == 0" + + - name: "Stop instance (check mode)" + ec2_instance: + state: stopped + name: "{{ resource_prefix }}-checkmode-comparison" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + TestTag: "Some Value" + check_mode: yes + + - name: "fact ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-checkmode-comparison" + register: confirm_checkmode_stopinstance_fact + + - name: "Verify that it was not stopped." + assert: + that: + - '"{{ confirm_checkmode_stopinstance_fact.instances[0].state.name }}" != "stopped"' + + - name: "Stop instance." + ec2_instance: + state: stopped + name: "{{ resource_prefix }}-checkmode-comparison" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + TestTag: "Some Value" + register: instance_stop + until: not instance_stop.failed + retries: 10 + + - name: "fact stopped ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-checkmode-comparison" + register: confirm_stopinstance_fact + + - name: "Verify that it was stopped." + assert: + that: + - '"{{ confirm_stopinstance_fact.instances[0].state.name }}" in ["stopped", "stopping"]' + + - name: "Running instance in check mode." + ec2_instance: + state: running + name: "{{ resource_prefix }}-checkmode-comparison" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + TestTag: "Some Value" + check_mode: yes + + - name: "fact ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-checkmode-comparison" + register: confirm_checkmode_runninginstance_fact + + - name: "Verify that it was not running." + assert: + that: + - '"{{ confirm_checkmode_runninginstance_fact.instances[0].state.name }}" != "running"' + + - name: "Running instance." + ec2_instance: + state: running + name: "{{ resource_prefix }}-checkmode-comparison" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + TestTag: "Some Value" + + - name: "fact ec2 instance." + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-checkmode-comparison" + register: confirm_runninginstance_fact + + - name: "Verify that it was running." + assert: + that: + - '"{{ confirm_runninginstance_fact.instances[0].state.name }}" == "running"' + + - name: "Tag instance." + ec2_instance: + state: running + name: "{{ resource_prefix }}-checkmode-comparison" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + TestTag: "Some Other Value" + check_mode: yes + + - name: "fact ec2 instance." + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-checkmode-comparison" + register: confirm_not_tagged + + - name: "Verify that it hasn't been re-tagged." + assert: + that: + - '"{{ confirm_not_tagged.instances[0].tags.TestTag }}" == "Some Value"' + + - name: "Terminate instance in check mode." + ec2_instance: + state: absent + name: "{{ resource_prefix }}-checkmode-comparison" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + TestTag: "Some Value" + check_mode: yes + + - name: "fact ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-checkmode-comparison" + register: confirm_checkmode_terminatedinstance_fact + + - name: "Verify that it was not terminated," + assert: + that: + - '"{{ confirm_checkmode_terminatedinstance_fact.instances[0].state.name }}" != "terminated"' + + - name: "Terminate instance." + ec2_instance: + state: absent + name: "{{ resource_prefix }}-checkmode-comparison" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + TestTag: "Some Value" + + - name: "fact ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-checkmode-comparison" + register: confirm_terminatedinstance_fact + + - name: "Verify that it was terminated," + assert: + that: + - '"{{ confirm_terminatedinstance_fact.instances[0].state.name }}" == "terminated"' + + always: + - name: "Terminate checkmode instances" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: yes + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/cpu_options.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/cpu_options.yml new file mode 100644 index 00000000..947011f7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/cpu_options.yml @@ -0,0 +1,86 @@ +- block: + - name: "create t3.nano instance with cpu_options" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-t3nano-1-threads-per-core" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + instance_type: t3.nano + cpu_options: + core_count: 1 + threads_per_core: 1 + wait: false + register: instance_creation + + - name: "instance with cpu_options created with the right options" + assert: + that: + - instance_creation is success + - instance_creation is changed + + - name: "modify cpu_options on existing instance (warning displayed)" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-t3nano-1-threads-per-core" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + instance_type: t3.nano + cpu_options: + core_count: 1 + threads_per_core: 2 + wait: false + register: cpu_options_update + ignore_errors: yes + + - name: "fact presented ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-t3nano-1-threads-per-core" + register: presented_instance_fact + + - name: "modify cpu_options has no effect on existing instance" + assert: + that: + - cpu_options_update is success + - cpu_options_update is not changed + - "{{ presented_instance_fact.instances | length }} > 0" + - "'{{ presented_instance_fact.instances.0.state.name }}' in ['running','pending']" + - "{{ presented_instance_fact.instances.0.cpu_options.core_count }} == 1" + - "{{ presented_instance_fact.instances.0.cpu_options.threads_per_core }} == 1" + + - name: "create t3.nano instance with cpu_options(check mode)" + ec2_instance: + name: "{{ resource_prefix }}-test-t3nano-1-threads-per-core-checkmode" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + instance_type: t3.nano + cpu_options: + core_count: 1 + threads_per_core: 1 + check_mode: yes + + - name: "fact checkmode ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-t3nano-1-threads-per-core-checkmode" + register: checkmode_instance_fact + + - name: "Confirm existence of instance id." + assert: + that: + - "{{ checkmode_instance_fact.instances | length }} == 0" + + always: + - name: "Terminate cpu_options instances" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: yes + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/default_vpc_tests.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/default_vpc_tests.yml new file mode 100644 index 00000000..a69dfe9f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/default_vpc_tests.yml @@ -0,0 +1,57 @@ +- block: + - name: "Make instance in a default subnet of the VPC" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-default-vpc" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + security_group: "default" + instance_type: "{{ ec2_instance_type }}" + wait: false + register: in_default_vpc + + - name: "Make instance in a default subnet of the VPC(check mode)" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-default-vpc-checkmode" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + security_group: "default" + instance_type: "{{ ec2_instance_type }}" + check_mode: yes + + - name: "fact presented ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-default-vpc" + register: presented_instance_fact + + - name: "fact checkmode ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-default-vpc-checkmode" + register: checkmode_instance_fact + + - name: "Confirm whether the check mode is working normally." + assert: + that: + - "{{ presented_instance_fact.instances | length }} > 0" + - "{{ checkmode_instance_fact.instances | length }} == 0" + + - name: "Terminate instances" + ec2_instance: + state: absent + instance_ids: "{{ in_default_vpc.instance_ids }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + + always: + - name: "Terminate vpc_tests instances" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: yes + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/ebs_optimized.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/ebs_optimized.yml new file mode 100644 index 00000000..5bfdc086 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/ebs_optimized.yml @@ -0,0 +1,41 @@ +- block: + - name: "Make EBS optimized instance in the testing subnet of the test VPC" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-ebs-optimized-instance-in-vpc" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + ebs_optimized: true + instance_type: t3.nano + wait: false + register: ebs_opt_in_vpc + + - name: "Get ec2 instance info" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-ebs-optimized-instance-in-vpc" + register: ebs_opt_instance_info + + - name: "Assert instance is ebs_optimized" + assert: + that: + - "{{ ebs_opt_instance_info.instances.0.ebs_optimized }}" + + - name: "Terminate instances" + ec2_instance: + state: absent + instance_ids: "{{ ebs_opt_in_vpc.instance_ids }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + + always: + - name: "Terminate ebs_optimzed instances" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: yes + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/env_cleanup.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/env_cleanup.yml new file mode 100644 index 00000000..07c7f72b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/env_cleanup.yml @@ -0,0 +1,104 @@ +- name: "remove Instances" + ec2_instance: + state: absent + filters: + vpc-id: "{{ testing_vpc.vpc.id }}" + wait: yes + ignore_errors: yes + retries: 10 + +- name: "remove ENIs" + ec2_eni_info: + filters: + vpc-id: "{{ testing_vpc.vpc.id }}" + register: enis + +- name: "delete all ENIs" + ec2_eni: + state: absent + eni_id: "{{ item.id }}" + until: removed is not failed + with_items: "{{ enis.network_interfaces }}" + ignore_errors: yes + retries: 10 + +- name: "remove the security group" + ec2_group: + state: absent + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ testing_vpc.vpc.id }}" + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: "remove the second security group" + ec2_group: + name: "{{ resource_prefix }}-sg-2" + description: a security group for ansible tests + vpc_id: "{{ testing_vpc.vpc.id }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: "remove routing rules" + ec2_vpc_route_table: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + tags: + created: "{{ resource_prefix }}-route" + routes: + - dest: 0.0.0.0/0 + gateway_id: "{{ igw.gateway_id }}" + subnets: + - "{{ testing_subnet_a.subnet.id }}" + - "{{ testing_subnet_b.subnet.id }}" + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: "remove internet gateway" + ec2_vpc_igw: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: "remove subnet A" + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: "{{ subnet_a_cidr }}" + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: "remove subnet B" + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: "{{ subnet_b_cidr }}" + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: "remove the VPC" + ec2_vpc_net: + state: absent + name: "{{ vpc_name }}" + cidr_block: "{{ vpc_cidr }}" + tags: + Name: Ansible Testing VPC + tenancy: default + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/env_setup.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/env_setup.yml new file mode 100644 index 00000000..7c99f807 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/env_setup.yml @@ -0,0 +1,95 @@ +- run_once: '{{ setup_run_once | default("no") | bool }}' + block: + - name: "fetch AZ availability" + aws_az_info: + register: az_info + - name: "Assert that we have multiple AZs available to us" + assert: + that: az_info.availability_zones | length >= 2 + + - name: "pick AZs" + set_fact: + subnet_a_az: '{{ az_info.availability_zones[0].zone_name }}' + subnet_b_az: '{{ az_info.availability_zones[1].zone_name }}' + + - name: "Create VPC for use in testing" + ec2_vpc_net: + state: present + name: "{{ vpc_name }}" + cidr_block: "{{ vpc_cidr }}" + tags: + Name: Ansible ec2_instance Testing VPC + tenancy: default + register: testing_vpc + + - name: "Create internet gateway for use in testing" + ec2_vpc_igw: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + register: igw + + - name: "Create default subnet in zone A" + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: "{{ subnet_a_cidr }}" + az: "{{ subnet_a_az }}" + resource_tags: + Name: "{{ resource_prefix }}-subnet-a" + register: testing_subnet_a + + - name: "Create secondary subnet in zone B" + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: "{{ subnet_b_cidr }}" + az: "{{ subnet_b_az }}" + resource_tags: + Name: "{{ resource_prefix }}-subnet-b" + register: testing_subnet_b + + - name: "create routing rules" + ec2_vpc_route_table: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + tags: + created: "{{ resource_prefix }}-route" + routes: + - dest: 0.0.0.0/0 + gateway_id: "{{ igw.gateway_id }}" + subnets: + - "{{ testing_subnet_a.subnet.id }}" + - "{{ testing_subnet_b.subnet.id }}" + + - name: "create a security group with the vpc" + ec2_group: + state: present + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ testing_vpc.vpc.id }}" + rules: + - proto: tcp + from_port: 22 + to_port: 22 + cidr_ip: 0.0.0.0/0 + - proto: tcp + from_port: 80 + to_port: 80 + cidr_ip: 0.0.0.0/0 + register: sg + + - name: "create secondary security group with the vpc" + ec2_group: + name: "{{ resource_prefix }}-sg-2" + description: a secondary security group for ansible tests + vpc_id: "{{ testing_vpc.vpc.id }}" + rules: + - proto: tcp + from_port: 22 + to_port: 22 + cidr_ip: 0.0.0.0/0 + - proto: tcp + from_port: 80 + to_port: 80 + cidr_ip: 0.0.0.0/0 + register: sg2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/external_resource_attach.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/external_resource_attach.yml new file mode 100644 index 00000000..2625977f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/external_resource_attach.yml @@ -0,0 +1,129 @@ +- block: + # Make custom ENIs and attach via the `network` parameter + - ec2_eni: + state: present + delete_on_termination: true + subnet_id: "{{ testing_subnet_b.subnet.id }}" + security_groups: + - "{{ sg.group_id }}" + register: eni_a + + - ec2_eni: + state: present + delete_on_termination: true + subnet_id: "{{ testing_subnet_b.subnet.id }}" + security_groups: + - "{{ sg.group_id }}" + register: eni_b + + - ec2_eni: + state: present + delete_on_termination: true + subnet_id: "{{ testing_subnet_b.subnet.id }}" + security_groups: + - "{{ sg.group_id }}" + register: eni_c + + - ec2_key: + name: "{{ resource_prefix }}_test_key" + + - name: "Make instance in the testing subnet created in the test VPC" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-eni-vpc" + key_name: "{{ resource_prefix }}_test_key" + network: + interfaces: + - id: "{{ eni_a.interface.id }}" + image_id: "{{ ec2_ami_image }}" + availability_zone: '{{ subnet_b_az }}' + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + instance_type: "{{ ec2_instance_type }}" + wait: false + register: in_test_vpc + + - name: "Gather {{ resource_prefix }}-test-eni-vpc info" + ec2_instance_info: + filters: + "tag:Name": '{{ resource_prefix }}-test-eni-vpc' + register: in_test_vpc_instance + + - assert: + that: + - 'in_test_vpc_instance.instances.0.key_name == "{{ resource_prefix }}_test_key"' + - '(in_test_vpc_instance.instances.0.network_interfaces | length) == 1' + + - name: "Add a second interface" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-eni-vpc" + network: + interfaces: + - id: "{{ eni_a.interface.id }}" + - id: "{{ eni_b.interface.id }}" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + instance_type: "{{ ec2_instance_type }}" + wait: false + register: add_interface + until: add_interface is not failed + ignore_errors: yes + retries: 10 + + - name: "Make instance in the testing subnet created in the test VPC(check mode)" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-eni-vpc-checkmode" + key_name: "{{ resource_prefix }}_test_key" + network: + interfaces: + - id: "{{ eni_c.interface.id }}" + image_id: "{{ ec2_ami_image }}" + availability_zone: '{{ subnet_b_az }}' + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + instance_type: "{{ ec2_instance_type }}" + check_mode: yes + + - name: "fact presented ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-eni-vpc" + register: presented_instance_fact + + - name: "fact checkmode ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-eni-vpc-checkmode" + register: checkmode_instance_fact + + - name: "Confirm existence of instance id." + assert: + that: + - "{{ presented_instance_fact.instances | length }} > 0" + - "{{ checkmode_instance_fact.instances | length }} == 0" + + always: + - name: "Terminate external_resource_attach instances" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: yes + ignore_errors: yes + + - ec2_key: + state: absent + name: "{{ resource_prefix }}_test_key" + ignore_errors: yes + + - ec2_eni: + state: absent + eni_id: '{{ item.interface.id }}' + ignore_errors: yes + with_items: + - '{{ eni_a }}' + - '{{ eni_b }}' + - '{{ eni_c }}' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/find_ami.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/find_ami.yml new file mode 100644 index 00000000..5c0e61f8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/find_ami.yml @@ -0,0 +1,15 @@ +- run_once: '{{ setup_run_once | default("no") | bool }}' + block: + - name: "Find AMI to use" + run_once: yes + ec2_ami_info: + owners: 'amazon' + filters: + name: '{{ ec2_ami_name }}' + register: ec2_amis + - name: "Set fact with latest AMI" + run_once: yes + vars: + latest_ami: '{{ ec2_amis.images | sort(attribute="creation_date") | last }}' + set_fact: + ec2_ami_image: '{{ latest_ami.image_id }}' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/iam_instance_role.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/iam_instance_role.yml new file mode 100644 index 00000000..6e29b746 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/iam_instance_role.yml @@ -0,0 +1,127 @@ +- block: + - name: "Create IAM role for test" + iam_role: + state: present + name: "ansible-test-sts-{{ resource_prefix }}-test-policy" + assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" + create_instance_profile: yes + managed_policy: + - AmazonEC2ContainerServiceRole + register: iam_role + + - name: "Create second IAM role for test" + iam_role: + state: present + name: "ansible-test-sts-{{ resource_prefix }}-test-policy-2" + assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" + create_instance_profile: yes + managed_policy: + - AmazonEC2ContainerServiceRole + register: iam_role_2 + + - name: "wait 10 seconds for roles to become available" + wait_for: + timeout: 10 + delegate_to: localhost + + - name: "Make instance with an instance_role" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-instance-role" + image_id: "{{ ec2_ami_image }}" + security_groups: "{{ sg.group_id }}" + instance_type: "{{ ec2_instance_type }}" + instance_role: "ansible-test-sts-{{ resource_prefix }}-test-policy" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + register: instance_with_role + + - assert: + that: + - 'instance_with_role.instances[0].iam_instance_profile.arn == iam_role.arn.replace(":role/", ":instance-profile/")' + + - name: "Make instance with an instance_role(check mode)" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-instance-role-checkmode" + image_id: "{{ ec2_ami_image }}" + security_groups: "{{ sg.group_id }}" + instance_type: "{{ ec2_instance_type }}" + instance_role: "{{ iam_role.arn.replace(':role/', ':instance-profile/') }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + check_mode: yes + + - name: "fact presented ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-instance-role" + register: presented_instance_fact + + - name: "fact checkmode ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-instance-role-checkmode" + register: checkmode_instance_fact + + - name: "Confirm whether the check mode is working normally." + assert: + that: + - "{{ presented_instance_fact.instances | length }} > 0" + - "{{ checkmode_instance_fact.instances | length }} == 0" + + - name: "Update instance with new instance_role" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-instance-role" + image_id: "{{ ec2_ami_image }}" + security_groups: "{{ sg.group_id }}" + instance_type: "{{ ec2_instance_type }}" + instance_role: "{{ iam_role_2.arn.replace(':role/', ':instance-profile/') }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + register: instance_with_updated_role + + - name: "wait 10 seconds for role update to complete" + wait_for: + timeout: 10 + delegate_to: localhost + + - name: "fact checkmode ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-instance-role" + register: updates_instance_info + + - assert: + that: + - 'updates_instance_info.instances[0].iam_instance_profile.arn == iam_role_2.arn.replace(":role/", ":instance-profile/")' + - 'updates_instance_info.instances[0].instance_id == instance_with_role.instances[0].instance_id' + + always: + - name: "Terminate iam_instance_role instances" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: yes + ignore_errors: yes + + - name: "Delete IAM role for test" + iam_role: + state: absent + name: "{{ item }}" + assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" + create_instance_profile: yes + managed_policy: + - AmazonEC2ContainerServiceRole + loop: + - "ansible-test-sts-{{ resource_prefix }}-test-policy" + - "ansible-test-sts-{{ resource_prefix }}-test-policy-2" + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/instance_no_wait.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/instance_no_wait.yml new file mode 100644 index 00000000..418d7ef3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/instance_no_wait.yml @@ -0,0 +1,68 @@ +- block: + - name: "New instance and don't wait for it to complete" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-no-wait" + image_id: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + wait: false + instance_type: "{{ ec2_instance_type }}" + register: in_test_vpc + + - assert: + that: + - in_test_vpc is not failed + - in_test_vpc is changed + - in_test_vpc.instances is not defined + - in_test_vpc.instance_ids is defined + - in_test_vpc.instance_ids | length > 0 + + - name: "New instance and don't wait for it to complete ( check mode )" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-no-wait-checkmode" + image_id: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + wait: false + instance_type: "{{ ec2_instance_type }}" + check_mode: yes + + - name: "Facts for ec2 test instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-no-wait" + register: real_instance_fact + until: real_instance_fact.instances | length > 0 + retries: 10 + + - name: "Facts for checkmode ec2 test instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-no-wait-checkmode" + register: checkmode_instance_fact + + - name: "Confirm whether the check mode is working normally." + assert: + that: + - "{{ real_instance_fact.instances | length }} > 0" + - "{{ checkmode_instance_fact.instances | length }} == 0" + + - name: "Terminate instances" + ec2_instance: + state: absent + instance_ids: "{{ in_test_vpc.instance_ids }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + + always: + - name: "Terminate instance_no_wait instances" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: yes + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/main.yml new file mode 100644 index 00000000..dc81199a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/main.yml @@ -0,0 +1,55 @@ +--- +# Beware: most of our tests here are run in parallel. +# To add new tests you'll need to add a new host to the inventory and a matching +# '{{ inventory_hostname }}'.yml file in roles/ec2_instance/tasks/ +# +# Please make sure you tag your instances with +# tags: +# "tag:TestId": "{{ ec2_instance_tag_TestId }}" +# And delete them based off that tag at the end of your specific set of tests +# +# ############################################################################### +# +# A Note about ec2 environment variable name preference: +# - EC2_URL -> AWS_URL +# - EC2_ACCESS_KEY -> AWS_ACCESS_KEY_ID -> AWS_ACCESS_KEY +# - EC2_SECRET_KEY -> AWS_SECRET_ACCESS_KEY -> AWX_SECRET_KEY +# - EC2_REGION -> AWS_REGION +# + +- name: "Wrap up all tests and setup AWS credentials" + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + aws_config: + retries: + # Unfortunately AWSRetry doesn't support paginators and boto3's paginators + # don't support any configuration of the delay between retries. + max_attempts: 20 + collections: + - amazon.aws + block: + - debug: + msg: "{{ inventory_hostname }} start: {{ lookup('pipe','date') }}" + - include_tasks: '{{ inventory_hostname }}.yml' + - debug: + msg: "{{ inventory_hostname }} finish: {{ lookup('pipe','date') }}" + + always: + - set_fact: + _role_complete: True + - vars: + completed_hosts: '{{ ansible_play_hosts_all | map("extract", hostvars, "_role_complete") | list | select("defined") | list | length }}' + hosts_in_play: '{{ ansible_play_hosts_all | length }}' + debug: + msg: "{{ completed_hosts }} of {{ hosts_in_play }} complete" + - include_tasks: env_cleanup.yml + vars: + completed_hosts: '{{ ansible_play_hosts_all | map("extract", hostvars, "_role_complete") | list | select("defined") | list | length }}' + hosts_in_play: '{{ ansible_play_hosts_all | length }}' + when: + - aws_cleanup + - completed_hosts == hosts_in_play diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/security_group.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/security_group.yml new file mode 100644 index 00000000..c0e52a5f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/security_group.yml @@ -0,0 +1,81 @@ +- block: + - name: "New instance with 2 security groups" + ec2_instance: + name: "{{ resource_prefix }}-test-security-groups" + image_id: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ resource_prefix }}" + instance_type: t2.micro + wait: false + security_groups: + - "{{ sg.group_id }}" + - "{{ sg2.group_id }}" + register: security_groups_test + + - name: "Recreate same instance with 2 security groups ( Idempotency )" + ec2_instance: + name: "{{ resource_prefix }}-test-security-groups" + image_id: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ resource_prefix }}" + instance_type: t2.micro + wait: false + security_groups: + - "{{ sg.group_id }}" + - "{{ sg2.group_id }}" + register: security_groups_test_idempotency + + - name: "Gather ec2 facts to check SGs have been added" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-security-groups" + "instance-state-name": "running" + register: dual_sg_instance_facts + until: dual_sg_instance_facts.instances | length > 0 + retries: 10 + + - name: "Remove secondary security group from instance" + ec2_instance: + name: "{{ resource_prefix }}-test-security-groups" + image_id: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ resource_prefix }}" + instance_type: t2.micro + security_groups: + - "{{ sg.group_id }}" + register: remove_secondary_security_group + + - name: "Gather ec2 facts to check seconday SG has been removed" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-security-groups" + "instance-state-name": "running" + register: single_sg_instance_facts + until: single_sg_instance_facts.instances | length > 0 + retries: 10 + + - name: "Add secondary security group to instance" + ec2_instance: + name: "{{ resource_prefix }}-test-security-groups" + image_id: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + tags: + TestId: "{{ resource_prefix }}" + instance_type: t2.micro + security_groups: + - "{{ sg.group_id }}" + - "{{ sg2.group_id }}" + register: add_secondary_security_group + + - assert: + that: + - security_groups_test is not failed + - security_groups_test is changed + - security_groups_test_idempotency is not changed + - remove_secondary_security_group is changed + - single_sg_instance_facts.instances.0.security_groups | length == 1 + - dual_sg_instance_facts.instances.0.security_groups | length == 2 + - add_secondary_security_group is changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/tags_and_vpc_settings.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/tags_and_vpc_settings.yml new file mode 100644 index 00000000..d38b53f7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/tags_and_vpc_settings.yml @@ -0,0 +1,158 @@ +- block: + - name: "Make instance in the testing subnet created in the test VPC" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-basic-vpc-create" + image_id: "{{ ec2_ami_image }}" + user_data: | + #cloud-config + package_upgrade: true + package_update: true + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + Something: else + security_groups: "{{ sg.group_id }}" + network: + source_dest_check: false + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + instance_type: "{{ ec2_instance_type }}" + wait: false + register: in_test_vpc + + - name: "Make instance in the testing subnet created in the test VPC(check mode)" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-basic-vpc-create-checkmode" + image_id: "{{ ec2_ami_image }}" + user_data: | + #cloud-config + package_upgrade: true + package_update: true + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + Something: else + security_groups: "{{ sg.group_id }}" + network: + source_dest_check: false + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + instance_type: "{{ ec2_instance_type }}" + check_mode: yes + + - name: "Try to re-make the instance, hopefully this shows changed=False" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-basic-vpc-create" + image_id: "{{ ec2_ami_image }}" + user_data: | + #cloud-config + package_upgrade: true + package_update: true + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + Something: else + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + instance_type: "{{ ec2_instance_type }}" + register: remake_in_test_vpc + - name: "Remaking the same instance resulted in no changes" + assert: + that: not remake_in_test_vpc.changed + - name: "check that instance IDs match anyway" + assert: + that: 'remake_in_test_vpc.instance_ids[0] == in_test_vpc.instance_ids[0]' + - name: "check that source_dest_check was set to false" + assert: + that: 'not remake_in_test_vpc.instances[0].source_dest_check' + + - name: "fact presented ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-basic-vpc-create" + register: presented_instance_fact + + - name: "fact checkmode ec2 instance" + ec2_instance_info: + filters: + "tag:Name": "{{ resource_prefix }}-test-basic-vpc-create-checkmode" + register: checkmode_instance_fact + + - name: "Confirm whether the check mode is working normally." + assert: + that: + - "{{ presented_instance_fact.instances | length }} > 0" + - "{{ checkmode_instance_fact.instances | length }} == 0" + + - name: "Alter it by adding tags" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-basic-vpc-create" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + Another: thing + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + instance_type: "{{ ec2_instance_type }}" + register: add_another_tag + + - ec2_instance_info: + instance_ids: "{{ add_another_tag.instance_ids }}" + register: check_tags + - name: "Remaking the same instance resulted in no changes" + assert: + that: + - check_tags.instances[0].tags.Another == 'thing' + - check_tags.instances[0].tags.Something == 'else' + + - name: "Purge a tag" + ec2_instance: + state: present + name: "{{ resource_prefix }}-test-basic-vpc-create" + image_id: "{{ ec2_ami_image }}" + purge_tags: true + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + Another: thing + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + instance_type: "{{ ec2_instance_type }}" + + - ec2_instance_info: + instance_ids: "{{ add_another_tag.instance_ids }}" + register: check_tags + + - name: "Remaking the same instance resulted in no changes" + assert: + that: + - "'Something' not in check_tags.instances[0].tags" + + - name: "check that subnet-default public IP rule was followed" + assert: + that: + - check_tags.instances[0].public_dns_name == "" + - check_tags.instances[0].private_ip_address.startswith(subnet_b_startswith) + - check_tags.instances[0].subnet_id == testing_subnet_b.subnet.id + - name: "check that tags were applied" + assert: + that: + - check_tags.instances[0].tags.Name.startswith(resource_prefix) + - "'{{ check_tags.instances[0].state.name }}' in ['pending', 'running']" + + - name: "Terminate instance" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: false + register: result + - assert: + that: result.changed + + always: + - name: "Terminate tags_and_vpc_settings instances" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: yes + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/termination_protection.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/termination_protection.yml new file mode 100644 index 00000000..418e3c39 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/termination_protection.yml @@ -0,0 +1,184 @@ +- block: + + - name: Create instance with termination protection (check mode) + ec2_instance: + name: "{{ resource_prefix }}-termination-protection" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ resource_prefix }}" + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + termination_protection: true + instance_type: "{{ ec2_instance_type }}" + state: running + wait: yes + check_mode: yes + register: create_instance_check_mode_results + + - name: Check the returned value for the earlier task + assert: + that: + - "{{ create_instance_check_mode_results.changed }}" + - "{{ create_instance_check_mode_results.spec.DisableApiTermination }}" + + - name: Create instance with termination protection + ec2_instance: + name: "{{ resource_prefix }}-termination-protection" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ resource_prefix }}" + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + termination_protection: true + instance_type: "{{ ec2_instance_type }}" + state: running + wait: yes + register: create_instance_results + + - name: Check return values of the create instance task + assert: + that: + - "{{ create_instance_results.instances | length }} > 0" + - "'{{ create_instance_results.instances.0.state.name }}' == 'running'" + - "'{{ create_instance_results.spec.DisableApiTermination }}'" + + - name: Create instance with termination protection (check mode) (idempotent) + ec2_instance: + name: "{{ resource_prefix }}-termination-protection" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ resource_prefix }}" + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + termination_protection: true + instance_type: "{{ ec2_instance_type }}" + state: running + wait: yes + check_mode: yes + register: create_instance_check_mode_results + + - name: Check the returned value for the earlier task + assert: + that: + - "{{ not create_instance_check_mode_results.changed }}" + + - name: Create instance with termination protection (idempotent) + ec2_instance: + name: "{{ resource_prefix }}-termination-protection" + image_id: "{{ ec2_ami_image }}" + tags: + TestId: "{{ resource_prefix }}" + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + termination_protection: true + instance_type: "{{ ec2_instance_type }}" + state: running + wait: yes + register: create_instance_results + + - name: Check return values of the create instance task + assert: + that: + - "{{ not create_instance_results.changed }}" + - "{{ create_instance_results.instances | length }} > 0" + + - name: Try to terminate the instance (expected to fail) + ec2_instance: + filters: + tag:Name: "{{ resource_prefix }}-termination-protection" + state: absent + failed_when: "'Unable to terminate instances' not in terminate_instance_results.msg" + register: terminate_instance_results + + # https://github.com/ansible/ansible/issues/67716 + # Updates to termination protection in check mode has a bug (listed above) + + - name: Set termination protection to false + ec2_instance: + name: "{{ resource_prefix }}-termination-protection" + image_id: "{{ ec2_ami_image }}" + termination_protection: false + instance_type: "{{ ec2_instance_type }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + register: set_termination_protection_results + + - name: Check return value + assert: + that: + - "{{ set_termination_protection_results.changed }}" + - "{{ not set_termination_protection_results.changes[0].DisableApiTermination.Value }}" + + - name: Set termination protection to false (idempotent) + ec2_instance: + name: "{{ resource_prefix }}-termination-protection" + image_id: "{{ ec2_ami_image }}" + termination_protection: false + instance_type: "{{ ec2_instance_type }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + register: set_termination_protection_results + + - name: Check return value + assert: + that: + - "{{ not set_termination_protection_results.changed }}" + + - name: Set termination protection to true + ec2_instance: + name: "{{ resource_prefix }}-termination-protection" + image_id: "{{ ec2_ami_image }}" + termination_protection: true + instance_type: "{{ ec2_instance_type }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + register: set_termination_protection_results + + - name: Check return value + assert: + that: + - "{{ set_termination_protection_results.changed }}" + - "{{ set_termination_protection_results.changes[0].DisableApiTermination.Value }}" + + - name: Set termination protection to true (idempotent) + ec2_instance: + name: "{{ resource_prefix }}-termination-protection" + image_id: "{{ ec2_ami_image }}" + termination_protection: true + instance_type: "{{ ec2_instance_type }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + register: set_termination_protection_results + + - name: Check return value + assert: + that: + - "{{ not set_termination_protection_results.changed }}" + + - name: Set termination protection to false (so we can terminate instance) + ec2_instance: + name: "{{ resource_prefix }}-termination-protection" + image_id: "{{ ec2_ami_image }}" + termination_protection: false + instance_type: "{{ ec2_instance_type }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + register: set_termination_protection_results + + - name: Terminate the instance + ec2_instance: + filters: + tag:TestId: "{{ resource_prefix }}" + state: absent + + always: + + - name: Set termination protection to false (so we can terminate instance) (cleanup) + ec2_instance: + filters: + tag:TestId: "{{ resource_prefix }}" + termination_protection: false + ignore_errors: yes + + - name: Terminate instance + ec2_instance: + filters: + tag:TestId: "{{ resource_prefix }}" + state: absent + wait: false + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/version_fail.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/version_fail.yml new file mode 100644 index 00000000..67370ebe --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/version_fail.yml @@ -0,0 +1,29 @@ +- block: + - name: "create t3.nano with cpu options (fails gracefully)" + ec2_instance: + state: present + name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-ec2" + image_id: "{{ ec2_ami_image }}" + instance_type: "t3.nano" + cpu_options: + core_count: 1 + threads_per_core: 1 + tags: + TestId: "{{ ec2_instance_tag_TestId }}" + register: ec2_instance_cpu_options_creation + ignore_errors: yes + + - name: "check that graceful error message is returned when creation with cpu_options and old botocore" + assert: + that: + - ec2_instance_cpu_options_creation.failed + - 'ec2_instance_cpu_options_creation.msg == "cpu_options is only supported with botocore >= 1.10.16"' + + always: + - name: "Terminate version_fail instances" + ec2_instance: + state: absent + filters: + "tag:TestId": "{{ ec2_instance_tag_TestId }}" + wait: yes + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/version_fail_wrapper.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/version_fail_wrapper.yml new file mode 100644 index 00000000..4513ae71 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/version_fail_wrapper.yml @@ -0,0 +1,30 @@ +--- +- include_role: + name: 'setup_remote_tmp_dir' + +- set_fact: + virtualenv: "{{ remote_tmp_dir }}/virtualenv" + virtualenv_command: "{{ ansible_python_interpreter }} -m virtualenv" + +- set_fact: + virtualenv_interpreter: "{{ virtualenv }}/bin/python" + +- pip: + name: "virtualenv" + +- pip: + name: + - 'botocore<1.10.16' + - boto3 + - coverage<5 + virtualenv: "{{ virtualenv }}" + virtualenv_command: "{{ virtualenv_command }}" + virtualenv_site_packages: no + +- include_tasks: version_fail.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + +- file: + state: absent + path: "{{ virtualenv }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/runme.sh b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/runme.sh new file mode 100755 index 00000000..aa324772 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_instance/runme.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# +# Beware: most of our tests here are run in parallel. +# To add new tests you'll need to add a new host to the inventory and a matching +# '{{ inventory_hostname }}'.yml file in roles/ec2_instance/tasks/ + + +set -eux + +export ANSIBLE_ROLES_PATH=../ + +ansible-playbook main.yml -i inventory "$@" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/full_test.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/full_test.yml new file mode 100644 index 00000000..ae375ac1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/full_test.yml @@ -0,0 +1,5 @@ +- hosts: localhost + connection: local + environment: "{{ ansible_test.environment }}" + roles: + - ec2_launch_template diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/defaults/main.yml new file mode 100644 index 00000000..9651b916 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/defaults/main.yml @@ -0,0 +1,18 @@ +--- +resource_prefix: ansible-test-default-group +ec2_ami_image: + # https://wiki.centos.org/Cloud/AWS collected 2018-01-10 + ap-northeast-1: ami-571e3c30 + ap-northeast-2: ami-97cb19f9 + ap-south-1: ami-11f0837e + ap-southeast-1: ami-30318f53 + ap-southeast-2: ami-24959b47 + ca-central-1: ami-daeb57be + eu-central-1: ami-7cbc6e13 + eu-west-1: ami-0d063c6b + eu-west-2: ami-c22236a6 + sa-east-1: ami-864f2dea + us-east-1: ami-ae7bfdb8 + us-east-2: ami-9cbf9bf9 + us-west-1: ami-7c280d1c + us-west-2: ami-0c2aba6c diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/files/assume-role-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/files/assume-role-policy.json new file mode 100644 index 00000000..72413abd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/files/assume-role-policy.json @@ -0,0 +1,13 @@ +{ + "Version": "2008-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Allow", + "Principal": { + "Service": "ec2.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/cpu_options.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/cpu_options.yml new file mode 100644 index 00000000..8d610a2e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/cpu_options.yml @@ -0,0 +1,38 @@ +- block: + - name: delete a non-existent template + ec2_launch_template: + name: "{{ resource_prefix }}-not-a-real-template" + state: absent + register: del_fake_lt + ignore_errors: true + - assert: + that: + - del_fake_lt is not failed + - name: create c4.large instance with cpu_options + ec2_launch_template: + name: "{{ resource_prefix }}-c4large-1-threads-per-core" + image_id: "{{ ec2_ami_image[aws_region] }}" + tags: + TestId: "{{ resource_prefix }}" + instance_type: c4.large + cpu_options: + core_count: 1 + threads_per_core: 1 + register: lt + + - name: instance with cpu_options created with the right options + assert: + that: + - lt is success + - lt is changed + - "lt.latest_template.launch_template_data.cpu_options.core_count == 1" + - "lt.latest_template.launch_template_data.cpu_options.threads_per_core == 1" + always: + - name: delete the template + ec2_launch_template: + name: "{{ resource_prefix }}-c4large-1-threads-per-core" + state: absent + register: del_lt + retries: 10 + until: del_lt is not failed + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/iam_instance_role.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/iam_instance_role.yml new file mode 100644 index 00000000..5e9b7f56 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/iam_instance_role.yml @@ -0,0 +1,104 @@ +- block: + - name: Create IAM role for test + iam_role: + name: "{{ resource_prefix }}-test-policy" + assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" + state: present + create_instance_profile: yes + managed_policy: + - AmazonS3ReadOnlyAccess + register: iam_role + + - name: Create second IAM role for test + iam_role: + name: "{{ resource_prefix }}-test-policy-2" + assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" + state: present + create_instance_profile: yes + managed_policy: + - AmazonS3ReadOnlyAccess + register: iam_role_2 + + - name: Make instance with an instance_role + ec2_launch_template: + name: "{{ resource_prefix }}-test-instance-role" + image_id: "{{ ec2_ami_image[aws_region] }}" + instance_type: t2.micro + iam_instance_profile: "{{ resource_prefix }}-test-policy" + register: template_with_role + + - assert: + that: + - 'template_with_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.arn.replace(":role/", ":instance-profile/")' + + - name: Create template again, with no change to instance_role + ec2_launch_template: + name: "{{ resource_prefix }}-test-instance-role" + image_id: "{{ ec2_ami_image[aws_region] }}" + instance_type: t2.micro + iam_instance_profile: "{{ resource_prefix }}-test-policy" + register: template_with_role + + - assert: + that: + - 'template_with_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role.arn.replace(":role/", ":instance-profile/")' + - 'template_with_role is not changed' + + - name: Update instance with new instance_role + ec2_launch_template: + name: "{{ resource_prefix }}-test-instance-role" + image_id: "{{ ec2_ami_image[aws_region] }}" + instance_type: t2.micro + iam_instance_profile: "{{ resource_prefix }}-test-policy-2" + register: template_with_updated_role + + - assert: + that: + - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.arn.replace(":role/", ":instance-profile/")' + - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.arn.replace(":role/", ":instance-profile/")' + - 'template_with_role.default_template.version_number < template_with_updated_role.default_template.version_number' + - 'template_with_updated_role is changed' + - 'template_with_updated_role is not failed' + + - name: Re-set with same new instance_role + ec2_launch_template: + name: "{{ resource_prefix }}-test-instance-role" + image_id: "{{ ec2_ami_image[aws_region] }}" + instance_type: t2.micro + iam_instance_profile: "{{ resource_prefix }}-test-policy-2" + register: template_with_updated_role + + - assert: + that: + - 'template_with_updated_role is not changed' + - 'template_with_updated_role.default_template.launch_template_data.iam_instance_profile.arn == iam_role_2.arn.replace(":role/", ":instance-profile/")' + + always: + - name: delete launch template + ec2_launch_template: + name: "{{ resource_prefix }}-test-instance-role" + state: absent + register: lt_removed + until: lt_removed is not failed + ignore_errors: yes + retries: 10 + - name: Delete IAM role for test + iam_role: + name: "{{ resource_prefix }}-test-policy" + assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" + state: absent + create_instance_profile: yes + register: iam_removed + until: iam_removed is not failed + ignore_errors: yes + retries: 10 + - name: Delete IAM role for test + iam_role: + name: "{{ resource_prefix }}-test-policy-2" + assume_role_policy_document: "{{ lookup('file','assume-role-policy.json') }}" + state: absent + create_instance_profile: yes + register: iam_2_removed + until: iam_2_removed is not failed + ignore_errors: yes + retries: 10 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/main.yml new file mode 100644 index 00000000..4976da27 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/main.yml @@ -0,0 +1,24 @@ +--- +# A Note about ec2 environment variable name preference: +# - EC2_URL -> AWS_URL +# - EC2_ACCESS_KEY -> AWS_ACCESS_KEY_ID -> AWS_ACCESS_KEY +# - EC2_SECRET_KEY -> AWS_SECRET_ACCESS_KEY -> AWX_SECRET_KEY +# - EC2_REGION -> AWS_REGION +# + +# - include: ../../../../../setup_ec2/tasks/common.yml module_name: ec2_instance + +- module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + block: + - include_tasks: cpu_options.yml + - include_tasks: iam_instance_role.yml + - include_tasks: versions.yml + + always: + - debug: + msg: teardown goes here diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/tags_and_vpc_settings.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/tags_and_vpc_settings.yml new file mode 100644 index 00000000..7da7f770 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/tags_and_vpc_settings.yml @@ -0,0 +1,208 @@ +- block: + # ============================================================ + # set up VPC + - name: Create VPC for use in testing + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.99.0.0/16 + tags: + Name: Ansible ec2_instance Testing VPC + tenancy: default + register: testing_vpc + + - name: Create default subnet in zone A + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.99.0.0/24 + az: "{{ aws_region }}a" + resource_tags: + Name: "{{ resource_prefix }}-subnet-a" + register: testing_subnet_a + + - name: Create secondary subnet in zone B + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.99.1.0/24 + az: "{{ aws_region }}b" + resource_tags: + Name: "{{ resource_prefix }}-subnet-b" + register: testing_subnet_b + + - name: create a security group with the vpc + ec2_group: + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ testing_vpc.vpc.id }}" + rules: + - proto: tcp + ports: [22, 80] + cidr_ip: 0.0.0.0/0 + register: sg + # TODO: switch these tests from instances + - assert: + that: + - 1 == 0 + # ============================================================ + # start subnet/sg testing + - name: Make instance in the testing subnet created in the test VPC + ec2_instance: + name: "{{ resource_prefix }}-test-basic-vpc-create" + image_id: "{{ ec2_ami_image[aws_region] }}" + user_data: | + #cloud-config + package_upgrade: true + package_update: true + tags: + TestId: "{{ resource_prefix }}" + Something: else + security_groups: "{{ sg.group_id }}" + network: + source_dest_check: false + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + instance_type: t2.micro + volumes: + - device_name: /dev/sda1 + ebs: + delete_on_termination: true + register: in_test_vpc + + - name: Try to re-make the instance, hopefully this shows changed=False + ec2_instance: + name: "{{ resource_prefix }}-test-basic-vpc-create" + image_id: "{{ ec2_ami_image[aws_region] }}" + user_data: | + #cloud-config + package_upgrade: true + package_update: true + tags: + TestId: "{{ resource_prefix }}" + Something: else + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + instance_type: t2.micro + register: remake_in_test_vpc + - name: "Remaking the same instance resulted in no changes" + assert: + that: not remake_in_test_vpc.changed + - name: check that instance IDs match anyway + assert: + that: 'remake_in_test_vpc.instance_ids[0] == in_test_vpc.instance_ids[0]' + - name: check that source_dest_check was set to false + assert: + that: 'not remake_in_test_vpc.instances[0].source_dest_check' + + - name: Alter it by adding tags + ec2_instance: + name: "{{ resource_prefix }}-test-basic-vpc-create" + image_id: "{{ ec2_ami_image[aws_region] }}" + tags: + TestId: "{{ resource_prefix }}" + Another: thing + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + instance_type: t2.micro + register: add_another_tag + + - ec2_instance_info: + instance_ids: "{{ add_another_tag.instance_ids }}" + register: check_tags + - name: "Remaking the same instance resulted in no changes" + assert: + that: + - check_tags.instances[0].tags.Another == 'thing' + - check_tags.instances[0].tags.Something == 'else' + + - name: Purge a tag + ec2_instance: + name: "{{ resource_prefix }}-test-basic-vpc-create" + image_id: "{{ ec2_ami_image[aws_region] }}" + purge_tags: true + tags: + TestId: "{{ resource_prefix }}" + Another: thing + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" + instance_type: t2.micro + - ec2_instance_info: + instance_ids: "{{ add_another_tag.instance_ids }}" + register: check_tags + - name: "Remaking the same instance resulted in no changes" + assert: + that: + - "'Something' not in check_tags.instances[0].tags" + + - name: Terminate instance + ec2_instance: + filters: + tag:TestId: "{{ resource_prefix }}" + state: absent + register: result + - assert: + that: result.changed + + - name: Terminate instance + ec2_instance: + instance_ids: "{{ in_test_vpc.instance_ids }}" + state: absent + register: result + - assert: + that: not result.changed + + - name: check that subnet-default public IP rule was followed + assert: + that: + - in_test_vpc.instances[0].public_dns_name == "" + - in_test_vpc.instances[0].private_ip_address.startswith("10.22.33") + - in_test_vpc.instances[0].subnet_id == testing_subnet_b.subnet.id + - name: check that tags were applied + assert: + that: + - in_test_vpc.instances[0].tags.Name.startswith(resource_prefix) + - in_test_vpc.instances[0].state.name == 'running' + + always: + - name: remove the security group + ec2_group: + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ testing_vpc.vpc.id }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: remove subnet A + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.99.0.0/24 + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: remove subnet B + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.99.1.0/24 + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: remove the VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.99.0.0/16 + state: absent + tags: + Name: Ansible Testing VPC + tenancy: default + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/versions.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/versions.yml new file mode 100644 index 00000000..9035467a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/versions.yml @@ -0,0 +1,62 @@ +- block: + - name: create simple instance template + ec2_launch_template: + name: "{{ resource_prefix }}-simple" + image_id: "{{ ec2_ami_image[aws_region] }}" + tags: + TestId: "{{ resource_prefix }}" + instance_type: c4.large + register: lt + + - name: instance with cpu_options created with the right options + assert: + that: + - lt is success + - lt is changed + - lt.default_version == 1 + - lt.latest_version == 1 + + - name: update simple instance template + ec2_launch_template: + name: "{{ resource_prefix }}-simple" + default_version: 1 + image_id: "{{ ec2_ami_image[aws_region] }}" + tags: + TestId: "{{ resource_prefix }}" + instance_type: m5.large + register: lt + + - name: instance with cpu_options created with the right options + assert: + that: + - lt is success + - lt is changed + - lt.default_version == 1 + - lt.latest_version == 2 + + - name: update simple instance template + ec2_launch_template: + name: "{{ resource_prefix }}-simple" + image_id: "{{ ec2_ami_image[aws_region] }}" + tags: + TestId: "{{ resource_prefix }}" + instance_type: t3.medium + register: lt + + - name: instance with cpu_options created with the right options + assert: + that: + - lt is success + - lt is changed + - lt.default_version == 3 + - lt.latest_version == 3 + + always: + - name: delete the template + ec2_launch_template: + name: "{{ resource_prefix }}-simple" + state: absent + register: del_lt + retries: 10 + until: del_lt is not failed + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/version_fail.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/version_fail.yml new file mode 100644 index 00000000..02b87f4a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/playbooks/version_fail.yml @@ -0,0 +1,36 @@ +- hosts: localhost + connection: local + environment: "{{ ansible_test.environment }}" + vars: + resource_prefix: 'ansible-testing' + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + tasks: + - block: + - name: Include vars file in roles/ec2_instance/defaults/main.yml + include_vars: + file: 'roles/ec2_launch_template/defaults/main.yml' + + - name: create c4.large template (failure expected) + ec2_launch_template: + state: present + name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tpl" + instance_type: c4.large + register: ec2_lt + ignore_errors: yes + + - name: check that graceful error message is returned when creation with cpu_options and old botocore + assert: + that: + - ec2_lt is failed + - 'ec2_lt.msg == "ec2_launch_template requires boto3 >= 1.6.0"' + always: + - name: delete the c4.large template just in case it was created + ec2_launch_template: + state: absent + name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tpl" + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/runme.sh b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/runme.sh new file mode 100755 index 00000000..62479044 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_launch_template/runme.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -eux + +export ANSIBLE_ROLES_PATH=../ + +# Test graceful failure for older versions of botocore +source virtualenv.sh +pip install 'boto3<1.6.0' +ansible-playbook -i ../../inventory -v playbooks/version_fail.yml "$@" + +# Run full test suite +source virtualenv.sh +pip install 'boto3>1.6.0' +ansible-playbook -i ../../inventory -v playbooks/full_test.yml "$@" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/aliases new file mode 100644 index 00000000..72a9fb4f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group4 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/defaults/main.yml new file mode 100644 index 00000000..4d80b5d6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/defaults/main.yml @@ -0,0 +1,6 @@ +--- +# defaults file for ec2_instance +ec2_instance_name: '{{ resource_prefix }}-node' +ec2_instance_owner: 'integration-run-{{ resource_prefix }}' +ec2_ami_name: "amzn-ami-hvm*" +alarm_prefix: "ansible-test" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/tasks/env_cleanup.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/tasks/env_cleanup.yml new file mode 100644 index 00000000..e90ddc64 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/tasks/env_cleanup.yml @@ -0,0 +1,94 @@ +- name: remove any instances in the test VPC + ec2_instance: + filters: + vpc_id: "{{ testing_vpc.vpc.id }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: remove ENIs + ec2_eni_info: + filters: + vpc-id: "{{ testing_vpc.vpc.id }}" + register: enis + +- name: delete all ENIs + ec2_eni: + eni_id: "{{ item.id }}" + state: absent + until: removed is not failed + with_items: "{{ enis.network_interfaces }}" + ignore_errors: yes + retries: 10 + +- name: remove the security group + ec2_group: + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ testing_vpc.vpc.id }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: remove routing rules + ec2_vpc_route_table: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + tags: + created: "{{ resource_prefix }}-route" + routes: + - dest: 0.0.0.0/0 + gateway_id: "{{ igw.gateway_id }}" + subnets: + - "{{ testing_subnet_a.subnet.id }}" + - "{{ testing_subnet_b.subnet.id }}" + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: remove internet gateway + ec2_vpc_igw: + vpc_id: "{{ testing_vpc.vpc.id }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: remove subnet A + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.32.0/24 + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: remove subnet B + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.33.0/24 + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + +- name: remove the VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.22.32.0/23 + state: absent + tags: + Name: Ansible Testing VPC + tenancy: default + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/tasks/env_setup.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/tasks/env_setup.yml new file mode 100644 index 00000000..80b49dbc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/tasks/env_setup.yml @@ -0,0 +1,62 @@ +- name: Create VPC for use in testing + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.22.32.0/23 + tags: + Name: Ansible ec2_instance Testing VPC + tenancy: default + register: testing_vpc + +- name: Create internet gateway for use in testing + ec2_vpc_igw: + vpc_id: "{{ testing_vpc.vpc.id }}" + state: present + register: igw + +- name: Create default subnet in zone A + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.32.0/24 + az: "{{ aws_region }}a" + resource_tags: + Name: "{{ resource_prefix }}-subnet-a" + register: testing_subnet_a + +- name: Create secondary subnet in zone B + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.33.0/24 + az: "{{ aws_region }}b" + resource_tags: + Name: "{{ resource_prefix }}-subnet-b" + register: testing_subnet_b + +- name: create routing rules + ec2_vpc_route_table: + vpc_id: "{{ testing_vpc.vpc.id }}" + tags: + created: "{{ resource_prefix }}-route" + routes: + - dest: 0.0.0.0/0 + gateway_id: "{{ igw.gateway_id }}" + subnets: + - "{{ testing_subnet_a.subnet.id }}" + - "{{ testing_subnet_b.subnet.id }}" + +- name: create a security group with the vpc + ec2_group: + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ testing_vpc.vpc.id }}" + rules: + - proto: tcp + from_port: 22 + to_port: 22 + cidr_ip: 0.0.0.0/0 + - proto: tcp + from_port: 80 + to_port: 80 + cidr_ip: 0.0.0.0/0 + register: sg diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/tasks/main.yml new file mode 100644 index 00000000..102747f4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/tasks/main.yml @@ -0,0 +1,232 @@ +- name: run ec2_metric_alarm tests + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + + block: + - set_fact: + alarm_full_name: "{{ alarm_prefix }}-{{ resource_prefix }}-cpu-low" + + # until there's a module to get info about alarms, awscli is needed + - name: install awscli + pip: + state: present + name: awscli + + - name: set up environment for testing. + include_tasks: env_setup.yml + + - name: get info on alarms + command: aws cloudwatch describe-alarms --alarm-names {{ alarm_full_name }} + environment: + AWS_ACCESS_KEY_ID: "{{ aws_access_key }}" + AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key }}" + AWS_SESSION_TOKEN: "{{ security_token | default('') }}" + AWS_DEFAULT_REGION: "{{ aws_region }}" + register: alarm_info_query + + - name: Find AMI to use + ec2_ami_info: + owners: 'amazon' + filters: + name: '{{ ec2_ami_name }}' + register: ec2_amis + - set_fact: + ec2_ami_image: '{{ ec2_amis.images[0].image_id }}' + + - name: Make instance in a default subnet of the VPC + ec2_instance: + name: "{{ resource_prefix }}-test-default-vpc" + image_id: "{{ec2_ami_image }}" + tags: + TestId: "{{ resource_prefix }}" + security_groups: "{{ sg.group_id }}" + vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" + instance_type: t2.micro + wait: true + register: ec2_instance_results + + - name: create ec2 metric alarm on ec2 instance + ec2_metric_alarm: + dimensions: + InstanceId: "{{ ec2_instance_results.instances[0].instance_id }}" + state: present + name: "{{ alarm_full_name }}" + metric: "CPUUtilization" + namespace: "AWS/EC2" + treat_missing_data: missing + statistic: Average + comparison: "<=" + threshold: 5.0 + period: 300 + evaluation_periods: 3 + unit: "Percent" + description: "This will alarm when an instance's cpu usage average is lower than 5% for 15 minutes " + register: ec2_instance_metric_alarm + + - name: get info on alarms + command: aws cloudwatch describe-alarms --alarm-names {{ alarm_full_name }} + environment: + AWS_ACCESS_KEY_ID: "{{ aws_access_key }}" + AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key }}" + AWS_SESSION_TOKEN: "{{ security_token | default('') }}" + AWS_DEFAULT_REGION: "{{ aws_region }}" + register: alarm_info_query + + - name: convert it to an object + set_fact: + alarm_info: "{{ alarm_info_query.stdout |from_json }}" + + - name: "verify that an alarm was created" + assert: + that: + - 'ec2_instance_metric_alarm.changed' + - 'ec2_instance_metric_alarm.alarm_arn' + - 'ec2_instance_metric_alarm.statistic == alarm_info["MetricAlarms"][0].Statistic' + - 'ec2_instance_metric_alarm.name == alarm_info["MetricAlarms"][0].AlarmName' + - 'ec2_instance_metric_alarm.metric== alarm_info["MetricAlarms"][0].MetricName' + - 'ec2_instance_metric_alarm.namespace == alarm_info["MetricAlarms"][0].Namespace' + - 'ec2_instance_metric_alarm.comparison == alarm_info["MetricAlarms"][0].ComparisonOperator' + - 'ec2_instance_metric_alarm.comparison == alarm_info["MetricAlarms"][0].ComparisonOperator' + - 'ec2_instance_metric_alarm.threshold == alarm_info["MetricAlarms"][0].Threshold' + - 'ec2_instance_metric_alarm.period == alarm_info["MetricAlarms"][0].Period' + - 'ec2_instance_metric_alarm.unit == alarm_info["MetricAlarms"][0].Unit' + - 'ec2_instance_metric_alarm.evaluation_periods == alarm_info["MetricAlarms"][0].EvaluationPeriods' + - 'ec2_instance_metric_alarm.description == alarm_info["MetricAlarms"][0].AlarmDescription' + - 'ec2_instance_metric_alarm.treat_missing_data == alarm_info["MetricAlarms"][0].TreatMissingData' + + - name: create ec2 metric alarm on ec2 instance (idempotent) + ec2_metric_alarm: + dimensions: + InstanceId: "{{ ec2_instance_results.instances[0].instance_id }}" + state: present + name: "{{ alarm_full_name }}" + metric: "CPUUtilization" + namespace: "AWS/EC2" + treat_missing_data: missing + statistic: Average + comparison: "<=" + threshold: 5.0 + period: 300 + evaluation_periods: 3 + unit: "Percent" + description: "This will alarm when an instance's cpu usage average is lower than 5% for 15 minutes " + register: ec2_instance_metric_alarm_idempotent + + - name: get info on alarms + command: aws cloudwatch describe-alarms --alarm-names {{ alarm_full_name }} + environment: + AWS_ACCESS_KEY_ID: "{{ aws_access_key }}" + AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key }}" + AWS_SESSION_TOKEN: "{{ security_token | default('') }}" + AWS_DEFAULT_REGION: "{{ aws_region }}" + register: alarm_info_query_idempotent + + - name: convert it to an object + set_fact: + alarm_info_idempotent: "{{ alarm_info_query_idempotent.stdout |from_json }}" + + - name: "Verify alarm does not register as changed after update" + assert: + that: + - not ec2_instance_metric_alarm_idempotent.changed + + - name: "Verify alarm did not change after updating" + assert: + that: + - "alarm_info['MetricAlarms'][0]['{{item}}'] == alarm_info_idempotent['MetricAlarms'][0]['{{ item }}']" + with_items: + - AlarmArn + - Statistic + - AlarmName + - MetricName + - Namespace + - ComparisonOperator + - Threshold + - Period + - Unit + - EvaluationPeriods + - AlarmDescription + - TreatMissingData + + - name: update alarm + ec2_metric_alarm: + dimensions: + InstanceId: "{{ ec2_instance_results.instances[0].instance_id }}" + state: present + name: "{{ alarm_full_name }}" + metric: "CPUUtilization" + namespace: "AWS/EC2" + statistic: Average + comparison: "<=" + threshold: 5.0 + period: 60 + evaluation_periods: 3 + unit: "Percent" + description: "This will alarm when an instance's cpu usage average is lower than 5% for 3 minutes " + register: ec2_instance_metric_alarm_update + + - name: "verify that alarm registers as updated" + assert: + that: + - 'ec2_instance_metric_alarm.changed' + + - name: "verify that properties were changed" + assert: + that: + - 'ec2_instance_metric_alarm_update.changed' + - 'ec2_instance_metric_alarm_update.period == 60' #Period should be 60, not matching old value + - 'ec2_instance_metric_alarm_update.alarm_arn == ec2_instance_metric_alarm.alarm_arn' + - 'ec2_instance_metric_alarm_update.statistic == alarm_info["MetricAlarms"][0].Statistic' + - 'ec2_instance_metric_alarm_update.name == alarm_info["MetricAlarms"][0].AlarmName' + - 'ec2_instance_metric_alarm_update.metric== alarm_info["MetricAlarms"][0].MetricName' + - 'ec2_instance_metric_alarm_update.namespace == alarm_info["MetricAlarms"][0].Namespace' + - 'ec2_instance_metric_alarm_update.statistic == alarm_info["MetricAlarms"][0].Statistic' + - 'ec2_instance_metric_alarm_update.comparison == alarm_info["MetricAlarms"][0].ComparisonOperator' + - 'ec2_instance_metric_alarm_update.threshold == alarm_info["MetricAlarms"][0].Threshold' + - 'ec2_instance_metric_alarm_update.unit == alarm_info["MetricAlarms"][0].Unit' + - 'ec2_instance_metric_alarm_update.evaluation_periods == alarm_info["MetricAlarms"][0].EvaluationPeriods' + - 'ec2_instance_metric_alarm_update.treat_missing_data == alarm_info["MetricAlarms"][0].TreatMissingData' + + - name: try to remove the alarm + ec2_metric_alarm: + state: absent + name: "{{ alarm_full_name }}" + + register: ec2_instance_metric_alarm_deletion + + - name: Verify that the alarm reports deleted/changed + assert: + that: + - 'ec2_instance_metric_alarm_deletion.changed' + + - name: get info on alarms + command: aws cloudwatch describe-alarms --alarm-names {{ alarm_full_name }} + environment: + AWS_ACCESS_KEY_ID: "{{ aws_access_key }}" + AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key }}" + AWS_SESSION_TOKEN: "{{ security_token | default('') }}" + AWS_DEFAULT_REGION: "{{ aws_region }}" + register: alarm_info_query + + - name: convert it to an object + set_fact: + alarm_info: "{{ alarm_info_query.stdout |from_json }}" + + - name: Verify that the alarm was deleted using cli + assert: + that: + - 'alarm_info["MetricAlarms"]|length == 0' + always: + - name: try to stop the ec2 instance + ec2_instance: + instance_ids: "{{ ec2_instance_results.instances[0].instance_id }}" + state: terminated + ignore_errors: yes + + - include_tasks: env_cleanup.yml diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/vars/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/vars/main.yml new file mode 100644 index 00000000..ed97d539 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_metric_alarm/vars/main.yml @@ -0,0 +1 @@ +--- diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/aliases new file mode 100644 index 00000000..157ce0c9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group3 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/defaults/main.yml new file mode 100644 index 00000000..9a895bdf --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/defaults/main.yml @@ -0,0 +1,3 @@ +scaling_policy_lc_name: "{{ resource_prefix }}_lc" +scaling_policy_asg_name: "{{ resource_prefix }}_asg" +ec2_ami_name: 'amzn2-ami-hvm-2.*-x86_64-gp2' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/tasks/main.yml new file mode 100644 index 00000000..ba6c2163 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_scaling_policy/tasks/main.yml @@ -0,0 +1,215 @@ +--- +# __Test Outline__ +# +# __ec2_scaling_policy__ +# create simplescaling scaling policy +# update simplescaling scaling policy +# remove simplescaling scaling policy +# create stepscaling scaling policy +# update stepscaling scaling policy +# remove stepscaling scaling policy + +- module_defaults: + group/aws: + region: "{{ aws_region }}" + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + collections: + - amazon.aws + block: + + - name: Find AMI to use + ec2_ami_info: + owners: 'amazon' + filters: + name: '{{ ec2_ami_name }}' + register: ec2_amis + + - name: Set fact with latest AMI + vars: + latest_ami: '{{ ec2_amis.images | sort(attribute="creation_date") | last }}' + set_fact: + scaling_policy_image_id: '{{ latest_ami.image_id }}' + + - name: create trivial launch_configuration + ec2_lc: + name: "{{ scaling_policy_lc_name }}" + state: present + instance_type: t3.nano + image_id: "{{ scaling_policy_image_id }}" + + - name: create trivial ASG + ec2_asg: + name: "{{ scaling_policy_asg_name }}" + state: present + launch_config_name: "{{ scaling_policy_lc_name }}" + min_size: 0 + max_size: 1 + desired_capacity: 0 + + - name: Create Simple Scaling policy using implicit defaults + ec2_scaling_policy: + name: "{{ resource_prefix }}_simplescaling_policy" + asg_name: "{{ scaling_policy_asg_name }}" + state: present + adjustment_type: ChangeInCapacity + scaling_adjustment: 1 + register: result + + - assert: + that: + - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - result.changed + + - name: Update Simple Scaling policy using explicit defaults + ec2_scaling_policy: + name: "{{ resource_prefix }}_simplescaling_policy" + asg_name: "{{ scaling_policy_asg_name }}" + state: present + adjustment_type: ChangeInCapacity + scaling_adjustment: 1 + policy_type: SimpleScaling + register: result + + - assert: + that: + - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - not result.changed + + - name: min_adjustment_step is ignored with ChangeInCapacity + ec2_scaling_policy: + name: "{{ resource_prefix }}_simplescaling_policy" + asg_name: "{{ scaling_policy_asg_name }}" + state: present + adjustment_type: ChangeInCapacity + scaling_adjustment: 1 + min_adjustment_step: 1 + policy_type: SimpleScaling + register: result + + - assert: + that: + - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - not result.changed + - result.adjustment_type == "ChangeInCapacity" + + - name: Change Simple Scaling policy adjustment_type to PercentChangeInCapacity + ec2_scaling_policy: + name: "{{ resource_prefix }}_simplescaling_policy" + asg_name: "{{ scaling_policy_asg_name }}" + state: present + adjustment_type: PercentChangeInCapacity + scaling_adjustment: 1 + min_adjustment_step: 1 + policy_type: SimpleScaling + register: result + + - assert: + that: + - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - result.changed + - result.adjustment_type == "PercentChangeInCapacity" + + - name: Remove Simple Scaling policy + ec2_scaling_policy: + name: "{{ resource_prefix }}_simplescaling_policy" + asg_name: "{{ scaling_policy_asg_name }}" + state: absent + register: result + + - assert: + that: + - result.changed + + - name: Create Step Scaling policy + ec2_scaling_policy: + name: "{{ resource_prefix }}_stepscaling_policy" + asg_name: "{{ scaling_policy_asg_name }}" + state: present + policy_type: StepScaling + metric_aggregation: Maximum + step_adjustments: + - upper_bound: 20 + scaling_adjustment: 50 + - lower_bound: 20 + scaling_adjustment: 100 + adjustment_type: "PercentChangeInCapacity" + register: result + + - assert: + that: + - result.policy_name == "{{ resource_prefix }}_stepscaling_policy" + - result.changed + + - name: Add another step + ec2_scaling_policy: + name: "{{ resource_prefix }}_stepscaling_policy" + asg_name: "{{ scaling_policy_asg_name }}" + state: present + policy_type: StepScaling + metric_aggregation: Maximum + step_adjustments: + - upper_bound: 20 + scaling_adjustment: 50 + - lower_bound: 20 + upper_bound: 40 + scaling_adjustment: 75 + - lower_bound: 40 + scaling_adjustment: 100 + adjustment_type: "PercentChangeInCapacity" + register: result + + - assert: + that: + - result.policy_name == "{{ resource_prefix }}_stepscaling_policy" + - result.changed + - result.adjustment_type == "PercentChangeInCapacity" + + - name: Remove Step Scaling policy + ec2_scaling_policy: + name: "{{ resource_prefix }}_stepscaling_policy" + asg_name: "{{ scaling_policy_asg_name }}" + state: absent + register: result + + - assert: + that: + - result.changed + + - name: Remove Step Scaling policy (idemopotency) + ec2_scaling_policy: + name: "{{ resource_prefix }}_stepscaling_policy" + asg_name: "{{ scaling_policy_asg_name }}" + state: absent + register: result + + - assert: + that: + - result is not changed + - result is successful + + always: + + # ============================================================ + - name: Remove the scaling policies + ec2_scaling_policy: + name: "{{ item }}" + state: absent + register: result + with_items: + - "{{ resource_prefix }}_simplescaling_policy" + - "{{ resource_prefix }}_stepscaling_policy" + ignore_errors: yes + + - name: remove the ASG + ec2_asg: + name: "{{ scaling_policy_asg_name }}" + state: absent + ignore_errors: yes + + - name: remove the Launch Configuration + ec2_lc: + name: "{{ scaling_policy_lc_name }}" + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_transit_gateway/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_transit_gateway/aliases new file mode 100644 index 00000000..ce6c0771 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_transit_gateway/aliases @@ -0,0 +1,3 @@ +cloud/aws +shippable/aws/group2 +ec2_transit_gateway_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_transit_gateway/tasks/main.yml new file mode 100644 index 00000000..b70db393 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -0,0 +1,175 @@ +--- +# tasks file for test_ec2_transit_gateway + +- name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + +- name: generate unique value for testing + set_fact: + tgw_description: "{{ resource_prefix }}-tgw" + +- block: + - name: test create transit gateway without permissions + ec2_transit_gateway: + description: "{{ tgw_description }}" + region: "{{ aws_region }}" + register: result + ignore_errors: yes + + - name: assert nice message returned + assert: + that: + - result is failed + - "result.msg != 'MODULE FAILURE'" + + - name: test create transit gateway without region + ec2_transit_gateway: + description: "{{ tgw_description }}" + register: result + ignore_errors: yes + + - name: assert failure when called with minimal parameters but no region + assert: + that: + - 'result.failed' + - 'result.msg.startswith("The ec2_transit_gateway module requires a region")' + + - name: test create transit gateway without tags + ec2_transit_gateway: + description: "{{ tgw_description }}" + <<: *aws_connection_info + register: create_result + - name: assert changed is True + assert: + that: + - create_result.changed == True + + - name: test update transit gateway with tags by description + ec2_transit_gateway: + description: "{{ tgw_description }}" + tags: + Name: Ansible Test TGW + <<: *aws_connection_info + register: result + - name: assert changed is True + assert: + that: + - result.changed == True + - result.transit_gateway.tags | length == 1 + - "'Name' in result.transit_gateway.tags" + + - name: test update transit gateway with new tag and purge_tags false + ec2_transit_gateway: + transit_gateway_id: '{{ create_result.transit_gateway.transit_gateway_id }}' + purge_tags: False + tags: + status: ok to delete + <<: *aws_connection_info + register: result + - name: assert changed is True and have 2 tags + assert: + that: + - result.changed == True + - result.transit_gateway.tags | length == 2 + - "'Name' in result.transit_gateway.tags" + + - name: test update transit gateway with purge_tags true + ec2_transit_gateway: + transit_gateway_id: '{{ create_result.transit_gateway.transit_gateway_id }}' + purge_tags: True + tags: + status: ok to delete + <<: *aws_connection_info + register: result + - name: assert changed is True and TGW tag is absent + assert: + that: + - result.changed == True + - result.transit_gateway.tags | length == 1 + - "'Name' not in result.transit_gateway.tags" + + - name: test idempotence + ec2_transit_gateway: + description: "{{ tgw_description }}" + purge_tags: True + tags: + status: ok to delete + <<: *aws_connection_info + register: result + - name: assert changed is False + assert: + that: + - result.changed == False + + # ==== Combine ec2_transit_gateway_info ====================== + - name: test success with no parameters + ec2_transit_gateway_info: + <<: *aws_connection_info + register: result + - name: assert success with no parameters + assert: + that: + - 'result.changed == false' + - 'result.transit_gateways != []' + + - name: test success with single filter + ec2_transit_gateway_info: + filters: + transit-gateway-id: "{{ create_result.transit_gateway.transit_gateway_id }}" + <<: *aws_connection_info + register: result + - name: assert success with transit_gateway_id filter + assert: + that: + - 'result.changed == false' + - 'result.transit_gateways != []' + + - name: test empty result set for non-existent tgw id via filter + ec2_transit_gateway_info: + filters: + transit-gateway-id: tgw-00000011111111122 + <<: *aws_connection_info + register: result + - name: assert success with transit_gateway_id filter + assert: + that: + - 'result.changed == false' + - 'result.transit_gateways == []' + + - name: test NotFound exception caught and returned empty result set + ec2_transit_gateway_info: + transit_gateway_id: tgw-00000011111111122 + <<: *aws_connection_info + register: result + - name: assert success with transit_gateway_id filter + assert: + that: + - 'result.changed == false' + - 'result.transit_gateways == []' + + - name: test success with multiple filters + ec2_transit_gateway_info: + filters: + options.dns-support: enable + options.vpn-ecmp-support: enable + <<: *aws_connection_info + register: result + - name: assert success with transit_gateway_id filter + assert: + that: + - 'result.changed == false' + - 'result.transit_gateways != []' + always: + ###### TEARDOWN STARTS HERE ###### + - name: delete transit gateway + ec2_transit_gateway: + description: "{{ tgw_description }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_egress_igw/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_egress_igw/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_egress_igw/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_egress_igw/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_egress_igw/tasks/main.yml new file mode 100644 index 00000000..b9ce40cd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_egress_igw/tasks/main.yml @@ -0,0 +1,116 @@ +--- +- name: ec2_vpc_egress_igw tests + collections: + - amazon.aws + + block: + + # ============================================================ + - name: test failure with no parameters + ec2_vpc_egress_igw: + register: result + ignore_errors: true + + - name: assert failure with no parameters + assert: + that: + - 'result.failed' + - 'result.msg == "missing required arguments: vpc_id"' + + # ============================================================ + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + # ============================================================ + - name: test failure with non-existent VPC ID + ec2_vpc_egress_igw: + state: present + vpc_id: vpc-012345678 + <<: *aws_connection_info + register: result + ignore_errors: true + + - name: assert failure with non-existent VPC ID + assert: + that: + - 'result.failed' + - 'result.error.code == "InvalidVpcID.NotFound"' + - '"invalid vpc ID" in result.msg' + + # ============================================================ + - name: create a VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: present + cidr_block: "10.232.232.128/26" + <<: *aws_connection_info + tags: + Name: "{{ resource_prefix }}-vpc" + Description: "Created by ansible-test" + register: vpc_result + + # ============================================================ + - name: create egress-only internet gateway (expected changed=true) + ec2_vpc_egress_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + <<: *aws_connection_info + register: vpc_eigw_create + + - name: assert creation happened (expected changed=true) + assert: + that: + - 'vpc_eigw_create' + - 'vpc_eigw_create.gateway_id.startswith("eigw-")' + - 'vpc_eigw_create.vpc_id == vpc_result.vpc.id' + + # ============================================================ + - name: attempt to recreate egress-only internet gateway on VPC (expected changed=false) + ec2_vpc_egress_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + <<: *aws_connection_info + register: vpc_eigw_recreate + + - name: assert recreation did nothing (expected changed=false) + assert: + that: + - 'vpc_eigw_recreate.changed == False' + - 'vpc_eigw_recreate.gateway_id == vpc_eigw_create.gateway_id' + - 'vpc_eigw_recreate.vpc_id == vpc_eigw_create.vpc_id' + + # ============================================================ + - name: test state=absent (expected changed=true) + ec2_vpc_egress_igw: + state: absent + vpc_id: "{{ vpc_result.vpc.id }}" + <<: *aws_connection_info + register: vpc_eigw_delete + + - name: assert state=absent (expected changed=true) + assert: + that: + - 'vpc_eigw_delete.changed' + + always: + # ============================================================ + - name: tidy up EIGW + ec2_vpc_egress_igw: + state: absent + vpc_id: "{{ vpc_result.vpc.id }}" + <<: *aws_connection_info + ignore_errors: true + + - name: tidy up VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: absent + cidr_block: "10.232.232.128/26" + <<: *aws_connection_info + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_igw/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_igw/aliases new file mode 100644 index 00000000..6b8a2ae5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_igw/aliases @@ -0,0 +1,3 @@ +cloud/aws +shippable/aws/group2 +ec2_vpc_igw_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_igw/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_igw/defaults/main.yml new file mode 100644 index 00000000..eeda091c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_igw/defaults/main.yml @@ -0,0 +1,4 @@ +--- +vpc_name: '{{ resource_prefix }}-vpc' +vpc_seed: '{{ resource_prefix }}' +vpc_cidr: '10.{{ 256 | random(seed=vpc_seed) }}.0.0/16' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_igw/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_igw/tasks/main.yml new file mode 100644 index 00000000..634438c0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_igw/tasks/main.yml @@ -0,0 +1,429 @@ +--- +- name: ec2_vpc_igw tests + collections: + - amazon.aws + + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + block: + # ============================================================ + - name: Fetch IGWs in check_mode + ec2_vpc_igw_info: + register: igw_info + check_mode: True + + - name: Assert success + assert: + that: + - igw_info is successful + - '"internet_gateways" in igw_info' + + # ============================================================ + - name: create a VPC + ec2_vpc_net: + name: "{{ vpc_name }}" + state: present + cidr_block: "{{ vpc_cidr }}" + tags: + Name: "{{ resource_prefix }}-vpc" + Description: "Created by ansible-test" + register: vpc_result + + - name: Assert success + assert: + that: + - vpc_result is successful + + # ============================================================ + - name: Search for internet gateway by VPC - no matches + ec2_vpc_igw_info: + filters: + attachment.vpc-id: '{{ vpc_result.vpc.id }}' + register: igw_info + + - name: Assert success + assert: + that: + - igw_info is successful + - '"internet_gateways" in igw_info' + + # ============================================================ + - name: create internet gateway (expected changed=true) - CHECK_MODE + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + tags: + tag_one: '{{ resource_prefix }} One' + "Tag Two": 'two {{ resource_prefix }}' + register: vpc_igw_create + check_mode: yes + + - name: assert creation would happen (expected changed=true) - CHECK_MODE + assert: + that: + - vpc_igw_create is changed + + - name: create internet gateway (expected changed=true) + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + tags: + tag_one: '{{ resource_prefix }} One' + "Tag Two": 'two {{ resource_prefix }}' + register: vpc_igw_create + + - name: assert creation happened (expected changed=true) + assert: + that: + - vpc_igw_create is changed + - 'vpc_igw_create.gateway_id.startswith("igw-")' + - 'vpc_igw_create.vpc_id == vpc_result.vpc.id' + - '"tags" in vpc_igw_create' + - vpc_igw_create.tags | length == 2 + - vpc_igw_create.tags["tag_one"] == '{{ resource_prefix }} One' + - vpc_igw_create.tags["Tag Two"] == 'two {{ resource_prefix }}' + - '"gateway_id" in vpc_igw_create' + + # ============================================================ + - name: Save IDs for later + set_fact: + igw_id: '{{ vpc_igw_create.gateway_id }}' + vpc_id: '{{ vpc_result.vpc.id }}' + + # ============================================================ + - name: Search for internet gateway by VPC + ec2_vpc_igw_info: + filters: + attachment.vpc-id: '{{ vpc_id }}' + register: igw_info + + - name: 'Check standard IGW details' + assert: + that: + - '"internet_gateways" in igw_info' + - igw_info.internet_gateways | length == 1 + - '"attachments" in current_igw' + - current_igw.attachments | length == 1 + - '"state" in current_igw.attachments[0]' + - current_igw.attachments[0].state == "available" + - '"vpc_id" in current_igw.attachments[0]' + - current_igw.attachments[0].vpc_id == vpc_id + - '"internet_gateway_id" in current_igw' + - current_igw.internet_gateway_id == igw_id + - '"tags" in current_igw' + - current_igw.tags | length == 2 + - '"key" in current_igw.tags[0]' + - '"value" in current_igw.tags[0]' + - '"key" in current_igw.tags[1]' + - '"value" in current_igw.tags[1]' + # Order isn't guaranteed in boto3 style, so just check the keys and + # values we expect are in there. + - current_igw.tags[0].key in ["tag_one", "Tag Two"] + - current_igw.tags[1].key in ["tag_one", "Tag Two"] + - current_igw.tags[0].value in [resource_prefix + " One", "two " + resource_prefix] + - current_igw.tags[1].value in [resource_prefix + " One", "two " + resource_prefix] + vars: + current_igw: '{{ igw_info.internet_gateways[0] }}' + + # ============================================================ + - name: Fetch IGW by ID + ec2_vpc_igw_info: + internet_gateway_ids: '{{ igw_id }}' + convert_tags: yes + register: igw_info + + - name: 'Check standard IGW details' + assert: + that: + - '"internet_gateways" in igw_info' + - igw_info.internet_gateways | length == 1 + - '"attachments" in current_igw' + - current_igw.attachments | length == 1 + - '"state" in current_igw.attachments[0]' + - current_igw.attachments[0].state == "available" + - '"vpc_id" in current_igw.attachments[0]' + - current_igw.attachments[0].vpc_id == vpc_id + - '"internet_gateway_id" in current_igw' + - current_igw.internet_gateway_id == igw_id + - '"tags" in current_igw' + - current_igw.tags | length == 2 + - '"tag_one" in current_igw.tags' + - '"Tag Two" in current_igw.tags' + - current_igw.tags["tag_one"] == '{{ resource_prefix }} One' + - current_igw.tags["Tag Two"] == 'two {{ resource_prefix }}' + vars: + current_igw: '{{ igw_info.internet_gateways[0] }}' + + # ============================================================ + - name: Fetch IGW by ID (list) + ec2_vpc_igw_info: + internet_gateway_ids: + - '{{ igw_id }}' + register: igw_info + + - name: 'Check standard IGW details' + assert: + that: + - '"internet_gateways" in igw_info' + - igw_info.internet_gateways | length == 1 + - '"attachments" in current_igw' + - current_igw.attachments | length == 1 + - '"state" in current_igw.attachments[0]' + - current_igw.attachments[0].state == "available" + - '"vpc_id" in current_igw.attachments[0]' + - current_igw.attachments[0].vpc_id == vpc_id + - '"internet_gateway_id" in current_igw' + - current_igw.internet_gateway_id == igw_id + - '"tags" in current_igw' + vars: + current_igw: '{{ igw_info.internet_gateways[0] }}' + + # ============================================================ + - name: attempt to recreate internet gateway on VPC (expected changed=false) - CHECK_MODE + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + register: vpc_igw_recreate + check_mode: yes + + - name: assert recreation would do nothing (expected changed=false) - CHECK_MODE + assert: + that: + - vpc_igw_recreate is not changed + + - name: attempt to recreate internet gateway on VPC (expected changed=false) + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + register: vpc_igw_recreate + + - name: assert recreation did nothing (expected changed=false) + assert: + that: + - vpc_igw_recreate is not changed + - vpc_igw_recreate.gateway_id == igw_id + - vpc_igw_recreate.vpc_id == vpc_id + - '"tags" in vpc_igw_create' + - vpc_igw_create.tags | length == 2 + - vpc_igw_create.tags["tag_one"] == '{{ resource_prefix }} One' + - vpc_igw_create.tags["Tag Two"] == 'two {{ resource_prefix }}' + + # ============================================================ + - name: Update the tags (no change) - CHECK_MODE + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + tags: + tag_one: '{{ resource_prefix }} One' + "Tag Two": 'two {{ resource_prefix }}' + register: vpc_igw_recreate + check_mode: yes + + - name: assert tag update would do nothing (expected changed=false) - CHECK_MODE + assert: + that: + - vpc_igw_recreate is not changed + + - name: Update the tags (no change) + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + tags: + tag_one: '{{ resource_prefix }} One' + "Tag Two": 'two {{ resource_prefix }}' + register: vpc_igw_recreate + + - name: assert tag update did nothing (expected changed=false) + assert: + that: + - vpc_igw_recreate is not changed + - vpc_igw_recreate.gateway_id == igw_id + - vpc_igw_recreate.vpc_id == vpc_id + - '"tags" in vpc_igw_recreate' + - vpc_igw_recreate.tags | length == 2 + - vpc_igw_recreate.tags["tag_one"] == '{{ resource_prefix }} One' + - vpc_igw_recreate.tags["Tag Two"] == 'two {{ resource_prefix }}' + + # ============================================================ + - name: Update the tags - remove and add - CHECK_MODE + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + tags: + tag_three: '{{ resource_prefix }} Three' + "Tag Two": 'two {{ resource_prefix }}' + register: vpc_igw_update + check_mode: yes + + - name: assert tag update would happen (expected changed=true) - CHECK_MODE + assert: + that: + - vpc_igw_update is changed + + - name: Update the tags - remove and add + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + tags: + tag_three: '{{ resource_prefix }} Three' + "Tag Two": 'two {{ resource_prefix }}' + register: vpc_igw_update + + - name: assert tags are updated (expected changed=true) + assert: + that: + - vpc_igw_update is changed + - vpc_igw_update.gateway_id == igw_id + - vpc_igw_update.vpc_id == vpc_id + - '"tags" in vpc_igw_update' + - vpc_igw_update.tags | length == 2 + - vpc_igw_update.tags["tag_three"] == '{{ resource_prefix }} Three' + - vpc_igw_update.tags["Tag Two"] == 'two {{ resource_prefix }}' + + # ============================================================ + - name: Update the tags add without purge - CHECK_MODE + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + purge_tags: no + tags: + tag_one: '{{ resource_prefix }} One' + register: vpc_igw_update + check_mode: yes + + - name: assert tags would be added - CHECK_MODE + assert: + that: + - vpc_igw_update is changed + + - name: Update the tags add without purge + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + purge_tags: no + tags: + tag_one: '{{ resource_prefix }} One' + register: vpc_igw_update + + - name: assert tags added + assert: + that: + - vpc_igw_update is changed + - vpc_igw_update.gateway_id == igw_id + - vpc_igw_update.vpc_id == vpc_id + - '"tags" in vpc_igw_update' + - vpc_igw_update.tags | length == 3 + - vpc_igw_update.tags["tag_one"] == '{{ resource_prefix }} One' + - vpc_igw_update.tags["tag_three"] == '{{ resource_prefix }} Three' + - vpc_igw_update.tags["Tag Two"] == 'two {{ resource_prefix }}' + + # ============================================================ + - name: Remove all tags - CHECK_MODE + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + tags: {} + register: vpc_igw_update + check_mode: yes + + - name: assert tags would be removed - CHECK_MODE + assert: + that: + - vpc_igw_update is changed + + - name: Remove all tags + ec2_vpc_igw: + state: present + vpc_id: "{{ vpc_result.vpc.id }}" + tags: {} + register: vpc_igw_update + + - name: assert tags removed + assert: + that: + - vpc_igw_update is changed + - vpc_igw_update.gateway_id == igw_id + - vpc_igw_update.vpc_id == vpc_id + - '"tags" in vpc_igw_update' + - vpc_igw_update.tags | length == 0 + + # ============================================================ + - name: test state=absent (expected changed=true) - CHECK_MODE + ec2_vpc_igw: + state: absent + vpc_id: "{{ vpc_result.vpc.id }}" + register: vpc_igw_delete + check_mode: yes + + - name: assert state=absent (expected changed=true) - CHECK_MODE + assert: + that: + - vpc_igw_delete is changed + + - name: test state=absent (expected changed=true) + ec2_vpc_igw: + state: absent + vpc_id: "{{ vpc_result.vpc.id }}" + register: vpc_igw_delete + + - name: assert state=absent (expected changed=true) + assert: + that: + - vpc_igw_delete is changed + + # ============================================================ + - name: Fetch IGW by ID (list) + ec2_vpc_igw_info: + internet_gateway_ids: + - '{{ igw_id }}' + register: igw_info + ignore_errors: True + + - name: 'Check IGW does not exist' + assert: + that: + # Deliberate choice not to change bevahiour when searching by ID + - igw_info is failed + + # ============================================================ + - name: test state=absent when already deleted (expected changed=false) - CHECK_MODE + ec2_vpc_igw: + state: absent + vpc_id: "{{ vpc_result.vpc.id }}" + register: vpc_igw_delete + check_mode: yes + + - name: assert state=absent (expected changed=false) - CHECK_MODE + assert: + that: + - vpc_igw_delete is not changed + + - name: test state=absent when already deleted (expected changed=false) + ec2_vpc_igw: + state: absent + vpc_id: "{{ vpc_result.vpc.id }}" + register: vpc_igw_delete + + - name: assert state=absent (expected changed=false) + assert: + that: + - vpc_igw_delete is not changed + + always: + # ============================================================ + - name: tidy up IGW + ec2_vpc_igw: + state: absent + vpc_id: "{{ vpc_result.vpc.id }}" + ignore_errors: true + + - name: tidy up VPC + ec2_vpc_net: + name: "{{ vpc_name }}" + state: absent + cidr_block: "{{ vpc_cidr }}" + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/aliases new file mode 100644 index 00000000..d82d1f9e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/aliases @@ -0,0 +1,5 @@ +ec2_vpc_nacl_info +cloud/aws +shippable/aws/group2 +# https://github.com/ansible-collections/community.aws/issues/153 +unstable diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/ingress_and_egress.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/ingress_and_egress.yml new file mode 100644 index 00000000..4eb60791 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/ingress_and_egress.yml @@ -0,0 +1,162 @@ +# ============================================================ + +- name: create ingress and egress rules using subnet IDs + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_ids }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + state: 'present' + register: nacl + +- name: assert the network acl was created + assert: + that: + - nacl.changed + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl.nacl_id }}" + register: nacl_facts + +- name: assert the nacl has the correct attributes + assert: + that: + - nacl_facts.nacls | length == 1 + - nacl_facts.nacls[0].ingress | length == 3 + - nacl_facts.nacls[0].egress | length == 1 + +# ============================================================ + +- name: remove an ingress rule + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_ids }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + state: 'present' + register: nacl + +- name: assert the network acl changed + assert: + that: + - nacl.changed + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl.nacl_id }}" + register: nacl_facts + +- name: assert the nacl has the correct attributes + assert: + that: + - nacl_facts.nacls | length == 1 + - nacl_facts.nacls[0].ingress | length == 2 + - nacl_facts.nacls[0].egress | length == 1 + +# ============================================================ + +- name: remove the egress rule + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_ids }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + egress: [] + state: 'present' + register: nacl + +- name: assert the network acl changed + assert: + that: + - nacl.changed + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl.nacl_id }}" + register: nacl_facts + +- name: assert the nacl has the correct attributes + assert: + that: + - nacl_facts.nacls | length == 1 + - nacl_facts.nacls[0].ingress | length == 2 + - nacl_facts.nacls[0].egress | length == 0 + +# ============================================================ + +- name: add egress rules + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_ids }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + egress: + - [100, 'tcp', 'allow', '10.0.0.0/24', null, null, 22, 22] + - [200, 'udp', 'allow', '10.0.0.0/24', null, null, 22, 22] + state: 'present' + register: nacl + +- name: assert the network acl changed + assert: + that: + - nacl.changed + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl.nacl_id }}" + register: nacl_facts + +- name: assert the nacl has the correct attributes + assert: + that: + - nacl_facts.nacls | length == 1 + - nacl_facts.nacls[0].ingress | length == 2 + - nacl_facts.nacls[0].egress | length == 2 + +# ============================================================ + +- name: remove the network ACL + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + state: absent + register: nacl + until: nacl is success + ignore_errors: yes + retries: 5 + delay: 5 + +- name: assert nacl was removed + assert: + that: + - nacl.changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/ipv6.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/ipv6.yml new file mode 100644 index 00000000..16b3a5aa --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/ipv6.yml @@ -0,0 +1,178 @@ +- block: + - name: create a VPC + ec2_vpc_net: + cidr_block: 10.230.231.0/24 + name: "{{ resource_prefix }}-ipv6" + state: present + ipv6_cidr: yes + register: vpc_result + + - set_fact: + vpc_ipv6_cidr: "{{ vpc_result.vpc.ipv6_cidr_block_association_set[0].ipv6_cidr_block }}" + + # ============================================================ + - name: create subnet with IPv6 (expected changed=true) + ec2_vpc_subnet: + cidr: 10.230.231.0/26 + vpc_id: "{{ vpc_result.vpc.id }}" + ipv6_cidr: "{{ vpc_ipv6_cidr | regex_replace('::/56', '::/64') }}" + state: present + tags: + Name: "{{ resource_prefix }}-ipv6-subnet-1" + register: vpc_subnet_ipv6 + + - name: assert creation with IPv6 happened (expected changed=true) + assert: + that: + - "vpc_subnet_ipv6.subnet.ipv6_cidr_block == '{{ vpc_ipv6_cidr | regex_replace('::/56', '::/64') }}'" + + # ============================================================ + + - name: create ingress and egress rules using subnet names + ec2_vpc_nacl: + vpc_id: "{{ vpc_result.vpc.id }}" + name: "{{ resource_prefix }}-acl" + subnets: + - "{{ resource_prefix }}-ipv6-subnet-1" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + state: 'present' + register: nacl + - assert: + that: + - nacl.nacl_id + + - set_fact: + nacl_id: "{{ nacl.nacl_id }}" + + - name: add ipv6 entries + ec2_vpc_nacl: + vpc_id: "{{ vpc_result.vpc.id }}" + name: "{{ resource_prefix }}-acl" + subnets: + - "{{ resource_prefix }}-ipv6-subnet-1" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + - [205, 'ipv6-tcp', 'allow', '::/0', null, null, 80, 80] + - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] + - [305, 'ipv6-icmp', 'allow', '::/0', 0, 8] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + - [105, 'all', 'allow', '::/0', null, null, null, null] + state: 'present' + register: nacl + # FIXME: Currently IPv6 rules are not supported - uncomment assertion when + # fixed (and add some nacl_info tests) + ignore_errors: yes + - name: get network ACL facts (test that it works with ipv6 entries) + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl_id }}" + register: nacl_facts + + + #- assert: + # that: + # - nacl.changed + # - nacl.nacl_id == nacl_id + + - name: purge ingress entries + ec2_vpc_nacl: + vpc_id: "{{ vpc_result.vpc.id }}" + name: "{{ resource_prefix }}-acl" + subnets: + - "{{ resource_prefix }}-ipv6-subnet-1" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: [] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + - [105, 'all', 'allow', '::/0', null, null, null, null] + state: 'present' + register: nacl + # FIXME: Currently IPv6 rules are not supported - uncomment assertion when + # fixed (and add some nacl_info tests) + ignore_errors: yes + + #- assert: + # that: + # - nacl.changed + # - nacl.nacl_id == nacl_id + + - name: purge egress entries + ec2_vpc_nacl: + vpc_id: "{{ vpc_result.vpc.id }}" + name: "{{ resource_prefix }}-acl" + subnets: + - "{{ resource_prefix }}-ipv6-subnet-1" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: [] + egress: [] + state: 'present' + register: nacl + + - assert: + that: + - nacl.changed + + # ============================================================ + - name: remove subnet ipv6 cidr (expected changed=true) + ec2_vpc_subnet: + cidr: 10.230.231.0/26 + vpc_id: "{{ vpc_result.vpc.id }}" + state: absent + register: vpc_remove_ipv6_cidr + + - name: assert subnet ipv6 cidr removed (expected changed=true) + assert: + that: + - 'vpc_remove_ipv6_cidr.changed' + + always: + + ################################################ + # TEARDOWN STARTS HERE + ################################################ + + - name: remove network ACL + ec2_vpc_nacl: + vpc_id: "{{ vpc_result.vpc.id }}" + name: "{{ resource_prefix }}-acl" + state: absent + register: removed_acl + until: removed_acl is success + retries: 5 + delay: 5 + ignore_errors: yes + + - name: tidy up subnet + ec2_vpc_subnet: + cidr: 10.230.231.0/26 + vpc_id: "{{ vpc_result.vpc.id }}" + state: absent + register: removed_subnet + until: removed_subnet is success + retries: 5 + delay: 5 + ignore_errors: yes + + - name: tidy up VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-ipv6" + state: absent + cidr_block: 10.230.231.0/24 + register: removed_vpc + until: removed_vpc is success + retries: 5 + delay: 5 + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/main.yml new file mode 100644 index 00000000..7be79895 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/main.yml @@ -0,0 +1,172 @@ +--- +- module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + block: + + # ============================================================ + + - name: test without any parameters + ec2_vpc_nacl: + register: result + ignore_errors: yes + + - name: assert required parameters + assert: + that: + - result.failed + - "result.msg == 'one of the following is required: name, nacl_id'" + + - name: get network ACL info without any parameters + ec2_vpc_nacl_info: + register: nacl_facts + + - name: assert we don't error + assert: + that: + - nacl_facts is succeeded + + - name: get network ACL info with invalid ID + ec2_vpc_nacl_info: + nacl_ids: + - 'acl-000000000000' + register: nacl_facts + ignore_errors: yes + + - name: assert message mentions missing ACLs + assert: + that: + - nacl_facts is failed + - '"does not exist" in nacl_facts.msg' + + # ============================================================ + + - name: fetch AZ availability + aws_az_info: + register: az_info + + - name: Assert that we have multiple AZs available to us + assert: + that: az_info.availability_zones | length >= 2 + + - name: pick AZs + set_fact: + az_one: '{{ az_info.availability_zones[0].zone_name }}' + az_two: '{{ az_info.availability_zones[1].zone_name }}' + + # ============================================================ + + - name: create a VPC + ec2_vpc_net: + cidr_block: 10.230.230.0/24 + name: "{{ resource_prefix }}" + state: present + register: vpc + + - name: create subnets + ec2_vpc_subnet: + cidr: "{{ item.cidr }}" + az: "{{ item.az }}" + vpc_id: "{{ vpc.vpc.id }}" + state: present + tags: + Name: "{{ item.name }}" + with_items: + - cidr: 10.230.230.0/26 + az: "{{ az_one }}" + name: "{{ resource_prefix }}-subnet-1" + - cidr: 10.230.230.64/26 + az: "{{ az_two }}" + name: "{{ resource_prefix }}-subnet-2" + - cidr: 10.230.230.128/26 + az: "{{ az_one }}" + name: "{{ resource_prefix }}-subnet-3" + - cidr: 10.230.230.192/26 + az: "{{ az_two }}" + name: "{{ resource_prefix }}-subnet-4" + register: subnets + + # ============================================================ + + - include_tasks: tasks/subnet_ids.yml + vars: + vpc_id: "{{ vpc.vpc.id }}" + subnet_ids: "{{ subnets | community.general.json_query('results[*].subnet.id') }}" + + - include_tasks: tasks/subnet_names.yml + vars: + vpc_id: "{{ vpc.vpc.id }}" + subnet_names: "{{ subnets | community.general.json_query('results[*].subnet.tags.Name') }}" + + - include_tasks: tasks/tags.yml + vars: + vpc_id: "{{ vpc.vpc.id }}" + subnet_ids: "{{ subnets | community.general.json_query('results[*].subnet.id') }}" + + - include_tasks: tasks/ingress_and_egress.yml + vars: + vpc_id: "{{ vpc.vpc.id }}" + subnet_ids: "{{ subnets | community.general.json_query('results[*].subnet.id') }}" + + - include_tasks: tasks/ipv6.yml + + # ============================================================ + + always: + + - name: remove network ACL + ec2_vpc_nacl: + vpc_id: "{{ vpc.vpc.id }}" + name: "{{ resource_prefix }}-acl" + state: absent + register: removed_acl + until: removed_acl is success + retries: 5 + delay: 5 + ignore_errors: yes + + - name: remove subnets + ec2_vpc_subnet: + cidr: "{{ item.cidr }}" + az: "{{ aws_region}}{{ item.az }}" + vpc_id: "{{ vpc.vpc.id }}" + state: absent + tags: + Public: "{{ item.public | string }}" + Name: "{{ item.public | ternary('public', 'private') }}-{{ item.az }}" + with_items: + - cidr: 10.230.230.0/26 + az: "a" + public: "True" + - cidr: 10.230.230.64/26 + az: "b" + public: "True" + - cidr: 10.230.230.128/26 + az: "a" + public: "False" + - cidr: 10.230.230.192/26 + az: "b" + public: "False" + ignore_errors: yes + register: removed_subnets + until: removed_subnets is success + retries: 5 + delay: 5 + + - name: remove the VPC + ec2_vpc_net: + cidr_block: 10.230.230.0/24 + name: "{{ resource_prefix }}" + state: absent + ignore_errors: yes + register: removed_vpc + until: removed_vpc is success + retries: 5 + delay: 5 + + # ============================================================ diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_ids.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_ids.yml new file mode 100644 index 00000000..de371d62 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_ids.yml @@ -0,0 +1,174 @@ +# ============================================================ + +- name: create ingress and egress rules using subnet IDs + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_ids }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + state: 'present' + register: nacl + +- set_fact: + nacl_id: "{{ nacl.nacl_id }}" + +- name: assert the network acl was created + assert: + that: + - nacl.changed + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl_id }}" + register: nacl_facts + +- name: assert the nacl has the correct attributes + assert: + that: + - nacl_facts.nacls | length == 1 + - nacl_facts.nacls[0].nacl_id == nacl_id + - nacl_facts.nacls[0].subnets | length == 4 + - nacl_facts.nacls[0].subnets | sort == subnet_ids | sort + - nacl_facts.nacls[0].ingress | length == 3 + - nacl_facts.nacls[0].egress | length == 1 + - "'{{ nacl_facts.nacls[0].tags.Name }}' == '{{ resource_prefix }}-acl'" + +# ============================================================ + +- name: test idempotence + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_ids }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + state: 'present' + register: nacl + +- name: assert the network acl already existed + assert: + that: + - not nacl.changed + - nacl.nacl_id == nacl_id + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl.nacl_id }}" + register: nacl_facts_idem + +- name: assert the facts are the same as before + assert: + that: + - nacl_facts_idem == nacl_facts + +# ============================================================ + +- name: remove a subnet from the network ACL + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: + - "{{ subnet_ids[0] }}" + - "{{ subnet_ids[1] }}" + - "{{ subnet_ids[2] }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + state: 'present' + register: nacl + +- name: assert the network ACL changed + assert: + that: + - nacl.changed + - nacl.nacl_id.startswith('acl-') + - nacl.nacl_id == nacl_id + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_id: + - "{{ nacl.nacl_id }}" + register: nacl_facts + +- name: assert the nacl has the correct attributes + assert: + that: + - nacl_facts.nacls | length == 1 + - nacl_facts.nacls[0].nacl_id == nacl_id + - nacl_facts.nacls[0].subnets | length == 3 + - subnet_ids[3] not in nacl_facts.nacls[0].subnets + - nacl_facts.nacls[0].ingress | length == 3 + - nacl_facts.nacls[0].egress | length == 1 + - "'{{ nacl_facts.nacls[0].tags.Name }}' == '{{ resource_prefix }}-acl'" + +# ============================================================ + +- name: remove the network ACL + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + state: absent + register: nacl + until: nacl is success + ignore_errors: yes + retries: 5 + delay: 5 + +- name: assert nacl was removed + assert: + that: + - nacl.changed + +- name: re-remove the network ACL by name (test idempotency) + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + state: absent + register: nacl + until: nacl is success + ignore_errors: yes + retries: 5 + delay: 5 + +- name: assert nacl was removed + assert: + that: + - nacl is not changed + +- name: re-remove the network ACL by id (test idempotency) + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + nacl_id: "{{ nacl_id }}" + state: absent + register: nacl + until: nacl is success + ignore_errors: yes + retries: 5 + delay: 5 + +- name: assert nacl was removed + assert: + that: + - nacl is not changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_names.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_names.yml new file mode 100644 index 00000000..5a4db04d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/subnet_names.yml @@ -0,0 +1,140 @@ +# ============================================================ + +- name: create ingress and egress rules using subnet names + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_names }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + state: 'present' + register: nacl + +- set_fact: + nacl_id: "{{ nacl.nacl_id }}" + +- name: assert the network acl was created + assert: + that: + - nacl.changed + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl_id }}" + register: nacl_facts + +- name: assert the nacl has the correct attributes + assert: + that: + - nacl_facts.nacls | length == 1 + - nacl_facts.nacls[0].nacl_id == nacl_id + - nacl_facts.nacls[0].subnets | length == 4 + - nacl_facts.nacls[0].ingress | length == 3 + - nacl_facts.nacls[0].egress | length == 1 + - "'{{ nacl_facts.nacls[0].tags.Name }}' == '{{ resource_prefix }}-acl'" + +# ============================================================ + +- name: test idempotence + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_names }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + state: 'present' + register: nacl + +- name: assert the network acl already existed + assert: + that: + - not nacl.changed + - nacl.nacl_id == nacl_id + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl.nacl_id }}" + register: nacl_facts_idem + +- name: assert the facts are the same as before + assert: + that: + - nacl_facts_idem == nacl_facts + +# ============================================================ + +- name: remove a subnet from the network ACL + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: + - "{{ subnet_names[0] }}" + - "{{ subnet_names[1] }}" + - "{{ subnet_names[2] }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + ingress: + - [100, 'tcp', 'allow', '0.0.0.0/0', null, null, 22, 22] + - [200, 'tcp', 'allow', '0.0.0.0/0', null, null, 80, 80] + - [300, 'icmp', 'allow', '0.0.0.0/0', 0, 8] + egress: + - [100, 'all', 'allow', '0.0.0.0/0', null, null, null, null] + state: 'present' + register: nacl + +- name: assert the network ACL changed + assert: + that: + - nacl.changed + - nacl.nacl_id == nacl_id + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl.nacl_id }}" + register: nacl_facts + +- name: assert the nacl has the correct attributes + assert: + that: + - nacl_facts.nacls | length == 1 + - nacl_facts.nacls[0].nacl_id == nacl_id + - nacl_facts.nacls[0].subnets | length == 3 + - nacl_facts.nacls[0].ingress | length == 3 + - nacl_facts.nacls[0].egress | length == 1 + - "'{{ nacl_facts.nacls[0].tags.Name }}' == '{{ resource_prefix }}-acl'" + +# ============================================================ + +- name: remove the network ACL + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + state: absent + register: nacl + until: nacl is success + ignore_errors: yes + retries: 5 + delay: 5 + +- name: assert nacl was removed + assert: + that: + - nacl.changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/tags.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/tags.yml new file mode 100644 index 00000000..f7847850 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nacl/tasks/tags.yml @@ -0,0 +1,117 @@ +# ============================================================ + +- name: create a network ACL using subnet IDs + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_ids }}" + state: 'present' + register: nacl + +- name: assert the network acl was created + assert: + that: + - nacl.changed + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl.nacl_id }}" + register: nacl_facts + +- name: assert the nacl has the correct attributes + assert: + that: + - nacl_facts.nacls[0].tags | length == 1 + - "'{{ nacl_facts.nacls[0].tags.Name }}' == '{{ resource_prefix }}-acl'" + +# ============================================================ + +- name: add a tag + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_ids }}" + tags: + Created_by: "Ansible test {{ resource_prefix }}" + state: 'present' + register: nacl + +- name: assert the network acl changed + assert: + that: + - nacl.changed + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl.nacl_id }}" + register: nacl_facts + +- name: assert the facts are the same as before + assert: + that: + - nacl_facts.nacls[0].tags | length == 2 + - "'{{ nacl_facts.nacls[0].tags.Name }}' == '{{ resource_prefix }}-acl'" + - "'{{ nacl_facts.nacls[0].tags.Created_by }}' == 'Ansible test {{ resource_prefix }}'" + +- name: get network ACL facts by filter + ec2_vpc_nacl_info: + filters: + "tag:Created_by": "Ansible test {{ resource_prefix }}" + register: nacl_facts + +- name: assert the facts are the same as before + assert: + that: + - nacl_facts.nacls | length == 1 + - nacl_facts.nacls[0].tags | length == 2 + - "'{{ nacl_facts.nacls[0].tags.Name }}' == '{{ resource_prefix }}-acl'" + - "'{{ nacl_facts.nacls[0].tags.Created_by }}' == 'Ansible test {{ resource_prefix }}'" + +# ============================================================ + +- name: remove a tag + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + subnets: "{{ subnet_ids }}" + state: 'present' + register: nacl + +- name: assert the network acl was created + assert: + that: + - nacl.changed + - nacl.nacl_id.startswith('acl-') + +- name: get network ACL facts + ec2_vpc_nacl_info: + nacl_ids: + - "{{ nacl.nacl_id }}" + register: nacl_facts + +- name: assert the nacl has the correct attributes + assert: + that: + - nacl_facts.nacls[0].tags | length == 1 + - "'{{ nacl_facts.nacls[0].tags.Name }}' == '{{ resource_prefix }}-acl'" + +# ============================================================ + +- name: remove the network ACL + ec2_vpc_nacl: + vpc_id: "{{ vpc_id }}" + name: "{{ resource_prefix }}-acl" + state: absent + register: nacl + until: nacl is success + ignore_errors: yes + retries: 5 + delay: 5 + +- name: assert nacl was removed + assert: + that: + - nacl.changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nat_gateway/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nat_gateway/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nat_gateway/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nat_gateway/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nat_gateway/tasks/main.yml new file mode 100644 index 00000000..7cb7e986 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_nat_gateway/tasks/main.yml @@ -0,0 +1,82 @@ +# The tests for this module are incomplete. +# The tests below were migrated from unit tests. +# They take advantage of hard-coded results within the module to trigger both changed and unchanged responses. +# They were migrated to maintain test coverage while removing unit tests that depended on use of TaskQueueManager. + +- name: Create new nat gateway with eip allocation-id + ec2_vpc_nat_gateway: + subnet_id: subnet-12345678 + allocation_id: eipalloc-12345678 + wait: yes + region: us-west-2 + register: nat_gateway + check_mode: yes + +- assert: + that: + - nat_gateway.changed + +- name: Create new nat gateway with eip allocation-id + ec2_vpc_nat_gateway: + subnet_id: subnet-123456789 + allocation_id: eipalloc-1234567 + wait: yes + region: us-west-2 + register: nat_gateway + check_mode: yes + +- assert: + that: + - not nat_gateway.changed + +- name: Create new nat gateway with eip address + ec2_vpc_nat_gateway: + subnet_id: subnet-12345678 + eip_address: 55.55.55.55 + wait: yes + region: us-west-2 + register: nat_gateway + check_mode: yes + +- assert: + that: + - nat_gateway.changed + +- name: Create new nat gateway with eip address + ec2_vpc_nat_gateway: + subnet_id: subnet-123456789 + eip_address: 55.55.55.55 + wait: yes + region: us-west-2 + register: nat_gateway + check_mode: yes + +- assert: + that: + - not nat_gateway.changed + +- name: Create new nat gateway only if one does not exist already + ec2_vpc_nat_gateway: + if_exist_do_not_create: yes + subnet_id: subnet-123456789 + wait: yes + region: us-west-2 + register: nat_gateway + check_mode: yes + +- assert: + that: + - not nat_gateway.changed + +- name: Delete Nat Gateway + ec2_vpc_nat_gateway: + nat_gateway_id: nat-123456789 + state: absent + wait: yes + region: us-west-2 + register: nat_gateway + check_mode: yes + +- assert: + that: + - nat_gateway.changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_route_table/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_route_table/aliases new file mode 100644 index 00000000..e4da78b0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_route_table/aliases @@ -0,0 +1,4 @@ +cloud/aws +shippable/aws/group2 +unstable +ec2_vpc_route_table_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_route_table/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_route_table/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_route_table/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_route_table/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_route_table/tasks/main.yml new file mode 100644 index 00000000..c3e4daf0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_route_table/tasks/main.yml @@ -0,0 +1,761 @@ +- name: ec2_vpc_net tests + collections: + - amazon.aws + + block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: create VPC + ec2_vpc_net: + cidr_block: 10.228.228.0/22 + name: "{{ resource_prefix }}_vpc" + state: present + <<: *aws_connection_info + register: vpc + + - name: create public subnet + ec2_vpc_subnet: + cidr: "{{ item.cidr }}" + az: "{{ aws_region}}{{ item.az }}" + vpc_id: "{{ vpc.vpc.id }}" + state: present + tags: + Public: "{{ item.public|string }}" + Name: "{{ (item.public|bool)|ternary('public', 'private') }}-{{ item.az }}" + <<: *aws_connection_info + with_items: + - cidr: 10.228.228.0/24 + az: "a" + public: "True" + - cidr: 10.228.229.0/24 + az: "b" + public: "True" + - cidr: 10.228.230.0/24 + az: "a" + public: "False" + - cidr: 10.228.231.0/24 + az: "b" + public: "False" + register: subnets + + - ec2_vpc_subnet_info: + filters: + vpc-id: "{{ vpc.vpc.id }}" + <<: *aws_connection_info + register: vpc_subnets + + - name: create IGW + ec2_vpc_igw: + vpc_id: "{{ vpc.vpc.id }}" + <<: *aws_connection_info + + - name: create NAT GW + ec2_vpc_nat_gateway: + if_exist_do_not_create: yes + wait: yes + subnet_id: "{{ subnets.results[0].subnet.id }}" + <<: *aws_connection_info + register: nat_gateway + + - name: CHECK MODE - route table should be created + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + <<: *aws_connection_info + check_mode: true + register: check_mode_results + + - name: assert that the public route table would be created + assert: + that: + - check_mode_results.changed + + - name: create public route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + <<: *aws_connection_info + register: create_public_table + + - name: assert that public route table has an id + assert: + that: + # - create_public_table.changed + - "create_public_table.route_table.id.startswith('rtb-')" + - "'Public' in create_public_table.route_table.tags and create_public_table.route_table.tags['Public'] == 'true'" + - create_public_table.route_table.routes|length == 1 + - create_public_table.route_table.associations|length == 0 + + - name: CHECK MODE - route table should already exist + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + <<: *aws_connection_info + check_mode: True + register: check_mode_results + + - name: assert the table already exists + assert: + that: + - not check_mode_results.changed + + - name: recreate public route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + <<: *aws_connection_info + register: recreate_public_route_table + + - name: assert that public route table did not change + assert: + that: + - not recreate_public_route_table.changed + + - name: CHECK MODE - add route to public route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + <<: *aws_connection_info + check_mode: True + register: check_mode_results + + - name: assert a route would be added + assert: + that: + - check_mode_results.changed + + - name: add a route to public route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + <<: *aws_connection_info + register: add_routes + + - name: assert route table contains new route + assert: + that: + - add_routes.changed + - add_routes.route_table.routes|length == 2 + + - name: CHECK MODE - add subnets to public route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `True`].id') }}" + <<: *aws_connection_info + check_mode: True + register: check_mode_results + + - name: assert the subnets would be added to the route table + assert: + that: + - check_mode_results.changed + + - name: add subnets to public route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `True`].id') }}" + <<: *aws_connection_info + register: add_subnets + + - name: assert route table contains subnets + assert: + that: + - add_subnets.changed + - add_subnets.route_table.associations|length == 2 + + - name: add a route to public route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + <<: *aws_connection_info + register: add_routes + + - name: CHECK MODE - no routes but purge_routes set to false + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + purge_routes: no + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `True`].id') }}" + <<: *aws_connection_info + check_mode: True + register: check_mode_results + + - name: assert no routes would be removed + assert: + that: + - not check_mode_results.changed + + - name: rerun with purge_routes set to false + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + purge_routes: no + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `True`].id') }}" + <<: *aws_connection_info + register: no_purge_routes + + - name: assert route table still has routes + assert: + that: + - not no_purge_routes.changed + - no_purge_routes.route_table.routes|length == 2 + - no_purge_routes.route_table.associations|length == 2 + + - name: rerun with purge_subnets set to false + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + purge_subnets: no + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + <<: *aws_connection_info + register: no_purge_subnets + + - name: assert route table still has subnets + assert: + that: + - not no_purge_subnets.changed + - no_purge_subnets.route_table.routes|length == 2 + - no_purge_subnets.route_table.associations|length == 2 + + - name: rerun with purge_tags not set (implicitly false) + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + lookup: id + route_table_id: "{{ create_public_table.route_table.id }}" + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `True`].id') }}" + <<: *aws_connection_info + register: no_purge_tags + + - name: assert route table still has tags + assert: + that: + - not no_purge_tags.changed + - "'Public' in no_purge_tags.route_table.tags and no_purge_tags.route_table.tags['Public'] == 'true'" + + - name: CHECK MODE - purge subnets + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + subnets: [] + tags: + Public: "true" + Name: "Public route table" + <<: *aws_connection_info + check_mode: True + register: check_mode_results + + - name: assert subnets would be removed + assert: + that: + - check_mode_results.changed + + - name: purge subnets + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + subnets: [] + tags: + Public: "true" + Name: "Public route table" + <<: *aws_connection_info + register: purge_subnets + + - name: assert purge subnets worked + assert: + that: + - purge_subnets.changed + - purge_subnets.route_table.associations|length == 0 + - purge_subnets.route_table.id == create_public_table.route_table.id + + - name: CHECK MODE - purge routes + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + <<: *aws_connection_info + routes: [] + check_mode: True + register: check_mode_results + + - name: assert routes would be removed + assert: + that: + - check_mode_results.changed + + - name: add subnets by cidr to public route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `True`].cidr_block') }}" + lookup: id + route_table_id: "{{ create_public_table.route_table.id }}" + <<: *aws_connection_info + register: add_subnets_cidr + + - name: assert route table contains subnets added by cidr + assert: + that: + - add_subnets_cidr.changed + - add_subnets_cidr.route_table.associations|length == 2 + + - name: purge subnets added by cidr + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + subnets: [] + lookup: id + route_table_id: "{{ create_public_table.route_table.id }}" + <<: *aws_connection_info + register: purge_subnets_cidr + + - name: assert purge subnets added by cidr worked + assert: + that: + - purge_subnets_cidr.changed + - purge_subnets_cidr.route_table.associations|length == 0 + + - name: add subnets by name to public route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `True`].tags.Name') }}" + lookup: id + route_table_id: "{{ create_public_table.route_table.id }}" + <<: *aws_connection_info + register: add_subnets_name + + - name: assert route table contains subnets added by name + assert: + that: + - add_subnets_name.changed + - add_subnets_name.route_table.associations|length == 2 + + - name: purge subnets added by name + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + routes: + - dest: 0.0.0.0/0 + gateway_id: igw + subnets: [] + lookup: id + route_table_id: "{{ create_public_table.route_table.id }}" + <<: *aws_connection_info + register: purge_subnets_name + + - name: assert purge subnets added by name worked + assert: + that: + - purge_subnets_name.changed + - purge_subnets_name.route_table.associations|length == 0 + + - name: purge routes + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "true" + Name: "Public route table" + <<: *aws_connection_info + routes: [] + register: purge_routes + + - name: assert purge routes worked + assert: + that: + - purge_routes.changed + - purge_routes.route_table.routes|length == 1 + - purge_routes.route_table.id == create_public_table.route_table.id + + - name: CHECK MODE - update tags + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + route_table_id: "{{ create_public_table.route_table.id }}" + lookup: id + purge_tags: yes + tags: + Name: Public route table + Updated: new_tag + <<: *aws_connection_info + check_mode: True + register: check_mode_results + + - name: assert tags would be changed + assert: + that: + - check_mode_results.changed + + - name: update tags + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + route_table_id: "{{ create_public_table.route_table.id }}" + lookup: id + purge_tags: yes + tags: + Name: Public route table + Updated: new_tag + <<: *aws_connection_info + register: update_tags + + - name: assert update tags worked + assert: + that: + - update_tags.changed + - "'Updated' in update_tags.route_table.tags and update_tags.route_table.tags['Updated'] == 'new_tag'" + - "'Public' not in update_tags.route_table.tags" + + - name: create NAT GW + ec2_vpc_nat_gateway: + if_exist_do_not_create: yes + wait: yes + subnet_id: "{{ subnets.results[0].subnet.id }}" + <<: *aws_connection_info + register: nat_gateway + + - name: CHECK MODE - create private route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "false" + Name: "Private route table" + routes: + - gateway_id: "{{ nat_gateway.nat_gateway_id }}" + dest: 0.0.0.0/0 + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `False`].id') }}" + <<: *aws_connection_info + check_mode: True + register: check_mode_results + + - name: assert the route table would be created + assert: + that: + - check_mode_results.changed + + - name: create private route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "false" + Name: "Private route table" + routes: + - gateway_id: "{{ nat_gateway.nat_gateway_id }}" + dest: 0.0.0.0/0 + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `False`].id') }}" + <<: *aws_connection_info + register: create_private_table + + - name: assert creating private route table worked + assert: + that: + - create_private_table.changed + - create_private_table.route_table.id != create_public_table.route_table.id + - "'Public' in create_private_table.route_table.tags" + + - name: CHECK MODE - destroy public route table by tags + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + state: absent + tags: + Updated: new_tag + Name: Public route table + <<: *aws_connection_info + check_mode: True + register: check_mode_results + + - name: assert the route table would be deleted + assert: + that: + check_mode_results.changed + + - name: destroy public route table by tags + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + state: absent + tags: + Updated: new_tag + Name: Public route table + <<: *aws_connection_info + register: destroy_table + + - name: assert destroy table worked + assert: + that: + - destroy_table.changed + + - name: CHECK MODE - redestroy public route table + ec2_vpc_route_table: + route_table_id: "{{ create_public_table.route_table.id }}" + lookup: id + state: absent + <<: *aws_connection_info + check_mode: True + register: check_mode_results + + - name: assert the public route table does not exist + assert: + that: + - not check_mode_results.changed + + - name: redestroy public route table + ec2_vpc_route_table: + route_table_id: "{{ create_public_table.route_table.id }}" + lookup: id + state: absent + <<: *aws_connection_info + register: redestroy_table + + - name: assert redestroy table worked + assert: + that: + - not redestroy_table.changed + + - name: destroy NAT GW + ec2_vpc_nat_gateway: + state: absent + wait: yes + release_eip: yes + subnet_id: "{{ subnets.results[0].subnet.id }}" + nat_gateway_id: "{{ nat_gateway.nat_gateway_id }}" + <<: *aws_connection_info + register: nat_gateway + + - name: show route table info, get table using route-table-id + ec2_vpc_route_table_info: + filters: + route-table-id: "{{ create_private_table.route_table.id }}" + <<: *aws_connection_info + register: route_table_info + + - name: assert route_table_info has correct attributes + assert: + that: + - '"route_tables" in route_table_info' + - 'route_table_info.route_tables | length == 1' + - '"id" in route_table_info.route_tables[0]' + - '"routes" in route_table_info.route_tables[0]' + - '"associations" in route_table_info.route_tables[0]' + - '"tags" in route_table_info.route_tables[0]' + - '"vpc_id" in route_table_info.route_tables[0]' + - 'route_table_info.route_tables[0].id == create_private_table.route_table.id' + + - name: show route table info, get table using tags + ec2_vpc_route_table_info: + filters: + "tag:Public": "false" + "tag:Name": "Private route table" + vpc-id: "{{ vpc.vpc.id }}" + <<: *aws_connection_info + register: route_table_info + + - name: assert route_table_info has correct tags + assert: + that: + - 'route_table_info.route_tables | length == 1' + - '"tags" in route_table_info.route_tables[0]' + - '"Public" in route_table_info.route_tables[0].tags and route_table_info.route_tables[0].tags["Public"] == "false"' + - '"Name" in route_table_info.route_tables[0].tags and route_table_info.route_tables[0].tags["Name"] == "Private route table"' + + - name: create NAT GW + ec2_vpc_nat_gateway: + if_exist_do_not_create: yes + wait: yes + subnet_id: "{{ subnets.results[0].subnet.id }}" + <<: *aws_connection_info + register: nat_gateway + + - name: show route table info + ec2_vpc_route_table_info: + filters: + route-table-id: "{{ create_private_table.route_table.id }}" + <<: *aws_connection_info + + - name: recreate private route table with new NAT GW + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "false" + Name: "Private route table" + routes: + - nat_gateway_id: "{{ nat_gateway.nat_gateway_id }}" + dest: 0.0.0.0/0 + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `False`].id') }}" + <<: *aws_connection_info + register: recreate_private_table + + - name: assert creating private route table worked + assert: + that: + - recreate_private_table.changed + - recreate_private_table.route_table.id != create_public_table.route_table.id + + - name: create a VPC endpoint to test ec2_vpc_route_table ignores it + ec2_vpc_endpoint: + state: present + vpc_id: "{{ vpc.vpc.id }}" + service: "com.amazonaws.{{ aws_region }}.s3" + route_table_ids: + - "{{ recreate_private_table.route_table.route_table_id }}" + <<: *aws_connection_info + register: vpc_endpoint + + - name: purge routes + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Public: "false" + Name: "Private route table" + routes: + - nat_gateway_id: "{{ nat_gateway.nat_gateway_id }}" + dest: 0.0.0.0/0 + subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `False`].id') }}" + purge_routes: true + <<: *aws_connection_info + register: result + + - name: Get endpoint infos to verify that it wasn't purged from the route table + ec2_vpc_endpoint_info: + query: endpoints + vpc_endpoint_ids: + - "{{ vpc_endpoint.result.vpc_endpoint_id }}" + <<: *aws_connection_info + register: endpoint_details + + - name: assert the route table is associated with the VPC endpoint + assert: + that: + - endpoint_details.vpc_endpoints[0].route_table_ids[0] == recreate_private_table.route_table.route_table_id + + always: + ############################################################################# + # TEAR DOWN STARTS HERE + ############################################################################# + - name: remove the VPC endpoint + ec2_vpc_endpoint: + state: absent + vpc_endpoint_id: "{{ vpc_endpoint.result.vpc_endpoint_id }}" + <<: *aws_connection_info + when: vpc_endpoint is defined + ignore_errors: yes + + - name: destroy route tables + ec2_vpc_route_table: + route_table_id: "{{ item.route_table.id }}" + lookup: id + state: absent + <<: *aws_connection_info + with_items: + - "{{ create_public_table|default() }}" + - "{{ create_private_table|default() }}" + when: item and not item.failed + ignore_errors: yes + + - name: destroy NAT GW + ec2_vpc_nat_gateway: + state: absent + wait: yes + release_eip: yes + subnet_id: "{{ subnets.results[0].subnet.id }}" + nat_gateway_id: "{{ nat_gateway.nat_gateway_id }}" + <<: *aws_connection_info + ignore_errors: yes + + - name: destroy IGW + ec2_vpc_igw: + vpc_id: "{{ vpc.vpc.id }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: destroy subnets + ec2_vpc_subnet: + cidr: "{{ item.cidr }}" + vpc_id: "{{ vpc.vpc.id }}" + state: absent + <<: *aws_connection_info + with_items: + - cidr: 10.228.228.0/24 + - cidr: 10.228.229.0/24 + - cidr: 10.228.230.0/24 + - cidr: 10.228.231.0/24 + ignore_errors: yes + + # FIXME: ec2_vpc_nat_gateway should take care of this, but clearly doesn't always + - name: ensure EIP is actually released + ec2_eip: + state: absent + device_id: "{{ item.network_interface_id }}" + in_vpc: yes + <<: *aws_connection_info + with_items: "{{ nat_gateway.nat_gateway_addresses }}" + ignore_errors: yes + + - name: destroy VPC + ec2_vpc_net: + cidr_block: 10.228.228.0/22 + name: "{{ resource_prefix }}_vpc" + state: absent + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vgw/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vgw/aliases new file mode 100644 index 00000000..0b8a330a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vgw/aliases @@ -0,0 +1,4 @@ +cloud/aws +shippable/aws/group2 +# https://github.com/ansible-collections/community.aws/issues/154 +unstable diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vgw/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vgw/tasks/main.yml new file mode 100644 index 00000000..641f6563 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vgw/tasks/main.yml @@ -0,0 +1,174 @@ +--- +- name: ec2_vpc_net tests + collections: + - amazon.aws + block: + + # ============================================================ + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + # ============================================================ + - debug: msg="Setting up test dependencies" + + - name: create a VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc-{{ item }}" + state: present + cidr_block: "10.0.0.0/26" + <<: *aws_connection_info + tags: + Name: "{{ resource_prefix }}-vpc-{{ item }}" + Description: "Created by ansible-test" + register: vpc_result + loop: [1, 2] + + - name: use set fact for vpc ids + set_fact: + vpc_id_1: '{{ vpc_result.results.0.vpc.id }}' + vpc_id_2: '{{ vpc_result.results.1.vpc.id }}' + + # ============================================================ + - debug: msg="Running tests" + + - name: create vpn gateway and attach it to vpc + ec2_vpc_vgw: + state: present + vpc_id: '{{ vpc_id_1 }}' + name: "{{ resource_prefix }}-vgw" + <<: *aws_connection_info + register: vgw + + - assert: + that: + - vgw.changed + - "{{ vgw.vgw.vpc_id == vpc_id_1 }}" + - '"{{ vgw.vgw.tags.Name }}" == "{{ resource_prefix }}-vgw"' + + - name: test idempotence + ec2_vpc_vgw: + state: present + vpc_id: '{{ vpc_id_1 }}' + name: "{{ resource_prefix }}-vgw" + <<: *aws_connection_info + register: vgw + + - assert: + that: + - not vgw.changed + + # ============================================================ + - name: attach vpn gateway to the other VPC + ec2_vpc_vgw: + state: present + vpc_id: '{{ vpc_id_2 }}' + name: "{{ resource_prefix }}-vgw" + <<: *aws_connection_info + register: vgw + + - assert: + that: + - vgw.changed + - "{{ vgw.vgw.vpc_id == vpc_id_2 }}" + + # ============================================================ + - name: add tags to the VGW + ec2_vpc_vgw: + state: present + vpc_id: '{{ vpc_id_2 }}' + name: "{{ resource_prefix }}-vgw" + tags: + created_by: ec2_vpc_vgw integration tests + <<: *aws_connection_info + register: vgw + + - assert: + that: + - vgw.changed + - vgw.vgw.tags | length == 2 + - "'created_by' in vgw.vgw.tags" + + - name: test idempotence + ec2_vpc_vgw: + state: present + vpc_id: '{{ vpc_id_2 }}' + name: "{{ resource_prefix }}-vgw" + tags: + created_by: ec2_vpc_vgw integration tests + <<: *aws_connection_info + register: vgw + + - assert: + that: + - not vgw.changed + + # ============================================================ + - name: remove tags from the VGW + ec2_vpc_vgw: + state: present + vpc_id: '{{ vpc_id_2 }}' + name: "{{ resource_prefix }}-vgw" + <<: *aws_connection_info + register: vgw + + - assert: + that: + - vgw.changed + - vgw.vgw.tags | length == 1 + - '"{{ vgw.vgw.tags.Name }}" == "{{ resource_prefix }}-vgw"' + + # ============================================================ + - name: detach vpn gateway + ec2_vpc_vgw: + state: present + name: "{{ resource_prefix }}-vgw" + <<: *aws_connection_info + register: vgw + + - assert: + that: + - vgw.changed + - not vgw.vgw.vpc_id + + - name: test idempotence + ec2_vpc_vgw: + state: present + name: "{{ resource_prefix }}-vgw" + <<: *aws_connection_info + register: vgw + + - assert: + that: + - not vgw.changed + + # ============================================================ + + always: + + - debug: msg="Removing test dependencies" + + - name: delete vpn gateway + ec2_vpc_vgw: + state: absent + vpn_gateway_id: '{{ vgw.vgw.id }}' + <<: *aws_connection_info + ignore_errors: yes + + - name: delete vpc + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc-{{ item }}" + state: absent + cidr_block: "10.0.0.0/26" + <<: *aws_connection_info + loop: [1, 2] + register: result + retries: 10 + delay: 5 + until: result is not failed + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vpn_info/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vpn_info/aliases new file mode 100644 index 00000000..e915bed8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vpn_info/aliases @@ -0,0 +1,4 @@ +cloud/aws +shippable/aws/group3 +# https://github.com/ansible-collections/community.aws/issues/156 +unstable diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vpn_info/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vpn_info/tasks/main.yml new file mode 100644 index 00000000..1d432a17 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ec2_vpc_vpn_info/tasks/main.yml @@ -0,0 +1,127 @@ +--- +- name: ec2_vpc_vpn_info tests + collections: + - amazon.aws + block: + + # ============================================================ + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + # ============================================================ + - name: create a VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: present + cidr_block: "10.0.0.0/26" + <<: *aws_connection_info + tags: + Name: "{{ resource_prefix }}-vpc" + Description: "Created by ansible-test" + register: vpc_result + + - name: create vpn gateway and attach it to vpc + ec2_vpc_vgw: + state: present + vpc_id: '{{ vpc_result.vpc.id }}' + name: "{{ resource_prefix }}-vgw" + <<: *aws_connection_info + register: vgw + + - name: create customer gateway + ec2_customer_gateway: + bgp_asn: 12345 + ip_address: 1.2.3.4 + name: testcgw + <<: *aws_connection_info + register: cgw + + - name: create vpn connection, with customer gateway + ec2_vpc_vpn: + customer_gateway_id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' + vpn_gateway_id: '{{ vgw.vgw.id }}' + state: present + <<: *aws_connection_info + register: vpn + + # ============================================================ + - name: test success with no parameters + ec2_vpc_vpn_info: + <<: *aws_connection_info + register: result + + - name: assert success with no parameters + assert: + that: + - 'result.changed == false' + - 'result.vpn_connections != []' + + - name: test success with customer gateway id as a filter + ec2_vpc_vpn_info: + filters: + customer-gateway-id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' + vpn-connection-id: '{{ vpn.vpn_connection_id }}' + <<: *aws_connection_info + register: result + + - name: assert success with customer gateway id as filter + assert: + that: + - 'result.changed == false' + - 'result.vpn_connections != []' + + # ============================================================ + always: + + - name: delete vpn connection + ec2_vpc_vpn: + state: absent + vpn_connection_id: '{{ vpn.vpn_connection_id }}' + <<: *aws_connection_info + register: result + retries: 10 + delay: 3 + until: result is not failed + ignore_errors: true + + - name: delete customer gateway + ec2_customer_gateway: + state: absent + ip_address: 1.2.3.4 + name: testcgw + bgp_asn: 12345 + <<: *aws_connection_info + register: result + retries: 10 + delay: 3 + until: result is not failed + ignore_errors: true + + - name: delete vpn gateway + ec2_vpc_vgw: + state: absent + vpn_gateway_id: '{{ vgw.vgw.id }}' + <<: *aws_connection_info + register: result + retries: 10 + delay: 3 + until: result is not failed + ignore_errors: true + + - name: delete vpc + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: absent + cidr_block: "10.0.0.0/26" + <<: *aws_connection_info + register: result + retries: 10 + delay: 3 + until: result is not failed + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/aliases new file mode 100644 index 00000000..4b1bea7a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/aliases @@ -0,0 +1,6 @@ +cloud/aws +ecs_service_info +ecs_task +ecs_taskdefinition +ecs_taskdefinition_info +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/defaults/main.yml new file mode 100644 index 00000000..20e010e3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/defaults/main.yml @@ -0,0 +1,38 @@ +ecs_cluster_name: "{{ resource_prefix }}" +user_data: | + #!/bin/bash + echo ECS_CLUSTER={{ ecs_cluster_name }} >> /etc/ecs/ecs.config + +ecs_service_name: "{{ resource_prefix }}-service" +ecs_task_image_path: nginx +ecs_task_name: "{{ resource_prefix }}-task" +ecs_task_memory: 128 +ecs_task_containers: +- name: "{{ ecs_task_name }}" + image: "{{ ecs_task_image_path }}" + essential: true + memory: "{{ ecs_task_memory }}" + portMappings: + - containerPort: "{{ ecs_task_container_port }}" + hostPort: "{{ ecs_task_host_port|default(0) }}" + mountPoints: "{{ ecs_task_mount_points|default([]) }}" +ecs_service_deployment_configuration: + minimum_healthy_percent: 0 + maximum_percent: 100 +ecs_service_placement_strategy: + - type: binpack + field: memory + - type: spread + field: attribute:ecs.availability-zone +ecs_task_container_port: 8080 +ecs_target_group_name: "{{ resource_prefix[:28] }}-tg" +ecs_load_balancer_name: "{{ resource_prefix[:29] }}-lb" +ecs_service_health_check_grace_period: 60 +ecs_fargate_task_containers: +- name: "{{ ecs_task_name }}" + image: "{{ ecs_task_image_path }}" + essential: true + portMappings: + - containerPort: "{{ ecs_task_container_port }}" + hostPort: "{{ ecs_task_host_port|default(0) }}" + #mountPoints: "{{ ecs_task_mount_points|default([]) }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/files/ec2-trust-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/files/ec2-trust-policy.json new file mode 100644 index 00000000..72413abd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/files/ec2-trust-policy.json @@ -0,0 +1,13 @@ +{ + "Version": "2008-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Allow", + "Principal": { + "Service": "ec2.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/files/ecs-trust-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/files/ecs-trust-policy.json new file mode 100644 index 00000000..f871b34d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/files/ecs-trust-policy.json @@ -0,0 +1,16 @@ +{ + "Version": "2008-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Allow", + "Principal": { + "Service": [ + "ecs.amazonaws.com", + "ecs-tasks.amazonaws.com" + ] + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/meta/main.yml new file mode 100644 index 00000000..1810d4be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_remote_tmp_dir diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/full_test.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/full_test.yml new file mode 100644 index 00000000..19db74d8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/full_test.yml @@ -0,0 +1,1172 @@ +--- +# tasks file for ecs_cluster +- name: ecs_cluster tests + collections: + - amazon.aws + + block: + # ============================================================ + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: ensure IAM instance role exists + iam_role: + name: ecsInstanceRole + assume_role_policy_document: "{{ lookup('file','ec2-trust-policy.json') }}" + state: present + create_instance_profile: yes + managed_policy: + - AmazonEC2ContainerServiceforEC2Role + <<: *aws_connection_info + + - name: ensure IAM service role exists + iam_role: + name: ecsServiceRole + assume_role_policy_document: "{{ lookup('file','ecs-trust-policy.json') }}" + state: present + create_instance_profile: no + managed_policy: + - AmazonEC2ContainerServiceRole + <<: *aws_connection_info + + - name: ensure AWSServiceRoleForECS role exists + iam_role_info: + name: AWSServiceRoleForECS + <<: *aws_connection_info + register: iam_role_result + + # FIXME: come up with a way to automate this + - name: fail if AWSServiceRoleForECS role does not exist + fail: + msg: > + Run `aws iam create-service-linked-role --aws-service-name=ecs.amazonaws.com ` to create + a linked role for AWS VPC load balancer management + when: not iam_role_result.iam_roles + + - name: create an ECS cluster + ecs_cluster: + name: "{{ ecs_cluster_name }}" + state: present + <<: *aws_connection_info + register: ecs_cluster + + - name: check that ecs_cluster changed + assert: + that: + - ecs_cluster.changed + + - name: create same ECS cluster (should do nothing) + ecs_cluster: + name: "{{ ecs_cluster_name }}" + state: present + <<: *aws_connection_info + register: ecs_cluster_again + + - name: check that ecs_cluster did not change + assert: + that: + - not ecs_cluster_again.changed + + - name: create a VPC to work in + ec2_vpc_net: + cidr_block: 10.0.0.0/16 + state: present + name: '{{ resource_prefix }}_ecs_cluster' + resource_tags: + Name: '{{ resource_prefix }}_ecs_cluster' + <<: *aws_connection_info + register: setup_vpc + + - name: create a key pair to use for creating an ec2 instance + ec2_key: + name: '{{ resource_prefix }}_ecs_cluster' + state: present + <<: *aws_connection_info + when: ec2_keypair is not defined # allow override in cloud-config-aws.ini + register: setup_key + + - name: create subnets + ec2_vpc_subnet: + az: '{{ ec2_region }}{{ item.zone }}' + tags: + Name: '{{ resource_prefix }}_ecs_cluster-subnet-{{ item.zone }}' + vpc_id: '{{ setup_vpc.vpc.id }}' + cidr: "{{ item.cidr }}" + state: present + <<: *aws_connection_info + register: setup_subnet + with_items: + - zone: a + cidr: 10.0.1.0/24 + - zone: b + cidr: 10.0.2.0/24 + + - name: create an internet gateway so that ECS agents can talk to ECS + ec2_vpc_igw: + vpc_id: '{{ setup_vpc.vpc.id }}' + state: present + <<: *aws_connection_info + register: igw + + - name: create a security group to use for creating an ec2 instance + ec2_group: + name: '{{ resource_prefix }}_ecs_cluster-sg' + description: 'created by Ansible integration tests' + state: present + vpc_id: '{{ setup_vpc.vpc.id }}' + rules: # allow all ssh traffic but nothing else + - ports: 22 + cidr: 0.0.0.0/0 + <<: *aws_connection_info + register: setup_sg + + - name: find a suitable AMI + ec2_ami_info: + owner: amazon + filters: + description: "Amazon Linux AMI* ECS *" + <<: *aws_connection_info + register: ec2_ami_info + + - name: set image id fact + set_fact: + ecs_image_id: "{{ (ec2_ami_info.images|first).image_id }}" + + - name: provision ec2 instance to create an image + ec2_instance: + key_name: '{{ ec2_keypair|default(setup_key.key.name) }}' + instance_type: t2.micro + state: present + image_id: '{{ ecs_image_id }}' + wait: yes + user_data: "{{ user_data }}" + instance_role: ecsInstanceRole + tags: + Name: '{{ resource_prefix }}_ecs_agent' + security_group: '{{ setup_sg.group_id }}' + vpc_subnet_id: '{{ setup_subnet.results[0].subnet.id }}' + <<: *aws_connection_info + register: setup_instance + + - name: create target group + elb_target_group: + name: "{{ ecs_target_group_name }}1" + state: present + protocol: HTTP + port: 8080 + modify_targets: no + vpc_id: '{{ setup_vpc.vpc.id }}' + target_type: instance + <<: *aws_connection_info + register: elb_target_group_instance + + - name: create second target group to use ip target_type + elb_target_group: + name: "{{ ecs_target_group_name }}2" + state: present + protocol: HTTP + port: 8080 + modify_targets: no + vpc_id: '{{ setup_vpc.vpc.id }}' + target_type: ip + <<: *aws_connection_info + register: elb_target_group_ip + + - name: create load balancer + elb_application_lb: + name: "{{ ecs_load_balancer_name }}" + state: present + scheme: internal + security_groups: '{{ setup_sg.group_id }}' + subnets: "{{ setup_subnet.results | community.general.json_query('[].subnet.id') }}" + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ ecs_target_group_name }}1" + - Protocol: HTTP + Port: 81 + DefaultActions: + - Type: forward + TargetGroupName: "{{ ecs_target_group_name }}2" + <<: *aws_connection_info + + - name: create task definition + ecs_taskdefinition: + containers: "{{ ecs_task_containers }}" + family: "{{ ecs_task_name }}" + state: present + <<: *aws_connection_info + register: ecs_task_definition + + - name: recreate task definition + ecs_taskdefinition: + containers: "{{ ecs_task_containers }}" + family: "{{ ecs_task_name }}" + state: present + <<: *aws_connection_info + register: ecs_task_definition_again + + - name: check that task definition does not change + assert: + that: + - not ecs_task_definition_again.changed + # FIXME: task definition should not change, will need #26752 or equivalent + ignore_errors: yes + + - name: obtain ECS task definition facts + ecs_taskdefinition_info: + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + <<: *aws_connection_info + + - name: create ECS service definition + ecs_service: + state: present + name: "{{ ecs_service_name }}" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + desired_count: 1 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + placement_strategy: "{{ ecs_service_placement_strategy }}" + health_check_grace_period_seconds: "{{ ecs_service_health_check_grace_period }}" + load_balancers: + - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + role: "ecsServiceRole" + <<: *aws_connection_info + register: ecs_service + + - name: check that ECS service creation changed + assert: + that: + - ecs_service.changed + + - name: create same ECS service definition (should not change) + ecs_service: + state: present + name: "{{ ecs_service_name }}" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + desired_count: 1 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + placement_strategy: "{{ ecs_service_placement_strategy }}" + health_check_grace_period_seconds: "{{ ecs_service_health_check_grace_period }}" + load_balancers: + - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + role: "ecsServiceRole" + <<: *aws_connection_info + register: ecs_service_again + + - name: check that ECS service recreation changed nothing + assert: + that: + - not ecs_service_again.changed + # FIXME: service should not change, needs fixing + ignore_errors: yes + + # FIXME: attempt to update service load balancer + - name: update ECS service definition (expected to fail) + ecs_service: + state: present + name: "{{ ecs_service_name }}" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + desired_count: 1 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + placement_strategy: "{{ ecs_service_placement_strategy }}" + health_check_grace_period_seconds: "{{ ecs_service_health_check_grace_period }}" + load_balancers: + - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port|int + 1 }}" + role: "ecsServiceRole" + <<: *aws_connection_info + register: update_ecs_service + ignore_errors: yes + + - name: assert that updating ECS load balancer failed with helpful message + assert: + that: + - update_ecs_service is failed + - "'error' not in update_ecs_service" + - "'msg' in update_ecs_service" + + + - name: attempt to use ECS network configuration on task definition without awsvpc network_mode + ecs_service: + state: present + name: "{{ ecs_service_name }}3" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + desired_count: 1 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + placement_strategy: "{{ ecs_service_placement_strategy }}" + load_balancers: + - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + network_configuration: + subnets: "{{ setup_subnet.results | community.general.json_query('[].subnet.id') }}" + security_groups: + - '{{ setup_sg.group_id }}' + <<: *aws_connection_info + register: ecs_service_network_without_awsvpc_task + ignore_errors: yes + + - name: assert that using ECS network configuration with non AWSVPC task definition fails + assert: + that: + - ecs_service_network_without_awsvpc_task is failed + + - name: scale down ECS service + ecs_service: + state: present + name: "{{ ecs_service_name }}" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + desired_count: 0 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + placement_strategy: "{{ ecs_service_placement_strategy }}" + load_balancers: + - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + role: "ecsServiceRole" + <<: *aws_connection_info + register: ecs_service_scale_down + + - name: pause to allow service to scale down + pause: + seconds: 60 + + - name: delete ECS service definition + ecs_service: + state: absent + name: "{{ ecs_service_name }}" + cluster: "{{ ecs_cluster_name }}" + <<: *aws_connection_info + register: delete_ecs_service + + - name: assert that deleting ECS service worked + assert: + that: + - delete_ecs_service.changed + + - name: assert that deleting ECS service worked + assert: + that: + - delete_ecs_service.changed + + - name: create VPC-networked task definition with host port set to 0 (expected to fail) + ecs_taskdefinition: + containers: "{{ ecs_task_containers }}" + family: "{{ ecs_task_name }}-vpc" + state: present + network_mode: awsvpc + <<: *aws_connection_info + register: ecs_task_definition_vpc_no_host_port + ignore_errors: yes + + - name: check that awsvpc task definition with host port 0 fails gracefully + assert: + that: + - ecs_task_definition_vpc_no_host_port is failed + - "'error' not in ecs_task_definition_vpc_no_host_port" + + - name: create VPC-networked task definition with host port set to 8080 + ecs_taskdefinition: + containers: "{{ ecs_task_containers }}" + family: "{{ ecs_task_name }}-vpc" + network_mode: awsvpc + state: present + <<: *aws_connection_info + vars: + ecs_task_host_port: 8080 + register: ecs_task_definition_vpc_with_host_port + + - name: obtain ECS task definition facts + ecs_taskdefinition_info: + task_definition: "{{ ecs_task_name }}-vpc:{{ ecs_task_definition_vpc_with_host_port.taskdefinition.revision }}" + <<: *aws_connection_info + register: ecs_taskdefinition_info + + - name: assert that network mode is awsvpc + assert: + that: + - "ecs_taskdefinition_info.network_mode == 'awsvpc'" + + - name: pause to allow service to scale down + pause: + seconds: 60 + + - name: delete ECS service definition + ecs_service: + state: absent + name: "{{ ecs_service_name }}4" + cluster: "{{ ecs_cluster_name }}" + <<: *aws_connection_info + register: delete_ecs_service + + - name: create ECS service definition with network configuration + ecs_service: + state: present + name: "{{ ecs_service_name }}2" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}-vpc:{{ ecs_task_definition_vpc_with_host_port.taskdefinition.revision }}" + desired_count: 1 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + placement_strategy: "{{ ecs_service_placement_strategy }}" + load_balancers: + - targetGroupArn: "{{ elb_target_group_ip.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + network_configuration: + subnets: "{{ setup_subnet.results | community.general.json_query('[].subnet.id') }}" + security_groups: + - '{{ setup_sg.group_id }}' + <<: *aws_connection_info + register: create_ecs_service_with_vpc + + - name: assert that network configuration is correct + assert: + that: + - "'networkConfiguration' in create_ecs_service_with_vpc.service" + - "'awsvpcConfiguration' in create_ecs_service_with_vpc.service.networkConfiguration" + - "create_ecs_service_with_vpc.service.networkConfiguration.awsvpcConfiguration.subnets|length == 2" + - "create_ecs_service_with_vpc.service.networkConfiguration.awsvpcConfiguration.securityGroups|length == 1" + + - name: create dummy group to update ECS service with + ec2_group: + name: "{{ resource_prefix }}-ecs-vpc-test-sg" + description: "Test security group for ECS with VPC" + vpc_id: '{{ setup_vpc.vpc.id }}' + state: present + <<: *aws_connection_info + + - name: update ECS service definition with new network configuration + ecs_service: + state: present + name: "{{ ecs_service_name }}2" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}-vpc:{{ ecs_task_definition_vpc_with_host_port.taskdefinition.revision }}" + desired_count: 1 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + placement_strategy: "{{ ecs_service_placement_strategy }}" + load_balancers: + - targetGroupArn: "{{ elb_target_group_ip.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + network_configuration: + subnets: "{{ setup_subnet.results | community.general.json_query('[].subnet.id') }}" + security_groups: + - "{{ resource_prefix }}-ecs-vpc-test-sg" + <<: *aws_connection_info + register: update_ecs_service_with_vpc + + - name: check that ECS service changed + assert: + that: + - update_ecs_service_with_vpc.changed + - "'networkConfiguration' in update_ecs_service_with_vpc.service" + - "'awsvpcConfiguration' in update_ecs_service_with_vpc.service.networkConfiguration" + - "update_ecs_service_with_vpc.service.networkConfiguration.awsvpcConfiguration.subnets|length == 2" + - "update_ecs_service_with_vpc.service.networkConfiguration.awsvpcConfiguration.securityGroups|length == 1" + + - name: create ecs_service using health_check_grace_period_seconds + ecs_service: + name: "{{ ecs_service_name }}-mft" + cluster: "{{ ecs_cluster_name }}" + load_balancers: + - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + scheduling_strategy: "REPLICA" + health_check_grace_period_seconds: 10 + desired_count: 1 + state: present + <<: *aws_connection_info + register: ecs_service_creation_hcgp + + + - name: health_check_grace_period_seconds sets HealthChecGracePeriodSeconds + assert: + that: + - ecs_service_creation_hcgp.changed + - "{{ecs_service_creation_hcgp.service.healthCheckGracePeriodSeconds}} == 10" + + - name: update ecs_service using health_check_grace_period_seconds + ecs_service: + name: "{{ ecs_service_name }}-mft" + cluster: "{{ ecs_cluster_name }}" + load_balancers: + - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + desired_count: 1 + health_check_grace_period_seconds: 30 + state: present + <<: *aws_connection_info + register: ecs_service_creation_hcgp2 + ignore_errors: no + + - name: check that module returns success + assert: + that: + - ecs_service_creation_hcgp2.changed + - "{{ecs_service_creation_hcgp2.service.healthCheckGracePeriodSeconds}} == 30" + +# until ansible supports service registries, this test can't run. +# - name: update ecs_service using service_registries +# ecs_service: +# name: "{{ ecs_service_name }}-service-registries" +# cluster: "{{ ecs_cluster_name }}" +# load_balancers: +# - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" +# containerName: "{{ ecs_task_name }}" +# containerPort: "{{ ecs_task_container_port }}" +# service_registries: +# - containerName: "{{ ecs_task_name }}" +# containerPort: "{{ ecs_task_container_port }}" +# ### TODO: Figure out how to get a service registry ARN without a service registry module. +# registryArn: "{{ ecs_task_service_registry_arn }}" +# task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" +# desired_count: 1 +# state: present +# <<: *aws_connection_info +# register: ecs_service_creation_sr +# ignore_errors: yes + +# - name: dump sr output +# debug: var=ecs_service_creation_sr + +# - name: check that module returns success +# assert: +# that: +# - ecs_service_creation_sr.changed + + - name: update ecs_service using REPLICA scheduling_strategy + ecs_service: + name: "{{ ecs_service_name }}-replica" + cluster: "{{ ecs_cluster_name }}" + load_balancers: + - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + scheduling_strategy: "REPLICA" + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + desired_count: 1 + state: present + <<: *aws_connection_info + register: ecs_service_creation_replica + + - name: obtain facts for all ECS services in the cluster + ecs_service_info: + cluster: "{{ ecs_cluster_name }}" + details: yes + events: no + <<: *aws_connection_info + register: ecs_service_info + + - name: assert that facts are useful + assert: + that: + - "'services' in ecs_service_info" + - ecs_service_info.services | length > 0 + - "'events' not in ecs_service_info.services[0]" + + - name: obtain facts for existing service in the cluster + ecs_service_info: + cluster: "{{ ecs_cluster_name }}" + service: "{{ ecs_service_name }}" + details: yes + events: no + <<: *aws_connection_info + register: ecs_service_info + + - name: assert that existing service is available and running + assert: + that: + - "ecs_service_info.services|length == 1" + - "ecs_service_info.services_not_running|length == 0" + + - name: obtain facts for non-existent service in the cluster + ecs_service_info: + cluster: "{{ ecs_cluster_name }}" + service: madeup + details: yes + events: no + <<: *aws_connection_info + register: ecs_service_info + + - name: assert that non-existent service is missing + assert: + that: + - "ecs_service_info.services_not_running[0].reason == 'MISSING'" + + - name: obtain specific ECS service facts + ecs_service_info: + service: "{{ ecs_service_name }}2" + cluster: "{{ ecs_cluster_name }}" + details: yes + <<: *aws_connection_info + register: ecs_service_info + + - name: check that facts contain network configuration + assert: + that: + - "'networkConfiguration' in ecs_service_info.services[0]" + + - name: attempt to get facts from missing task definition + ecs_taskdefinition_info: + task_definition: "{{ ecs_task_name }}-vpc:{{ ecs_task_definition.taskdefinition.revision + 1}}" + <<: *aws_connection_info + + # ============================================================ + # Begin tests for Fargate + + - name: ensure AmazonECSTaskExecutionRolePolicy exists + iam_role: + name: ecsTaskExecutionRole + assume_role_policy_document: "{{ lookup('file','ecs-trust-policy.json') }}" + description: "Allows ECS containers to make calls to ECR" + state: present + create_instance_profile: no + managed_policy: + - AmazonEC2ContainerServiceRole + <<: *aws_connection_info + register: iam_execution_role + + - name: create Fargate VPC-networked task definition with host port set to 8080 and unsupported network mode (expected to fail) + ecs_taskdefinition: + containers: "{{ ecs_fargate_task_containers }}" + family: "{{ ecs_task_name }}-vpc" + network_mode: bridge + launch_type: FARGATE + cpu: 512 + memory: 1024 + state: present + <<: *aws_connection_info + vars: + ecs_task_host_port: 8080 + ignore_errors: yes + register: ecs_fargate_task_definition_bridged_with_host_port + + - name: check that fargate task definition with bridged networking fails gracefully + assert: + that: + - ecs_fargate_task_definition_bridged_with_host_port is failed + - 'ecs_fargate_task_definition_bridged_with_host_port.msg == "To use FARGATE launch type, network_mode must be awsvpc"' + + - name: create Fargate VPC-networked task definition without CPU or Memory (expected to Fail) + ecs_taskdefinition: + containers: "{{ ecs_fargate_task_containers }}" + family: "{{ ecs_task_name }}-vpc" + network_mode: awsvpc + launch_type: FARGATE + state: present + <<: *aws_connection_info + ignore_errors: yes + register: ecs_fargate_task_definition_vpc_no_mem + + - name: check that fargate task definition without memory or cpu fails gracefully + assert: + that: + - ecs_fargate_task_definition_vpc_no_mem is failed + - 'ecs_fargate_task_definition_vpc_no_mem.msg == "launch_type is FARGATE but all of the following are missing: cpu, memory"' + + - name: create Fargate VPC-networked task definition with CPU or Memory and execution role + ecs_taskdefinition: + containers: "{{ ecs_fargate_task_containers }}" + family: "{{ ecs_task_name }}-vpc" + network_mode: awsvpc + launch_type: FARGATE + cpu: 512 + memory: 1024 + execution_role_arn: "{{ iam_execution_role.arn }}" + state: present + <<: *aws_connection_info + vars: + ecs_task_host_port: 8080 + register: ecs_fargate_task_definition + + - name: obtain ECS task definition facts + ecs_taskdefinition_info: + task_definition: "{{ ecs_task_name }}-vpc:{{ ecs_fargate_task_definition.taskdefinition.revision }}" + <<: *aws_connection_info + + - name: create fargate ECS service without network config (expected to fail) + ecs_service: + state: present + name: "{{ ecs_service_name }}4" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}-vpc:{{ ecs_fargate_task_definition.taskdefinition.revision }}" + desired_count: 1 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + launch_type: FARGATE + <<: *aws_connection_info + register: ecs_fargate_service_network_without_awsvpc + ignore_errors: yes + + - name: assert that using Fargate ECS service fails + assert: + that: + - ecs_fargate_service_network_without_awsvpc is failed + + - name: create fargate ECS service with network config + ecs_service: + state: present + name: "{{ ecs_service_name }}4" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}-vpc:{{ ecs_fargate_task_definition.taskdefinition.revision }}" + desired_count: 1 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + launch_type: FARGATE + network_configuration: + subnets: "{{ setup_subnet.results | community.general.json_query('[].subnet.id') }}" + security_groups: + - '{{ setup_sg.group_id }}' + assign_public_ip: true + <<: *aws_connection_info + register: ecs_fargate_service_network_with_awsvpc + + - name: assert that public IP assignment is enabled + assert: + that: + - 'ecs_fargate_service_network_with_awsvpc.service.networkConfiguration.awsvpcConfiguration.assignPublicIp == "ENABLED"' + + - name: create fargate ECS task with run task + ecs_task: + operation: run + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}-vpc" + launch_type: FARGATE + count: 1 + network_configuration: + subnets: "{{ setup_subnet.results | community.general.json_query('[].subnet.id') }}" + security_groups: + - '{{ setup_sg.group_id }}' + assign_public_ip: true + started_by: ansible_user + <<: *aws_connection_info + register: fargate_run_task_output + + # aws cli not installed in docker container; make sure it's installed. + - name: install awscli + pip: + state: present + name: awscli + + - name: disable taskLongArnFormat + command: aws ecs put-account-setting --name taskLongArnFormat --value disabled + environment: + AWS_ACCESS_KEY_ID: "{{ aws_access_key }}" + AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key }}" + AWS_SESSION_TOKEN: "{{ security_token | default('') }}" + AWS_DEFAULT_REGION: "{{ aws_region }}" + + - name: create fargate ECS task with run task and tags (LF disabled) (should fail) + ecs_task: + operation: run + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}-vpc" + launch_type: FARGATE + count: 1 + tags: + tag_key: tag_value + tag_key2: tag_value2 + network_configuration: + subnets: "{{ setup_subnet.results | community.general.json_query('[].subnet.id') }}" + security_groups: + - '{{ setup_sg.group_id }}' + assign_public_ip: true + started_by: ansible_user + <<: *aws_connection_info + register: fargate_run_task_output_with_tags_fail + ignore_errors: yes + + - name: enable taskLongArnFormat + command: aws ecs put-account-setting --name taskLongArnFormat --value enabled + environment: + AWS_ACCESS_KEY_ID: "{{ aws_access_key }}" + AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key }}" + AWS_SESSION_TOKEN: "{{ security_token | default('') }}" + AWS_DEFAULT_REGION: "{{ aws_region }}" + + - name: create fargate ECS task with run task and tags + ecs_task: + operation: run + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}-vpc" + launch_type: FARGATE + count: 1 + tags: + tag_key: tag_value + tag_key2: tag_value2 + network_configuration: + subnets: "{{ setup_subnet.results | community.general.json_query('[].subnet.id') }}" + security_groups: + - '{{ setup_sg.group_id }}' + assign_public_ip: true + started_by: ansible_user + <<: *aws_connection_info + register: fargate_run_task_output_with_tags + + + # ============================================================ + # End tests for Fargate + + - name: create task definition for absent with arn regression test + ecs_taskdefinition: + containers: "{{ ecs_task_containers }}" + family: "{{ ecs_task_name }}-absent" + state: present + <<: *aws_connection_info + register: ecs_task_definition_absent_with_arn + + - name: absent task definition by arn + ecs_taskdefinition: + arn: "{{ ecs_task_definition_absent_with_arn.taskdefinition.taskDefinitionArn }}" + state: absent + <<: *aws_connection_info + + always: + # TEAR DOWN: snapshot, ec2 instance, ec2 key pair, security group, vpc + - name: Announce teardown start + debug: + msg: "***** TESTING COMPLETE. COMMENCE TEARDOWN *****" + + - name: obtain ECS service facts + ecs_service_info: + service: "{{ ecs_service_name }}" + cluster: "{{ ecs_cluster_name }}" + details: yes + <<: *aws_connection_info + register: ecs_service_info + + - name: scale down ECS service + ecs_service: + state: present + name: "{{ ecs_service_name }}" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_service_info.services[0].taskDefinition }}" + desired_count: 0 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + placement_strategy: "{{ ecs_service_placement_strategy }}" + load_balancers: + - targetGroupArn: "{{ ecs_service_info.services[0].loadBalancers[0].targetGroupArn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + <<: *aws_connection_info + ignore_errors: yes + register: ecs_service_scale_down + + - name: obtain second ECS service facts + ecs_service_info: + service: "{{ ecs_service_name }}2" + cluster: "{{ ecs_cluster_name }}" + details: yes + <<: *aws_connection_info + ignore_errors: yes + register: ecs_service_info + + - name: scale down second ECS service + ecs_service: + state: present + name: "{{ ecs_service_name }}2" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_service_info.services[0].taskDefinition }}" + desired_count: 0 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + placement_strategy: "{{ ecs_service_placement_strategy }}" + load_balancers: + - targetGroupArn: "{{ ecs_service_info.services[0].loadBalancers[0].targetGroupArn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + <<: *aws_connection_info + ignore_errors: yes + register: ecs_service_scale_down + + - name: scale down multifunction-test service + ecs_service: + name: "{{ ecs_service_name }}-mft" + cluster: "{{ ecs_cluster_name }}" + state: present + load_balancers: + - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + desired_count: 0 + <<: *aws_connection_info + ignore_errors: yes + register: ecs_service_scale_down + + + + - name: scale down scheduling_strategy service + ecs_service: + name: "{{ ecs_service_name }}-replica" + cluster: "{{ ecs_cluster_name }}" + state: present + load_balancers: + - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" + containerName: "{{ ecs_task_name }}" + containerPort: "{{ ecs_task_container_port }}" + task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" + desired_count: 0 + <<: *aws_connection_info + ignore_errors: yes + register: ecs_service_scale_down + + +# until ansible supports service registries, the test for it can't run and this +# scale down is not needed +# - name: scale down service_registries service +# ecs_service: +# name: "{{ ecs_service_name }}-service-registries" +# cluster: "{{ ecs_cluster_name }}" +# state: present +# load_balancers: +# - targetGroupArn: "{{ elb_target_group_instance.target_group_arn }}" +# containerName: "{{ ecs_task_name }}" +# containerPort: "{{ ecs_task_container_port }}" +# task_definition: "{{ ecs_task_name }}:{{ ecs_task_definition.taskdefinition.revision }}" +# desired_count: 0 +# <<: *aws_connection_info +# ignore_errors: yes +# register: ecs_service_scale_down + + - name: scale down Fargate ECS service + ecs_service: + state: present + name: "{{ ecs_service_name }}4" + cluster: "{{ ecs_cluster_name }}" + task_definition: "{{ ecs_task_name }}-vpc:{{ ecs_fargate_task_definition.taskdefinition.revision }}" + desired_count: 0 + deployment_configuration: "{{ ecs_service_deployment_configuration }}" + <<: *aws_connection_info + ignore_errors: yes + register: ecs_service_scale_down + + - name: stop Fargate ECS task + ecs_task: + task: "{{ fargate_run_task_output.task[0].taskArn }}" + task_definition: "{{ ecs_task_name }}-vpc" + operation: stop + cluster: "{{ ecs_cluster_name }}" + <<: *aws_connection_info + ignore_errors: yes + + - name: stop Fargate ECS task + ecs_task: + task: "{{ fargate_run_task_output_with_tags.task[0].taskArn }}" + task_definition: "{{ ecs_task_name }}-vpc" + operation: stop + cluster: "{{ ecs_cluster_name }}" + <<: *aws_connection_info + ignore_errors: yes + - name: pause to allow services to scale down + pause: + seconds: 60 + when: ecs_service_scale_down is not failed + + - name: remove ecs service + ecs_service: + state: absent + cluster: "{{ ecs_cluster_name }}" + name: "{{ ecs_service_name }}" + <<: *aws_connection_info + ignore_errors: yes + + - name: remove second ecs service + ecs_service: + state: absent + cluster: "{{ ecs_cluster_name }}" + name: "{{ ecs_service_name }}2" + <<: *aws_connection_info + ignore_errors: yes + + - name: remove mft ecs service + ecs_service: + state: absent + cluster: "{{ ecs_cluster_name }}" + name: "{{ ecs_service_name }}-mft" + <<: *aws_connection_info + ignore_errors: yes + + - name: remove scheduling_strategy ecs service + ecs_service: + state: absent + cluster: "{{ ecs_cluster_name }}" + name: "{{ ecs_service_name }}-replica" + <<: *aws_connection_info + ignore_errors: yes + +# until ansible supports service registries, the test for it can't run and this +# removal is not needed +# - name: remove service_registries ecs service +# ecs_service: +# state: absent +# cluster: "{{ ecs_cluster_name }}" +# name: "{{ ecs_service_name }}-service-registries" +# <<: *aws_connection_info +# ignore_errors: yes + + - name: remove fargate ECS service + ecs_service: + state: absent + name: "{{ ecs_service_name }}4" + cluster: "{{ ecs_cluster_name }}" + <<: *aws_connection_info + ignore_errors: yes + register: ecs_fargate_service_network_with_awsvpc + + - name: remove ecs task definition + ecs_taskdefinition: + containers: "{{ ecs_task_containers }}" + family: "{{ ecs_task_name }}" + revision: "{{ ecs_task_definition.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + vars: + ecs_task_host_port: 8080 + ignore_errors: yes + + - name: remove ecs task definition again + ecs_taskdefinition: + containers: "{{ ecs_task_containers }}" + family: "{{ ecs_task_name }}" + revision: "{{ ecs_task_definition_again.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + vars: + ecs_task_host_port: 8080 + ignore_errors: yes + + - name: remove second ecs task definition + ecs_taskdefinition: + containers: "{{ ecs_task_containers }}" + family: "{{ ecs_task_name }}-vpc" + revision: "{{ ecs_task_definition_vpc_with_host_port.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + vars: + ecs_task_host_port: 8080 + ignore_errors: yes + + - name: remove fargate ecs task definition + ecs_taskdefinition: + containers: "{{ ecs_fargate_task_containers }}" + family: "{{ ecs_task_name }}-vpc" + revision: "{{ ecs_fargate_task_definition.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs task definition for absent with arn + ecs_taskdefinition: + containers: "{{ ecs_task_containers }}" + family: "{{ ecs_task_name }}-absent" + revision: "{{ ecs_task_definition_absent_with_arn.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove load balancer + elb_application_lb: + name: "{{ ecs_load_balancer_name }}" + state: absent + wait: yes + <<: *aws_connection_info + ignore_errors: yes + register: elb_application_lb_remove + + - name: pause to allow target group to be disassociated + pause: + seconds: 30 + when: not elb_application_lb_remove is failed + + - name: remove target groups + elb_target_group: + name: "{{ item }}" + state: absent + <<: *aws_connection_info + with_items: + - "{{ ecs_target_group_name }}1" + - "{{ ecs_target_group_name }}2" + ignore_errors: yes + + - name: remove setup ec2 instance + ec2_instance: + instance_ids: '{{ setup_instance.instance_ids }}' + state: absent + wait: yes + <<: *aws_connection_info + ignore_errors: yes + + - name: remove setup keypair + ec2_key: + name: '{{ resource_prefix }}_ecs_cluster' + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove security groups + ec2_group: + name: '{{ item }}' + description: 'created by Ansible integration tests' + state: absent + vpc_id: '{{ setup_vpc.vpc.id }}' + <<: *aws_connection_info + with_items: + - "{{ resource_prefix }}-ecs-vpc-test-sg" + - '{{ resource_prefix }}_ecs_cluster-sg' + ignore_errors: yes + + - name: remove IGW + ec2_vpc_igw: + state: absent + vpc_id: '{{ setup_vpc.vpc.id }}' + <<: *aws_connection_info + ignore_errors: yes + + - name: remove setup subnet + ec2_vpc_subnet: + az: '{{ aws_region }}{{ item.zone }}' + vpc_id: '{{ setup_vpc.vpc.id }}' + cidr: "{{ item.cidr}}" + state: absent + <<: *aws_connection_info + with_items: + - zone: a + cidr: 10.0.1.0/24 + - zone: b + cidr: 10.0.2.0/24 + ignore_errors: yes + + - name: remove setup VPC + ec2_vpc_net: + cidr_block: 10.0.0.0/16 + state: absent + name: '{{ resource_prefix }}_ecs_cluster' + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ECS cluster + ecs_cluster: + name: "{{ ecs_cluster_name }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/main.yml new file mode 100644 index 00000000..ccbd00a4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/main.yml @@ -0,0 +1,53 @@ +- set_fact: + virtualenv: "{{ remote_tmp_dir }}/virtualenv" + virtualenv_command: "{{ ansible_python_interpreter }} -m virtualenv" + +- set_fact: + virtualenv_interpreter: "{{ virtualenv }}/bin/python" + +- pip: + name: virtualenv + +- pip: + name: + - 'botocore<1.8.4' + - boto3 + - coverage<5 + virtualenv: "{{ virtualenv }}" + virtualenv_command: "{{ virtualenv_command }}" + virtualenv_site_packages: no + +- include_tasks: network_assign_public_ip_fail.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + +- include_tasks: network_force_new_deployment_fail.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + +- file: + path: "{{ virtualenv }}" + state: absent + +# Test graceful failures when botocore<1.12.38 + +- pip: + name: + - 'botocore>=1.12.60' + - boto3 + - coverage<5 + virtualenv: "{{ virtualenv }}" + virtualenv_command: "{{ virtualenv_command }}" + virtualenv_site_packages: no + +- include_tasks: network_force_new_deployment.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + +- include_tasks: full_test.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + +- file: + path: "{{ virtualenv }}" + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_assign_public_ip_fail.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_assign_public_ip_fail.yml new file mode 100644 index 00000000..b4b7e531 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_assign_public_ip_fail.yml @@ -0,0 +1,123 @@ +- block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: True + + - name: create ecs cluster + ecs_cluster: + name: "{{ resource_prefix }}" + state: present + <<: *aws_connection_info + + - name: create ecs_taskdefinition with bridged network + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}" + state: present + network_mode: bridge + <<: *aws_connection_info + register: ecs_taskdefinition_creation + + - name: create ecs_taskdefinition with awsvpc network + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}-vpc" + state: present + network_mode: awsvpc + <<: *aws_connection_info + register: ecs_taskdefinition_creation_vpc + + - name: ecs_taskdefinition works fine even when older botocore is used + assert: + that: + - ecs_taskdefinition_creation_vpc.changed + + - name: create ecs_service using awsvpc network_configuration + ecs_service: + name: "{{ resource_prefix }}-vpc" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}-vpc" + desired_count: 1 + network_configuration: + subnets: + - subnet-abcd1234 + security_groups: + - sg-abcd1234 + assign_public_ip: true + state: present + <<: *aws_connection_info + register: ecs_service_creation_vpc + ignore_errors: yes + + - name: check that graceful failure message is returned from ecs_service + assert: + that: + - ecs_service_creation_vpc.failed + - 'ecs_service_creation_vpc.msg == "botocore needs to be version 1.8.4 or higher to use assign_public_ip in network_configuration"' + + always: + - name: scale down ecs service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 0 + state: present + <<: *aws_connection_info + ignore_errors: yes + + - name: pause to wait for scale down + pause: + seconds: 30 + + - name: remove ecs service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs task definition + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}" + revision: "{{ ecs_taskdefinition_creation.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs task definition vpc + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}-vpc" + revision: "{{ ecs_taskdefinition_creation_vpc.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs cluster + ecs_cluster: + name: "{{ resource_prefix }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_fail.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_fail.yml new file mode 100644 index 00000000..4c050837 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_fail.yml @@ -0,0 +1,216 @@ +- block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: True + + - name: create ecs cluster + ecs_cluster: + name: "{{ resource_prefix }}" + state: present + <<: *aws_connection_info + + - name: create ecs_taskdefinition with bridged network + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}" + state: present + network_mode: bridge + <<: *aws_connection_info + register: ecs_taskdefinition_creation + + - name: create ecs_taskdefinition with awsvpc network + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}-vpc" + state: present + network_mode: awsvpc + <<: *aws_connection_info + register: ecs_taskdefinition_creation_vpc + + - name: create ecs_taskdefinition and execution_role_arn (expected to fail) + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}-vpc" + execution_role_arn: not_a_real_arn + state: present + network_mode: awsvpc + <<: *aws_connection_info + ignore_errors: yes + register: ecs_taskdefinition_arn + + - name: check that graceful failure message is returned from ecs_taskdefinition_arn + assert: + that: + - ecs_taskdefinition_arn.failed + - 'ecs_taskdefinition_arn.msg == "botocore needs to be version 1.10.44 or higher to use execution_role_arn"' + + - name: ecs_taskdefinition works fine even when older botocore is used + assert: + that: + - ecs_taskdefinition_creation_vpc.changed + + - name: create ecs_service using bridged network + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + state: present + <<: *aws_connection_info + register: ecs_service_creation + + - name: create ecs_service using awsvpc network_configuration + ecs_service: + name: "{{ resource_prefix }}-vpc" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}-vpc" + desired_count: 1 + network_configuration: + subnets: + - subnet-abcd1234 + security_groups: + - sg-abcd1234 + state: present + <<: *aws_connection_info + register: ecs_service_creation_vpc + ignore_errors: yes + + - name: check that graceful failure message is returned from ecs_service + assert: + that: + - ecs_service_creation_vpc.failed + - 'ecs_service_creation_vpc.msg == "botocore needs to be version 1.7.44 or higher to use network configuration"' + + - name: create ecs_service using awsvpc network_configuration and launch_type + ecs_service: + name: "{{ resource_prefix }}-vpc" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}-vpc" + desired_count: 1 + network_configuration: + subnets: + - subnet-abcd1234 + security_groups: + - sg-abcd1234 + launch_type: FARGATE + state: present + <<: *aws_connection_info + register: ecs_service_creation_vpc_launchtype + ignore_errors: yes + + - name: check that graceful failure message is returned from ecs_service + assert: + that: + - ecs_service_creation_vpc_launchtype.failed + - 'ecs_service_creation_vpc_launchtype.msg == "botocore needs to be version 1.7.44 or higher to use network configuration"' + + - name: create ecs_service with launchtype and missing network_configuration + ecs_service: + name: "{{ resource_prefix }}-vpc" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}-vpc" + desired_count: 1 + launch_type: FARGATE + state: present + <<: *aws_connection_info + register: ecs_service_creation_vpc_launchtype_nonet + ignore_errors: yes + + - name: check that graceful failure message is returned from ecs_service + assert: + that: + - ecs_service_creation_vpc_launchtype_nonet.failed + - 'ecs_service_creation_vpc_launchtype_nonet.msg == "launch_type is FARGATE but all of the following are missing: network_configuration"' + + - name: create ecs_task using awsvpc network_configuration + ecs_task: + cluster: "{{ resource_prefix }}-vpc" + task_definition: "{{ resource_prefix }}" + operation: run + count: 1 + started_by: me + network_configuration: + subnets: + - subnet-abcd1234 + security_groups: + - sg-abcd1234 + <<: *aws_connection_info + register: ecs_task_creation_vpc + ignore_errors: yes + + - name: check that graceful failure message is returned from ecs_task + assert: + that: + - ecs_task_creation_vpc.failed + - 'ecs_task_creation_vpc.msg == "botocore needs to be version 1.7.44 or higher to use network configuration"' + + + always: + - name: scale down ecs service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 0 + state: present + <<: *aws_connection_info + ignore_errors: yes + + - name: pause to wait for scale down + pause: + seconds: 30 + + - name: remove ecs service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs task definition + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}" + revision: "{{ ecs_taskdefinition_creation.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs task definition vpc + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}-vpc" + revision: "{{ ecs_taskdefinition_creation_vpc.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs cluster + ecs_cluster: + name: "{{ resource_prefix }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_force_new_deployment.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_force_new_deployment.yml new file mode 100644 index 00000000..c86e7222 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_force_new_deployment.yml @@ -0,0 +1,124 @@ +- block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: True + + - name: create ecs cluster + ecs_cluster: + name: "{{ resource_prefix }}" + state: present + <<: *aws_connection_info + + - name: create ecs_taskdefinition + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}" + state: present + <<: *aws_connection_info + register: ecs_taskdefinition_creation + + # even after deleting the cluster and recreating with a different name + # the previous service can prevent the current service from starting + # while it's in a draining state. Check the service info and sleep + # if the service does not report as inactive. + + - name: check if service is still running from a previous task + ecs_service_info: + service: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + details: yes + <<: *aws_connection_info + register: ecs_service_info_results + - name: delay if the service was not inactive + debug: var=ecs_service_info_results + + - name: delay if the service was not inactive + pause: + seconds: 30 + when: + - ecs_service_info_results.services|length >0 + - ecs_service_info_results.services[0]['status'] != 'INACTIVE' + + - name: create ecs_service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + state: present + <<: *aws_connection_info + register: ecs_service_creation + + - name: ecs_service works fine even when older botocore is used + assert: + that: + - ecs_service_creation.changed + + - name: create ecs_service using force_new_deployment + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + force_new_deployment: true + state: present + <<: *aws_connection_info + register: ecs_service_creation_force_new_deploy + ignore_errors: yes + + - name: check that module returns success + assert: + that: + - ecs_service_creation_force_new_deploy.changed + + always: + - name: scale down ecs service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 0 + state: present + <<: *aws_connection_info + ignore_errors: yes + + - name: pause to wait for scale down + pause: + seconds: 30 + + - name: remove ecs service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs task definition + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}" + revision: "{{ ecs_taskdefinition_creation.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs cluster + ecs_cluster: + name: "{{ resource_prefix }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_force_new_deployment_fail.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_force_new_deployment_fail.yml new file mode 100644 index 00000000..95e8c576 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_cluster/tasks/network_force_new_deployment_fail.yml @@ -0,0 +1,125 @@ +- block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: True + + - name: create ecs cluster + ecs_cluster: + name: "{{ resource_prefix }}" + state: present + <<: *aws_connection_info + + - name: create ecs_taskdefinition + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}" + state: present + <<: *aws_connection_info + register: ecs_taskdefinition_creation + + # even after deleting the cluster and recreating with a different name + # the previous service can prevent the current service from starting + # while it's in a draining state. Check the service info and sleep + # if the service does not report as inactive. + + - name: check if service is still running from a previous task + ecs_service_info: + service: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + details: yes + <<: *aws_connection_info + register: ecs_service_info_results + - name: delay if the service was not inactive + debug: var=ecs_service_info_results + + - name: delay if the service was not inactive + pause: + seconds: 30 + when: + - ecs_service_info_results.services|length >0 + - ecs_service_info_results.services[0]['status'] != 'INACTIVE' + + - name: create ecs_service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + state: present + <<: *aws_connection_info + register: ecs_service_creation + + - name: ecs_service works fine even when older botocore is used + assert: + that: + - ecs_service_creation.changed + + - name: create ecs_service using force_new_deployment + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + force_new_deployment: true + state: present + <<: *aws_connection_info + register: ecs_service_creation_force_new_deploy + ignore_errors: yes + + - name: check that graceful failure message is returned from ecs_service + assert: + that: + - ecs_service_creation_force_new_deploy.failed + - 'ecs_service_creation_force_new_deploy.msg == "botocore needs to be version 1.8.4 or higher to use force_new_deployment"' + + always: + - name: scale down ecs service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 0 + state: present + <<: *aws_connection_info + ignore_errors: yes + + - name: pause to wait for scale down + pause: + seconds: 30 + + - name: remove ecs service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs task definition + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}" + revision: "{{ ecs_taskdefinition_creation.taskdefinition.revision }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: remove ecs cluster + ecs_cluster: + name: "{{ resource_prefix }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/defaults/main.yml new file mode 100644 index 00000000..4a912794 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/defaults/main.yml @@ -0,0 +1,22 @@ +policy: + Version: '2008-10-17' + Statement: + - Sid: new statement + Effect: Allow + Principal: "*" + Action: + - ecr:GetDownloadUrlForLayer + - ecr:BatchGetImage + - ecr:BatchCheckLayerAvailability + +lifecycle_policy: + rules: + - rulePriority: 1 + description: new policy + selection: + tagStatus: untagged + countType: sinceImagePushed + countUnit: days + countNumber: 365 + action: + type: expire diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/tasks/main.yml new file mode 100644 index 00000000..f92ba965 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_ecr/tasks/main.yml @@ -0,0 +1,541 @@ +--- +- module_defaults: + group/aws: + region: "{{ aws_region }}" + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + + block: + - set_fact: + ecr_name: '{{ resource_prefix }}-ecr' + + - name: When creating with check mode + ecs_ecr: + name: '{{ ecr_name }}' + register: result + check_mode: yes + + - name: it should skip, change and create + assert: + that: + - result is skipped + - result is changed + - result.created + + + - name: When specifying a registry that is inaccessible + ecs_ecr: + registry_id: 999999999999 + name: '{{ ecr_name }}' + register: result + ignore_errors: true + + - name: it should fail with an AccessDeniedException + assert: + that: + - result is failed + - '"AccessDeniedException" in result.msg' + + + - name: When creating a repository + ecs_ecr: + name: '{{ ecr_name }}' + register: result + + - name: it should change and create + assert: + that: + - result is changed + - result.created + + - name: it should have been configured as mutable by default + assert: + that: + - result.repository.imageTagMutability == "MUTABLE" + + + - name: When creating a repository that already exists in check mode + ecs_ecr: + name: '{{ ecr_name }}' + register: result + check_mode: yes + + - name: it should not skip, should not change + assert: + that: + - result is not skipped + - result is not changed + + + - name: When creating a repository that already exists + ecs_ecr: + name: '{{ ecr_name }}' + register: result + + - name: it should not change + assert: + that: + - result is not changed + + + - name: When in check mode, and deleting a policy that does not exist + ecs_ecr: + name: '{{ ecr_name }}' + purge_policy: yes + register: result + check_mode: yes + + - name: it should not skip and not change + assert: + that: + - result is not skipped + - result is not changed + + + - name: When in check mode, setting policy on a repository that has no policy + ecs_ecr: + name: '{{ ecr_name }}' + policy: '{{ policy }}' + register: result + check_mode: yes + + - name: it should skip, change and not create + assert: + that: + - result is skipped + - result is changed + - not result.created + + + - name: When setting policy on a repository that has no policy + ecs_ecr: + name: '{{ ecr_name }}' + policy: '{{ policy }}' + register: result + + - name: it should change and not create + assert: + that: + - result is changed + - not result.created + + + - name: When in check mode, and deleting a policy that exists + ecs_ecr: + name: '{{ ecr_name }}' + delete_policy: yes + register: result + check_mode: yes + + - name: it should skip, change but not create, have deprecations + assert: + that: + - result is skipped + - result is changed + - not result.created + - result.deprecations + + + - name: When in check mode, and purging a policy that exists + ecs_ecr: + name: '{{ ecr_name }}' + purge_policy: yes + register: result + check_mode: yes + + - name: it should skip, change but not create, no deprecations + assert: + that: + - result is skipped + - result is changed + - not result.created + - result.deprecations is not defined + + + - name: When purging a policy that exists + ecs_ecr: + name: '{{ ecr_name }}' + purge_policy: yes + register: result + + - name: it should change and not create + assert: + that: + - result is changed + - not result.created + + + - name: When setting a policy as a string + ecs_ecr: + name: '{{ ecr_name }}' + policy: '{{ policy | to_json }}' + register: result + + - name: it should change and not create + assert: + that: + - result is changed + - not result.created + + + - name: When setting a policy to its current value + ecs_ecr: + name: '{{ ecr_name }}' + policy: '{{ policy }}' + register: result + + - name: it should not change + assert: + that: + - result is not changed + + - name: When omitting policy on a repository that has a policy + ecs_ecr: + name: '{{ ecr_name }}' + register: result + + - name: it should not change + assert: + that: + - result is not changed + + - name: When specifying both policy and purge_policy + ecs_ecr: + name: '{{ ecr_name }}' + policy: '{{ policy }}' + purge_policy: yes + register: result + ignore_errors: true + + - name: it should fail + assert: + that: + - result is failed + + + - name: When specifying invalid JSON for policy + ecs_ecr: + name: '{{ ecr_name }}' + policy: "Ceci n'est pas une JSON" + register: result + ignore_errors: true + + - name: it should fail + assert: + that: + - result is failed + + + - name: When in check mode, and purging a lifecycle policy that does not exists + ecs_ecr: + name: '{{ ecr_name }}' + purge_lifecycle_policy: yes + register: result + check_mode: yes + + - name: it should not skip and not change + assert: + that: + - not result is skipped + - not result is changed + + + - name: When in check mode, setting lifecyle policy on a repository that has no policy + ecs_ecr: + name: '{{ ecr_name }}' + lifecycle_policy: '{{ lifecycle_policy }}' + register: result + check_mode: yes + + - name: it should skip, change and not create + assert: + that: + - result is skipped + - result is changed + - not result.created + + + - name: When setting lifecycle policy on a repository that has no policy + ecs_ecr: + name: '{{ ecr_name }}' + lifecycle_policy: '{{ lifecycle_policy }}' + register: result + + - name: it should change and not create + assert: + that: + - result is changed + - not result.created + - result.lifecycle_policy is defined + - result.lifecycle_policy.rules|length == 1 + + + - name: When in check mode, and purging a lifecyle policy that exists + ecs_ecr: + name: '{{ ecr_name }}' + purge_lifecycle_policy: yes + register: result + check_mode: yes + + - name: it should skip, change but not create + assert: + that: + - result is skipped + - result is changed + - not result.created + + + - name: When purging a lifecycle policy that exists + ecs_ecr: + name: '{{ ecr_name }}' + purge_lifecycle_policy: yes + register: result + + - name: it should change and not create + assert: + that: + - result is changed + - not result.created + + + - name: When setting a lifecyle policy as a string + ecs_ecr: + name: '{{ ecr_name }}' + lifecycle_policy: '{{ lifecycle_policy | to_json }}' + register: result + + - name: it should change and not create + assert: + that: + - result is changed + - not result.created + + + - name: When setting a lifecycle policy to its current value + ecs_ecr: + name: '{{ ecr_name }}' + lifecycle_policy: '{{ lifecycle_policy }}' + register: result + + - name: it should not change + assert: + that: + - not result is changed + + + - name: When omitting lifecycle policy on a repository that has a policy + ecs_ecr: + name: '{{ ecr_name }}' + register: result + + - name: it should not change + assert: + that: + - not result is changed + + + - name: When specifying both lifecycle_policy and purge_lifecycle_policy + ecs_ecr: + name: '{{ ecr_name }}' + lifecycle_policy: '{{ lifecycle_policy }}' + purge_lifecycle_policy: yes + register: result + ignore_errors: true + + - name: it should fail + assert: + that: + - result is failed + + + - name: When specifying invalid JSON for lifecycle policy + ecs_ecr: + name: '{{ ecr_name }}' + lifecycle_policy: "Ceci n'est pas une JSON" + register: result + ignore_errors: true + + - name: it should fail + assert: + that: + - result is failed + + + - name: When specifying an invalid document for lifecycle policy + ecs_ecr: + name: '{{ ecr_name }}' + lifecycle_policy: + rules: + - invalid: "Ceci n'est pas une rule" + register: result + ignore_errors: true + + - name: it should fail + assert: + that: + - result is failed + + + - name: When in check mode, deleting a repository that exists + ecs_ecr: + name: '{{ ecr_name }}' + state: absent + register: result + check_mode: yes + + - name: it should skip, change and not create + assert: + that: + - result is skipped + - result is changed + - not result.created + + + - name: When deleting a repository that exists + ecs_ecr: + name: '{{ ecr_name }}' + state: absent + register: result + + - name: it should change + assert: + that: + - result is changed + + + - name: When in check mode, deleting a repository that does not exist + ecs_ecr: + name: '{{ ecr_name }}' + state: absent + register: result + check_mode: yes + + - name: it should not change + assert: + that: + - result is not skipped + - result is not changed + + + - name: When deleting a repository that does not exist + ecs_ecr: + name: '{{ ecr_name }}' + state: absent + register: result + + - name: it should not change + assert: + that: + - result is not changed + + - name: When creating an immutable repository + ecs_ecr: + name: '{{ ecr_name }}' + image_tag_mutability: immutable + register: result + + - name: it should change and create + assert: + that: + - result is changed + - result.created + + - name: it should have been configured as immutable + assert: + that: + - result.repository.imageTagMutability == "IMMUTABLE" + + + - name: When configuring an existing immutable repository to be mutable in check mode + ecs_ecr: + name: '{{ ecr_name }}' + image_tag_mutability: mutable + register: result + check_mode: yes + + - name: it should skip, change and configured mutable + assert: + that: + - result is skipped + - result is changed + - result.repository.imageTagMutability == "MUTABLE" + + - name: When configuring an existing immutable repository to be mutable + ecs_ecr: + name: '{{ ecr_name }}' + image_tag_mutability: mutable + register: result + + - name: it should change and configured mutable + assert: + that: + - result is changed + - result.repository.imageTagMutability == "MUTABLE" + + - name: When configuring an already mutable repository to be mutable + ecs_ecr: + name: '{{ ecr_name }}' + image_tag_mutability: mutable + register: result + + - name: it should not change + assert: + that: + - result is not changed + + - name: enable scan on push in check mode + ecs_ecr: + name: '{{ ecr_name }}' + scan_on_push: yes + check_mode: yes + register: result + + - name: it should change + assert: + that: + - result is skipped + - result is changed + + - name: enable scan on push + ecs_ecr: + name: '{{ ecr_name }}' + scan_on_push: yes + register: result + + - name: it should change + assert: + that: + - result is changed + - result.repository.imageScanningConfiguration.scanOnPush + + - name: verify enable scan on push + ecs_ecr: + name: '{{ ecr_name }}' + scan_on_push: yes + register: result + + - name: it should not change + assert: + that: + - result is not changed + - result.repository.imageScanningConfiguration.scanOnPush + + - name: disable scan on push + ecs_ecr: + name: '{{ ecr_name }}' + scan_on_push: no + register: result + + - name: it should change + assert: + that: + - result is changed + - not result.repository.imageScanningConfiguration.scanOnPush + + always: + + - name: Delete lingering ECR repository + ecs_ecr: + name: '{{ ecr_name }}' + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_tag/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_tag/aliases new file mode 100644 index 00000000..fe51f28b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_tag/aliases @@ -0,0 +1,3 @@ +cloud/aws +ecs_tag +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_tag/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_tag/tasks/main.yml new file mode 100644 index 00000000..78a11837 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/ecs_tag/tasks/main.yml @@ -0,0 +1,322 @@ +- module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key | default(omit) }}' + aws_secret_key: '{{ aws_secret_key | default(omit) }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region | default(omit) }}' + collections: + - amazon.aws + block: + - name: create ecs cluster + ecs_cluster: + name: "{{ resource_prefix }}" + state: present + register: cluster_info + + - name: create ecs_taskdefinition + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}" + state: present + register: ecs_taskdefinition_creation + + # even after deleting the cluster and recreating with a different name + # the previous service can prevent the current service from starting + # while it's in a draining state. Check the service info and sleep + # if the service does not report as inactive. + + - name: check if service is still running from a previous task + ecs_service_info: + service: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + details: yes + register: ecs_service_info_results + + - name: delay if the service was not inactive + pause: + seconds: 30 + when: + - ecs_service_info_results.services|length >0 + - ecs_service_info_results.services[0]['status'] != 'INACTIVE' + + - name: create ecs_service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + state: present + register: ecs_service_creation + + - name: ecs_service up + assert: + that: + - ecs_service_creation.changed + + # Test tagging cluster resource + + - name: cluster tags - Add tags to cluster + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{resource_prefix}}" + resource_type: cluster + state: present + tags: + Name: "{{ resource_prefix }}" + another: foobar + register: taglist + + - name: cluster tags - tags should be there + assert: + that: + - taglist.changed == true + - taglist.added_tags.Name == "{{ resource_prefix }}" + - taglist.added_tags.another == "foobar" + + - name: cluster tags - Add tags to cluster again + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{resource_prefix}}" + resource_type: cluster + state: present + tags: + Name: "{{ resource_prefix }}" + another: foobar + register: taglist + + - name: cluster tags - No change after adding again + assert: + that: + - taglist.changed == false + + - name: cluster tags - List tags + ecs_tag: + cluster_name: "{{ resource_prefix}}" + resource: "{{ resource_prefix}}" + resource_type: cluster + state: list + register: taglist + + - name: cluster tags - should have 2 tags + assert: + that: + - taglist.tags|list|length == 2 + - taglist.failed == false + - taglist.changed == false + + - name: cluster tags - remove tag another + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{resource_prefix}}" + resource_type: cluster + state: absent + tags: + another: + register: taglist + + - name: cluster tags - tag another should be gone + assert: + that: + - taglist.changed == true + - '"another" not in taglist.tags' + + - name: cluster tags - remove tag when not present + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{resource_prefix}}" + resource_type: cluster + state: absent + tags: + temp: + temp_two: + register: taglist + ignore_errors: yes + + - name: cluster tags - check that there was no fail, but changed is false + assert: + that: + - taglist.failed == false + - taglist.changed == false + + + - name: cluster tags - invalid cluster name + ecs_tag: + cluster_name: "{{resource_prefix}}-foo" + resource: "{{resource_prefix}}-foo" + resource_type: cluster + state: absent + tags: + temp: + temp_two: + register: taglist + ignore_errors: yes + + - name: cluster tags - Make sure invalid clustername is handled + assert: + that: + - taglist.failed == true + - taglist.changed == false + - 'taglist.msg is regex("Failed to find cluster ansible-test-.*-foo")' + + # Test tagging service resource + + - name: services tags - Add name tag + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{ecs_service_creation.service.serviceName}}" + resource_type: service + state: present + tags: + Name: "service-{{resource_prefix}}" + register: taglist + + - name: service tag - name tags should be there + assert: + that: + - taglist.changed == true + - taglist.added_tags.Name == "service-{{ resource_prefix }}" + - taglist.tags.Name == "service-{{ resource_prefix }}" + + - name: services tags - Add name tag again - see no change + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{ecs_service_creation.service.serviceName}}" + resource_type: service + state: present + tags: + Name: "service-{{resource_prefix}}" + register: taglist + + - name: service tag - test adding tag twice has no effect + assert: + that: + - taglist.changed == false + - taglist.tags.Name == "service-{{ resource_prefix }}" + + - name: service tags - remove service tags + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{ecs_service_creation.service.serviceName}}" + resource_type: service + state: absent + tags: + Name: + register: taglist + + - name: service tags - all tags gone + assert: + that: + - taglist.tags|list|length == 0 + - taglist.changed == true + - '"Name" not in taglist.tags' + + + # Test tagging task_definition resource + + - name: task_definition tags - Add name tag + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{ecs_taskdefinition_creation.taskdefinition.family}}" + resource_type: task_definition + state: present + tags: + Name: "task_definition-{{resource_prefix}}" + register: taglist + + - name: task_definition tag - name tags should be there + assert: + that: + - taglist.changed == true + - taglist.added_tags.Name == "task_definition-{{ resource_prefix }}" + - taglist.tags.Name == "task_definition-{{ resource_prefix }}" + + - name: task_definition tags - Add name tag again - see no change + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{ecs_taskdefinition_creation.taskdefinition.family}}" + resource_type: task_definition + state: present + tags: + Name: "task_definition-{{resource_prefix}}" + register: taglist + + - name: task_definition tag - test adding tag twice has no effect + assert: + that: + - taglist.changed == false + - taglist.tags.Name == "task_definition-{{ resource_prefix }}" + + - name: task_definition tags - retrieve all tags on a task_definition + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{ecs_taskdefinition_creation.taskdefinition.family}}" + resource_type: task_definition + state: list + register: taglist + + - name: task_definition tags - should have 1 tag + assert: + that: + - taglist.tags|list|length == 1 + - taglist.failed == false + - taglist.changed == false + + - name: task_definition tags - remove task_definition tags + ecs_tag: + cluster_name: "{{resource_prefix}}" + resource: "{{ecs_taskdefinition_creation.taskdefinition.family}}" + resource_type: task_definition + state: absent + tags: + Name: + register: taglist + + - name: task_definition tags - all tags gone + assert: + that: + - taglist.tags|list|length == 0 + - taglist.changed == true + - '"Name" not in taglist.tags' + + always: + - name: scale down ecs service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 0 + state: present + ignore_errors: yes + + - name: pause to wait for scale down + pause: + seconds: 30 + + - name: remove ecs service + ecs_service: + name: "{{ resource_prefix }}" + cluster: "{{ resource_prefix }}" + task_definition: "{{ resource_prefix }}" + desired_count: 1 + state: absent + ignore_errors: yes + + - name: remove ecs task definition + ecs_taskdefinition: + containers: + - name: my_container + image: ubuntu + memory: 128 + family: "{{ resource_prefix }}" + revision: "{{ ecs_taskdefinition_creation.taskdefinition.revision }}" + state: absent + ignore_errors: yes + + - name: remove ecs cluster + ecs_cluster: + name: "{{ resource_prefix }}" + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/aliases new file mode 100644 index 00000000..3f9eda99 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/aliases @@ -0,0 +1,3 @@ +cloud/aws +unsupported +efs_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/playbooks/full_test.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/playbooks/full_test.yml new file mode 100644 index 00000000..e15e5aa4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/playbooks/full_test.yml @@ -0,0 +1,9 @@ +- hosts: localhost + connection: local +# environment: "{{ ansible_test.environment }}" + + vars: + resource_prefix: 'ansible-testing' + + roles: + - efs diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/playbooks/roles/efs/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/playbooks/roles/efs/tasks/main.yml new file mode 100644 index 00000000..c17378fd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/playbooks/roles/efs/tasks/main.yml @@ -0,0 +1,331 @@ +--- +- name: efs tests + collections: + - amazon.aws + + block: + + # ============================================================ + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: true + + - name: Create VPC for testing + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.22.32.0/23 + tags: + Name: Ansible ec2_instance Testing VPC + tenancy: default + <<: *aws_connection_info + register: testing_vpc + + - name: Create subnet in zone A for testing + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.32.0/24 + az: "{{ aws_region }}a" + resource_tags: + Name: "{{ resource_prefix }}-subnet-a" + <<: *aws_connection_info + register: testing_subnet_a + + - name: Create subnet in zone B for testing + ec2_vpc_subnet: + state: present + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.33.0/24 + az: "{{ aws_region }}b" + resource_tags: + Name: "{{ resource_prefix }}-subnet-b" + <<: *aws_connection_info + register: testing_subnet_b + + - name: Get default security group id for vpc + ec2_group_info: + <<: *aws_connection_info + filters: + vpc-id: "{{ testing_vpc.vpc.id }}" + register: sg_facts + + - set_fact: + vpc_default_sg_id: "{{sg_facts.security_groups[0].group_id}}" + + + # ============================================================ + - name: Create Efs for testing + efs: + <<: *aws_connection_info + state: present + name: "{{ resource_prefix }}-test-efs" + tags: + Name: "{{ resource_prefix }}-test-tag" + Purpose: file-storage + targets: + - subnet_id: "{{testing_subnet_a.subnet.id}}" + - subnet_id: "{{testing_subnet_b.subnet.id}}" + throughput_mode: 'bursting' + register: created_efs + + # ============================================================ + - name: Get all EFS Facts + efs_info: + <<: *aws_connection_info + register: efs_result + + - assert: + that: + - (efs_result.efs | length) >= 1 + + # ============================================================ + - name: Get EFS by creation token + efs_info: + name: "{{ resource_prefix }}-test-efs" + <<: *aws_connection_info + register: efs_result + + - set_fact: + efs_result_assertions: + - efs_result is not changed + - (efs_result.efs | length) == 1 + - efs_result.efs[0].creation_token == "{{ resource_prefix }}-test-efs" + - efs_result.efs[0].file_system_id == created_efs.efs.file_system_id + - efs_result.efs[0].number_of_mount_targets == 2 + - (efs_result.efs[0].mount_targets | length) == 2 + - efs_result.efs[0].name == "{{ resource_prefix }}-test-tag" + - efs_result.efs[0].tags.Name == "{{ resource_prefix }}-test-tag" + - efs_result.efs[0].tags.Purpose == "file-storage" + - efs_result.efs[0].encrypted == false + - efs_result.efs[0].life_cycle_state == "available" + - efs_result.efs[0].performance_mode == "generalPurpose" + - efs_result.efs[0].throughput_mode == "bursting" + - efs_result.efs[0].mount_targets[0].security_groups[0] == vpc_default_sg_id + - efs_result.efs[0].mount_targets[1].security_groups[0] == vpc_default_sg_id + + - assert: + that: "{{efs_result_assertions}}" + + # ============================================================ + - name: Get EFS by id + efs_info: + id: "{{created_efs.efs.file_system_id}}" + <<: *aws_connection_info + register: efs_result + + - assert: + that: "{{efs_result_assertions}}" + + # ============================================================ + - name: Get EFS by tag + efs_info: + tags: + Name: "{{ resource_prefix }}-test-tag" + <<: *aws_connection_info + register: efs_result + + - assert: + that: "{{efs_result_assertions}}" + + # ============================================================ + - name: Get EFS by target (subnet_id) + efs_info: + targets: + - "{{testing_subnet_a.subnet.id}}" + <<: *aws_connection_info + register: efs_result + + - assert: + that: "{{efs_result_assertions}}" + + # ============================================================ + - name: Get EFS by target (security_group_id) + efs_info: + targets: + - "{{vpc_default_sg_id}}" + <<: *aws_connection_info + register: efs_result + + - assert: + that: "{{efs_result_assertions}}" + + # ============================================================ + - name: Get EFS by tag and target + efs_info: + tags: + Name: "{{ resource_prefix }}-test-tag" + targets: + - "{{testing_subnet_a.subnet.id}}" + <<: *aws_connection_info + register: efs_result + + - assert: + that: "{{efs_result_assertions}}" + + # ============================================================ + # Not checking efs_result.efs["throughput_mode"] here as + # Efs with status "life_cycle_state": "updating" might return the previous values + - name: Update Efs to use provisioned throughput_mode + efs: + <<: *aws_connection_info + state: present + name: "{{ resource_prefix }}-test-efs" + tags: + Name: "{{ resource_prefix }}-test-tag" + Purpose: file-storage + targets: + - subnet_id: "{{testing_subnet_a.subnet.id}}" + - subnet_id: "{{testing_subnet_b.subnet.id}}" + throughput_mode: 'provisioned' + provisioned_throughput_in_mibps: 5.0 + register: efs_result + + - assert: + that: + - efs_result is changed + + # ============================================================ + - name: Efs same value for provisioned_throughput_in_mibps + efs: + <<: *aws_connection_info + state: present + name: "{{ resource_prefix }}-test-efs" + tags: + Name: "{{ resource_prefix }}-test-tag" + Purpose: file-storage + targets: + - subnet_id: "{{testing_subnet_a.subnet.id}}" + - subnet_id: "{{testing_subnet_b.subnet.id}}" + throughput_mode: 'provisioned' + provisioned_throughput_in_mibps: 5.0 + register: efs_result + + - assert: + that: + - efs_result is not changed + - efs_result.efs["throughput_mode"] == "provisioned" + - efs_result.efs["provisioned_throughput_in_mibps"] == 5.0 + + # ============================================================ + - name: Efs new value for provisioned_throughput_in_mibps + efs: + <<: *aws_connection_info + state: present + name: "{{ resource_prefix }}-test-efs" + tags: + Name: "{{ resource_prefix }}-test-tag" + Purpose: file-storage + targets: + - subnet_id: "{{testing_subnet_a.subnet.id}}" + - subnet_id: "{{testing_subnet_b.subnet.id}}" + throughput_mode: 'provisioned' + provisioned_throughput_in_mibps: 8.0 + register: efs_result + + - assert: + that: + - efs_result is changed + - efs_result.efs["provisioned_throughput_in_mibps"] == 8.0 + + # ============================================================ + - name: Check new facts with provisioned mode + efs_info: + name: "{{ resource_prefix }}-test-efs" + <<: *aws_connection_info + register: efs_result + + - set_fact: + efs_result_assertions: + - efs_result is not changed + - efs_result.efs[0].throughput_mode == "provisioned" + - efs_result.efs[0].provisioned_throughput_in_mibps == 8.0 + - (efs_result.efs | length) == 1 + - efs_result.efs[0].creation_token == "{{ resource_prefix }}-test-efs" + - efs_result.efs[0].file_system_id == created_efs.efs.file_system_id + + - assert: + that: "{{efs_result_assertions}}" + + # ============================================================ + - name: Query unknown EFS by tag + efs_info: + tags: + Name: "{{ resource_prefix }}-unknown" + <<: *aws_connection_info + register: efs_result + + - assert: + that: + - efs_result is not changed + - (efs_result.efs | length) == 0 + + - name: Query unknown EFS by target + efs_info: + targets: + - sg-00000000000 + <<: *aws_connection_info + register: efs_result + + - assert: + that: + - efs_result is not changed + - (efs_result.efs | length) == 0 + + # ============================================================ + always: + - name: Delete EFS used for tests + efs: + <<: *aws_connection_info + state: absent + name: "{{ resource_prefix }}-test-efs" + tags: + Name: "{{ resource_prefix }}-test-tag" + Purpose: file-storage + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: Remove test subnet in zone A + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.32.0/24 + az: "{{ aws_region }}a" + resource_tags: + Name: "{{ resource_prefix }}-subnet-a" + <<: *aws_connection_info + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: Remove test subnet in zone B + ec2_vpc_subnet: + state: absent + vpc_id: "{{ testing_vpc.vpc.id }}" + cidr: 10.22.33.0/24 + az: "{{ aws_region }}b" + resource_tags: + Name: "{{ resource_prefix }}-subnet-b" + <<: *aws_connection_info + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: remove the VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.22.32.0/23 + state: absent + <<: *aws_connection_info + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/playbooks/version_fail.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/playbooks/version_fail.yml new file mode 100644 index 00000000..49c94ae3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/playbooks/version_fail.yml @@ -0,0 +1,32 @@ +- hosts: localhost + connection: local + environment: "{{ ansible_test.environment }}" + vars: + resource_prefix: 'ansible-testing' + + tasks: + - block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: True + + - name: create efs with provisioned_throughput options (fails gracefully) + efs: + state: present + name: "{{ resource_prefix }}-efs" + throughput_mode: 'provisioned' + provisioned_throughput_in_mibps: 8.0 + <<: *aws_connection_info + register: efs_provisioned_throughput_creation + ignore_errors: yes + + - name: check that graceful error message is returned when creation with throughput_mode and old botocore + assert: + that: + - efs_provisioned_throughput_creation.failed + - 'efs_provisioned_throughput_creation.msg == "throughput_mode parameter requires botocore >= 1.10.57"' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/runme.sh b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/runme.sh new file mode 100755 index 00000000..e4f214b8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/efs/runme.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -eux + +export ANSIBLE_ROLES_PATH=../ + +# Test graceful failure for older versions of botocore +source virtualenv.sh +pip install 'botocore<1.10.57' boto3 +ansible-playbook -i ../../inventory -v playbooks/version_fail.yml "$@" + +# Run full test suite +source virtualenv.sh +pip install 'botocore>=1.10.57' boto3 +ansible-playbook -i ../../inventory -v playbooks/full_test.yml "$@" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/defaults/main.yml new file mode 100644 index 00000000..8100bd55 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/defaults/main.yml @@ -0,0 +1,6 @@ +--- +# load balancer and target group names have to be less than 32 characters +# the 8 digit identifier at the end of resource_prefix helps determine during which test something +# was created and allows tests to be run in parallel +alb_name: "my-alb-{{ resource_prefix | regex_search('([0-9]+)$') }}" +tg_name: "my-tg-{{ resource_prefix | regex_search('([0-9]+)$') }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/meta/main.yml new file mode 100644 index 00000000..1810d4be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_remote_tmp_dir diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/full_test.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/full_test.yml new file mode 100644 index 00000000..82aabf1a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/full_test.yml @@ -0,0 +1,283 @@ +- name: elb_application_lb full_test + collections: + - amazon.aws + block: + - name: set connection information for all tasks + set_fact: + aws_connection_info: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + awscli_connection_info: + AWS_ACCESS_KEY_ID: '{{ aws_access_key }}' + AWS_SECRET_ACCESS_KEY: '{{ aws_secret_key }}' + AWS_SESSION_TOKEN: '{{ security_token }}' + AWS_DEFAULT_REGION: '{{ aws_region }}' + no_log: true + - name: create VPC + ec2_vpc_net: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + cidr_block: 10.228.228.0/22 + name: '{{ resource_prefix }}_vpc' + state: present + register: vpc + - name: create internet gateway + ec2_vpc_igw: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + vpc_id: '{{ vpc.vpc.id }}' + state: present + tags: + Name: '{{ resource_prefix }}' + register: igw + - name: create public subnet + ec2_vpc_subnet: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + cidr: '{{ item.cidr }}' + az: '{{ aws_region}}{{ item.az }}' + vpc_id: '{{ vpc.vpc.id }}' + state: present + tags: + Public: '{{ item.public|string }}' + Name: '{{ item.public|ternary(''public'', ''private'') }}-{{ item.az }}' + with_items: + - cidr: 10.228.228.0/24 + az: a + public: 'True' + - cidr: 10.228.229.0/24 + az: b + public: 'True' + - cidr: 10.228.230.0/24 + az: a + public: 'False' + - cidr: 10.228.231.0/24 + az: b + public: 'False' + register: subnets + - ec2_vpc_subnet_info: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + filters: + vpc-id: '{{ vpc.vpc.id }}' + register: vpc_subnets + - name: create list of subnet ids + set_fact: + alb_subnets: '{{ vpc_subnets|community.general.json_query(''subnets[?tags.Public == `True`].id'') }}' + private_subnets: '{{ vpc_subnets|community.general.json_query(''subnets[?tags.Public != `True`].id'') }}' + - name: create a route table + ec2_vpc_route_table: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + vpc_id: '{{ vpc.vpc.id }}' + tags: + Name: igw-route + Created: '{{ resource_prefix }}' + subnets: '{{ alb_subnets + private_subnets }}' + routes: + - dest: 0.0.0.0/0 + gateway_id: '{{ igw.gateway_id }}' + register: route_table + - ec2_group: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ resource_prefix }}' + description: security group for Ansible ALB integration tests + state: present + vpc_id: '{{ vpc.vpc.id }}' + rules: + - proto: tcp + from_port: 1 + to_port: 65535 + cidr_ip: 0.0.0.0/0 + register: sec_group + - name: create a target group for testing + elb_target_group: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ tg_name }}' + protocol: http + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: present + register: tg + - name: create privatekey for testing + community.crypto.openssl_privatekey: + path: ./ansible_alb_test.pem + size: 2048 + - name: create csr for cert + community.crypto.openssl_csr: + path: ./ansible_alb_test.csr + privatekey_path: ./ansible_alb_test.pem + C: US + ST: AnyPrincipality + L: AnyTown + O: AnsibleIntegrationTest + OU: Test + CN: ansible-alb-test.example.com + - name: create certificate + community.crypto.openssl_certificate: + path: ./ansible_alb_test.crt + privatekey_path: ./ansible_alb_test.pem + csr_path: ./ansible_alb_test.csr + provider: selfsigned + - name: upload server cert to iam + iam_cert: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ alb_name }}' + state: present + cert: ./ansible_alb_test.crt + key: ./ansible_alb_test.pem + register: cert_upload + - name: register certificate arn to acm_arn fact + set_fact: + cert_arn: '{{ cert_upload.arn }}' + - include_tasks: test_alb_bad_listener_options.yml + - include_tasks: test_alb_tags.yml + - include_tasks: test_creating_alb.yml + - include_tasks: test_alb_with_asg.yml + - include_tasks: test_modifying_alb_listeners.yml + - include_tasks: test_deleting_alb.yml + - include_tasks: test_multiple_actions.yml + always: + - name: destroy ALB + elb_application_lb: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ alb_name }}' + state: absent + wait: true + wait_timeout: 600 + ignore_errors: true + - name: destroy target group if it was created + elb_target_group: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ tg_name }}' + protocol: http + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: absent + wait: true + wait_timeout: 600 + register: remove_tg + retries: 5 + delay: 3 + until: remove_tg is success + when: tg is defined + ignore_errors: true + - name: destroy acm certificate + iam_cert: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ alb_name }}' + state: absent + register: remove_cert + retries: 5 + delay: 3 + until: remove_cert is success + when: cert_arn is defined + ignore_errors: true + - name: destroy sec group + ec2_group: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ sec_group.group_name }}' + description: security group for Ansible ALB integration tests + state: absent + vpc_id: '{{ vpc.vpc.id }}' + register: remove_sg + retries: 10 + delay: 5 + until: remove_sg is success + ignore_errors: true + - name: remove route table + ec2_vpc_route_table: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + vpc_id: '{{ vpc.vpc.id }}' + route_table_id: '{{ route_table.route_table.route_table_id }}' + lookup: id + state: absent + register: remove_rt + retries: 10 + delay: 5 + until: remove_rt is success + ignore_errors: true + - name: destroy subnets + ec2_vpc_subnet: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + cidr: '{{ item.cidr }}' + vpc_id: '{{ vpc.vpc.id }}' + state: absent + register: remove_subnet + retries: 10 + delay: 5 + until: remove_subnet is success + with_items: + - cidr: 10.228.228.0/24 + - cidr: 10.228.229.0/24 + - cidr: 10.228.230.0/24 + - cidr: 10.228.231.0/24 + ignore_errors: true + - name: destroy internet gateway + ec2_vpc_igw: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + vpc_id: '{{ vpc.vpc.id }}' + tags: + Name: '{{ resource_prefix }}' + state: absent + register: remove_igw + retries: 10 + delay: 5 + until: remove_igw is success + ignore_errors: true + - name: destroy VPC + ec2_vpc_net: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + cidr_block: 10.228.228.0/22 + name: '{{ resource_prefix }}_vpc' + state: absent + register: remove_vpc + retries: 10 + delay: 5 + until: remove_vpc is success + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/main.yml new file mode 100644 index 00000000..425469bc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/main.yml @@ -0,0 +1,44 @@ +- set_fact: + virtualenv: "{{ remote_tmp_dir }}/virtualenv" + virtualenv_command: "{{ ansible_python_interpreter }} -m virtualenv" + +- set_fact: + virtualenv_interpreter: "{{ virtualenv }}/bin/python" + +- pip: + name: virtualenv + +- pip: + name: + - 'botocore<1.10.30' + - boto3 + - boto + - coverage<5 + - cryptography + virtualenv: "{{ virtualenv }}" + virtualenv_command: "{{ virtualenv_command }}" + virtualenv_site_packages: no + +- include_tasks: multiple_actions_fail.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + + +- pip: + name: + - 'botocore>=1.10.30' + - boto3 + - boto + - coverage<5 + - cryptography + virtualenv: "{{ virtualenv }}" + virtualenv_command: "{{ virtualenv_command }}" + virtualenv_site_packages: no + +- include_tasks: full_test.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + +- file: + path: "{{ virtualenv }}" + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/multiple_actions_fail.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/multiple_actions_fail.yml new file mode 100644 index 00000000..56b6a194 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/multiple_actions_fail.yml @@ -0,0 +1,277 @@ +- name: elb_application_lb multiple_actions_fail tests + collections: + - amazon.aws + block: + - name: set connection information for all tasks + set_fact: + aws_connection_info: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + awscli_connection_info: + AWS_ACCESS_KEY_ID: '{{ aws_access_key }}' + AWS_SECRET_ACCESS_KEY: '{{ aws_secret_key }}' + AWS_SESSION_TOKEN: '{{ security_token }}' + AWS_DEFAULT_REGION: '{{ aws_region }}' + no_log: true + - name: create VPC + ec2_vpc_net: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + cidr_block: 10.228.228.0/22 + name: '{{ resource_prefix }}_vpc' + state: present + register: vpc + - name: create internet gateway + ec2_vpc_igw: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + vpc_id: '{{ vpc.vpc.id }}' + state: present + tags: + Name: '{{ resource_prefix }}' + register: igw + - name: create public subnet + ec2_vpc_subnet: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + cidr: '{{ item.cidr }}' + az: '{{ aws_region}}{{ item.az }}' + vpc_id: '{{ vpc.vpc.id }}' + state: present + tags: + Public: '{{ item.public|string }}' + Name: '{{ item.public|ternary(''public'', ''private'') }}-{{ item.az }}' + with_items: + - cidr: 10.228.228.0/24 + az: a + public: 'True' + - cidr: 10.228.229.0/24 + az: b + public: 'True' + - cidr: 10.228.230.0/24 + az: a + public: 'False' + - cidr: 10.228.231.0/24 + az: b + public: 'False' + register: subnets + - ec2_vpc_subnet_facts: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + filters: + vpc-id: '{{ vpc.vpc.id }}' + register: vpc_subnets + - name: create list of subnet ids + set_fact: + alb_subnets: '{{ vpc_subnets|community.general.json_query(''subnets[?tags.Public == `True`].id'') }}' + private_subnets: '{{ vpc_subnets|community.general.json_query(''subnets[?tags.Public != `True`].id'') }}' + - name: create a route table + ec2_vpc_route_table: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + vpc_id: '{{ vpc.vpc.id }}' + tags: + Name: igw-route + Created: '{{ resource_prefix }}' + subnets: '{{ alb_subnets + private_subnets }}' + routes: + - dest: 0.0.0.0/0 + gateway_id: '{{ igw.gateway_id }}' + register: route_table + - ec2_group: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ resource_prefix }}' + description: security group for Ansible ALB integration tests + state: present + vpc_id: '{{ vpc.vpc.id }}' + rules: + - proto: tcp + from_port: 1 + to_port: 65535 + cidr_ip: 0.0.0.0/0 + register: sec_group + - name: create a target group for testing + elb_target_group: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ tg_name }}' + protocol: http + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: present + register: tg + - name: create privatekey for testing + community.crypto.openssl_privatekey: + path: ./ansible_alb_test.pem + size: 2048 + - name: create csr for cert + community.crypto.openssl_csr: + path: ./ansible_alb_test.csr + privatekey_path: ./ansible_alb_test.pem + C: US + ST: AnyPrincipality + L: AnyTown + O: AnsibleIntegrationTest + OU: Test + CN: ansible-alb-test.example.com + - name: create certificate + community.crypto.openssl_certificate: + path: ./ansible_alb_test.crt + privatekey_path: ./ansible_alb_test.pem + csr_path: ./ansible_alb_test.csr + provider: selfsigned + - name: upload server cert to iam + iam_cert: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ alb_name }}' + state: present + cert: ./ansible_alb_test.crt + key: ./ansible_alb_test.pem + register: cert_upload + - name: register certificate arn to acm_arn fact + set_fact: + cert_arn: '{{ cert_upload.arn }}' + - include_tasks: test_multiple_actions_fail.yml + always: + - name: destroy ALB + elb_application_lb: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ alb_name }}' + state: absent + wait: true + wait_timeout: 600 + ignore_errors: true + - name: destroy target group if it was created + elb_target_group: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ tg_name }}' + protocol: http + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: absent + wait: true + wait_timeout: 600 + register: remove_tg + retries: 10 + delay: 5 + until: remove_tg is success + when: tg is defined + ignore_errors: true + - name: destroy acm certificate + iam_cert: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ alb_name }}' + state: absent + register: remove_cert + retries: 10 + delay: 5 + until: remove_cert is success + when: cert_arn is defined + ignore_errors: true + - name: destroy sec group + ec2_group: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + name: '{{ sec_group.group_name }}' + description: security group for Ansible ALB integration tests + state: absent + vpc_id: '{{ vpc.vpc.id }}' + register: remove_sg + retries: 10 + delay: 5 + until: remove_sg is success + ignore_errors: true + - name: remove route table + ec2_vpc_route_table: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + vpc_id: '{{ vpc.vpc.id }}' + route_table_id: '{{ route_table.route_table.route_table_id }}' + lookup: id + state: absent + register: remove_rt + retries: 10 + delay: 5 + until: remove_rt is success + ignore_errors: true + - name: destroy subnets + ec2_vpc_subnet: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + cidr: '{{ item.cidr }}' + vpc_id: '{{ vpc.vpc.id }}' + state: absent + register: remove_subnet + retries: 10 + delay: 5 + until: remove_subnet is success + with_items: + - cidr: 10.228.228.0/24 + - cidr: 10.228.229.0/24 + - cidr: 10.228.230.0/24 + - cidr: 10.228.231.0/24 + ignore_errors: true + - name: destroy internet gateway + ec2_vpc_igw: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + vpc_id: '{{ vpc.vpc.id }}' + tags: + Name: '{{ resource_prefix }}' + state: absent + register: remove_igw + retries: 10 + delay: 5 + until: remove_igw is success + ignore_errors: true + - name: destroy VPC + ec2_vpc_net: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + region: '{{ aws_region }}' + cidr_block: 10.228.228.0/22 + name: '{{ resource_prefix }}_vpc' + state: absent + register: remove_vpc + retries: 10 + delay: 5 + until: remove_vpc is success + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_alb_bad_listener_options.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_alb_bad_listener_options.yml new file mode 100644 index 00000000..821ad36d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_alb_bad_listener_options.yml @@ -0,0 +1,71 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: test creating an ALB with invalid listener options + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTPS + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + ignore_errors: yes + register: alb + + - assert: + that: + - alb is failed + - alb.msg.startswith("'SslPolicy' is a required listener dict key when Protocol = HTTPS") + + - name: test creating an ALB without providing required listener options + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Port: 80 + <<: *aws_connection_info + ignore_errors: yes + register: alb + + - assert: + that: + - alb is failed + - '"missing required arguments" in alb.msg' + - '"Protocol" in alb.msg' + - '"DefaultActions" in alb.msg' + + - name: test creating an ALB providing an invalid listener option type + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTP + Port: "bad type" + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + ignore_errors: yes + register: alb + + - assert: + that: + - alb is failed + - "'unable to convert to int' in alb.msg" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_alb_tags.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_alb_tags.yml new file mode 100644 index 00000000..b7942fa7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_alb_tags.yml @@ -0,0 +1,93 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: create ALB with no listeners + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + + - name: re-create ALB with no listeners + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + <<: *aws_connection_info + register: alb + + - assert: + that: + - not alb.changed + + - name: add tags to ALB + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + tags: + created_by: "ALB test {{ resource_prefix }}" + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - 'alb.tags == {"created_by": "ALB test {{ resource_prefix }}"}' + + - name: remove tags from ALB + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + tags: {} + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - not alb.tags + + - name: test idempotence + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + tags: {} + <<: *aws_connection_info + register: alb + + - assert: + that: + - not alb.changed + - not alb.tags + + - name: destroy ALB with no listeners + elb_application_lb: + name: "{{ alb_name }}" + state: absent + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_alb_with_asg.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_alb_with_asg.yml new file mode 100644 index 00000000..de97d5bd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_alb_with_asg.yml @@ -0,0 +1,89 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - ec2_ami_info: + <<: *aws_connection_info + filters: + architecture: x86_64 + virtualization-type: hvm + root-device-type: ebs + name: "amzn-ami-hvm*" + owner-alias: "amazon" + register: amis + + - set_fact: + latest_amazon_linux: "{{ amis.images | sort(attribute='creation_date') | last }}" + + - ec2_asg: + <<: *aws_connection_info + state: absent + name: "{{ resource_prefix }}-webservers" + wait_timeout: 900 + + - ec2_lc: + <<: *aws_connection_info + name: "{{ resource_prefix }}-web-lcfg" + state: absent + + - name: Create launch config for testing + ec2_lc: + <<: *aws_connection_info + name: "{{ resource_prefix }}-web-lcfg" + assign_public_ip: true + image_id: "{{ latest_amazon_linux.image_id }}" + security_groups: "{{ sec_group.group_id }}" + instance_type: t2.medium + user_data: | + #!/bin/bash + set -x + yum update -y --nogpgcheck + yum install -y --nogpgcheck httpd + echo "Hello Ansiblings!" >> /var/www/html/index.html + service httpd start + volumes: + - device_name: /dev/xvda + volume_size: 10 + volume_type: gp2 + delete_on_termination: true + + - name: Create autoscaling group for app server fleet + ec2_asg: + <<: *aws_connection_info + name: "{{ resource_prefix }}-webservers" + vpc_zone_identifier: "{{ alb_subnets }}" + launch_config_name: "{{ resource_prefix }}-web-lcfg" + termination_policies: + - OldestLaunchConfiguration + - Default + health_check_period: 600 + health_check_type: EC2 + replace_all_instances: true + min_size: 0 + max_size: 2 + desired_capacity: 1 + wait_for_instances: true + target_group_arns: + - "{{ tg.target_group_arn }}" + + always: + + - ec2_asg: + <<: *aws_connection_info + state: absent + name: "{{ resource_prefix }}-webservers" + wait_timeout: 900 + ignore_errors: yes + + - ec2_lc: + <<: *aws_connection_info + name: "{{ resource_prefix }}-web-lcfg" + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_creating_alb.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_creating_alb.yml new file mode 100644 index 00000000..ee932d4e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_creating_alb.yml @@ -0,0 +1,52 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: create ALB with a listener + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners|length == 1 + - alb.listeners[0].rules|length == 1 + + - name: test idempotence creating ALB with a listener + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + register: alb + + - assert: + that: + - not alb.changed + - alb.listeners|length == 1 + - alb.listeners[0].rules|length == 1 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_deleting_alb.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_deleting_alb.yml new file mode 100644 index 00000000..34e278cb --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_deleting_alb.yml @@ -0,0 +1,52 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: destroy ALB with listener + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: absent + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + wait: yes + wait_timeout: 300 + register: alb + + - assert: + that: + - alb.changed + + - name: test idempotence + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: absent + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + wait: yes + wait_timeout: 300 + register: alb + + - assert: + that: + - not alb.changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml new file mode 100644 index 00000000..3e4765b1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml @@ -0,0 +1,240 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: add a rule to the listener + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + Rules: + - Conditions: + - Field: path-pattern + Values: + - '/test' + Priority: '1' + Actions: + - TargetGroupName: "{{ tg_name }}" + Type: forward + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners[0].rules|length == 2 + + - name: test replacing the rule with one with the same priority + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + purge_listeners: true + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + Rules: + - Conditions: + - Field: path-pattern + Values: + - '/new' + Priority: '1' + Actions: + - TargetGroupName: "{{ tg_name }}" + Type: forward + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners[0].rules|length == 2 + + - name: test the rule will not be removed without purge_listeners + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + register: alb + + - assert: + that: + - not alb.changed + - alb.listeners[0].rules|length == 2 + + - name: test a rule can be added and other rules will not be removed when purge_rules is no. + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + purge_rules: no + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + Rules: + - Conditions: + - Field: path-pattern + Values: + - '/new' + Priority: '2' + Actions: + - TargetGroupName: "{{ tg_name }}" + Type: forward + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners[0].rules|length == 3 + + - name: add a rule that uses the host header condition to the listener + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + purge_rules: no + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + Rules: + - Conditions: + - Field: host-header + Values: + - 'local.mydomain.com' + Priority: '3' + Actions: + - TargetGroupName: "{{ tg_name }}" + Type: forward + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners[0].rules|length == 4 + - '{{ alb|community.general.json_query("listeners[].rules[].conditions[].host_header_config.values[]")|length == 1 }}' + + - name: test replacing the rule that uses the host header condition with multiple host header conditions + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + purge_rules: no + state: present + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + Rules: + - Conditions: + - Field: host-header + Values: + - 'local.mydomain.com' + - 'alternate.mydomain.com' + Priority: '3' + Actions: + - TargetGroupName: "{{ tg_name }}" + Type: forward + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners[0].rules|length == 4 + - '{{ alb|community.general.json_query("listeners[].rules[].conditions[].host_header_config.values[]")|length == 2 }}' + + - name: remove the rule + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + purge_listeners: true + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + Rules: [] + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners[0].rules|length == 1 + + - name: remove listener from ALB + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: [] + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - not alb.listeners + + - name: add the listener to the ALB + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners|length == 1 + - alb.availability_zones|length == 2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions.yml new file mode 100644 index 00000000..6223270c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions.yml @@ -0,0 +1,467 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: register dummy OIDC config + set_fact: + AuthenticateOidcActionConfig: + AuthorizationEndpoint: "https://www.example.com/auth" + ClientId: "eeeeeeeeeeeeeeeeeeeeeeeeee" + ClientSecret: "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + Issuer: "https://www.example.com/issuer" + OnUnauthenticatedRequest: "authenticate" + Scope: "openid" + SessionCookieName: "AWSELBAuthSessionCookie" + SessionTimeout: 604800 + TokenEndpoint: "https://www.example.com/token" + UserInfoEndpoint: "https://www.example.com/userinfo" + UseExistingClientSecret: true + + - name: register fixed response action + set_fact: + FixedResponseActionConfig: + ContentType: "text/plain" + MessageBody: "This is the page you're looking for" + StatusCode: "200" + + - name: register redirect action + set_fact: + RedirectActionConfig: + Host: "#{host}" + Path: "/example/redir" # or /#{path} + Port: "#{port}" + Protocol: "#{protocol}" + Query: "#{query}" + StatusCode: "HTTP_302" # or HTTP_301 + + - name: delete existing ALB to avoid target group association issues + elb_application_lb: + name: "{{ alb_name }}" + state: absent + <<: *aws_connection_info + wait: yes + wait_timeout: 600 + + - name: cleanup tg to avoid target group association issues + elb_target_group: + name: "{{ tg_name }}" + protocol: http + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + state: absent + wait: yes + wait_timeout: 600 + <<: *aws_connection_info + register: cleanup_tg + retries: 5 + delay: 3 + until: cleanup_tg is success + + - name: recreate a target group + elb_target_group: + name: "{{ tg_name }}" + protocol: http + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + state: present + <<: *aws_connection_info + register: tg + + - name: create ALB with redirect DefaultAction + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTPS + Port: 443 + DefaultActions: + - Type: redirect + RedirectConfig: "{{ RedirectActionConfig }}" + Certificates: + - CertificateArn: "{{ cert_arn }}" + SslPolicy: ELBSecurityPolicy-2016-08 + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners|length == 1 + - alb.listeners[0].rules[0].actions|length == 1 + - alb.listeners[0].rules[0].actions[0].type == "redirect" + + - name: test idempotence with redirect DefaultAction + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTPS + Port: 443 + DefaultActions: + - Type: redirect + RedirectConfig: "{{ RedirectActionConfig }}" + Certificates: + - CertificateArn: "{{ cert_arn }}" + SslPolicy: ELBSecurityPolicy-2016-08 + <<: *aws_connection_info + register: alb + + - assert: + that: + - not alb.changed + - alb.listeners|length == 1 + - alb.listeners[0].rules[0].actions|length == 1 + - alb.listeners[0].rules[0].actions[0].type == "redirect" + + - name: update ALB with fixed-response DefaultAction + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTPS + Port: 443 + DefaultActions: + - Type: fixed-response + FixedResponseConfig: "{{ FixedResponseActionConfig }}" + Certificates: + - CertificateArn: "{{ cert_arn }}" + SslPolicy: ELBSecurityPolicy-2016-08 + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners|length == 1 + - alb.listeners[0].rules[0].actions|length == 1 + - alb.listeners[0].rules[0].actions[0].type == "fixed-response" + + - name: test idempotence with fixed-response DefaultAction + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTPS + Port: 443 + DefaultActions: + - Type: fixed-response + FixedResponseConfig: "{{ FixedResponseActionConfig }}" + Certificates: + - CertificateArn: "{{ cert_arn }}" + SslPolicy: ELBSecurityPolicy-2016-08 + <<: *aws_connection_info + register: alb + + - assert: + that: + - not alb.changed + - alb.listeners|length == 1 + - alb.listeners[0].rules[0].actions|length == 1 + - alb.listeners[0].rules[0].actions[0].type == "fixed-response" + + - name: test multiple non-default rules + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTPS + Port: 443 + DefaultActions: + - Type: fixed-response + FixedResponseConfig: "{{ FixedResponseActionConfig }}" + Certificates: + - CertificateArn: "{{ cert_arn }}" + SslPolicy: ELBSecurityPolicy-2016-08 + Rules: + - Conditions: + - Field: path-pattern + Values: + - "/forward-path/*" + Priority: 1 + Actions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + - Conditions: + - Field: path-pattern + Values: + - "/redirect-path/*" + Priority: 2 + Actions: + - Type: redirect + RedirectConfig: "{{ RedirectActionConfig }}" + - Conditions: + - Field: path-pattern + Values: + - "/fixed-response-path/" + Priority: 3 + Actions: + - Type: fixed-response + FixedResponseConfig: "{{ FixedResponseActionConfig }}" + <<: *aws_connection_info + register: alb + + - assert: + that: + - alb.changed + - alb.listeners|length == 1 + - alb.listeners[0].rules|length == 4 ## defaultactions is included as a rule + - alb.listeners[0].rules[0].actions|length == 1 + - alb.listeners[0].rules[0].actions[0].type == "forward" + - alb.listeners[0].rules[1].actions|length == 1 + - alb.listeners[0].rules[1].actions[0].type == "redirect" + - alb.listeners[0].rules[2].actions|length == 1 + - alb.listeners[0].rules[2].actions[0].type == "fixed-response" + + - name: test idempotence multiple non-default rules + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTPS + Port: 443 + DefaultActions: + - Type: fixed-response + FixedResponseConfig: "{{ FixedResponseActionConfig }}" + Certificates: + - CertificateArn: "{{ cert_arn }}" + SslPolicy: ELBSecurityPolicy-2016-08 + Rules: + - Conditions: + - Field: path-pattern + Values: + - "/forward-path/*" + Priority: 1 + Actions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + - Conditions: + - Field: path-pattern + Values: + - "/redirect-path/*" + Priority: 2 + Actions: + - Type: redirect + RedirectConfig: "{{ RedirectActionConfig }}" + - Conditions: + - Field: path-pattern + Values: + - "/fixed-response-path/" + Priority: 3 + Actions: + - Type: fixed-response + FixedResponseConfig: "{{ FixedResponseActionConfig }}" + <<: *aws_connection_info + register: alb + + - assert: + that: + - not alb.changed + - alb.listeners|length == 1 + - alb.listeners[0].rules|length == 4 ## defaultactions is included as a rule + - alb.listeners[0].rules[0].actions|length == 1 + - alb.listeners[0].rules[0].actions[0].type == "forward" + - alb.listeners[0].rules[1].actions|length == 1 + - alb.listeners[0].rules[1].actions[0].type == "redirect" + - alb.listeners[0].rules[2].actions|length == 1 + - alb.listeners[0].rules[2].actions[0].type == "fixed-response" + + +# - name: test creating ALB with a default listener with multiple actions +# elb_application_lb: +# name: "{{ alb_name }}" +# subnets: "{{ alb_subnets }}" +# security_groups: "{{ sec_group.group_id }}" +# state: present +# listeners: +# - Protocol: HTTPS +# Port: 443 +# DefaultActions: +# - Type: forward +# TargetGroupName: "{{ tg_name }}" +# Order: 2 +# - Type: authenticate-oidc +# AuthenticateOidcConfig: "{{ AuthenticateOidcActionConfig }}" +# Order: 1 +# Certificates: +# - CertificateArn: "{{ cert_arn }}" +# SslPolicy: ELBSecurityPolicy-2016-08 +# <<: *aws_connection_info +# register: alb +# +# - assert: +# that: +# - alb.listeners|length == 1 +# - alb.listeners[0].rules[0].actions|length == 2 +# +# - name: test changing order of actions +# elb_application_lb: +# name: "{{ alb_name }}" +# subnets: "{{ alb_subnets }}" +# security_groups: "{{ sec_group.group_id }}" +# state: present +# listeners: +# - Protocol: HTTPS +# Port: 443 +# DefaultActions: +# - Type: authenticate-oidc +# AuthenticateOidcConfig: "{{ AuthenticateOidcActionConfig }}" +# Order: 1 +# - Type: forward +# TargetGroupName: "{{ tg_name }}" +# Order: 2 +# Certificates: +# - CertificateArn: "{{ cert_arn }}" +# SslPolicy: ELBSecurityPolicy-2016-08 +# <<: *aws_connection_info +# register: alb +# +# - assert: +# that: +# - not alb.changed +# - alb.listeners|length == 1 +# - alb.listeners[0].rules[0].actions|length == 2 +# +# - name: test non-default rule with multiple actions +# elb_application_lb: +# name: "{{ alb_name }}" +# subnets: "{{ alb_subnets }}" +# security_groups: "{{ sec_group.group_id }}" +# state: present +# listeners: +# - Protocol: HTTPS +# Port: 443 +# DefaultActions: +# - Type: authenticate-oidc +# AuthenticateOidcConfig: "{{ AuthenticateOidcActionConfig }}" +# Order: 1 +# - Type: forward +# TargetGroupName: "{{ tg_name }}" +# Order: 2 +# Certificates: +# - CertificateArn: "{{ cert_arn }}" +# SslPolicy: ELBSecurityPolicy-2016-08 +# Rules: +# - Conditions: +# - Field: path-pattern +# Values: +# - "*" +# Priority: 1 +# Actions: +# - Type: forward +# TargetGroupName: "{{ tg_name }}" +# Order: 2 +# - Type: authenticate-oidc +# AuthenticateOidcConfig: "{{ AuthenticateOidcActionConfig }}" +# Order: 1 +# <<: *aws_connection_info +# register: alb +# +# - assert: +# that: +# - alb.changed +# - alb.listeners|length == 1 +# - alb.listeners[0].rules[0].actions|length == 2 +# - alb.listeners[0].rules[1].actions|length == 2 +# +# - name: test idempotency non-default rule with multiple actions +# elb_application_lb: +# name: "{{ alb_name }}" +# subnets: "{{ alb_subnets }}" +# security_groups: "{{ sec_group.group_id }}" +# state: present +# listeners: +# - Protocol: HTTPS +# Port: 443 +# DefaultActions: +# - Type: authenticate-oidc +# AuthenticateOidcConfig: "{{ AuthenticateOidcActionConfig }}" +# Order: 1 +# - Type: forward +# TargetGroupName: "{{ tg_name }}" +# Order: 2 +# Certificates: +# - CertificateArn: "{{ cert_arn }}" +# SslPolicy: ELBSecurityPolicy-2016-08 +# Rules: +# - Conditions: +# - Field: path-pattern +# Values: +# - "*" +# Priority: 1 +# Actions: +# - Type: forward +# TargetGroupName: "{{ tg_name }}" +# Order: 2 +# - Type: authenticate-oidc +# AuthenticateOidcConfig: "{{ AuthenticateOidcActionConfig }}" +# Order: 1 +# <<: *aws_connection_info +# register: alb +# +# - assert: +# that: +# - not alb.changed +# - alb.listeners|length == 1 +# - alb.listeners[0].rules[0].actions|length == 2 +# - alb.listeners[0].rules[1].actions|length == 2 +# +# - name: test non-default rule action order change +# elb_application_lb: +# name: "{{ alb_name }}" +# subnets: "{{ alb_subnets }}" +# security_groups: "{{ sec_group.group_id }}" +# state: present +# listeners: +# - Protocol: HTTPS +# Port: 443 +# DefaultActions: +# - Type: authenticate-oidc +# AuthenticateOidcConfig: "{{ AuthenticateOidcActionConfig }}" +# Order: 1 +# - Type: forward +# TargetGroupName: "{{ tg_name }}" +# Order: 2 +# Certificates: +# - CertificateArn: "{{ cert_arn }}" +# SslPolicy: ELBSecurityPolicy-2016-08 +# Rules: +# - Conditions: +# - Field: path-pattern +# Values: +# - "*" +# Priority: 1 +# Actions: +# - Type: authenticate-oidc +# AuthenticateOidcConfig: "{{ AuthenticateOidcActionConfig }}" +# Order: 1 +# - Type: forward +# TargetGroupName: "{{ tg_name }}" +# Order: 2 +# <<: *aws_connection_info +# register: alb +# +# - assert: +# that: +# - not alb.changed +# - alb.listeners|length == 1 +# - alb.listeners[0].rules[0].actions|length == 2 +# - alb.listeners[0].rules[1].actions|length == 2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions_fail.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions_fail.yml new file mode 100644 index 00000000..722002f2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions_fail.yml @@ -0,0 +1,53 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: register dummy OIDC config + set_fact: + AuthenticateOidcActionConfig: + AuthorizationEndpoint: "https://www.example.com/auth" + ClientId: "eeeeeeeeeeeeeeeeeeeeeeeeee" + ClientSecret: "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + Issuer: "https://www.example.com/issuer" + OnUnauthenticatedRequest: "authenticate" + Scope: "openid" + SessionCookieName: "AWSELBAuthSessionCookie" + SessionTimeout: 604800 + TokenEndpoint: "https://www.example.com/token" + UserInfoEndpoint: "https://www.example.com/userinfo" + + - name: create ALB with multiple DefaultActions + elb_application_lb: + name: "{{ alb_name }}" + subnets: "{{ alb_subnets }}" + security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: HTTPS + Port: 443 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + Order: 2 + - Type: authenticate-oidc + AuthenticateOidcConfig: "{{ AuthenticateOidcActionConfig }}" + Order: 1 + Certificates: + - CertificateArn: "{{ cert_arn }}" + SslPolicy: ELBSecurityPolicy-2016-08 + <<: *aws_connection_info + register: alb + ignore_errors: yes + + - name: check for a graceful failure message + assert: + that: + - alb.failed + - 'alb.msg == "installed version of botocore does not support multiple actions, please upgrade botocore to version 1.10.30 or higher"' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/defaults/main.yml new file mode 100644 index 00000000..76164523 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/defaults/main.yml @@ -0,0 +1,3 @@ +--- +# defaults file for test_ec2_eip +tag_prefix: '{{resource_prefix}}' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/tasks/main.yml new file mode 100644 index 00000000..2b368c6f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/tasks/main.yml @@ -0,0 +1,425 @@ +--- +# __Test Info__ +# Create a self signed cert and upload it to AWS +# http://www.akadia.com/services/ssh_test_certificate.html +# http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/ssl-server-cert.html + +# __Test Outline__ +# +# __elb_classic_lb__ +# create test elb with listeners and certificate +# change AZ's +# change listeners +# remove listeners +# remove elb + +# __ec2-common__ +# test environment variable EC2_REGION +# test with no parameters +# test with only instance_id +# test invalid region parameter +# test valid region parameter +# test invalid ec2_url parameter +# test valid ec2_url parameter +# test credentials from environment +# test credential parameters + +- block: + + # ============================================================ + # create test elb with listeners, certificate, and health check + + - name: Create ELB + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + ec2_access_key: "{{ ec2_access_key }}" + ec2_secret_key: "{{ ec2_secret_key }}" + security_token: "{{ security_token }}" + state: present + zones: + - "{{ ec2_region }}a" + - "{{ ec2_region }}b" + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + - protocol: http + load_balancer_port: 8080 + instance_port: 8080 + health_check: + ping_protocol: http + ping_port: 80 + ping_path: "/index.html" + response_timeout: 5 + interval: 30 + unhealthy_threshold: 2 + healthy_threshold: 10 + register: info + + - assert: + that: + - 'info.changed' + - 'info.elb.status == "created"' + - '"{{ ec2_region }}a" in info.elb.zones' + - '"{{ ec2_region }}b" in info.elb.zones' + - 'info.elb.health_check.healthy_threshold == 10' + - 'info.elb.health_check.interval == 30' + - 'info.elb.health_check.target == "HTTP:80/index.html"' + - 'info.elb.health_check.timeout == 5' + - 'info.elb.health_check.unhealthy_threshold == 2' + - '[80, 80, "HTTP", "HTTP"] in info.elb.listeners' + - '[8080, 8080, "HTTP", "HTTP"] in info.elb.listeners' + + # ============================================================ + + # check ports, would be cool, but we are at the mercy of AWS + # to start things in a timely manner + + #- name: check to make sure 80 is listening + # wait_for: host={{ info.elb.dns_name }} port=80 timeout=600 + # register: result + + #- name: assert can connect to port# + # assert: 'result.state == "started"' + + #- name: check to make sure 443 is listening + # wait_for: host={{ info.elb.dns_name }} port=443 timeout=600 + # register: result + + #- name: assert can connect to port# + # assert: 'result.state == "started"' + + # ============================================================ + + # Change AZ's + + - name: Change AZ's + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + ec2_access_key: "{{ ec2_access_key }}" + ec2_secret_key: "{{ ec2_secret_key }}" + security_token: "{{ security_token }}" + state: present + zones: + - "{{ ec2_region }}c" + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + purge_zones: yes + health_check: + ping_protocol: http + ping_port: 80 + ping_path: "/index.html" + response_timeout: 5 + interval: 30 + unhealthy_threshold: 2 + healthy_threshold: 10 + register: info + + + + - assert: + that: + - 'info.elb.status == "ok"' + - 'info.changed' + - 'info.elb.zones[0] == "{{ ec2_region }}c"' + + # ============================================================ + + # Update AZ's + + - name: Update AZ's + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + ec2_access_key: "{{ ec2_access_key }}" + ec2_secret_key: "{{ ec2_secret_key }}" + security_token: "{{ security_token }}" + state: present + zones: + - "{{ ec2_region }}a" + - "{{ ec2_region }}b" + - "{{ ec2_region }}c" + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + purge_zones: yes + register: info + + - assert: + that: + - 'info.changed' + - 'info.elb.status == "ok"' + - '"{{ ec2_region }}a" in info.elb.zones' + - '"{{ ec2_region }}b" in info.elb.zones' + - '"{{ ec2_region }}c" in info.elb.zones' + + + # ============================================================ + + # Purge Listeners + + - name: Purge Listeners + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + ec2_access_key: "{{ ec2_access_key }}" + ec2_secret_key: "{{ ec2_secret_key }}" + security_token: "{{ security_token }}" + state: present + zones: + - "{{ ec2_region }}a" + - "{{ ec2_region }}b" + - "{{ ec2_region }}c" + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 81 + purge_listeners: yes + register: info + + - assert: + that: + - 'info.elb.status == "ok"' + - 'info.changed' + - '[80, 81, "HTTP", "HTTP"] in info.elb.listeners' + - 'info.elb.listeners|length == 1' + + + + # ============================================================ + + # add Listeners + + - name: Add Listeners + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + ec2_access_key: "{{ ec2_access_key }}" + ec2_secret_key: "{{ ec2_secret_key }}" + security_token: "{{ security_token }}" + state: present + zones: + - "{{ ec2_region }}a" + - "{{ ec2_region }}b" + - "{{ ec2_region }}c" + listeners: + - protocol: http + load_balancer_port: 8081 + instance_port: 8081 + purge_listeners: no + register: info + + - assert: + that: + - 'info.elb.status == "ok"' + - 'info.changed' + - '[80, 81, "HTTP", "HTTP"] in info.elb.listeners' + - '[8081, 8081, "HTTP", "HTTP"] in info.elb.listeners' + - 'info.elb.listeners|length == 2' + + + # ============================================================ + + - name: test with no parameters + elb_classic_lb: + register: result + ignore_errors: true + + - name: assert failure when called with no parameters + assert: + that: + - 'result.failed' + - 'result.msg.startswith("missing required arguments: ")' + + + + # ============================================================ + - name: test with only name + elb_classic_lb: + name="{{ tag_prefix }}" + register: result + ignore_errors: true + + - name: assert failure when called with only name + assert: + that: + - 'result.failed' + - 'result.msg == "missing required arguments: state"' + + + # ============================================================ + - name: test invalid region parameter + elb_classic_lb: + name: "{{ tag_prefix }}" + region: 'asdf querty 1234' + state: present + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + zones: + - "{{ ec2_region }}a" + - "{{ ec2_region }}b" + - "{{ ec2_region }}c" + register: result + ignore_errors: true + + - name: assert invalid region parameter + assert: + that: + - 'result.failed' + - 'result.msg.startswith("Region asdf querty 1234 does not seem to be available ")' + + + # ============================================================ + - name: test valid region parameter + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + state: present + zones: + - "{{ ec2_region }}a" + - "{{ ec2_region }}b" + - "{{ ec2_region }}c" + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + + register: result + ignore_errors: true + + - name: assert valid region parameter + assert: + that: + - 'result.failed' + - 'result.msg.startswith("No handler was ready to authenticate.")' + + + # ============================================================ + + - name: test invalid ec2_url parameter + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + state: present + zones: + - "{{ ec2_region }}a" + - "{{ ec2_region }}b" + - "{{ ec2_region }}c" + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + environment: + EC2_URL: bogus.example.com + register: result + ignore_errors: true + + - name: assert invalid ec2_url parameter + assert: + that: + - 'result.failed' + - 'result.msg.startswith("No handler was ready to authenticate.")' + + + # ============================================================ + - name: test valid ec2_url parameter + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + state: present + zones: + - "{{ ec2_region }}a" + - "{{ ec2_region }}b" + - "{{ ec2_region }}c" + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + environment: + EC2_URL: '{{ec2_url}}' + register: result + ignore_errors: true + + - name: assert valid ec2_url parameter + assert: + that: + - 'result.failed' + - 'result.msg.startswith("No handler was ready to authenticate.")' + + + # ============================================================ + - name: test credentials from environment + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + state: present + zones: + - "{{ ec2_region }}a" + - "{{ ec2_region }}b" + - "{{ ec2_region }}c" + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + environment: + EC2_ACCESS_KEY: bogus_access_key + EC2_SECRET_KEY: bogus_secret_key + register: result + ignore_errors: true + + - name: assert credentials from environment + assert: + that: + - 'result.failed' + - '"InvalidClientTokenId" in result.exception' + + + # ============================================================ + - name: test credential parameters + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + state: present + zones: + - "{{ ec2_region }}a" + - "{{ ec2_region }}b" + - "{{ ec2_region }}c" + listeners: + - protocol: http + load_balancer_port: 80 + instance_port: 80 + register: result + ignore_errors: true + + - name: assert credential parameters + assert: + that: + - 'result.failed' + - '"No handler was ready to authenticate. 1 handlers were checked." in result.msg' + + always: + + # ============================================================ + - name: remove the test load balancer completely + elb_classic_lb: + name: "{{ tag_prefix }}" + region: "{{ ec2_region }}" + state: absent + ec2_access_key: "{{ ec2_access_key }}" + ec2_secret_key: "{{ ec2_secret_key }}" + security_token: "{{ security_token }}" + register: result + + - name: assert the load balancer was removed + assert: + that: + - 'result.changed' + - 'result.elb.name == "{{tag_prefix}}"' + - 'result.elb.status == "deleted"' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/vars/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/vars/main.yml new file mode 100644 index 00000000..79194af1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_classic_lb/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for test_ec2_elb_lb diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/defaults/main.yml new file mode 100644 index 00000000..5ee3fa45 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/defaults/main.yml @@ -0,0 +1,7 @@ +--- +# load balancer and target group names have to be less than 32 characters +# the 8 digit identifier at the end of resource_prefix helps determine during which test something +# was created and allows tests to be run in parallel +nlb_name: "my-nlb-{{ resource_prefix | regex_search('([0-9]+)$') }}" +tg_name: "my-tg-{{ resource_prefix | regex_search('([0-9]+)$') }}" +tg_tcpudp_name: "my-tg-tcpudp-{{ resource_prefix | regex_search('([0-9]+)$') }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/files/cert.pem b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/files/cert.pem new file mode 100644 index 00000000..81df3a6f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/files/cert.pem @@ -0,0 +1,32 @@ +-----BEGIN CERTIFICATE----- +MIIFiTCCA3GgAwIBAgIJAKE+XLUKdWtPMA0GCSqGSIb3DQEBCwUAMFsxCzAJBgNV +BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX +aWRnaXRzIFB0eSBMdGQxFDASBgNVBAMMC2V4YW1wbGUuY29tMB4XDTE5MDYxNDEx +MzIzM1oXDTIwMDYxMzExMzIzM1owWzELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNv +bWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEUMBIG +A1UEAwwLZXhhbXBsZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC +AQDOFNh5eQ6+9tYvtzjrqvFDzPoXmZuOFeqFS7iBH4gLorvmQQIQcVEAH7O+tkhW +Z8+6PgvXXd43GFtEbY8jZoBQwupl7lIdzywFRoyZYkREXodmDixkwxlPvUWdrb3r +ZDRON6qIbX8LrzTPD1+JL4Rtkgr1RTlLrHT3ABEqEV1fQODOdbRd7rq6fmqwPlbl +zS5kN3RPFuJVDZrnCPcEMOA3QftQgDTzyOlZJYWDZsJxel7H/O9qZjPBTitNJxg1 +ierPaIXT6u6CdWA0A7t3Knyn2+vcyvemjsbQg9v/U5zKR3h+6F0slqgOT/ZnrEos +AzxdeaA5POJFy6xCHZiVgsE7OVaPB9imWrrAYbKsHVLP2rdlhnGZQnnebmTYCll5 +SvXWCIr5vp4i1qxIa95QBU/xmEY6kTy9GjAOSmYXj7UnwnBZwgEop0yUdBMb4s9G +x8S6Yxaj1DZVyiyrzInBri9lqabkPLPQNaK7wTKN5zl7r5pSCsF8rl4R+mvcxyyY +dS+cqseGjn98ubdd/vyQWqLbQtr5Njk4ROs5Rv6/2z/RUFdwsqB5aXztxOs3J7aJ +5ScTgmoK+wkQY+tej6H5pgT02vKuXLwe4wHKKAYepgH7Azkm7XoFlHhBEUy+uUsI +PMBm2Meo1JzOc8E5QqLX2YO/MDiZhI+NYOMJF0/huWqM7wIDAQABo1AwTjAdBgNV +HQ4EFgQU3cPtQEUQYkj4lTM5fbdkd8FSVVIwHwYDVR0jBBgwFoAU3cPtQEUQYkj4 +lTM5fbdkd8FSVVIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEACWQX +CJK6f+/Zci1e7Gvw0gd+1xV8jbz2lH2zOGSpoQ6UCRVrANEX+p0nZZRpnTTrJfGa +Yx+TjIJ4SSoaCud+N2IGXWxzuMan+NskyycTaHSA/i6OwZ8jKki/iVvE5XQN+gHw +h5lWnEh5PiGG91lYi+FShUN0DX7Su776UK3mloLlq+ANCubWxDycWc0xBNH8iD2U +xBV7MfuCX9rSei+2NU+hnOPrzh0OKNGOTSPHY1N1KU3grxTLTpF8PTMHC55sEy2E +EMokRb3V/lFyrfX755KT5cQG6uQKQorI95BoxoNjeek54tuBUjenLfOH6dMO/6Xd +WaouLXiDM73fwFI0ByQ5CTJizC0ehoZtv2XB7yjZJEuI7zz4wXBBwgNlBV2j4aJJ +0wNG9210ZC7NxNH7MRfZfzLQpsOMTm9UP85TXsB1ieaN6OD2CnHP9O6umy633Aie +dsQt5yaC9+N86NBceb44IlkqlTv720BQjq7Dz5UCthhNg0VYpICzymD9kAKPfx9Z +1ug2gB4i2r6eHqFIexwSfa29DxW+KEPlL7pP9P9FVsYNyZYOvX8OgVERkA/9L53i +MpzRPPzTyjW/sJcDWVfrQU0NhPj5lOxdMcbvvU+KD3afraUXPiN4N4+FFWENOFZ/ +HEKjPj+As/3OHNyUXrCciYjq6gCLZ6SV945l2h8= +-----END CERTIFICATE----- diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/files/key.pem b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/files/key.pem new file mode 100644 index 00000000..3b4da6fe --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/files/key.pem @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQDOFNh5eQ6+9tYv +tzjrqvFDzPoXmZuOFeqFS7iBH4gLorvmQQIQcVEAH7O+tkhWZ8+6PgvXXd43GFtE +bY8jZoBQwupl7lIdzywFRoyZYkREXodmDixkwxlPvUWdrb3rZDRON6qIbX8LrzTP +D1+JL4Rtkgr1RTlLrHT3ABEqEV1fQODOdbRd7rq6fmqwPlblzS5kN3RPFuJVDZrn +CPcEMOA3QftQgDTzyOlZJYWDZsJxel7H/O9qZjPBTitNJxg1ierPaIXT6u6CdWA0 +A7t3Knyn2+vcyvemjsbQg9v/U5zKR3h+6F0slqgOT/ZnrEosAzxdeaA5POJFy6xC +HZiVgsE7OVaPB9imWrrAYbKsHVLP2rdlhnGZQnnebmTYCll5SvXWCIr5vp4i1qxI +a95QBU/xmEY6kTy9GjAOSmYXj7UnwnBZwgEop0yUdBMb4s9Gx8S6Yxaj1DZVyiyr +zInBri9lqabkPLPQNaK7wTKN5zl7r5pSCsF8rl4R+mvcxyyYdS+cqseGjn98ubdd +/vyQWqLbQtr5Njk4ROs5Rv6/2z/RUFdwsqB5aXztxOs3J7aJ5ScTgmoK+wkQY+te +j6H5pgT02vKuXLwe4wHKKAYepgH7Azkm7XoFlHhBEUy+uUsIPMBm2Meo1JzOc8E5 +QqLX2YO/MDiZhI+NYOMJF0/huWqM7wIDAQABAoICAB3iqAH1rE3FPgptZ7PFdnd+ +okYJ4KUaSIhMEtWm3PPTBay+gK4hwL1j240sohDlvRolJVJ2KmOTBKlHuhpIIxOT +MKrXhNEN2jRpproXpg7EJp6GL6ntIR6PNClJqOEaBvvQ1soyFtp67g2ZDSG34lyB +cVVgVI7E07F+MP8IxaGqpu9J4n48wJeK/a3RXIi22KNv504Q44GyF2SpyCizbdCV +oPxrm0I/QJfM+S+1Fz2doWEfLRkg+SBvVZg6sygQeBzb64xv5WbF3s2sPONrJeix +2+KJDKD605ophR3h4jrzYmYFDH4K2xQ4RGOEeL0pOvfTS4kBa07z2mc8I4SLEbpi +VzQblmftRvwye2eKk74GVhJho7Il6ssTL29TJxIyzEljVFrprILkmAVEV8SOn544 +pgSj6i7gDcav4OdhxldT6dk7PNqMq49p3acYzLtXCknlLkHOODEFH3BWP1oAWN6e +m34kwPGFviKEIYkurWV0LGV9h/zLL3kxjdbgFyLY24jVbvWuJ9VeJkcHVgL3Rs1A +5irHFpW9TSKYg+R8zLM50S5HRcnL0wV+hl02TcJbkjyVToFh5FeDdyIxN+sQnh+a +b+g/IA+um2RbqjEUoaVxCdIo7/oPzzj0u8Pw5FvAedNM1a8sZiUJ/1CW7In8yRPC +Nb5rONsL/eEHAJU9EWIBAoIBAQDnzEl7NUZ50wjqBTna69u9luxb6ixJM3o9asnY +BXU90Bp7kl14WbHUmTPYGKoGIEKDmmKpA/LhGwD1vykjtHWkUcgGYYucXIBuzRb7 +hEcAa9qkce6Ik4HS8khRmmikNDu/t5zJU2tkgNuGVQlHvsjpJz/rdX857G5Cv8v7 +GSBL4aNxhp9OoMav3/XEUpRSoccR7WEAdfeTfiR4EgaIy864w4twxr2nLroB6SzN +dYSPZ4hMkTS34ixzjO233QioAGiEnG22XyBA7DTB41EoRFIBcbPrCMqDONkNHbeO +j25g4okNjK+7ihmIHZBP0awN+mlfNHnDXuJ6L2LCrxWHQQtHAoIBAQDjmS6h51/H +gcBDUxot16M/7PPJZUbJ8y+qqPbaqu3ORADyvguE/Ww80we+8xeaOa5tVpVE6diZ +tg5BfBGwltyCEwKDAG1g9/D3IVw3yE1AuxyG0+1q0/rTcdZl01PgGVwi+28YCLyO +VxgyIvpGFwgQ9WV22l16JatyhsZLRIWFk78ECJO3v5X8KuCJLnKfcd9nkem9DXdS +iKqiylOXzvIKGUe5HxeDd/itI8V8b8OTQQxM0jEwCOZQg1o1BNN0uEJo4dENkuYa +dZyJFYe0ZsM5ZRm5HmcIYMlPejcYaINRX30TZHRNE/X+fCfrIwg0LmJxFVieFcc3 +Dc3ZU1K5T3UZAoIBAQDCAK3ji+RPY/xK+VLB0rOYSy/JggXMwmPl8XG79l14/aqc +kBTg/JkkqZDFpWbwN6HTyawXb3GhS9uS0oqZEpl/jN8P0CZsGNN5aPd6TOysApj9 +F0ogTuzSY+t5OPWpsPns7L0xlzsD5AFXveZFgP1gfnQ2GqIAFcz22tXbc90fBVup +UZYV1eRVIOnuhXsUachWTcno+9LZRDM7t0J2zbVX2HnlSsFCoo4VuVXBJEFtUKa4 +BrQLzyWLFIGFaF6tVaIkk1QT1iwFimxhdmLfg8bq5IJEDZiJGVQ4cQ3HKG6mchNp +Hr2aBex2it/UnlUVYec9QotCpDCDORO8g5NOH3dTAoIBAQCJH9htqVYWgIESzvW9 +2ua7dAqpM0CEGeWFH8mik0s1c9lSZtfP51OYDdjj3dhBjjEeJQVIANAERCCwqYyK +5UmzgLqJrO85dgiTDGFgJmkM7+7O+M5ZB6BeVn7C2KD3KrBNT0lupIzeAXFNe69o +HSY5+W+JPSUGm72BAdxkqsL7aLm0N2qwUViPFlIztG1QzS25W7sEsSFL85VDAT1+ +ACvpk7OXwDjNd7G2tw+b2kZt6Mn9WsJR23rP1WO6/85ay00PncXzNKc4F9YY7YTW +VveWE+h8lOmkrZN8M/kP1qAPncVgsqwzaCxUh/8Q9wlRTwT2dtLuY9ajv8hfAImd +pla5AoIBAQCduiA3aZBDqGrUTH9bcMRtyU8RTlc2Y5+jFSBP4KfcS/ORoILVdvZz +v+o0jw01keGAtW77Mq70ZCpc8HjOm8Ju8GYtwUGmPRS+hQaZwT8/QseF6q2Q+Bi5 +Wc0Lqa4YA0cI7XViJRhHIPfdV8YEEAW8rIAUqFSoAT6G7z/o0K4zlSa+2RbG0l1v +zLWmJtF8OJfM8IboIyER0PHrWjNFzxKCJssu2WE7WT6/Rupus04XVXRR+Fb6DAGb +yw2MpB3kLvjugQpolx4YbXE4n+F1mkqm9fHjo4fbfSwjmeFnPsRvRmiRTomHxq/s +DUZ6eZM8TIlGhUrx/Y1TP0GQjKxDN6ZQ +-----END PRIVATE KEY----- diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/main.yml new file mode 100644 index 00000000..e18c3d44 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/main.yml @@ -0,0 +1,252 @@ +- name: elb_network_lb tests + collections: + - amazon.aws + + block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: create certificate + iam_cert: + name: test_cert + state: present + cert: "{{ lookup('file', 'cert.pem') }}" + key: "{{ lookup('file', 'key.pem') }}" + <<: *aws_connection_info + register: cert + + - name: create VPC + ec2_vpc_net: + cidr_block: 10.228.228.0/22 + name: "{{ resource_prefix }}_vpc" + state: present + <<: *aws_connection_info + register: vpc + + - name: create internet gateway + ec2_vpc_igw: + vpc_id: "{{ vpc.vpc.id }}" + state: present + tags: + Name: "{{ resource_prefix }}" + <<: *aws_connection_info + register: igw + + - name: create subnets + ec2_vpc_subnet: + cidr: "{{ item.cidr }}" + az: "{{ aws_region}}{{ item.az }}" + vpc_id: "{{ vpc.vpc.id }}" + state: present + tags: + Created_By: "{{ resource_prefix }}" + Public: "{{ item.public }}" + <<: *aws_connection_info + with_items: + - cidr: 10.228.228.0/24 + az: "a" + public: True + - cidr: 10.228.229.0/24 + az: "b" + public: True + - cidr: 10.228.230.0/24 + az: "a" + public: False + - cidr: 10.228.231.0/24 + az: "b" + public: False + register: subnets + + - ec2_vpc_subnet_info: + filters: + vpc-id: "{{ vpc.vpc.id }}" + <<: *aws_connection_info + register: vpc_subnets + + - name: create list of subnet ids + set_fact: + nlb_subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public == `True`].id') }}" + private_subnets: "{{ vpc_subnets|community.general.json_query('subnets[?tags.Public != `True`].id') }}" + + - name: create a route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + <<: *aws_connection_info + tags: + Name: igw-route + Created: "{{ resource_prefix }}" + subnets: "{{ nlb_subnets + private_subnets }}" + routes: + - dest: 0.0.0.0/0 + gateway_id: "{{ igw.gateway_id }}" + register: route_table + + - ec2_group: + name: "{{ resource_prefix }}" + description: "security group for Ansible NLB integration tests" + state: present + vpc_id: "{{ vpc.vpc.id }}" + rules: + - proto: tcp + from_port: 1 + to_port: 65535 + cidr_ip: 0.0.0.0/0 + - proto: all + ports: 80 + cidr_ip: 10.228.228.0/22 + <<: *aws_connection_info + register: sec_group + + - name: create a target group for testing + elb_target_group: + name: "{{ tg_name }}" + protocol: tcp + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + state: present + <<: *aws_connection_info + register: tg + + - name: create a target group for testing tcp_udp protocols + elb_target_group: + name: "{{ tg_tcpudp_name }}" + protocol: tcp_udp + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + state: present + <<: *aws_connection_info + register: tg_tcpudp + + - include_tasks: test_nlb_bad_listener_options.yml + - include_tasks: test_nlb_tags.yml + - include_tasks: test_creating_nlb.yml + - include_tasks: test_nlb_with_asg.yml + - include_tasks: test_modifying_nlb_listeners.yml + - include_tasks: test_deleting_nlb.yml + + always: + + - name: destroy NLB + elb_network_lb: + name: "{{ nlb_name }}" + state: absent + wait: yes + wait_timeout: 600 + <<: *aws_connection_info + ignore_errors: yes + + - name: destroy target group if it was created + elb_target_group: + name: "{{ tg_name }}" + protocol: tcp + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + state: absent + wait: yes + wait_timeout: 600 + <<: *aws_connection_info + register: remove_tg + retries: 5 + delay: 3 + until: remove_tg is success + when: tg is defined + ignore_errors: yes + + - name: destroy tcp_udp target group if it was created + elb_target_group: + name: "{{ tg_tcpudp_name }}" + protocol: tcp_udp + port: 80 + vpc_id: "{{ vpc.vpc.id }}" + state: absent + wait: yes + wait_timeout: 600 + <<: *aws_connection_info + register: remove_tg + retries: 5 + delay: 3 + until: remove_tg is success + when: tg_tcpudp is defined + ignore_errors: yes + + - name: destroy sec group + ec2_group: + name: "{{ sec_group.group_name }}" + description: "security group for Ansible NLB integration tests" + state: absent + vpc_id: "{{ vpc.vpc.id }}" + <<: *aws_connection_info + register: remove_sg + retries: 10 + delay: 5 + until: remove_sg is success + ignore_errors: yes + + - name: remove route table + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + route_table_id: "{{ route_table.route_table.route_table_id }}" + lookup: id + state: absent + <<: *aws_connection_info + register: remove_rt + retries: 10 + delay: 5 + until: remove_rt is success + ignore_errors: yes + + - name: destroy subnets + ec2_vpc_subnet: + cidr: "{{ item.cidr }}" + vpc_id: "{{ vpc.vpc.id }}" + state: absent + <<: *aws_connection_info + register: remove_subnet + retries: 10 + delay: 5 + until: remove_subnet is success + with_items: + - cidr: 10.228.228.0/24 + - cidr: 10.228.229.0/24 + - cidr: 10.228.230.0/24 + - cidr: 10.228.231.0/24 + ignore_errors: yes + + - name: destroy internet gateway + ec2_vpc_igw: + vpc_id: "{{ vpc.vpc.id }}" + tags: + Name: "{{ resource_prefix }}" + state: absent + <<: *aws_connection_info + register: remove_igw + retries: 10 + delay: 5 + until: remove_igw is success + ignore_errors: yes + + - name: destroy VPC + ec2_vpc_net: + cidr_block: 10.228.228.0/22 + name: "{{ resource_prefix }}_vpc" + state: absent + <<: *aws_connection_info + register: remove_vpc + retries: 10 + delay: 5 + until: remove_vpc is success + ignore_errors: yes + + - name: destroy certificate + iam_cert: + name: test_cert + state: absent + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_creating_nlb.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_creating_nlb.yml new file mode 100644 index 00000000..b99af17b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_creating_nlb.yml @@ -0,0 +1,82 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: create NLB with listeners + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + listeners: + - Protocol: TCP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + - Protocol: TLS + Port: 443 + Certificates: + - CertificateArn: "{{ cert.arn }}" + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + - Protocol: UDP + Port: 13 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_tcpudp_name }}" + - Protocol: TCP_UDP + Port: 17 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_tcpudp_name }}" + <<: *aws_connection_info + register: nlb + + - assert: + that: + - nlb.changed + - nlb.listeners|length == 4 + + - name: test idempotence creating NLB with listeners + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + listeners: + - Protocol: TCP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + - Protocol: TLS + Port: 443 + Certificates: + - CertificateArn: "{{ cert.arn }}" + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + - Protocol: UDP + Port: 13 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_tcpudp_name }}" + - Protocol: TCP_UDP + Port: 17 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_tcpudp_name }}" + <<: *aws_connection_info + register: nlb + + - assert: + that: + - not nlb.changed + - nlb.listeners|length == 4 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_deleting_nlb.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_deleting_nlb.yml new file mode 100644 index 00000000..23d1d535 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_deleting_nlb.yml @@ -0,0 +1,50 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: destroy NLB with listener + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: absent + listeners: + - Protocol: TCP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + wait: yes + wait_timeout: 300 + register: nlb + + - assert: + that: + - nlb.changed + + - name: test idempotence + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: absent + listeners: + - Protocol: TCP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + wait: yes + wait_timeout: 300 + register: nlb + + - assert: + that: + - not nlb.changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_modifying_nlb_listeners.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_modifying_nlb_listeners.yml new file mode 100644 index 00000000..67ab99e8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_modifying_nlb_listeners.yml @@ -0,0 +1,88 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: add a listener + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + listeners: + - Protocol: TCP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + - Protocol: TCP + Port: 443 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + register: nlb + + - assert: + that: + - nlb.changed + - nlb.listeners|length == 2 + + - name: test an omitted listener will not be removed without purge_listeners + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + purge_listeners: false + listeners: + - Protocol: TCP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + register: nlb + + - assert: + that: + - not nlb.changed + - nlb.listeners|length == 2 + + - name: remove the rule + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + purge_listeners: true + listeners: + - Protocol: TCP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + register: nlb + + - assert: + that: + - nlb.changed + - nlb.listeners|length == 1 + + - name: remove listener from NLB + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + listeners: [] + <<: *aws_connection_info + register: nlb + + - assert: + that: + - nlb.changed + - not nlb.listeners diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_nlb_bad_listener_options.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_nlb_bad_listener_options.yml new file mode 100644 index 00000000..5372cae3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_nlb_bad_listener_options.yml @@ -0,0 +1,72 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: test creating an NLB with invalid listener options + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + #security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: TCP + Port: 80 + Certificates: {'CertificateArn': 'test', 'IsDefault': 'True'} + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + ignore_errors: yes + register: nlb + + - assert: + that: + - nlb is failed + - "'unable to convert to list' in nlb.msg" + + - name: test creating an NLB without providing required listener options + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + #security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Port: 80 + <<: *aws_connection_info + ignore_errors: yes + register: nlb + + - assert: + that: + - nlb is failed + - '"missing required arguments" in nlb.msg' + - '"Protocol" in nlb.msg' + - '"DefaultActions" in nlb.msg' + + - name: test creating an NLB providing an invalid listener option type + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + #security_groups: "{{ sec_group.group_id }}" + state: present + listeners: + - Protocol: TCP + Port: "bad type" + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}" + <<: *aws_connection_info + ignore_errors: yes + register: nlb + + - assert: + that: + - nlb is failed + - "'unable to convert to int' in nlb.msg" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml new file mode 100644 index 00000000..6b81e90c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml @@ -0,0 +1,101 @@ +- block: + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: create NLB with no listeners + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + <<: *aws_connection_info + register: nlb + + - assert: + that: + - nlb.changed + + - name: re-create NLB with no listeners + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + <<: *aws_connection_info + register: nlb + + - assert: + that: + - not nlb.changed + + - name: add tags to NLB + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + tags: + created_by: "NLB test {{ resource_prefix }}" + <<: *aws_connection_info + register: nlb + + - assert: + that: + - nlb.changed + - 'nlb.tags.created_by == "NLB test {{ resource_prefix }}"' + + - name: test tags are not removed if unspecified + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + <<: *aws_connection_info + register: nlb + + - assert: + that: + - not nlb.changed + - 'nlb.tags.created_by == "NLB test {{ resource_prefix }}"' + + - name: remove tags from NLB + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + tags: {} + <<: *aws_connection_info + register: nlb + + - assert: + that: + - nlb.changed + - not nlb.tags + + - name: test idempotence + elb_network_lb: + name: "{{ nlb_name }}" + subnets: "{{ nlb_subnets }}" + state: present + tags: {} + <<: *aws_connection_info + register: nlb + + - assert: + that: + - not nlb.changed + - not nlb.tags + + - name: destroy NLB with no listeners + elb_network_lb: + name: "{{ nlb_name }}" + state: absent + <<: *aws_connection_info + register: nlb + + - assert: + that: + - nlb.changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_nlb_with_asg.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_nlb_with_asg.yml new file mode 100644 index 00000000..f5005df6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_network_lb/tasks/test_nlb_with_asg.yml @@ -0,0 +1,90 @@ +- block: + + # create instances + + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - ec2_ami_info: + <<: *aws_connection_info + filters: + architecture: x86_64 + virtualization-type: hvm + root-device-type: ebs + name: "amzn-ami-hvm*" + register: amis + + - set_fact: + latest_amazon_linux: "{{ amis.images | sort(attribute='creation_date') | last }}" + + - ec2_asg: + <<: *aws_connection_info + state: absent + name: "{{ resource_prefix }}-webservers" + wait_timeout: 900 + + - ec2_lc: + <<: *aws_connection_info + name: "{{ resource_prefix }}-web-lcfg" + state: absent + + - name: Create launch config for testing + ec2_lc: + <<: *aws_connection_info + name: "{{ resource_prefix }}-web-lcfg" + assign_public_ip: true + image_id: "{{ latest_amazon_linux.image_id }}" + security_groups: "{{ sec_group.group_id }}" + instance_type: t2.micro + user_data: | + #!/bin/bash + set -x + yum update -y --nogpgcheck + yum install -y --nogpgcheck httpd + echo "Hello Ansiblings!" >> /var/www/html/index.html + service httpd start + volumes: + - device_name: /dev/xvda + volume_size: 10 + volume_type: gp2 + delete_on_termination: true + + - name: Create autoscaling group for app server fleet + ec2_asg: + <<: *aws_connection_info + name: "{{ resource_prefix }}-webservers" + vpc_zone_identifier: "{{ nlb_subnets }}" + launch_config_name: "{{ resource_prefix }}-web-lcfg" + termination_policies: + - OldestLaunchConfiguration + - Default + health_check_period: 600 + health_check_type: EC2 + replace_all_instances: true + min_size: 0 + max_size: 2 + desired_capacity: 1 + wait_for_instances: true + target_group_arns: + - "{{ tg.target_group_arn }}" + + always: + + - ec2_asg: + <<: *aws_connection_info + state: absent + name: "{{ resource_prefix }}-webservers" + wait_timeout: 900 + ignore_errors: yes + + - ec2_lc: + <<: *aws_connection_info + name: "{{ resource_prefix }}-web-lcfg" + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/aliases new file mode 100644 index 00000000..b9935459 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/aliases @@ -0,0 +1,3 @@ +cloud/aws +elb_target_group +shippable/aws/group4 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/full_test.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/full_test.yml new file mode 100644 index 00000000..ac95c66f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/full_test.yml @@ -0,0 +1,7 @@ +- hosts: localhost + connection: local +# environment: "{{ ansible_test.environment }}" + + roles: + - elb_lambda_target + - elb_target diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml new file mode 100644 index 00000000..a28253eb --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml @@ -0,0 +1,5 @@ +resource_shortprefix: 'ansible-test-{{ resource_prefix | regex_search("([0-9]+)$") }}' +lambda_role_name: '{{ resource_shortprefix }}-elb-target-lambda' +#lambda_role_name: '{{ resource_prefix }}-elb-target-lambda' +lambda_name: '{{ resource_prefix }}-elb-target-lambda' +elb_target_group_name: '{{ resource_shortprefix }}-elb-tg' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/files/ansible_lambda_target.py b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/files/ansible_lambda_target.py new file mode 100644 index 00000000..3ea22472 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/files/ansible_lambda_target.py @@ -0,0 +1,10 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type +import json + + +def lambda_handler(event, context): + return { + 'statusCode': 200, + 'body': json.dumps('Hello from Lambda!') + } diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/files/assume-role.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/files/assume-role.json new file mode 100644 index 00000000..06456f79 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/files/assume-role.json @@ -0,0 +1,8 @@ +{ + "Version": "2012-10-17", + "Statement": { + "Effect": "Allow", + "Principal": { "Service": "lambda.amazonaws.com" }, + "Action": "sts:AssumeRole" + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/tasks/main.yml new file mode 100644 index 00000000..fb310b84 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/tasks/main.yml @@ -0,0 +1,110 @@ +- name: set up lambda as elb_target + module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + collections: + - community.general + block: + - name: create zip to deploy lambda code + archive: + path: '{{ role_path }}/files/ansible_lambda_target.py' + dest: /tmp/lambda.zip + format: zip + - name: create or update service-role for lambda + iam_role: + name: '{{ lambda_role_name }}' + assume_role_policy_document: '{{ lookup("file", role_path + "/files/assume-role.json") }}' + managed_policy: + - 'arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess' + register: ROLE_ARN + - name: when it is too fast, the role is not usable. + pause: + seconds: 10 + - name: deploy lambda.zip to ansible_lambda_target function + lambda: + name: '{{ lambda_name }}' + state: present + zip_file: /tmp/lambda.zip + runtime: python3.7 + role: '{{ ROLE_ARN.arn }}' + handler: ansible_lambda_target.lambda_handler + timeout: 30 + register: lambda_function + retries: 3 + delay: 15 + until: lambda_function.changed + - name: create empty target group + elb_target_group: + name: '{{ elb_target_group_name }}' + target_type: lambda + state: present + modify_targets: false + register: elb_target_group + - name: tg is created, state must be changed + assert: + that: + - elb_target_group.changed + - name: allow elb to invoke the lambda function + lambda_policy: + state: present + function_name: '{{ lambda_name }}' + version: '{{ lambda_function.configuration.version }}' + statement_id: elb1 + action: lambda:InvokeFunction + principal: elasticloadbalancing.amazonaws.com + source_arn: '{{ elb_target_group.target_group_arn }}' + - name: add lambda to elb target + elb_target_group: + name: '{{ elb_target_group_name }}' + target_type: lambda + state: present + targets: + - Id: '{{ lambda_function.configuration.function_arn }}' + register: elb_target_group + - name: target is updated, state must be changed + assert: + that: + - elb_target_group.changed + - name: re-add lambda to elb target (idempotency) + elb_target_group: + name: '{{ elb_target_group_name }}' + target_type: lambda + state: present + targets: + - Id: '{{ lambda_function.configuration.function_arn }}' + register: elb_target_group + - name: target is still the same, state must not be changed (idempotency) + assert: + that: + - not elb_target_group.changed + - name: remove lambda target from target group + elb_target_group: + name: '{{ elb_target_group_name }}' + target_type: lambda + state: absent + targets: [] + register: elb_target_group + - name: target is still the same, state must not be changed (idempotency) + assert: + that: + - elb_target_group.changed + always: + - name: remove elb target group + elb_target_group: + name: '{{ elb_target_group_name }}' + target_type: lambda + state: absent + ignore_errors: true + - name: remove lambda function + lambda: + name: '{{ lambda_name }}' + state: absent + ignore_errors: true + - name: remove iam role for lambda + iam_role: + name: '{{ lambda_role_name }}' + state: absent + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml new file mode 100644 index 00000000..731c84d6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml @@ -0,0 +1,10 @@ +--- +ec2_ami_name: 'amzn2-ami-hvm-2.0.20190612-x86_64-gp2' + +resource_shortprefix: 'ansible-test-{{ resource_prefix | regex_search("([0-9]+)$") }}' +tg_name: "{{ resource_shortprefix }}-tg" +tg_tcpudp_name: "{{ resource_shortprefix }}-tgtcpudp" +lb_name: "{{ resource_shortprefix }}-lb" + +healthy_state: + state: 'healthy' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_target/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_target/tasks/main.yml new file mode 100644 index 00000000..2021823f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/roles/elb_target/tasks/main.yml @@ -0,0 +1,484 @@ +--- + - name: set up elb_target test prerequisites + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + + block: + + # ============================================================ + + - name: + debug: msg="********** Setting up elb_target test dependencies **********" + + # ============================================================ + - name: Find AMI to use + ec2_ami_info: + owners: 'amazon' + filters: + name: '{{ ec2_ami_name }}' + register: ec2_amis + - set_fact: + ec2_ami_image: '{{ ec2_amis.images[0].image_id }}' + + + - name: set up testing VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: present + cidr_block: 20.0.0.0/16 + tags: + Name: "{{ resource_prefix }}-vpc" + Description: "Created by ansible-test" + register: vpc + + - name: set up testing internet gateway + ec2_vpc_igw: + vpc_id: "{{ vpc.vpc.id }}" + state: present + register: igw + + - name: set up testing subnet + ec2_vpc_subnet: + state: present + vpc_id: "{{ vpc.vpc.id }}" + cidr: 20.0.0.0/18 + az: "{{ aws_region }}a" + resource_tags: + Name: "{{ resource_prefix }}-subnet" + register: subnet_1 + + - name: set up testing subnet + ec2_vpc_subnet: + state: present + vpc_id: "{{ vpc.vpc.id }}" + cidr: 20.0.64.0/18 + az: "{{ aws_region }}b" + resource_tags: + Name: "{{ resource_prefix }}-subnet" + register: subnet_2 + + - name: create routing rules + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + created: "{{ resource_prefix }}-route" + routes: + - dest: 0.0.0.0/0 + gateway_id: "{{ igw.gateway_id }}" + subnets: + - "{{ subnet_1.subnet.id }}" + - "{{ subnet_2.subnet.id }}" + register: route_table + + - name: create testing security group + ec2_group: + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ vpc.vpc.id }}" + rules: + - proto: tcp + from_port: 80 + to_port: 80 + cidr_ip: 0.0.0.0/0 + - proto: tcp + from_port: 22 + to_port: 22 + cidr_ip: 0.0.0.0/0 + register: sg + + - name: set up testing target group (type=instance) + elb_target_group: + name: "{{ tg_name }}" + health_check_port: 80 + protocol: http + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: present + target_type: instance + tags: + Description: "Created by {{ resource_prefix }}" + + - name: set up testing target group (type=instance) with UDP protocol + elb_target_group: + name: "{{ tg_tcpudp_name }}" + protocol: udp + port: 53 + vpc_id: '{{ vpc.vpc.id }}' + state: present + target_type: instance + tags: + Protocol: "UDP" + Description: "Created by {{ resource_prefix }}" + + - name: set up testing target group for ALB (type=instance) + elb_target_group: + name: "{{ tg_name }}-used" + health_check_port: 80 + protocol: http + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: present + target_type: instance + tags: + Description: "Created by {{ resource_prefix }}" + + - name: set up ec2 instance to use as a target + ec2: + group_id: "{{ sg.group_id }}" + instance_type: t3.micro + image: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ subnet_2.subnet.id }}" + instance_tags: + Name: "{{ resource_prefix }}-inst" + exact_count: 1 + count_tag: + Name: "{{ resource_prefix }}-inst" + assign_public_ip: true + volumes: [] + wait: true + ebs_optimized: false + user_data: | + #cloud-config + package_upgrade: true + package_update: true + packages: + - httpd + runcmd: + - "service httpd start" + - echo "HELLO ANSIBLE" > /var/www/html/index.html + register: ec2 + + - name: create an application load balancer + elb_application_lb: + name: "{{ lb_name }}" + security_groups: + - "{{ sg.group_id }}" + subnets: + - "{{ subnet_1.subnet.id }}" + - "{{ subnet_2.subnet.id }}" + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}-used" + state: present + + # ============================================================ + + - name: + debug: msg="********** Running elb_target integration tests **********" + + # ============================================================ + + - name: register an instance to unused target group + elb_target: + target_group_name: "{{ tg_name }}" + target_id: "{{ ec2.instance_ids[0] }}" + state: present + register: result + + - name: target is registered + assert: + that: + - result.changed + - result.target_group_arn + - result.target_health_descriptions.target.id == ec2.instance_ids[0] + + # ============================================================ + + - name: test idempotence + elb_target: + target_group_name: "{{ tg_name }}" + target_id: "{{ ec2.instance_ids[0] }}" + state: present + register: result + + - name: target was already registered + assert: + that: + - not result.changed + + # ============================================================ + + - name: remove an unused target + elb_target: + target_group_name: "{{ tg_name }}" + target_id: "{{ ec2.instance_ids[0] }}" + state: absent + deregister_unused: true + register: result + + - name: target group was deleted + assert: + that: + - result.changed + - not result.target_health_descriptions + + # ============================================================ + + - name: register an instance to used target group and wait until healthy + elb_target: + target_group_name: "{{ tg_name }}-used" + target_id: "{{ ec2.instance_ids[0] }}" + state: present + target_status: healthy + target_status_timeout: 400 + register: result + + - name: target is registered + assert: + that: + - result.changed + - result.target_group_arn + - result.target_health_descriptions.target.id == ec2.instance_ids[0] + - result.target_health_descriptions.target_health == healthy_state + + # ============================================================ + + - name: remove a target from used target group + elb_target: + target_group_name: "{{ tg_name }}-used" + target_id: "{{ ec2.instance_ids[0] }}" + state: absent + target_status: unused + target_status_timeout: 400 + register: result + + - name: target was deregistered + assert: + that: + - result.changed + + # ============================================================ + + - name: test idempotence + elb_target: + target_group_name: "{{ tg_name }}-used" + target_id: "{{ ec2.instance_ids[0] }}" + state: absent + register: result + + - name: target was already deregistered + assert: + that: + - not result.changed + + # ============================================================ + + - name: register an instance to used target group and wait until healthy again to test deregistering differently + elb_target: + target_group_name: "{{ tg_name }}-used" + target_id: "{{ ec2.instance_ids[0] }}" + state: present + target_status: healthy + target_status_timeout: 400 + register: result + + - name: target is registered + assert: + that: + - result.changed + - result.target_group_arn + - result.target_health_descriptions.target.id == ec2.instance_ids[0] + - result.target_health_descriptions.target_health == healthy_state + + - name: start deregisteration but don't wait + elb_target: + target_group_name: "{{ tg_name }}-used" + target_id: "{{ ec2.instance_ids[0] }}" + state: absent + register: result + + - name: target is starting to deregister + assert: + that: + - result.changed + - result.target_health_descriptions.target_health.reason == "Target.DeregistrationInProgress" + + - name: now wait for target to finish deregistering + elb_target: + target_group_name: "{{ tg_name }}-used" + target_id: "{{ ec2.instance_ids[0] }}" + state: absent + target_status: unused + target_status_timeout: 400 + register: result + + - name: target was deregistered already and now has finished + assert: + that: + - not result.changed + - not result.target_health_descriptions + + # ============================================================ + + always: + + - name: + debug: msg="********** Tearing down elb_target test dependencies **********" + + - name: remove ec2 instance + ec2: + group_id: "{{ sg.group_id }}" + instance_type: t2.micro + image: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ subnet_2.subnet.id }}" + instance_tags: + Name: "{{ resource_prefix }}-inst" + exact_count: 0 + count_tag: + Name: "{{ resource_prefix }}-inst" + assign_public_ip: true + volumes: [] + wait: true + ebs_optimized: false + ignore_errors: true + + - name: remove testing target groups + elb_target_group: + name: "{{ item }}" + health_check_port: 80 + protocol: http + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: absent + target_type: instance + tags: + Description: "Created by {{ resource_prefix }}" + wait: true + wait_timeout: 400 + register: removed + retries: 10 + until: removed is not failed + with_items: + - "{{ tg_name }}" + - "{{ tg_name }}-used" + ignore_errors: true + + - name: remove udp testing target groups + elb_target_group: + name: "{{ item }}" + protocol: udp + port: 53 + vpc_id: '{{ vpc.vpc.id }}' + state: absent + target_type: instance + tags: + Description: "Created by {{ resource_prefix }}" + Protocol: "UDP" + wait: true + wait_timeout: 400 + register: removed + retries: 10 + until: removed is not failed + with_items: + - "{{ tg_tcpudp_name }}" + ignore_errors: true + + - name: remove application load balancer + elb_application_lb: + name: "{{ lb_name }}" + security_groups: + - "{{ sg.group_id }}" + subnets: + - "{{ subnet_1.subnet.id }}" + - "{{ subnet_2.subnet.id }}" + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}-used" + state: absent + wait: true + wait_timeout: 400 + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove testing security group + ec2_group: + state: absent + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ vpc.vpc.id }}" + rules: + - proto: tcp + from_port: 80 + to_port: 80 + cidr_ip: 0.0.0.0/0 + - proto: tcp + from_port: 22 + to_port: 22 + cidr_ip: 0.0.0.0/0 + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove routing rules + ec2_vpc_route_table: + state: absent + lookup: id + route_table_id: "{{ route_table.route_table.id }}" + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove testing subnet + ec2_vpc_subnet: + state: absent + vpc_id: "{{ vpc.vpc.id }}" + cidr: 20.0.0.0/18 + az: "{{ aws_region }}a" + resource_tags: + Name: "{{ resource_prefix }}-subnet" + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove testing subnet + ec2_vpc_subnet: + state: absent + vpc_id: "{{ vpc.vpc.id }}" + cidr: 20.0.64.0/18 + az: "{{ aws_region }}b" + resource_tags: + Name: "{{ resource_prefix }}-subnet" + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove testing internet gateway + ec2_vpc_igw: + vpc_id: "{{ vpc.vpc.id }}" + state: absent + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove testing VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: absent + cidr_block: 20.0.0.0/16 + tags: + Name: "{{ resource_prefix }}-vpc" + Description: "Created by ansible-test" + register: removed + retries: 10 + until: removed is not failed + + # ============================================================ diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/version_fail.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/version_fail.yml new file mode 100644 index 00000000..43cdba85 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/playbooks/version_fail.yml @@ -0,0 +1,41 @@ +- hosts: localhost + connection: local + environment: "{{ ansible_test.environment }}" + + tasks: + - name: set up aws connection info + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + block: + - name: set up testing target group (type=ip) + elb_target_group: + state: present + #name: "{{ resource_shortprefix }}-tg" + name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tg" + health_check_port: 80 + protocol: http + port: 80 + vpc_id: 'vpc-abcd1234' + target_type: ip + tags: + Description: "Created by {{ resource_prefix }}" + register: elb_target_group_type_ip + ignore_errors: yes + + - name: check that setting up target group with type=ip fails with friendly message + assert: + that: + - elb_target_group_type_ip is failed + - "'msg' in elb_target_group_type_ip" + + # In the off-chance that this went (partially) through when it shouldn't... + always: + - name: Remove testing target group (type=ip) + elb_target_group: + state: absent + #name: "{{ resource_shortprefix }}-tg" + name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tg" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/runme.sh b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/runme.sh new file mode 100755 index 00000000..e379f24b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target/runme.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -eux + +# Test graceful failure for older versions of botocore +source virtualenv.sh +pip install 'botocore<=1.7.1' boto3 +ansible-playbook -i ../../inventory -v playbooks/version_fail.yml "$@" + +# Run full test suite +source virtualenv.sh +pip install 'botocore>=1.8.0' boto3 +ansible-playbook -i ../../inventory -v playbooks/full_test.yml "$@" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/playbooks/full_test.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/playbooks/full_test.yml new file mode 100644 index 00000000..20942527 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/playbooks/full_test.yml @@ -0,0 +1,6 @@ +- hosts: localhost + connection: local + environment: "{{ ansible_test.environment }}" + + roles: + - elb_target_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/playbooks/roles/elb_target_info/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/playbooks/roles/elb_target_info/defaults/main.yml new file mode 100644 index 00000000..4420a8d5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/playbooks/roles/elb_target_info/defaults/main.yml @@ -0,0 +1,5 @@ +--- +ec2_ami_name: 'amzn2-ami-hvm-2.0.20190612-x86_64-gp2' + +tg_name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tg" +lb_name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-lb" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/playbooks/roles/elb_target_info/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/playbooks/roles/elb_target_info/tasks/main.yml new file mode 100644 index 00000000..8ca10069 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/playbooks/roles/elb_target_info/tasks/main.yml @@ -0,0 +1,507 @@ +--- + - name: set up elb_target_info test prerequisites + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + + block: + + # ============================================================ + + - name: + debug: msg="********** Setting up elb_target_info test dependencies **********" + + - name: Find AMI to use + ec2_ami_info: + owners: 'amazon' + filters: + name: '{{ ec2_ami_name }}' + register: ec2_amis + - set_fact: + ec2_ami_image: '{{ ec2_amis.images[0].image_id }}' + + # ============================================================ + + - name: set up testing VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: present + cidr_block: 20.0.0.0/16 + tags: + Name: "{{ resource_prefix }}-vpc" + Description: "Created by ansible-test" + register: vpc + + - name: set up testing internet gateway + ec2_vpc_igw: + vpc_id: "{{ vpc.vpc.id }}" + state: present + register: igw + + - name: set up testing subnet + ec2_vpc_subnet: + state: present + vpc_id: "{{ vpc.vpc.id }}" + cidr: 20.0.0.0/18 + az: "{{ aws_region }}a" + resource_tags: + Name: "{{ resource_prefix }}-subnet" + register: subnet_1 + + - name: set up testing subnet + ec2_vpc_subnet: + state: present + vpc_id: "{{ vpc.vpc.id }}" + cidr: 20.0.64.0/18 + az: "{{ aws_region }}b" + resource_tags: + Name: "{{ resource_prefix }}-subnet" + register: subnet_2 + + - name: create routing rules + ec2_vpc_route_table: + vpc_id: "{{ vpc.vpc.id }}" + tags: + created: "{{ resource_prefix }}-route" + routes: + - dest: 0.0.0.0/0 + gateway_id: "{{ igw.gateway_id }}" + subnets: + - "{{ subnet_1.subnet.id }}" + - "{{ subnet_2.subnet.id }}" + register: route_table + + - name: create testing security group + ec2_group: + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ vpc.vpc.id }}" + rules: + - proto: tcp + from_port: 80 + to_port: 80 + cidr_ip: 0.0.0.0/0 + - proto: tcp + from_port: 22 + to_port: 22 + cidr_ip: 0.0.0.0/0 + register: sg + + - name: set up testing target group (type=instance) + register: alb_target_group + elb_target_group: + name: "{{ tg_name }}-inst" + health_check_port: 80 + protocol: http + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: present + target_type: instance + # set this to 30 to test polling for changes, instead of having everything go out immediately + deregistration_delay_timeout: 30 + tags: + Description: "Created by {{ resource_prefix }}" + + - name: set up testing target group (type=ip) + register: nlb_target_group + elb_target_group: + name: "{{ tg_name }}-ip" + health_check_port: 80 + protocol: tcp + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: present + # set this to 30 to test polling for changes, instead of having everything go out immediately + deregistration_delay_timeout: 30 + target_type: ip + tags: + Description: "Created by {{ resource_prefix }}" + + - name: set up testing target group which will not be associated with any load balancers + register: idle_target_group + elb_target_group: + name: "{{ tg_name }}-idle" + health_check_port: 80 + protocol: tcp + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: present + target_type: instance + tags: + Description: "Created by {{ resource_prefix }}" + + - name: set up ec2 instance to use as a target + ec2: + group_id: "{{ sg.group_id }}" + instance_type: t2.micro + image: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ subnet_2.subnet.id }}" + instance_tags: + Name: "{{ resource_prefix }}-inst" + exact_count: 1 + count_tag: + Name: "{{ resource_prefix }}-inst" + assign_public_ip: true + volumes: [] + wait: true + ebs_optimized: false + user_data: | + #cloud-config + package_upgrade: true + package_update: true + packages: + - httpd + runcmd: + - "service httpd start" + - echo "HELLO ANSIBLE" > /var/www/html/index.html + register: ec2 + + - name: create an application load balancer + elb_application_lb: + name: "{{ lb_name }}-alb" + security_groups: + - "{{ sg.group_id }}" + subnets: + - "{{ subnet_1.subnet.id }}" + - "{{ subnet_2.subnet.id }}" + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}-inst" + state: present + + + - name: create a network load balancer + elb_network_lb: + name: "{{ lb_name }}-nlb" + subnets: + - "{{ subnet_1.subnet.id }}" + - "{{ subnet_2.subnet.id }}" + listeners: + - Protocol: TCP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}-ip" + state: present + + - name: register with the ALB + elb_target: + target_group_name: "{{ tg_name }}-inst" + target_id: "{{ ec2.instance_ids[0] }}" + state: present + target_status: "initial" + + - name: register with the NLB IP target group + elb_target: + target_group_name: "{{ tg_name }}-ip" + target_id: "{{ ec2.instances[0].private_ip }}" + state: present + target_status: "initial" + + # ============================================================ + + - debug: msg="********** Running elb_target_info integration tests **********" + + # ============================================================ + - name: gather facts + elb_target_info: + instance_id: "{{ ec2.instance_ids[0]}}" + register: target_facts + + - assert: + that: + - "{{ alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "{{ nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "{{ idle_target_group.target_group_arn not in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - (target_facts.instance_target_groups | length) == 2 + msg: "target facts showed the target in the right target groups" + + + - name: register with unused target group + elb_target: + target_group_name: "{{ tg_name }}-idle" + target_id: "{{ ec2.instance_ids[0]}}" + state: present + target_status: "unused" + + - name: gather facts again, including the idle group + elb_target_info: + instance_id: "{{ ec2.instance_ids[0]}}" + register: target_facts + + - assert: + that: + - "{{ alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "{{ nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "{{ idle_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - (target_facts.instance_target_groups | length) == 3 + msg: "target facts reflected the addition of the target to the idle group" + + - name: gather facts again, this time excluding the idle group + elb_target_info: + instance_id: "{{ ec2.instance_ids[0]}}" + get_unused_target_groups: false + register: target_facts + + - assert: + that: + - "{{ alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "{{ nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "{{ idle_target_group.target_group_arn not in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - (target_facts.instance_target_groups | length) == 2 + msg: "target_facts.instance_target_groups did not gather unused target groups when variable was set" + + - name: register twice in the same target group + elb_target: + target_group_name: "{{ tg_name }}-ip" + target_port: 22 + target_id: "{{ ec2.instances[0].private_ip }}" + state: present + target_status: "healthy" + target_status_timeout: 400 + + - name: gather facts + elb_target_info: + instance_id: "{{ ec2.instance_ids[0] }}" + get_unused_target_groups: false + register: target_facts + + - assert: + that: + - alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) + - nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) + - (target_facts.instance_target_groups | length) == 2 + - (target_facts.instance_target_groups | + selectattr('target_group_arn', 'equalto', nlb_target_group.target_group_arn) | + map(attribute='targets') | + flatten | + list | + length) == 2 + msg: "registering a target twice didn't affect the overall target group count, increased target count" + + - set_fact: + original_target_groups: "{{ target_facts.instance_target_groups }}" + + - name: Deregister instance from all target groups + elb_target: + target_group_arn: "{{ item.0.target_group_arn }}" + target_port: "{{ item.1.target_port }}" + target_az: "{{ item.1.target_az }}" + target_id: "{{ item.1.target_id }}" + state: absent + target_status: "draining" + with_subelements: + - "{{ original_target_groups }}" + - "targets" + + - name: wait for all targets to deregister simultaneously + elb_target_info: + get_unused_target_groups: false + instance_id: "{{ ec2.instance_ids[0] }}" + register: target_facts + until: (target_facts.instance_target_groups | length) == 0 + retries: 60 + delay: 10 + + - name: reregister in elbv2s + elb_target: + target_group_arn: "{{ item.0.target_group_arn }}" + target_port: "{{ item.1.target_port }}" + target_az: "{{ item.1.target_az }}" + target_id: "{{ item.1.target_id }}" + state: present + target_status: "initial" + with_subelements: + - "{{ original_target_groups }}" + - "targets" + + # wait until all groups associated with this instance are 'healthy' or + # 'unused' + - name: wait for registration + elb_target_info: + get_unused_target_groups: false + instance_id: "{{ ec2.instance_ids[0] }}" + register: target_facts + until: > + (target_facts.instance_target_groups | + map(attribute='targets') | + flatten | + map(attribute='target_health') | + rejectattr('state', 'equalto', 'healthy') | + rejectattr('state', 'equalto', 'unused') | + list | + length) == 0 + retries: 61 + delay: 10 + + - assert: + that: + - alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) + - nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) + - (target_facts.instance_target_groups | length) == 2 + - (target_facts.instance_target_groups | + selectattr('target_group_arn', 'equalto', nlb_target_group.target_group_arn) | + map(attribute='targets') | + flatten | + list | + length) == 2 + msg: "reregistration completed successfully" + + always: + + - name: + debug: msg="********** Tearing down elb_target_info test dependencies **********" + + - name: remove ec2 instance + ec2: + group_id: "{{ sg.group_id }}" + instance_type: t2.micro + image: "{{ ec2_ami_image }}" + vpc_subnet_id: "{{ subnet_2.subnet.id }}" + instance_tags: + Name: "{{ resource_prefix }}-inst" + exact_count: 0 + count_tag: + Name: "{{ resource_prefix }}-inst" + assign_public_ip: true + volumes: [] + wait: true + ebs_optimized: false + ignore_errors: true + + - name: remove application load balancer + elb_application_lb: + name: "{{ lb_name }}-alb" + security_groups: + - "{{ sg.group_id }}" + subnets: + - "{{ subnet_1.subnet.id }}" + - "{{ subnet_2.subnet.id }}" + listeners: + - Protocol: HTTP + Port: 80 + DefaultActions: + - Type: forward + TargetGroupName: "{{ tg_name }}-inst" + state: absent + wait: true + wait_timeout: 200 + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove NLB + ignore_errors: true + elb_network_lb: + name: "{{ lb_name }}-nlb" + state: absent + + - name: remove testing target groups + elb_target_group: + name: "{{ item }}" + health_check_port: 80 + protocol: http + port: 80 + vpc_id: '{{ vpc.vpc.id }}' + state: absent + target_type: instance + tags: + Description: "Created by {{ resource_prefix }}" + wait: true + wait_timeout: 200 + register: removed + retries: 10 + until: removed is not failed + with_items: + - "{{ tg_name }}-idle" + - "{{ tg_name }}-ip" + - "{{ tg_name }}-inst" + ignore_errors: true + + - name: remove testing security group + ec2_group: + state: absent + name: "{{ resource_prefix }}-sg" + description: a security group for ansible tests + vpc_id: "{{ vpc.vpc.id }}" + rules: + - proto: tcp + from_port: 80 + to_port: 80 + cidr_ip: 0.0.0.0/0 + - proto: tcp + from_port: 22 + to_port: 22 + cidr_ip: 0.0.0.0/0 + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove routing rules + ec2_vpc_route_table: + state: absent + lookup: id + route_table_id: "{{ route_table.route_table.id }}" + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove testing subnet + ec2_vpc_subnet: + state: absent + vpc_id: "{{ vpc.vpc.id }}" + cidr: 20.0.0.0/18 + az: "{{ aws_region }}a" + resource_tags: + Name: "{{ resource_prefix }}-subnet" + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove testing subnet + ec2_vpc_subnet: + state: absent + vpc_id: "{{ vpc.vpc.id }}" + cidr: 20.0.64.0/18 + az: "{{ aws_region }}b" + resource_tags: + Name: "{{ resource_prefix }}-subnet" + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove testing internet gateway + ec2_vpc_igw: + vpc_id: "{{ vpc.vpc.id }}" + state: absent + register: removed + retries: 10 + until: removed is not failed + ignore_errors: true + + - name: remove testing VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: absent + cidr_block: 20.0.0.0/16 + tags: + Name: "{{ resource_prefix }}-vpc" + Description: "Created by ansible-test" + register: removed + retries: 10 + until: removed is not failed + + # ============================================================ diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/runme.sh b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/runme.sh new file mode 100755 index 00000000..33d2b8d0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/elb_target_info/runme.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -eux + +ansible-playbook -i ../../inventory -v playbooks/full_test.yml "$@" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/aliases new file mode 100644 index 00000000..67ae2cc7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/aliases @@ -0,0 +1,2 @@ +unsupported +cloud/aws diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/defaults/main.yml new file mode 100644 index 00000000..f5112b1a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/defaults/main.yml @@ -0,0 +1,3 @@ +--- +test_user: '{{ resource_prefix }}-user' +test_group: '{{ resource_prefix }}-group' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/tasks/main.yml new file mode 100644 index 00000000..65b44182 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_group/tasks/main.yml @@ -0,0 +1,127 @@ +--- +- name: set up aws connection info + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + block: + - name: ensure ansible user exists + iam_user: + name: '{{ test_user }}' + state: present + + - name: ensure group exists + iam_group: + name: '{{ test_group }}' + users: + - '{{ test_user }}' + state: present + register: iam_group + + - assert: + that: + - iam_group.iam_group.users + - iam_group is changed + + - name: add non existent user to group + iam_group: + name: '{{ test_group }}' + users: + - '{{ test_user }}' + - NonExistentUser + state: present + ignore_errors: yes + register: iam_group + + - name: assert that adding non existent user to group fails with helpful message + assert: + that: + - iam_group is failed + - iam_group.msg.startswith("Couldn't add user NonExistentUser to group {{ test_group }}") + + - name: remove a user + iam_group: + name: '{{ test_group }}' + purge_users: True + users: [] + state: present + register: iam_group + + - assert: + that: + - iam_group is changed + - not iam_group.iam_group.users + + - name: re-remove a user (no change) + iam_group: + name: '{{ test_group }}' + purge_users: True + users: [] + state: present + register: iam_group + + - assert: + that: + - iam_group is not changed + - not iam_group.iam_group.users + + - name: Add the user again + iam_group: + name: '{{ test_group }}' + users: + - '{{ test_user }}' + state: present + register: iam_group + + - assert: + that: + - iam_group is changed + - iam_group.iam_group.users + + - name: Re-add the user + iam_group: + name: '{{ test_group }}' + users: + - '{{ test_user }}' + state: present + register: iam_group + + - assert: + that: + - iam_group is not changed + - iam_group.iam_group.users + + - name: remove group + iam_group: + name: '{{ test_group }}' + state: absent + register: iam_group + + - assert: + that: + - iam_group is changed + + - name: re-remove group + iam_group: + name: '{{ test_group }}' + state: absent + register: iam_group + + - assert: + that: + - iam_group is not changed + + always: + - name: remove group + iam_group: + name: '{{ test_group }}' + state: absent + + - name: remove ansible user + iam_user: + name: '{{ test_user }}' + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_password_policy/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_password_policy/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_password_policy/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_password_policy/tasks/main.yaml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_password_policy/tasks/main.yaml new file mode 100644 index 00000000..7b773eac --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_password_policy/tasks/main.yaml @@ -0,0 +1,107 @@ +- module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + block: + - name: set iam password policy + iam_password_policy: + state: present + min_pw_length: 8 + require_symbols: false + require_numbers: true + require_uppercase: true + require_lowercase: true + allow_pw_change: true + pw_max_age: 60 + pw_reuse_prevent: 5 + pw_expire: false + register: result + + - name: assert that changes were made + assert: + that: + - result.changed + + - name: verify iam password policy has been created + iam_password_policy: + state: present + min_pw_length: 8 + require_symbols: false + require_numbers: true + require_uppercase: true + require_lowercase: true + allow_pw_change: true + pw_max_age: 60 + pw_reuse_prevent: 5 + pw_expire: false + register: result + + - name: assert that no changes were made + assert: + that: + - not result.changed + + - name: update iam password policy with different settings + iam_password_policy: + state: present + min_pw_length: 15 + require_symbols: true + require_numbers: true + require_uppercase: true + require_lowercase: true + allow_pw_change: true + pw_max_age: 30 + pw_reuse_prevent: 10 + pw_expire: true + register: result + + - name: assert that updates were made + assert: + that: + - result.changed + + # Test for regression of #59102 + - name: update iam password policy without expiry + iam_password_policy: + state: present + min_pw_length: 15 + require_symbols: true + require_numbers: true + require_uppercase: true + require_lowercase: true + allow_pw_change: true + register: result + + - name: assert that changes were made + assert: + that: + - result.changed + + - name: remove iam password policy + iam_password_policy: + state: absent + register: result + + - name: assert password policy has been removed + assert: + that: + - result.changed + + - name: verify password policy has been removed + iam_password_policy: + state: absent + register: result + + - name: assert no changes were made + assert: + that: + - not result.changed + always: + - name: remove iam password policy + iam_password_policy: + state: absent + register: result diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/aliases new file mode 100644 index 00000000..3f812e19 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/aliases @@ -0,0 +1,3 @@ +iam_policy_info +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/defaults/main.yml new file mode 100644 index 00000000..93759404 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/defaults/main.yml @@ -0,0 +1,6 @@ +--- +iam_name: '{{resource_prefix}}' +iam_policy_name_a: '{{resource_prefix}}-document-a' +iam_policy_name_b: '{{resource_prefix}}-document-b' +iam_policy_name_c: '{{resource_prefix}}-json-a' +iam_policy_name_d: '{{resource_prefix}}-json-b' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_access.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_access.json new file mode 100644 index 00000000..a2f29975 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_access.json @@ -0,0 +1,10 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Deny", + "Action": "*", + "Resource": "*" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_access_with_id.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_access_with_id.json new file mode 100644 index 00000000..9d40dd54 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_access_with_id.json @@ -0,0 +1,11 @@ +{ + "Id": "MyId", + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Deny", + "Action": "*", + "Resource": "*" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_access_with_second_id.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_access_with_second_id.json new file mode 100644 index 00000000..0efbc31d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_access_with_second_id.json @@ -0,0 +1,11 @@ +{ + "Id": "MyOtherId", + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Deny", + "Action": "*", + "Resource": "*" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_trust.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_trust.json new file mode 100644 index 00000000..c3661618 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/files/no_trust.json @@ -0,0 +1,10 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Deny", + "Principal": {"AWS": "*"}, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/tasks/main.yml new file mode 100644 index 00000000..2780bd3e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/tasks/main.yml @@ -0,0 +1,99 @@ +--- +- name: 'Run integration tests for IAM (inline) Policy management' + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + block: + # ============================================================ + - name: Create a temporary folder for the policies + tempfile: + state: directory + register: tmpdir + - name: Copy over policy + copy: + src: no_access.json + dest: "{{ tmpdir.path }}" + - name: Copy over other policy + copy: + src: no_access_with_id.json + dest: "{{ tmpdir.path }}" + - name: Copy over other policy + copy: + src: no_access_with_second_id.json + dest: "{{ tmpdir.path }}" + + # ============================================================ + - name: Create user for tests + iam_user: + state: present + name: "{{ iam_name }}" + register: result + - name: Ensure user was created + assert: + that: + - result is changed + + - name: Create role for tests + iam_role: + state: present + name: "{{ iam_name }}" + assume_role_policy_document: "{{ lookup('file','no_trust.json') }}" + register: result + - name: Ensure role was created + assert: + that: + - result is changed + + - name: Create group for tests + iam_group: + state: present + name: "{{ iam_name }}" + register: result + - name: Ensure group was created + assert: + that: + - result is changed + + # ============================================================ + + - name: Run tests for each type of object + include_tasks: object.yml + loop_control: + loop_var: iam_type + with_items: + - user + - group + - role + + # ============================================================ + + always: + # ============================================================ + - name: Remove user + iam_user: + state: absent + name: "{{ iam_name }}" + ignore_errors: yes + + - name: Remove role + iam_role: + state: absent + name: "{{ iam_name }}" + ignore_errors: yes + + - name: Remove group + iam_group: + state: absent + name: "{{ iam_name }}" + ignore_errors: yes + + # ============================================================ + - name: Delete temporary folder containing the policies + file: + state: absent + path: "{{ tmpdir.path }}/" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/tasks/object.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/tasks/object.yml new file mode 100644 index 00000000..2007da11 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_policy/tasks/object.yml @@ -0,0 +1,1065 @@ +--- +- name: 'Run integration tests for IAM (inline) Policy management on {{ iam_type }}s' + vars: + iam_object_key: '{{ iam_type }}_name' + block: + # ============================================================ + - name: 'Fetch policies from {{ iam_type }} before making changes' + iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + register: iam_policy_info + + - name: 'Assert empty policy list' + assert: + that: + - iam_policy_info is succeeded + - iam_policy_info.policies | length == 0 + - iam_policy_info.all_policy_names | length == 0 + - iam_policy_info.policy_names | length == 0 + + - name: 'Fetch policies from non-existent {{ iam_type }}' + iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}-junk' + register: iam_policy_info + + - name: 'Assert not failed' + assert: + that: + - iam_policy_info is succeeded + + # ============================================================ + - name: 'Create policy using document for {{ iam_type }} (check mode)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + policy_document: '{{ tmpdir.path }}/no_access.json' + skip_duplicates: yes + register: result + + - name: 'Assert policy would be added for {{ iam_type }}' + assert: + that: + - result is changed + + - name: 'Create policy using document for {{ iam_type }}' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + policy_document: '{{ tmpdir.path }}/no_access.json' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + register: iam_policy_info + + - name: 'Assert policy was added for {{ iam_type }}' + assert: + that: + - result is changed + - result.policies | length == 1 + - iam_policy_name_a in result.policies + - result[iam_object_key] == iam_name + - iam_policy_name_a in iam_policy_info.policy_names + - iam_policy_info.policy_names | length == 1 + - iam_policy_info.policies | length == 1 + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_info.all_policy_names | length == 1 + - iam_policy_info.policies[0].policy_name == iam_policy_name_a + - '"Id" not in iam_policy_info.policies[0].policy_document' + + - name: 'Create policy using document for {{ iam_type }} (idempotency)' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + policy_document: '{{ tmpdir.path }}/no_access.json' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + register: iam_policy_info + + - name: 'Assert no change' + assert: + that: + - result is not changed + - result.policies | length == 1 + - iam_policy_name_a in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies | length == 1 + - iam_policy_info.all_policy_names | length == 1 + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_info.policies[0].policy_name == iam_policy_name_a + - '"Id" not in iam_policy_info.policies[0].policy_document' + + # ============================================================ + - name: 'Create policy using document for {{ iam_type }} (check mode) (skip_duplicates)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + policy_document: '{{ tmpdir.path }}/no_access.json' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + register: iam_policy_info + + - name: 'Assert policy would be added for {{ iam_type }}' + assert: + that: + - result is not changed + - iam_policy_info.all_policy_names | length == 1 + - '"policies" not in iam_policy_info' + - iam_policy_name_b not in iam_policy_info.all_policy_names + + - name: 'Create policy using document for {{ iam_type }} (skip_duplicates)' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + policy_document: '{{ tmpdir.path }}/no_access.json' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + register: iam_policy_info + + - name: 'Assert policy was not added for {{ iam_type }} (skip_duplicates)' + assert: + that: + - result is not changed + - result.policies | length == 1 + - iam_policy_name_b not in result.policies + - result[iam_object_key] == iam_name + - '"policies" not in iam_policy_info' + - '"policy_names" not in iam_policy_info' + - iam_policy_info.all_policy_names | length == 1 + - iam_policy_name_b not in iam_policy_info.all_policy_names + + - name: 'Create policy using document for {{ iam_type }} (check mode) (skip_duplicates = no)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + policy_document: '{{ tmpdir.path }}/no_access.json' + skip_duplicates: no + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + register: iam_policy_info + + - name: 'Assert policy would be added for {{ iam_type }}' + assert: + that: + - result.changed == True + - '"policies" not in iam_policy_info' + - iam_policy_info.all_policy_names | length == 1 + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b not in iam_policy_info.all_policy_names + + - name: 'Create policy using document for {{ iam_type }} (skip_duplicates = no)' + iam_policy: + state: present + skip_duplicates: no + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + policy_document: '{{ tmpdir.path }}/no_access.json' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + register: iam_policy_info + + - name: 'Assert policy was added for {{ iam_type }}' + assert: + that: + - result is changed + - result.policies | length == 2 + - iam_policy_name_b in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies | length == 1 + - iam_policy_info.all_policy_names | length == 2 + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b in iam_policy_info.all_policy_names + - iam_policy_info.policies[0].policy_name == iam_policy_name_b + - '"Id" not in iam_policy_info.policies[0].policy_document' + + - name: 'Create policy using document for {{ iam_type }} (idempotency) (skip_duplicates = no)' + iam_policy: + state: present + skip_duplicates: no + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + policy_document: '{{ tmpdir.path }}/no_access.json' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + register: iam_policy_info + + - name: 'Assert no change' + assert: + that: + - result is not changed + - result.policies | length == 2 + - iam_policy_name_b in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies | length == 1 + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b in iam_policy_info.all_policy_names + - iam_policy_info.all_policy_names | length == 2 + - iam_policy_info.policies[0].policy_name == iam_policy_name_b + - '"Id" not in iam_policy_info.policies[0].policy_document' + + # ============================================================ + - name: 'Create policy using json for {{ iam_type }} (check mode)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_id.json") }}' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + register: iam_policy_info + + - name: 'Assert policy would be added for {{ iam_type }}' + assert: + that: + - result is changed + - '"policies" not in iam_policy_info' + - iam_policy_info.all_policy_names | length == 2 + - iam_policy_name_c not in iam_policy_info.all_policy_names + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b in iam_policy_info.all_policy_names + + - name: 'Create policy using json for {{ iam_type }}' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_id.json") }}' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + register: iam_policy_info + + - name: 'Assert policy was added for {{ iam_type }}' + assert: + that: + - result is changed + - result.policies | length == 3 + - iam_policy_name_c in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies | length == 1 + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b in iam_policy_info.all_policy_names + - iam_policy_name_c in iam_policy_info.all_policy_names + - iam_policy_info.all_policy_names | length == 3 + - iam_policy_info.policies[0].policy_name == iam_policy_name_c + - iam_policy_info.policies[0].policy_document.Id == 'MyId' + + - name: 'Create policy using json for {{ iam_type }} (idempotency)' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_id.json") }}' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + register: iam_policy_info + + - name: 'Assert no change' + assert: + that: + - result is not changed + - result.policies | length == 3 + - iam_policy_name_c in result.policies + - result[iam_object_key] == iam_name + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b in iam_policy_info.all_policy_names + - iam_policy_name_c in iam_policy_info.all_policy_names + - iam_policy_info.all_policy_names | length == 3 + - iam_policy_info.policies[0].policy_name == iam_policy_name_c + - iam_policy_info.policies[0].policy_document.Id == 'MyId' + + # ============================================================ + - name: 'Create policy using json for {{ iam_type }} (check mode) (skip_duplicates)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_id.json") }}' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert policy would be added for {{ iam_type }}' + assert: + that: + - result is not changed + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b in iam_policy_info.all_policy_names + - iam_policy_name_c in iam_policy_info.all_policy_names + - iam_policy_name_d not in iam_policy_info.all_policy_names + - iam_policy_info.all_policy_names | length == 3 + - '"policies" not in iam_policy_info' + + - name: 'Create policy using json for {{ iam_type }} (skip_duplicates)' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_id.json") }}' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert policy was not added for {{ iam_type }} (skip_duplicates)' + assert: + that: + - result is not changed + - result.policies | length == 3 + - iam_policy_name_d not in result.policies + - result[iam_object_key] == iam_name + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b in iam_policy_info.all_policy_names + - iam_policy_name_c in iam_policy_info.all_policy_names + - iam_policy_name_d not in iam_policy_info.all_policy_names + - iam_policy_info.all_policy_names | length == 3 + - '"policies" not in iam_policy_info' + + - name: 'Create policy using json for {{ iam_type }} (check mode) (skip_duplicates = no)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_id.json") }}' + skip_duplicates: no + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert policy would be added for {{ iam_type }}' + assert: + that: + - result.changed == True + + - name: 'Create policy using json for {{ iam_type }} (skip_duplicates = no)' + iam_policy: + state: present + skip_duplicates: no + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_id.json") }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert policy was added for {{ iam_type }}' + assert: + that: + - result is changed + - result.policies | length == 4 + - iam_policy_name_d in result.policies + - result[iam_object_key] == iam_name + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b in iam_policy_info.all_policy_names + - iam_policy_name_c in iam_policy_info.all_policy_names + - iam_policy_name_d in iam_policy_info.all_policy_names + - iam_policy_name_a not in iam_policy_info.policy_names + - iam_policy_name_b not in iam_policy_info.policy_names + - iam_policy_name_c not in iam_policy_info.policy_names + - iam_policy_name_d in iam_policy_info.policy_names + - iam_policy_info.policy_names | length == 1 + - iam_policy_info.all_policy_names | length == 4 + - iam_policy_info.policies[0].policy_name == iam_policy_name_d + - iam_policy_info.policies[0].policy_document.Id == 'MyId' + + - name: 'Create policy using json for {{ iam_type }} (idempotency) (skip_duplicates = no)' + iam_policy: + state: present + skip_duplicates: no + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_id.json") }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert no change' + assert: + that: + - result is not changed + - result.policies | length == 4 + - iam_policy_name_d in result.policies + - result[iam_object_key] == iam_name + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b in iam_policy_info.all_policy_names + - iam_policy_name_c in iam_policy_info.all_policy_names + - iam_policy_name_d in iam_policy_info.all_policy_names + - iam_policy_info.all_policy_names | length == 4 + - iam_policy_info.policies[0].policy_name == iam_policy_name_d + - iam_policy_info.policies[0].policy_document.Id == 'MyId' + + # ============================================================ + - name: 'Test fetching multiple policies from {{ iam_type }}' + iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + register: iam_policy_info + + - name: 'Assert all policies returned' + assert: + that: + - iam_policy_info is succeeded + - iam_policy_info.policies | length == 4 + - iam_policy_info.all_policy_names | length == 4 + - iam_policy_name_a in iam_policy_info.all_policy_names + - iam_policy_name_b in iam_policy_info.all_policy_names + - iam_policy_name_c in iam_policy_info.all_policy_names + - iam_policy_name_d in iam_policy_info.all_policy_names + # Quick test that the policies are the ones we expect + - iam_policy_info.policies | community.general.json_query('[*].policy_name') | length == 4 + - iam_policy_info.policies | community.general.json_query('[?policy_document.Id == `MyId`].policy_name') | length == 2 + - iam_policy_name_c in (iam_policy_info.policies | community.general.json_query('[?policy_document.Id == `MyId`].policy_name') | list) + - iam_policy_name_d in (iam_policy_info.policies | community.general.json_query('[?policy_document.Id == `MyId`].policy_name') | list) + + # ============================================================ + - name: 'Update policy using document for {{ iam_type }} (check mode) (skip_duplicates)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + policy_document: '{{ tmpdir.path }}/no_access_with_id.json' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + register: iam_policy_info + + - name: 'Assert policy would be added for {{ iam_type }}' + assert: + that: + - result is not changed + - iam_policy_info.policies[0].policy_name == iam_policy_name_a + - '"Id" not in iam_policy_info.policies[0].policy_document' + + - name: 'Update policy using document for {{ iam_type }} (skip_duplicates)' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + policy_document: '{{ tmpdir.path }}/no_access_with_id.json' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + register: iam_policy_info + + - name: 'Assert policy was not updated for {{ iam_type }} (skip_duplicates)' + assert: + that: + - result is not changed + - result.policies | length == 4 + - iam_policy_name_a in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.all_policy_names | length == 4 + - iam_policy_info.policies[0].policy_name == iam_policy_name_a + - '"Id" not in iam_policy_info.policies[0].policy_document' + + - name: 'Update policy using document for {{ iam_type }} (check mode) (skip_duplicates = no)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + policy_document: '{{ tmpdir.path }}/no_access_with_id.json' + skip_duplicates: no + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + register: iam_policy_info + + - name: 'Assert policy would be updated for {{ iam_type }}' + assert: + that: + - result.changed == True + - iam_policy_info.all_policy_names | length == 4 + - iam_policy_info.policies[0].policy_name == iam_policy_name_a + - '"Id" not in iam_policy_info.policies[0].policy_document' + + - name: 'Update policy using document for {{ iam_type }} (skip_duplicates = no)' + iam_policy: + state: present + skip_duplicates: no + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + policy_document: '{{ tmpdir.path }}/no_access_with_id.json' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + register: iam_policy_info + + - name: 'Assert policy was updated for {{ iam_type }}' + assert: + that: + - result is changed + - result.policies | length == 4 + - iam_policy_name_a in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies[0].policy_document.Id == 'MyId' + + - name: 'Update policy using document for {{ iam_type }} (idempotency) (skip_duplicates = no)' + iam_policy: + state: present + skip_duplicates: no + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + policy_document: '{{ tmpdir.path }}/no_access_with_id.json' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + register: iam_policy_info + + - name: 'Assert no change' + assert: + that: + - result is not changed + - result.policies | length == 4 + - iam_policy_name_a in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies[0].policy_document.Id == 'MyId' + + - name: 'Delete policy A' + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + register: iam_policy_info + + - name: 'Assert deleted' + assert: + that: + - result is changed + - result.policies | length == 3 + - iam_policy_name_a not in result.policies + - result[iam_object_key] == iam_name + - '"policies" not in iam_policy_info' + - iam_policy_info.all_policy_names | length == 3 + - iam_policy_name_a not in iam_policy_info.all_policy_names + + # ============================================================ + # Update C with no_access.json + # Delete C + + - name: 'Update policy using json for {{ iam_type }} (check mode) (skip_duplicates)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access.json") }}' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + register: iam_policy_info + + - name: 'Assert policy would be added for {{ iam_type }}' + assert: + that: + - result is not changed + - iam_policy_info.policies[0].policy_document.Id == 'MyId' + + - name: 'Update policy using json for {{ iam_type }} (skip_duplicates)' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access.json") }}' + skip_duplicates: yes + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + register: iam_policy_info + + - name: 'Assert policy was not updated for {{ iam_type }} (skip_duplicates)' + assert: + that: + - result is not changed + - result.policies | length == 3 + - iam_policy_name_c in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies[0].policy_document.Id == 'MyId' + + - name: 'Update policy using json for {{ iam_type }} (check mode) (skip_duplicates = no)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access.json") }}' + skip_duplicates: no + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + register: iam_policy_info + + - name: 'Assert policy would be updated for {{ iam_type }}' + assert: + that: + - result.changed == True + - iam_policy_info.policies[0].policy_document.Id == 'MyId' + + - name: 'Update policy using json for {{ iam_type }} (skip_duplicates = no)' + iam_policy: + state: present + skip_duplicates: no + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access.json") }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + register: iam_policy_info + + - name: 'Assert policy was updated for {{ iam_type }}' + assert: + that: + - result is changed + - result.policies | length == 3 + - iam_policy_name_c in result.policies + - result[iam_object_key] == iam_name + - '"Id" not in iam_policy_info.policies[0].policy_document' + + - name: 'Update policy using json for {{ iam_type }} (idempotency) (skip_duplicates = no)' + iam_policy: + state: present + skip_duplicates: no + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access.json") }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + register: iam_policy_info + + - name: 'Assert no change' + assert: + that: + - result is not changed + - result.policies | length == 3 + - iam_policy_name_c in result.policies + - result[iam_object_key] == iam_name + - '"Id" not in iam_policy_info.policies[0].policy_document' + + - name: 'Delete policy C' + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + register: iam_policy_info + + - name: 'Assert deleted' + assert: + that: + - result is changed + - result.policies | length == 2 + - iam_policy_name_c not in result.policies + - result[iam_object_key] == iam_name + - '"policies" not in iam_policy_info' + - iam_policy_info.all_policy_names | length == 2 + - iam_policy_name_c not in iam_policy_info.all_policy_names + + # ============================================================ + - name: 'Update policy using document for {{ iam_type }} (check mode)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + policy_document: '{{ tmpdir.path }}/no_access_with_second_id.json' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + register: iam_policy_info + + - name: 'Assert policy would be updated for {{ iam_type }}' + assert: + that: + - result.changed == True + - '"Id" not in iam_policy_info.policies[0].policy_document' + + - name: 'Update policy using document for {{ iam_type }}' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + policy_document: '{{ tmpdir.path }}/no_access_with_second_id.json' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + register: iam_policy_info + + - name: 'Assert policy was updated for {{ iam_type }}' + assert: + that: + - result is changed + - result.policies | length == 2 + - iam_policy_name_b in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies[0].policy_document.Id == 'MyOtherId' + + - name: 'Update policy using document for {{ iam_type }} (idempotency)' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + policy_document: '{{ tmpdir.path }}/no_access_with_second_id.json' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + register: iam_policy_info + + - name: 'Assert no change' + assert: + that: + - result is not changed + - result.policies | length == 2 + - iam_policy_name_b in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies[0].policy_document.Id == 'MyOtherId' + + - name: 'Delete policy B' + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + register: iam_policy_info + + - name: 'Assert deleted' + assert: + that: + - result is changed + - result.policies | length == 1 + - iam_policy_name_b not in result.policies + - result[iam_object_key] == iam_name + - '"policies" not in iam_policy_info' + - iam_policy_info.all_policy_names | length == 1 + - iam_policy_name_b not in iam_policy_info.all_policy_names + + # ============================================================ + - name: 'Update policy using json for {{ iam_type }} (check mode)' + check_mode: yes + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_second_id.json") }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert policy would be updated for {{ iam_type }}' + assert: + that: + - result.changed == True + - iam_policy_info.policies[0].policy_document.Id == 'MyId' + + - name: 'Update policy using json for {{ iam_type }}' + iam_policy: + state: present + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_second_id.json") }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert policy was updated for {{ iam_type }}' + assert: + that: + - result is changed + - result.policies | length == 1 + - iam_policy_name_d in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies[0].policy_document.Id == 'MyOtherId' + + - name: 'Update policy using json for {{ iam_type }} (idempotency)' + iam_policy: + state: present + skip_duplicates: no + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + policy_json: '{{ lookup("file", "{{ tmpdir.path }}/no_access_with_second_id.json") }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert no change' + assert: + that: + - result is not changed + - result.policies | length == 1 + - iam_policy_name_d in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.policies[0].policy_document.Id == 'MyOtherId' + + # ============================================================ + - name: 'Delete policy D (check_mode)' + check_mode: yes + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert not deleted' + assert: + that: + - result is changed + - result.policies | length == 1 + - iam_policy_name_d in result.policies + - result[iam_object_key] == iam_name + - iam_policy_info.all_policy_names | length == 1 + - iam_policy_name_d in iam_policy_info.all_policy_names + - iam_policy_info.policies[0].policy_document.Id == 'MyOtherId' + + - name: 'Delete policy D' + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert deleted' + assert: + that: + - result is changed + - '"policies" not in iam_policy_info' + - iam_policy_name_d not in result.policies + - result[iam_object_key] == iam_name + - '"policies" not in iam_policy_info' + - iam_policy_info.all_policy_names | length == 0 + + - name: 'Delete policy D (test idempotency)' + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert deleted' + assert: + that: + - result is not changed + - '"policies" not in iam_policy_info' + - iam_policy_info.all_policy_names | length == 0 + + - name: 'Delete policy D (check_mode) (test idempotency)' + check_mode: yes + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: result + - iam_policy_info: + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + register: iam_policy_info + + - name: 'Assert deleted' + assert: + that: + - result is not changed + - '"policies" not in iam_policy_info' + - iam_policy_info.all_policy_names | length == 0 + + always: + # ============================================================ + - name: 'Delete policy A for {{ iam_type }}' + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_a }}' + ignore_errors: yes + + - name: 'Delete policy B for {{ iam_type }}' + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_b }}' + ignore_errors: yes + + - name: 'Delete policy C for {{ iam_type }}' + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_c }}' + ignore_errors: yes + + - name: 'Delete policy D for {{ iam_type }}' + iam_policy: + state: absent + iam_type: '{{ iam_type }}' + iam_name: '{{ iam_name }}' + policy_name: '{{ iam_policy_name_d }}' + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/aliases new file mode 100644 index 00000000..3d7a2c9f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/aliases @@ -0,0 +1,3 @@ +iam_role_info +unsupported +cloud/aws diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/defaults/main.yml new file mode 100644 index 00000000..46db6050 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/defaults/main.yml @@ -0,0 +1,8 @@ +--- +test_role: '{{ resource_prefix }}-role' +test_path: '/{{ resource_prefix }}/' +safe_managed_policy: 'AWSDenyAll' +custom_policy_name: '{{ resource_prefix }}-denyall' +boundary_policy: 'arn:aws:iam::aws:policy/AWSDenyAll' +paranoid_pauses: no +standard_pauses: no diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-all-a.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-all-a.json new file mode 100644 index 00000000..ae62fd19 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-all-a.json @@ -0,0 +1,13 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "*" + ], + "Effect": "Deny", + "Resource": "*", + "Sid": "DenyA" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-all-b.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-all-b.json new file mode 100644 index 00000000..3a4704a4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-all-b.json @@ -0,0 +1,13 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "*" + ], + "Effect": "Deny", + "Resource": "*", + "Sid": "DenyB" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-all.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-all.json new file mode 100644 index 00000000..3d324b9b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-all.json @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "*" + ], + "Effect": "Deny", + "Resource": "*" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-assume.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-assume.json new file mode 100644 index 00000000..73e87715 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/files/deny-assume.json @@ -0,0 +1,10 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Principal": { "Service": "ec2.amazonaws.com" }, + "Effect": "Deny" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/tasks/main.yml new file mode 100644 index 00000000..34c17af3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_role/tasks/main.yml @@ -0,0 +1,1521 @@ +--- +# Tests for iam_role and iam_role_info +# +# Tests: +# - Minimal Role creation +# - Role deletion +# - Fetching a specific role +# - Creating roles w/ and w/o instance profiles +# - Creating roles w/ a path +# - Updating Max Session Duration +# - Updating Description +# - Managing list of managed policies +# - Managing list of inline policies (for testing _info) +# - Managing boundary policy +# +# Notes: +# - Only tests *documented* return values ( RESULT.iam_role ) +# - There are some known timing issues with boto3 returning before actions +# complete in the case of problems with "changed" status it's worth enabling +# the standard_pauses and paranoid_pauses options as a first step in debugging +# +# Possible Bugs: +# - Fails to delete role if inline policies not removed first + +- name: 'Setup AWS connection info' + module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + iam_role: + assume_role_policy_document: '{{ lookup("file", "deny-assume.json") }}' + collections: + - amazon.aws + block: + # =================================================================== + # Parameter Checks + - name: 'Friendly message when creating an instance profile and adding a boundary profile' + iam_role: + name: '{{ test_role }}' + boundary: '{{ boundary_policy }}' + register: iam_role + ignore_errors: yes + - assert: + that: + - iam_role is failed + - '"boundary policy" in iam_role.msg' + - '"create_instance_profile" in iam_role.msg' + - '"false" in iam_role.msg' + + - name: 'Friendly message when boundary profile is not an ARN' + iam_role: + name: '{{ test_role }}' + boundary: 'AWSDenyAll' + create_instance_profile: no + register: iam_role + ignore_errors: yes + - assert: + that: + - iam_role is failed + - '"Boundary policy" in iam_role.msg' + - '"ARN" in iam_role.msg' + + - name: 'Friendly message when "present" without assume_role_policy_document' + module_defaults: { iam_role: {} } + iam_role: + name: '{{ test_role }}' + register: iam_role + ignore_errors: yes + - assert: + that: + - iam_role is failed + - 'iam_role.msg.startswith("state is present but all of the following are missing")' + - '"assume_role_policy_document" in iam_role.msg' + + - name: 'Maximum Session Duration needs to be between 1 and 12 hours' + iam_role: + name: '{{ test_role }}' + max_session_duration: 3599 + register: iam_role + ignore_errors: yes + - assert: + that: + - iam_role is failed + - '"max_session_duration must be between" in iam_role.msg' + + - name: 'Maximum Session Duration needs to be between 1 and 12 hours' + iam_role: + name: '{{ test_role }}' + max_session_duration: 43201 + register: iam_role + ignore_errors: yes + - assert: + that: + - iam_role is failed + - '"max_session_duration must be between" in iam_role.msg' + + - name: 'Role Paths must start with /' + iam_role: + name: '{{ test_role }}' + path: 'test/' + register: iam_role + ignore_errors: yes + - assert: + that: + - iam_role is failed + - '"path must begin and end with /" in iam_role.msg' + + - name: 'Role Paths must end with /' + iam_role: + name: '{{ test_role }}' + path: '/test' + register: iam_role + ignore_errors: yes + - assert: + that: + - iam_role is failed + - '"path must begin and end with /" in iam_role.msg' + + # =================================================================== + # Supplemental resource pre-creation + - name: 'Create Safe IAM Managed Policy' + iam_managed_policy: + state: present + policy_name: '{{ custom_policy_name }}' + policy_description: "A safe (deny-all) managed policy" + policy: "{{ lookup('file', 'deny-all.json') }}" + register: create_managed_policy + - assert: + that: + - create_managed_policy is succeeded + + # =================================================================== + # Rapid Role Creation and deletion + - name: Try running some rapid fire create/delete tests + # We've previously seen issues with iam_role returning before creation's + # actually complete, if we think the issue's gone, let's try creating and + # deleting things in quick succession + when: not (standard_pauses | bool) + block: + - name: 'Minimal IAM Role without instance profile (rapid)' + iam_role: + name: '{{ test_role }}' + create_instance_profile: no + register: iam_role + - name: 'Minimal IAM Role without instance profile (rapid)' + iam_role: + name: '{{ test_role }}' + create_instance_profile: no + register: iam_role_again + - assert: + that: + - iam_role is changed + - iam_role_again is not changed + - name: 'Remove IAM Role (rapid)' + iam_role: + state: absent + name: '{{ test_role }}' + register: iam_role + - name: 'Remove IAM Role (rapid)' + iam_role: + state: absent + name: '{{ test_role }}' + register: iam_role_again + - assert: + that: + - iam_role is changed + - iam_role_again is not changed + + - name: 'Minimal IAM Role without instance profile (rapid)' + iam_role: + name: '{{ test_role }}' + create_instance_profile: no + register: iam_role + - name: 'Remove IAM Role (rapid)' + iam_role: + state: absent + name: '{{ test_role }}' + register: iam_role_again + - assert: + that: + - iam_role is changed + - iam_role_again is changed + + # =================================================================== + # Role Creation + # (without Instance profile) + - name: 'iam_role_info before Role creation (no args)' + iam_role_info: + register: role_info + - assert: + that: + - role_info is succeeded + + - name: 'iam_role_info before Role creation (search for test role)' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 0 + + - name: 'Minimal IAM Role (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + create_instance_profile: no + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + # Pause this first time, just in case we actually created something... + - name: Short pause for role creation to finish + pause: + seconds: 10 + when: standard_pauses | bool + + - name: 'iam_role_info after Role creation in check_mode' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 0 + + - name: 'Minimal IAM Role without instance profile' + iam_role: + name: '{{ test_role }}' + create_instance_profile: no + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - 'iam_role.iam_role.arn.startswith("arn")' + - 'iam_role.iam_role.arn.endswith("role/" + test_role )' + # Would be nice to test the contents... + - '"assume_role_policy_document" in iam_role.iam_role' + - iam_role.iam_role.attached_policies | length == 0 + - iam_role.iam_role.max_session_duration == 3600 + - iam_role.iam_role.path == '/' + - iam_role.iam_role.role_name == test_role + - '"create_date" in iam_role.iam_role' + - '"role_id" in iam_role.iam_role' + - name: Short pause for role creation to finish + pause: + seconds: 10 + when: standard_pauses | bool + + - name: 'Minimal IAM Role without instance profile (no change)' + iam_role: + name: '{{ test_role }}' + create_instance_profile: no + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + + - name: 'iam_role_info after Role creation' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - '"description" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 0 + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 3600 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 0 + + - name: 'Remove IAM Role' + iam_role: + state: absent + name: '{{ test_role }}' + delete_instance_profile: yes + register: iam_role + - assert: + that: + - iam_role is changed + - name: Short pause for role removal to finish + pause: + seconds: 10 + when: paranoid_pauses | bool + + - name: 'iam_role_info after Role deletion' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 0 + + # (with path) + - name: 'Minimal IAM Role with path (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + path: '{{ test_path }}' + register: iam_role + check_mode: yes + - assert: + that: + - iam_role is changed + + - name: 'Minimal IAM Role with path' + iam_role: + name: '{{ test_role }}' + path: '{{ test_path }}' + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - 'iam_role.iam_role.arn.startswith("arn")' + - 'iam_role.iam_role.arn.endswith("role" + test_path + test_role )' + # Would be nice to test the contents... + - '"assume_role_policy_document" in iam_role.iam_role' + - iam_role.iam_role.attached_policies | length == 0 + - iam_role.iam_role.max_session_duration == 3600 + - iam_role.iam_role.path == '{{ test_path }}' + - iam_role.iam_role.role_name == test_role + - '"create_date" in iam_role.iam_role' + - '"role_id" in iam_role.iam_role' + - name: Short pause for role creation to finish + pause: + seconds: 10 + when: standard_pauses | bool + + - name: 'Minimal IAM Role with path (no change)' + iam_role: + name: '{{ test_role }}' + path: '{{ test_path }}' + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + + - name: 'iam_role_info after Role creation' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role" + test_path + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - '"description" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile" + test_path + test_role)' + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 3600 + - role_info.iam_roles[0].path == '{{ test_path }}' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 0 + + - name: 'iam_role_info after Role creation (searching a path)' + iam_role_info: + path_prefix: '{{ test_path }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role" + test_path + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - '"description" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile" + test_path + test_role)' + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 3600 + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].path == '{{ test_path }}' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 0 + + - name: 'Remove IAM Role' + iam_role: + state: absent + name: '{{ test_role }}' + path: '{{ test_path }}' + # If we don't delete the existing profile it'll be reused (with the path) + # by the test below. + delete_instance_profile: yes + register: iam_role + - assert: + that: + - iam_role is changed + - name: Short pause for role removal to finish + pause: + seconds: 10 + when: paranoid_pauses | bool + + - name: 'iam_role_info after Role deletion' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 0 + + # (with Instance profile) + - name: 'Minimal IAM Role with instance profile' + iam_role: + name: '{{ test_role }}' + create_instance_profile: yes + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - 'iam_role.iam_role.arn.startswith("arn")' + - 'iam_role.iam_role.arn.endswith("role/" + test_role )' + # Would be nice to test the contents... + - '"assume_role_policy_document" in iam_role.iam_role' + - iam_role.iam_role.attached_policies | length == 0 + - iam_role.iam_role.max_session_duration == 3600 + - iam_role.iam_role.path == '/' + - iam_role.iam_role.role_name == test_role + - '"create_date" in iam_role.iam_role' + - '"role_id" in iam_role.iam_role' + - name: Short pause for role creation to finish + pause: + seconds: 10 + when: standard_pauses | bool + + - name: 'Minimal IAM Role wth instance profile (no change)' + iam_role: + name: '{{ test_role }}' + create_instance_profile: yes + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + + - name: 'iam_role_info after Role creation' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - '"description" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 3600 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 0 + + # =================================================================== + # Max Session Duration Manipulation + + - name: 'Update Max Session Duration (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + max_session_duration: 43200 + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Update Max Session Duration' + iam_role: + name: '{{ test_role }}' + max_session_duration: 43200 + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - iam_role.iam_role.max_session_duration == 43200 + + - name: 'Update Max Session Duration (no change)' + iam_role: + name: '{{ test_role }}' + max_session_duration: 43200 + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + + - name: 'iam_role_info after updating Max Session Duration' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - '"description" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 0 + + # =================================================================== + # Description Manipulation + + - name: 'Add Description (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + description: 'Ansible Test Role {{ resource_prefix }}' + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Add Description' + iam_role: + name: '{{ test_role }}' + description: 'Ansible Test Role {{ resource_prefix }}' + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - iam_role.iam_role.description == 'Ansible Test Role {{ resource_prefix }}' + + - name: 'Add Description (no change)' + iam_role: + name: '{{ test_role }}' + description: 'Ansible Test Role {{ resource_prefix }}' + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + - iam_role.iam_role.description == 'Ansible Test Role {{ resource_prefix }}' + + - name: 'iam_role_info after adding Description' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 0 + + - name: 'Update Description (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + description: 'Ansible Test Role (updated) {{ resource_prefix }}' + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Update Description' + iam_role: + name: '{{ test_role }}' + description: 'Ansible Test Role (updated) {{ resource_prefix }}' + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - iam_role.iam_role.description == 'Ansible Test Role (updated) {{ resource_prefix }}' + + - name: 'Update Description (no change)' + iam_role: + name: '{{ test_role }}' + description: 'Ansible Test Role (updated) {{ resource_prefix }}' + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + - iam_role.iam_role.description == 'Ansible Test Role (updated) {{ resource_prefix }}' + + - name: 'iam_role_info after updating Description' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role (updated) {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 0 + + + # =================================================================== + # Tag Manipulation + + - name: 'Add Tag (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + tags: + TagA: ValueA + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Add Tag' + iam_role: + name: '{{ test_role }}' + tags: + TagA: ValueA + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - iam_role.iam_role.tags | length == 1 + - '"TagA" in iam_role.iam_role.tags' + - iam_role.iam_role.tags.TagA == "ValueA" + + - name: 'Add Tag (no change)' + iam_role: + name: '{{ test_role }}' + tags: + TagA: ValueA + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + - '"TagA" in iam_role.iam_role.tags' + - iam_role.iam_role.tags.TagA == "ValueA" + + - name: 'iam_role_info after adding Tags' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role (updated) {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 1 + - '"TagA" in role_info.iam_roles[0].tags' + - role_info.iam_roles[0].tags.TagA == "ValueA" + + - name: 'Update Tag (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + tags: + TagA: AValue + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Update Tag' + iam_role: + name: '{{ test_role }}' + tags: + TagA: AValue + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - '"TagA" in iam_role.iam_role.tags' + - iam_role.iam_role.tags.TagA == "AValue" + + - name: 'Update Tag (no change)' + iam_role: + name: '{{ test_role }}' + tags: + TagA: AValue + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + - '"TagA" in iam_role.iam_role.tags' + - iam_role.iam_role.tags.TagA == "AValue" + + - name: 'iam_role_info after updating Tag' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role (updated) {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 1 + - '"TagA" in role_info.iam_roles[0].tags' + - role_info.iam_roles[0].tags.TagA == "AValue" + + - name: 'Add second Tag without purge (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + purge_tags: no + tags: + TagB: ValueB + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Add second Tag without purge' + iam_role: + name: '{{ test_role }}' + purge_tags: no + tags: + TagB: ValueB + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - '"TagB" in iam_role.iam_role.tags' + - iam_role.iam_role.tags.TagB == "ValueB" + + - name: 'Add second Tag without purge (no change)' + iam_role: + name: '{{ test_role }}' + purge_tags: no + tags: + TagB: ValueB + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + - '"TagB" in iam_role.iam_role.tags' + - iam_role.iam_role.tags.TagB == "ValueB" + + - name: 'iam_role_info after adding second Tag without purge' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role (updated) {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 2 + - '"TagA" in role_info.iam_roles[0].tags' + - role_info.iam_roles[0].tags.TagA == "AValue" + - '"TagB" in role_info.iam_roles[0].tags' + - role_info.iam_roles[0].tags.TagB == "ValueB" + + - name: 'Purge first tag (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + purge_tags: yes + tags: + TagB: ValueB + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Purge first tag' + iam_role: + name: '{{ test_role }}' + purge_tags: yes + tags: + TagB: ValueB + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - '"TagB" in iam_role.iam_role.tags' + - iam_role.iam_role.tags.TagB == "ValueB" + + - name: 'Purge first tag (no change)' + iam_role: + name: '{{ test_role }}' + purge_tags: yes + tags: + TagB: ValueB + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + - '"TagB" in iam_role.iam_role.tags' + - iam_role.iam_role.tags.TagB == "ValueB" + + - name: 'iam_role_info after purging first Tag' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role (updated) {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 1 + - '"TagA" not in role_info.iam_roles[0].tags' + - '"TagB" in role_info.iam_roles[0].tags' + - role_info.iam_roles[0].tags.TagB == "ValueB" + + + # =================================================================== + # Policy Manipulation + + - name: 'Add Managed Policy (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + purge_policies: no + managed_policy: + - '{{ safe_managed_policy }}' + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Add Managed Policy' + iam_role: + name: '{{ test_role }}' + purge_policies: no + managed_policy: + - '{{ safe_managed_policy }}' + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + + - name: 'Add Managed Policy (no change)' + iam_role: + name: '{{ test_role }}' + purge_policies: no + managed_policy: + - '{{ safe_managed_policy }}' + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + + - name: 'iam_role_info after adding Managed Policy' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role (updated) {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 1 + - safe_managed_policy in ( role_info | community.general.json_query("iam_roles[*].managed_policies[*].policy_name") | list | flatten ) + - custom_policy_name not in ( role_info | community.general.json_query("iam_roles[*].managed_policies[*].policy_name") | list | flatten ) + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 1 + - '"TagB" in role_info.iam_roles[0].tags' + - role_info.iam_roles[0].tags.TagB == "ValueB" + + - name: 'Update Managed Policy without purge (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + purge_policies: no + managed_policy: + - '{{ custom_policy_name }}' + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Update Managed Policy without purge' + iam_role: + name: '{{ test_role }}' + purge_policies: no + managed_policy: + - '{{ custom_policy_name }}' + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + + - name: 'Update Managed Policy without purge (no change)' + iam_role: + name: '{{ test_role }}' + purge_policies: no + managed_policy: + - '{{ custom_policy_name }}' + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + + - name: 'iam_role_info after updating Managed Policy without purge' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role (updated) {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 2 + - safe_managed_policy in ( role_info | community.general.json_query("iam_roles[*].managed_policies[*].policy_name") | list | flatten ) + - custom_policy_name in ( role_info | community.general.json_query("iam_roles[*].managed_policies[*].policy_name") | list | flatten ) + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 1 + - '"TagB" in role_info.iam_roles[0].tags' + - role_info.iam_roles[0].tags.TagB == "ValueB" + + # Managed Policies are purged by default + - name: 'Update Managed Policy with purge (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + managed_policy: + - '{{ custom_policy_name }}' + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Update Managed Policy with purge' + iam_role: + name: '{{ test_role }}' + managed_policy: + - '{{ custom_policy_name }}' + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + + - name: 'Update Managed Policy with purge (no change)' + iam_role: + name: '{{ test_role }}' + managed_policy: + - '{{ custom_policy_name }}' + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + + - name: 'iam_role_info after updating Managed Policy with purge' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role (updated) {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 1 + - safe_managed_policy not in ( role_info | community.general.json_query("iam_roles[*].managed_policies[*].policy_name") | list | flatten ) + - custom_policy_name in ( role_info | community.general.json_query("iam_roles[*].managed_policies[*].policy_name") | list | flatten ) + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 1 + - '"TagB" in role_info.iam_roles[0].tags' + - role_info.iam_roles[0].tags.TagB == "ValueB" + + # =================================================================== + # Inline Policy (test _info behaviour) + + # XXX Not sure if it's a bug in Ansible or a "quirk" of AWS, but these two + # policies need to have at least different Sids or the second doesn't show + # up... + + - name: 'Attach inline policy a' + iam_policy: + state: present + iam_type: 'role' + iam_name: '{{ test_role }}' + policy_name: 'inline-policy-a' + policy_json: '{{ lookup("file", "deny-all-a.json") }}' + + - name: 'Attach inline policy b' + iam_policy: + state: present + iam_type: 'role' + iam_name: '{{ test_role }}' + policy_name: 'inline-policy-b' + policy_json: '{{ lookup("file", "deny-all-b.json") }}' + + - name: 'iam_role_info after attaching inline policies (using iam_policy)' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role (updated) {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 2 + - '"inline-policy-a" in role_info.iam_roles[0].inline_policies' + - '"inline-policy-b" in role_info.iam_roles[0].inline_policies' + - role_info.iam_roles[0].instance_profiles | length == 1 + - role_info.iam_roles[0].instance_profiles[0].instance_profile_name == test_role + - 'role_info.iam_roles[0].instance_profiles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].instance_profiles[0].arn.endswith("instance-profile/" + test_role)' + - role_info.iam_roles[0].managed_policies | length == 1 + - safe_managed_policy not in ( role_info | community.general.json_query("iam_roles[*].managed_policies[*].policy_name") | list | flatten ) + - custom_policy_name in ( role_info | community.general.json_query("iam_roles[*].managed_policies[*].policy_name") | list | flatten ) + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == '/' + - '"permissions_boundary" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - role_info.iam_roles[0].tags | length == 1 + - '"TagB" in role_info.iam_roles[0].tags' + - role_info.iam_roles[0].tags.TagB == "ValueB" + + # XXX iam_role fails to remove inline policies before deleting the role + - name: 'Detach inline policy a' + iam_policy: + state: absent + iam_type: 'role' + iam_name: '{{ test_role }}' + policy_name: 'inline-policy-a' + + - name: 'Detach inline policy b' + iam_policy: + state: absent + iam_type: 'role' + iam_name: '{{ test_role }}' + policy_name: 'inline-policy-b' + + # =================================================================== + # Role Removal + - name: 'Remove IAM Role (CHECK MODE)' + iam_role: + state: absent + name: '{{ test_role }}' + delete_instance_profile: yes + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + - name: 'Short pause for role removal to finish' + pause: + seconds: 10 + when: paranoid_pauses | bool + + - name: 'iam_role_info after deleting role in check mode' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + + - name: 'Remove IAM Role' + iam_role: + state: absent + name: '{{ test_role }}' + delete_instance_profile: yes + register: iam_role + - assert: + that: + - iam_role is changed + - name: 'Short pause for role removal to finish' + pause: + seconds: 10 + when: paranoid_pauses | bool + + - name: 'iam_role_info after deleting role' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 0 + + - name: 'Remove IAM Role (should be gone already)' + iam_role: + state: absent + name: '{{ test_role }}' + delete_instance_profile: yes + register: iam_role + - assert: + that: + - iam_role is not changed + - name: 'Short pause for role removal to finish' + pause: + seconds: 10 + when: paranoid_pauses | bool + + # =================================================================== + # Boundary Policy (requires create_instance_profile: no) + - name: 'Create minimal role with no boundary policy' + iam_role: + name: '{{ test_role }}' + create_instance_profile: no + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + + - name: 'Configure Boundary Policy (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + create_instance_profile: no + boundary: '{{ boundary_policy }}' + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + + - name: 'Configure Boundary Policy' + iam_role: + name: '{{ test_role }}' + create_instance_profile: no + boundary: '{{ boundary_policy }}' + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + + - name: 'Configure Boundary Policy (no change)' + iam_role: + name: '{{ test_role }}' + create_instance_profile: no + boundary: '{{ boundary_policy }}' + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + + - name: 'iam_role_info after adding boundary policy' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role/" + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - '"description" not in role_info.iam_roles[0]' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 0 + - role_info.iam_roles[0].managed_policies | length == 0 + - role_info.iam_roles[0].max_session_duration == 3600 + - role_info.iam_roles[0].path == '/' + - role_info.iam_roles[0].permissions_boundary.permissions_boundary_arn == boundary_policy + - role_info.iam_roles[0].permissions_boundary.permissions_boundary_type == 'Policy' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + + - name: 'Remove IAM Role' + iam_role: + state: absent + name: '{{ test_role }}' + delete_instance_profile: yes + register: iam_role + - assert: + that: + - iam_role is changed + - name: Short pause for role removal to finish + pause: + seconds: 10 + when: paranoid_pauses | bool + + # =================================================================== + # Complex role Creation + - name: 'Complex IAM Role (CHECK MODE)' + iam_role: + name: '{{ test_role }}' + assume_role_policy_document: '{{ lookup("file", "deny-assume.json") }}' + boundary: '{{ boundary_policy }}' + create_instance_profile: no + description: 'Ansible Test Role {{ resource_prefix }}' + managed_policy: + - '{{ safe_managed_policy }}' + - '{{ custom_policy_name }}' + max_session_duration: 43200 + path: '{{ test_path }}' + tags: + TagA: 'ValueA' + check_mode: yes + register: iam_role + - assert: + that: + - iam_role is changed + - name: Short pause for role creation to finish + pause: + seconds: 10 + when: standard_pauses | bool + + - name: 'iam_role_info after Complex Role creation in check_mode' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 0 + + - name: 'Complex IAM Role' + iam_role: + name: '{{ test_role }}' + assume_role_policy_document: '{{ lookup("file", "deny-assume.json") }}' + boundary: '{{ boundary_policy }}' + create_instance_profile: no + description: 'Ansible Test Role {{ resource_prefix }}' + managed_policy: + - '{{ safe_managed_policy }}' + - '{{ custom_policy_name }}' + max_session_duration: 43200 + path: '{{ test_path }}' + tags: + TagA: 'ValueA' + register: iam_role + - assert: + that: + - iam_role is changed + - iam_role.iam_role.role_name == test_role + - 'iam_role.iam_role.arn.startswith("arn")' + - 'iam_role.iam_role.arn.endswith("role" + test_path + test_role )' + # Would be nice to test the contents... + - '"assume_role_policy_document" in iam_role.iam_role' + - iam_role.iam_role.attached_policies | length == 2 + - iam_role.iam_role.max_session_duration == 43200 + - iam_role.iam_role.path == test_path + - iam_role.iam_role.role_name == test_role + - '"create_date" in iam_role.iam_role' + - '"role_id" in iam_role.iam_role' + - name: Short pause for role creation to finish + pause: + seconds: 10 + when: standard_pauses | bool + + - name: 'Complex IAM role (no change)' + iam_role: + name: '{{ test_role }}' + assume_role_policy_document: '{{ lookup("file", "deny-assume.json") }}' + boundary: '{{ boundary_policy }}' + create_instance_profile: no + description: 'Ansible Test Role {{ resource_prefix }}' + managed_policy: + - '{{ safe_managed_policy }}' + - '{{ custom_policy_name }}' + max_session_duration: 43200 + path: '{{ test_path }}' + tags: + TagA: 'ValueA' + register: iam_role + - assert: + that: + - iam_role is not changed + - iam_role.iam_role.role_name == test_role + + - name: 'iam_role_info after Role creation' + iam_role_info: + name: '{{ test_role }}' + register: role_info + - assert: + that: + - role_info is succeeded + - role_info.iam_roles | length == 1 + - 'role_info.iam_roles[0].arn.startswith("arn")' + - 'role_info.iam_roles[0].arn.endswith("role" + test_path + test_role )' + - '"assume_role_policy_document" in role_info.iam_roles[0]' + - '"create_date" in role_info.iam_roles[0]' + - 'role_info.iam_roles[0].description == "Ansible Test Role {{ resource_prefix }}"' + - role_info.iam_roles[0].inline_policies | length == 0 + - role_info.iam_roles[0].instance_profiles | length == 0 + - role_info.iam_roles[0].managed_policies | length == 2 + - safe_managed_policy in ( role_info | community.general.json_query("iam_roles[*].managed_policies[*].policy_name") | list | flatten ) + - custom_policy_name in ( role_info | community.general.json_query("iam_roles[*].managed_policies[*].policy_name") | list | flatten ) + - role_info.iam_roles[0].max_session_duration == 43200 + - role_info.iam_roles[0].path == test_path + - role_info.iam_roles[0].permissions_boundary.permissions_boundary_arn == boundary_policy + - role_info.iam_roles[0].permissions_boundary.permissions_boundary_type == 'Policy' + - role_info.iam_roles[0].role_id == iam_role.iam_role.role_id + - role_info.iam_roles[0].role_name == test_role + - '"TagA" in role_info.iam_roles[0].tags' + - role_info.iam_roles[0].tags.TagA == "ValueA" + + always: + # =================================================================== + # Cleanup + + # XXX iam_role fails to remove inline policies before deleting the role + - name: 'Detach inline policy a' + iam_policy: + state: absent + iam_type: 'role' + iam_name: '{{ test_role }}' + policy_name: 'inline-policy-a' + ignore_errors: true + + - name: 'Detach inline policy b' + iam_policy: + state: absent + iam_type: 'role' + iam_name: '{{ test_role }}' + policy_name: 'inline-policy-b' + ignore_errors: true + + - name: 'Remove IAM Role' + iam_role: + state: absent + name: '{{ test_role }}' + delete_instance_profile: yes + ignore_errors: true + + - name: 'Remove IAM Role (with path)' + iam_role: + state: absent + name: '{{ test_role }}' + path: '{{ test_path }}' + delete_instance_profile: yes + ignore_errors: true + + - name: 'iam_role_info after Role deletion' + iam_role_info: + name: '{{ test_role }}' + ignore_errors: true + + - name: 'Remove test managed policy' + iam_managed_policy: + state: absent + policy_name: '{{ custom_policy_name }}' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/files/example1.xml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/files/example1.xml new file mode 100644 index 00000000..fa2130a5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/files/example1.xml @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" validUntil="2019-08-24T20:37:21Z" cacheDuration="PT1567111041S" entityID="AnsibleSAMLTest1"> + <md:IDPSSODescriptor WantAuthnRequestsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"> + <md:KeyDescriptor use="signing"> + <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> + <ds:X509Data> + <ds:X509Certificate>MIIDJjCCAg4CCQCiwst2XYH7fTANBgkqhkiG9w0BAQsFADBVMQswCQYDVQQGEwJYWDEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZhdWx0IENvbXBhbnkgTHRkMREwDwYDVQQDDAhleGFtcGxlMTAeFw0xOTA4MjIyMDM2NTFaFw0yMDA4MjEyMDM2NTFaMFUxCzAJBgNVBAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQxETAPBgNVBAMMCGV4YW1wbGUxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArLbBVE6E28bfvB/gUGjOmY2lxxxLZ9Fls4fOH9js/MhGG+hh4diyj/Kb7Coo6HehXMp93TXkYYbiKGAoykT6ULEACZnYi1V9XdUs619ibumi9pRSFygBrbyN+n9peMJxf4jvM1QS/DTPWxdkgeMkqb2SARJChd3azCHd0cdGwcsx1pTkYp34SL0gP79m6W8N3TIxyJmqi0Kc7mntPQUCVH/wFSyg59JXo8SUQDQNap/yd9UwLzxP9MhH8G3DBatwQj3ijYOPnAeUPbsw7GYiKQBh/SIH5DGzW4TNHo0PiQJqzymNp0mI0eKjRO98vfnsXkeQwotzeKVbkmJ63h3PHQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBvm+zYchto1NESDxCVDK96QKObklWrfiAgKDLb49Loox+pyWTvs2mu5DOgDe0rrgEDfxngbbupo9eSu5w7OPVfip8W9rsB8k6ak+P4G8MltqkYv5A0aXbka1da1NenbIXAC3/YbMjLnsidDWQiKYZ0i0HxjuhguW3lvOFd3Dzp2rNDydzA6ilSmBXFrAcKm0RHAfP4NGy3ECdU6SQ5OBSUcJprKADMODIykuds1qh0Gz8a0ukKKmp2yJvz9bIuC4+TRXKKZtgDZKPcN0MgtqYZJ2rttoFqkCWrNBCZSUgJEASUJ78NSC3Wy8WQr3NjZvQ86KG2/mcVQ3Lm1ci82Uue</ds:X509Certificate> + </ds:X509Data> + </ds:KeyInfo> + </md:KeyDescriptor> + <md:KeyDescriptor use="encryption"> + <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> + <ds:X509Data> + <ds:X509Certificate>MIIDJjCCAg4CCQCiwst2XYH7fTANBgkqhkiG9w0BAQsFADBVMQswCQYDVQQGEwJYWDEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZhdWx0IENvbXBhbnkgTHRkMREwDwYDVQQDDAhleGFtcGxlMTAeFw0xOTA4MjIyMDM2NTFaFw0yMDA4MjEyMDM2NTFaMFUxCzAJBgNVBAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQxETAPBgNVBAMMCGV4YW1wbGUxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArLbBVE6E28bfvB/gUGjOmY2lxxxLZ9Fls4fOH9js/MhGG+hh4diyj/Kb7Coo6HehXMp93TXkYYbiKGAoykT6ULEACZnYi1V9XdUs619ibumi9pRSFygBrbyN+n9peMJxf4jvM1QS/DTPWxdkgeMkqb2SARJChd3azCHd0cdGwcsx1pTkYp34SL0gP79m6W8N3TIxyJmqi0Kc7mntPQUCVH/wFSyg59JXo8SUQDQNap/yd9UwLzxP9MhH8G3DBatwQj3ijYOPnAeUPbsw7GYiKQBh/SIH5DGzW4TNHo0PiQJqzymNp0mI0eKjRO98vfnsXkeQwotzeKVbkmJ63h3PHQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBvm+zYchto1NESDxCVDK96QKObklWrfiAgKDLb49Loox+pyWTvs2mu5DOgDe0rrgEDfxngbbupo9eSu5w7OPVfip8W9rsB8k6ak+P4G8MltqkYv5A0aXbka1da1NenbIXAC3/YbMjLnsidDWQiKYZ0i0HxjuhguW3lvOFd3Dzp2rNDydzA6ilSmBXFrAcKm0RHAfP4NGy3ECdU6SQ5OBSUcJprKADMODIykuds1qh0Gz8a0ukKKmp2yJvz9bIuC4+TRXKKZtgDZKPcN0MgtqYZJ2rttoFqkCWrNBCZSUgJEASUJ78NSC3Wy8WQr3NjZvQ86KG2/mcVQ3Lm1ci82Uue</ds:X509Certificate> + </ds:X509Data> + </ds:KeyInfo> + </md:KeyDescriptor> + <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="http://example.com/saml/logout"/> + <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat> + <md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="http://example.com/saml/"/> + </md:IDPSSODescriptor> +</md:EntityDescriptor> diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/files/example2.xml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/files/example2.xml new file mode 100644 index 00000000..76a86c7a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/files/example2.xml @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" validUntil="2019-08-24T20:38:34Z" cacheDuration="PT1567111114S" entityID="AnsibleSAMLTest2"> + <md:IDPSSODescriptor WantAuthnRequestsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"> + <md:KeyDescriptor use="signing"> + <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> + <ds:X509Data> + <ds:X509Certificate>MIIDADCCAegCCQCgxBiDM2muazANBgkqhkiG9w0BAQsFADBCMQswCQYDVQQGEwJYWDEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZhdWx0IENvbXBhbnkgTHRkMB4XDTE5MDgyMjIwMzY1OFoXDTIwMDgyMTIwMzY1OFowQjELMAkGA1UEBhMCWFgxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoGA1UECgwTRGVmYXVsdCBDb21wYW55IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMUJ3J1tzqoAgQwaJHx/MGl5yVTNpJLPfx8YCS0Z+RQWXIazZrssy/tpZcfgnek4+xvqrzRXR4nell31VTojIGItqR70lPhrsPES70SrN8egi+MLTZ4iddG5hjK4bn4wss88/3johi8/J85wc26/bkRz66lOvTaJ8k1pncQ3NekT9zZzWlW1LQk3uMbaPrVVocjFBEZyTsYUE9wZG+ggRBJlOMGEdhGsgPuR8Aj7OXO7X8/RolV8lB3GTzellX2GxiWnOhjnabSPBUUv5iVKcDOb2lIqxr5DScIvX1PcJSUCAGGLcd8wYK/lh3k+PFH9QNDLY6F5WHkoZq9LS46+8lkCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAWjX7E/BYAHaOKOXc5RAD9zwAaMxLMTSK5Cnq32TGIh1P4ap8jTNVaiCs9UJXHJpKwXUN+3DdVBIGMT17DzFwAeruZOzNBN0VJVl0yZ6dARgss4gpOBGvBD8blLidnVxEd5VRGldx5R5+I441ms6ASkohcHhGlF4WGbnabEZ/MtxhDIWUX2w4naOfFg6vOiPsE1C/ZXJeLDNP+dnjfueTN5DD38d+ND2mHweB7u0Qjpkd2K0TuCp0z4kXRuTgPzlfkPORNkgyU1hA3YClpT57aeUsHgO23sr/4d04jzI+hYeleGqjNM+3vDQYsOQyXx61/nANeF0Sp9ZIv3eJSTMXNw==</ds:X509Certificate> + </ds:X509Data> + </ds:KeyInfo> + </md:KeyDescriptor> + <md:KeyDescriptor use="encryption"> + <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> + <ds:X509Data> + <ds:X509Certificate>MIIDADCCAegCCQCgxBiDM2muazANBgkqhkiG9w0BAQsFADBCMQswCQYDVQQGEwJYWDEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZhdWx0IENvbXBhbnkgTHRkMB4XDTE5MDgyMjIwMzY1OFoXDTIwMDgyMTIwMzY1OFowQjELMAkGA1UEBhMCWFgxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoGA1UECgwTRGVmYXVsdCBDb21wYW55IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMUJ3J1tzqoAgQwaJHx/MGl5yVTNpJLPfx8YCS0Z+RQWXIazZrssy/tpZcfgnek4+xvqrzRXR4nell31VTojIGItqR70lPhrsPES70SrN8egi+MLTZ4iddG5hjK4bn4wss88/3johi8/J85wc26/bkRz66lOvTaJ8k1pncQ3NekT9zZzWlW1LQk3uMbaPrVVocjFBEZyTsYUE9wZG+ggRBJlOMGEdhGsgPuR8Aj7OXO7X8/RolV8lB3GTzellX2GxiWnOhjnabSPBUUv5iVKcDOb2lIqxr5DScIvX1PcJSUCAGGLcd8wYK/lh3k+PFH9QNDLY6F5WHkoZq9LS46+8lkCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAWjX7E/BYAHaOKOXc5RAD9zwAaMxLMTSK5Cnq32TGIh1P4ap8jTNVaiCs9UJXHJpKwXUN+3DdVBIGMT17DzFwAeruZOzNBN0VJVl0yZ6dARgss4gpOBGvBD8blLidnVxEd5VRGldx5R5+I441ms6ASkohcHhGlF4WGbnabEZ/MtxhDIWUX2w4naOfFg6vOiPsE1C/ZXJeLDNP+dnjfueTN5DD38d+ND2mHweB7u0Qjpkd2K0TuCp0z4kXRuTgPzlfkPORNkgyU1hA3YClpT57aeUsHgO23sr/4d04jzI+hYeleGqjNM+3vDQYsOQyXx61/nANeF0Sp9ZIv3eJSTMXNw==</ds:X509Certificate> + </ds:X509Data> + </ds:KeyInfo> + </md:KeyDescriptor> + <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="http://example.com/saml/logout"/> + <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat> + <md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="http://example.com/saml/"/> + </md:IDPSSODescriptor> +</md:EntityDescriptor> diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/tasks/main.yml new file mode 100644 index 00000000..5c662f56 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_saml_federation/tasks/main.yml @@ -0,0 +1,89 @@ +- module_defaults: + group/aws: + region: "{{ aws_region }}" + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + collections: + - amazon.aws + block: + # ============================================================ + # TESTS + - name: Create the identity provider + iam_saml_federation: + name: '{{ resource_prefix }}-saml' + state: present + saml_metadata_document: '{{ lookup("file", "example1.xml") }}' + register: create_result + + - name: assert idp created + assert: + that: + - create_result is changed + + - name: Test that nothing changes when we retry + iam_saml_federation: + name: '{{ resource_prefix }}-saml' + state: present + saml_metadata_document: '{{ lookup("file", "example1.xml") }}' + register: create_result + + - name: assert the idp doesn't change when we retry + assert: + that: + - create_result is not changed + + - name: Change the identity provider + iam_saml_federation: + name: '{{ resource_prefix }}-saml' + state: present + saml_metadata_document: '{{ lookup("file", "example2.xml") }}' + register: change_result + + - name: assert idp created + assert: + that: + - change_result is changed + + - name: Test that nothing changes when we retry + iam_saml_federation: + name: '{{ resource_prefix }}-saml' + state: present + saml_metadata_document: '{{ lookup("file", "example2.xml") }}' + register: change_result + + - name: assert the idp doesn't change when we retry + assert: + that: + - change_result is not changed + + - name: Delete the identity provider + iam_saml_federation: + name: '{{ resource_prefix }}-saml' + state: absent + register: destroy_result + + - name: assert deleted + assert: + that: + - destroy_result is changed + + - name: Attempt to re-delete the identity provider + iam_saml_federation: + name: '{{ resource_prefix }}-saml' + state: absent + register: destroy_result + + - name: assert deleted + assert: + that: + - destroy_result is not changed + + always: + # ============================================================ + # CLEAN-UP + - name: finish off by deleting the identity provider + iam_saml_federation: + name: '{{ resource_prefix }}-saml' + state: absent + register: destroy_result diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/aliases new file mode 100644 index 00000000..c7a4b8ab --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/aliases @@ -0,0 +1,3 @@ +cloud/aws +iam_user_info +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/defaults/main.yml new file mode 100644 index 00000000..8a69ca09 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/defaults/main.yml @@ -0,0 +1,7 @@ +--- +test_group: '{{ resource_prefix }}-group' +test_path: '/' +test_user: '{{ test_users[0] }}' +test_users: + - '{{ resource_prefix }}-user-a' + - '{{ resource_prefix }}-user-b' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/tasks/main.yml new file mode 100644 index 00000000..c5be49ec --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/iam_user/tasks/main.yml @@ -0,0 +1,482 @@ +--- +- name: set up aws connection info + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + collections: + - amazon.aws + block: + - name: ensure improper usage of parameters fails gracefully + iam_user_info: + path: '{{ test_path }}' + group: '{{ test_group }}' + ignore_errors: yes + register: iam_user_info_path_group + - assert: + that: + - iam_user_info_path_group is failed + - 'iam_user_info_path_group.msg == "parameters are mutually exclusive: group|path"' + + - name: ensure exception handling fails as expected + iam_user_info: + region: 'bogus' + path: '' + ignore_errors: yes + register: iam_user_info + - assert: + that: + - iam_user_info is failed + - '"user" in iam_user_info.msg' + + - name: ensure exception handling fails as expected with group + iam_user_info: + region: 'bogus' + group: '{{ test_group }}' + ignore_errors: yes + register: iam_user_info + - assert: + that: + - iam_user_info is failed + - '"group" in iam_user_info.msg' + + - name: ensure exception handling fails as expected with default path + iam_user_info: + region: 'bogus' + ignore_errors: yes + register: iam_user_info + - assert: + that: + - iam_user_info is failed + - '"path" in iam_user_info.msg' + + - name: create test user (check mode) + iam_user: + name: '{{ test_user }}' + state: present + check_mode: yes + register: iam_user + + - name: assert that the user would be created + assert: + that: + - iam_user is changed + + - name: create test user + iam_user: + name: '{{ test_user }}' + state: present + register: iam_user + + - name: assert that the user is created + assert: + that: + - iam_user is changed + + - name: ensure test user exists (no change) + iam_user: + name: '{{ test_user }}' + state: present + register: iam_user + + - name: assert that the user wasn't changed + assert: + that: + - iam_user is not changed + + - name: ensure the info used to validate other tests is valid + set_fact: + test_iam_user: '{{ iam_user.iam_user.user }}' + - assert: + that: + - 'test_iam_user.arn.startswith("arn:aws:iam")' + - 'test_iam_user.arn.endswith("user/" + test_user )' + - test_iam_user.create_date is not none + - test_iam_user.path == '{{ test_path }}' + - test_iam_user.user_id is not none + - test_iam_user.user_name == '{{ test_user }}' + + - name: get info on IAM user(s) + iam_user_info: + register: iam_user_info + - assert: + that: + - iam_user_info.iam_users | length != 0 + + - name: get info on IAM user(s) with name + iam_user_info: + name: '{{ test_user }}' + register: iam_user_info + - debug: var=iam_user_info + - assert: + that: + - iam_user_info.iam_users | length == 1 + - iam_user_info.iam_users[0].arn == test_iam_user.arn + - iam_user_info.iam_users[0].create_date == test_iam_user.create_date + - iam_user_info.iam_users[0].path == test_iam_user.path + - iam_user_info.iam_users[0].user_id == test_iam_user.user_id + - iam_user_info.iam_users[0].user_name == test_iam_user.user_name + + - name: get info on IAM user(s) on path + iam_user_info: + path: '{{ test_path }}' + name: '{{ test_user }}' + register: iam_user_info + - assert: + that: + - iam_user_info.iam_users | length == 1 + - iam_user_info.iam_users[0].arn == test_iam_user.arn + - iam_user_info.iam_users[0].create_date == test_iam_user.create_date + - iam_user_info.iam_users[0].path == test_iam_user.path + - iam_user_info.iam_users[0].user_id == test_iam_user.user_id + - iam_user_info.iam_users[0].user_name == test_iam_user.user_name + + # =========================================== + # Test Managed Policy management + # + # Use a couple of benign policies for testing: + # - AWSDenyAll + # - ServiceQuotasReadOnlyAccess + # + - name: attach managed policy to user (check mode) + check_mode: yes + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - arn:aws:iam::aws:policy/AWSDenyAll + register: iam_user + + - name: assert that the user is changed + assert: + that: + - iam_user is changed + + - name: attach managed policy to user + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - arn:aws:iam::aws:policy/AWSDenyAll + register: iam_user + + - name: assert that the user is changed + assert: + that: + - iam_user is changed + + - name: ensure managed policy is attached to user (no change) + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - arn:aws:iam::aws:policy/AWSDenyAll + register: iam_user + + - name: assert that the user hasn't changed + assert: + that: + - iam_user is not changed + + - name: attach different managed policy to user (check mode) + check_mode: yes + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - arn:aws:iam::aws:policy/ServiceQuotasReadOnlyAccess + purge_policy: no + register: iam_user + + - name: assert that the user changed + assert: + that: + - iam_user is changed + + - name: attach different managed policy to user + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - arn:aws:iam::aws:policy/ServiceQuotasReadOnlyAccess + purge_policy: no + register: iam_user + + - name: assert that the user changed + assert: + that: + - iam_user is changed + + - name: Check first policy wasn't purged + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - arn:aws:iam::aws:policy/ServiceQuotasReadOnlyAccess + - arn:aws:iam::aws:policy/AWSDenyAll + purge_policy: no + register: iam_user + + - name: assert that the user hasn't changed + assert: + that: + - iam_user is not changed + + - name: Check that managed policy order doesn't matter + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - arn:aws:iam::aws:policy/AWSDenyAll + - arn:aws:iam::aws:policy/ServiceQuotasReadOnlyAccess + purge_policy: no + register: iam_user + + - name: assert that the user hasn't changed + assert: + that: + - iam_user is not changed + + - name: Check that policy doesn't require full ARN path + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - AWSDenyAll + - arn:aws:iam::aws:policy/ServiceQuotasReadOnlyAccess + purge_policy: no + register: iam_user + + - name: assert that the user hasn't changed + assert: + that: + - iam_user is not changed + + - name: Remove one of the managed policies - with purge (check mode) + check_mode: yes + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - arn:aws:iam::aws:policy/ServiceQuotasReadOnlyAccess + purge_policy: yes + register: iam_user + + - name: assert that the user changed + assert: + that: + - iam_user is changed + + - name: Remove one of the managed policies - with purge + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - arn:aws:iam::aws:policy/ServiceQuotasReadOnlyAccess + purge_policy: yes + register: iam_user + + - name: assert that the user changed + assert: + that: + - iam_user is changed + + - name: Check we only have the one policy attached + iam_user: + name: '{{ test_user }}' + state: present + managed_policy: + - arn:aws:iam::aws:policy/ServiceQuotasReadOnlyAccess + purge_policy: yes + register: iam_user + + - name: assert that the user changed + assert: + that: + - iam_user is not changed + + - name: ensure group exists + iam_group: + name: '{{ test_group }}' + users: + - '{{ test_user }}' + state: present + register: iam_group + + - assert: + that: + - iam_group.changed + - iam_group.iam_group.users + + - name: get info on IAM user(s) in group + iam_user_info: + group: '{{ test_group }}' + name: '{{ test_user }}' + register: iam_user_info + + - assert: + that: + - iam_user_info.iam_users | length == 1 + - iam_user_info.iam_users[0].arn == test_iam_user.arn + - iam_user_info.iam_users[0].create_date == test_iam_user.create_date + - iam_user_info.iam_users[0].path == test_iam_user.path + - iam_user_info.iam_users[0].user_id == test_iam_user.user_id + - iam_user_info.iam_users[0].user_name == test_iam_user.user_name + + - name: remove user from group + iam_group: + name: '{{ test_group }}' + purge_users: True + users: [] + state: present + register: iam_group + + - name: get info on IAM user(s) after removing from group + iam_user_info: + group: '{{ test_group }}' + name: '{{ test_user }}' + register: iam_user_info + + - name: assert empty list of users for group are returned + assert: + that: + - iam_user_info.iam_users | length == 0 + + - name: ensure ansible users exist + iam_user: + name: '{{ item }}' + state: present + with_items: '{{ test_users }}' + + - name: get info on multiple IAM user(s) + iam_user_info: + register: iam_user_info + - assert: + that: + - iam_user_info.iam_users | length != 0 + + - name: ensure multiple user group exists with single user + iam_group: + name: '{{ test_group }}' + users: + - '{{ test_user }}' + state: present + register: iam_group + + - name: get info on IAM user(s) in group + iam_user_info: + group: '{{ test_group }}' + register: iam_user_info + - assert: + that: + - iam_user_info.iam_users | length == 1 + + - name: add all users to group + iam_group: + name: '{{ test_group }}' + users: '{{ test_users }}' + state: present + register: iam_group + + - name: get info on multiple IAM user(s) in group + iam_user_info: + group: '{{ test_group }}' + register: iam_user_info + - assert: + that: + - iam_user_info.iam_users | length == test_users | length + + - name: purge users from group + iam_group: + name: '{{ test_group }}' + purge_users: True + users: [] + state: present + register: iam_group + + - name: ensure info is empty for empty group + iam_user_info: + group: '{{ test_group }}' + register: iam_user_info + - assert: + that: + - iam_user_info.iam_users | length == 0 + + - name: get info on IAM user(s) after removing from group + iam_user_info: + group: '{{ test_group }}' + register: iam_user_info + + - name: assert empty list of users for group are returned + assert: + that: + - iam_user_info.iam_users | length == 0 + + - name: remove group + iam_group: + name: '{{ test_group }}' + state: absent + register: iam_group + + - name: assert that group was removed + assert: + that: + - iam_group.changed + - iam_group + + - name: Test remove group again (idempotency) + iam_group: + name: "{{ test_group }}" + state: absent + register: iam_group + + - name: assert that group remove is not changed + assert: + that: + - not iam_group.changed + + - name: Remove user with attached policy + iam_user: + name: "{{ test_user }}" + state: absent + register: iam_user + + - name: get info on IAM user(s) after deleting + iam_user_info: + group: '{{ test_user }}' + ignore_errors: yes + register: iam_user_info + + - name: Assert user was removed + assert: + that: + - iam_user.changed + - "'cannot be found' in iam_user_info.msg" + + - name: Remove user with attached policy (idempotent) + iam_user: + name: "{{ test_user }}" + state: absent + ignore_errors: yes + register: iam_user + + - name: Assert user was removed + assert: + that: + - not iam_user.changed + + always: + - name: remove group + iam_group: + name: '{{ test_group }}' + state: absent + ignore_errors: yes + + - name: remove ansible users + iam_user: + name: '{{ item }}' + state: absent + with_items: '{{ test_users }}' + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/defaults/main.yml new file mode 100644 index 00000000..bdaddb34 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/defaults/main.yml @@ -0,0 +1,18 @@ +--- +kinesis_stream_name: '{{ resource_prefix }}' + +kms_cmk_alias_1: '{{ resource_prefix }}-1' +kms_cmk_alias_2: '{{ resource_prefix }}-2' + +# A variety of camelCase and PascalCase to test things don't get re-cased +# underneath us +kinesis_stream_tags_1: + tag: value + AnExample: AValue + somethingElse: Another Value + Bleep: bloop +# Adds 2 values, Deletes 2 and keeps a value +kinesis_stream_tags_2: + tag: value + foo: Bar + Baz: quuX diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/tasks/main.yml new file mode 100644 index 00000000..c55d16af --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/tasks/main.yml @@ -0,0 +1,713 @@ +--- +# ============================================================ +# Known issues: +# +# - (CM) check_mode returns changed (always?) +# - (CM_snake) check_mode returns keys and values that don't directly +# map to those from non-check_mode +# - (Tag_snake) tag keys get snake_cased in return values +# - (Tag_changed) changing tags doesn't return changed +# - (Enc_snake) return values don't get snake_cased when updating encryption +# - (Enc_disable) disabling encryption Requires key and type be set +# - (Enc_idemp) Updating encryption settings isn't idempotent +# +# ============================================================ +- name: 'Setup AWS Module Defaults' + module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + kinesis_stream: + # Number of shards is mandatory when state=present + shards: 1 + + block: + # ============================================================ + # Set up some additional resources for later user + + - name: 'KMS test preperation - only run when explicitly enabled' + when: + - run_kms_tests | default(False) | bool + block: + # KMS Keys + # Note: Because we're not a producer / consumer we don't actually need + # access to the keys + - name: 'Create KMS key 1' + aws_kms: + alias: '{{ kms_cmk_alias_1 }}' + state: present + enabled: yes + register: create_kms_1 + - name: 'Create KMS key 2' + aws_kms: + alias: '{{ kms_cmk_alias_2 }}' + state: present + enabled: yes + register: create_kms_2 + - name: 'Assert that we sucessfully created our keys' + assert: + that: + - create_kms_1 is success + - create_kms_2 is success + - name: 'Store the Key IDs for later' + set_fact: + kms_cmk_id_1: '{{ create_kms_1.key_id }}' + kms_cmk_arn_1: '{{ create_kms_1.key_arn }}' + kms_cmk_id_2: '{{ create_kms_2.key_id }}' + kms_cmk_arn_2: '{{ create_kms_2.key_arn }}' + # All of the valid ways to describe the CMK + kms_cmk_1: + - '{{ create_kms_1.key_id }}' + - 'alias/{{ kms_cmk_alias_1 }}' + - '{{ create_kms_1.key_arn }}' + kms_cmk_2: + - '{{ create_kms_2.key_id }}' + - 'alias/{{ kms_cmk_alias_2 }}' + - '{{ create_kms_2.key_arn }}' + + # ============================================================ + # Basic creation + - name: 'Create a basic Kinesis stream (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + register: result + - name: 'Assert state is changed when first creating a stream (CHECK_MODE)' + assert: + that: + - result is success + - result is changed + + - name: 'Create a basic Kinesis stream' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + register: result + - name: 'Assert state is changed when first creating a stream' + assert: + that: + - result is success + - result is changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 24 + - result.stream_arn.startswith('arn:aws:kinesis:') + - result.stream_arn.endswith(':stream/' + kinesis_stream_name) + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + - result.tags == {} + + # We've run tests that the ARN matches the pattern we expect, we can just test + # it doesn't change. + - name: 'Save Stream ARN for later comparison' + set_fact: + kinesis_stream_arn: '{{ result.stream_arn }}' + + - name: 'Create a basic Kinesis stream - Idempotency (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + register: result + - name: 'Assert state is not changed when re-running the create (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (CM) + ignore_errors: yes + + - name: 'Create a basic Kinesis stream - Idempotency' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + register: result + - name: 'Assert state is not changed when re-running the create' + assert: + that: + - result is success + - result is not changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 24 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + - result.tags == {} + + # ============================================================ + # Retention Period + # + - name: 'Increase the retention period (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + retention_period: 72 + register: result + - name: 'Assert state is changed when changing the retention period (CHECK_MODE)' + assert: + that: + - result is success + - result is changed + + - name: 'Increase the retention period' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + retention_period: 72 + register: result + - name: 'Assert state is changed when changing the retention period' + assert: + that: + - result is success + - result is changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 72 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + - result.tags == {} + + - name: 'Increase the retention period - Idempotency (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + retention_period: 72 + register: result + - name: 'Assert state is not changed when not changing the retention period (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (CM) + ignore_errors: yes + + - name: 'Increase the retention period - Idempotency' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + retention_period: 72 + register: result + - name: 'Assert state is not changed when not changing the retention period' + assert: + that: + - result is success + - result is not changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 72 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + - result.tags == {} + + - name: 'Decrease the retention period (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + retention_period: 48 + register: result + - name: 'Assert state is changed when changing the retention period (CHECK_MODE)' + assert: + that: + - result is success + - result is changed + + - name: 'Decrease the retention period' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + retention_period: 48 + register: result + - name: 'Assert state is changed when changing the retention period' + assert: + that: + - result is success + - result is changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + - result.tags == {} + + - name: 'Decrease the retention period - Idempotency (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + retention_period: 48 + register: result + - name: 'Assert state is not changed when not changing the retention period (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (CM) + ignore_errors: yes + + - name: 'Decrease the retention period - Idempotency' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + retention_period: 48 + register: result + - name: 'Assert state is not changed when not changing the retention period' + assert: + that: + - result is success + - result is not changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + + # ============================================================ + # Basic tagging + + - name: 'Set some tags (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + tags: '{{ kinesis_stream_tags_1 }}' + register: result + - name: 'Assert state is changed when adding tags (CHECK_MODE)' + assert: + that: + - result is success + - result is changed + + - name: 'Set some tags' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + tags: '{{ kinesis_stream_tags_1 }}' + register: result + - name: 'Assert state is changed when adding tags' + assert: + that: + - result is success + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + - name: 'Assert tags return as expected' + assert: + that: + - result is changed + - result.tags == kinesis_stream_tags_1 + # XXX BUG (CM) + ignore_errors: yes + + - name: 'Set some tags - Idempotency (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + tags: '{{ kinesis_stream_tags_1 }}' + register: result + - name: 'Assert state is not changed when not changing the tags (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (CM) + ignore_errors: yes + + - name: 'Set some tags - Idempotency' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + tags: '{{ kinesis_stream_tags_1 }}' + register: result + - name: 'Assert state is not changed when not changing the tags' + assert: + that: + - result is success + - result is not changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + # Merge this into the main assertion when the return values are no longer + # snake_cased + - name: 'Assert tags return as expected' + assert: + that: + - result.tags == kinesis_stream_tags_1 + # XXX BUG (Tag_snake) + ignore_errors: yes + + - name: 'Change some tags (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + tags: '{{ kinesis_stream_tags_2 }}' + register: result + - name: 'Assert state is changed when changing tags (CHECK_MODE)' + assert: + that: + - result is success + - result is changed + + - name: 'Change some tags' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + tags: '{{ kinesis_stream_tags_2 }}' + register: result + - name: 'Assert state is changed when changing tags' + assert: + that: + - result is success + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + # Merge this into the main assertion when the return values are no longer + # snake_cased + - name: 'Assert tags return as expected (tags2)' + assert: + that: + - result is changed + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_changed) (Tag_snake) + ignore_errors: yes + + - name: 'Change some tags - Idempotency (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + tags: '{{ kinesis_stream_tags_2 }}' + register: result + - name: 'Assert state is not changed when not changing the tags (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (CM) + ignore_errors: yes + + - name: 'Change some tags - Idempotency' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + tags: '{{ kinesis_stream_tags_2 }}' + register: result + - name: 'Assert state is not changed when not changing the tags' + assert: + that: + - result is success + - result is not changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + # Merge this into the main assertion when the return values are no longer + # snake_cased + - name: 'Assert tags return as expected (tags2)' + assert: + that: + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_snake) + ignore_errors: yes + + # ============================================================ + # Number of shards + # + - name: 'Change the number of shards (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + shards: 2 + register: result + - name: 'Assert state is changed when changing the number of shards (CHECK_MODE)' + assert: + that: + - result is success + - result is changed + + - name: 'Change the number of shards' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + shards: 2 + register: result + - name: 'Assert state is changed when changing the number of shards' + assert: + that: + - result is success + - result is changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 2 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + #- result.tags == kinesis_stream_tags_2 + # Merge this into the main assertion when the tag keys are no longer + # snake_cased + - name: 'Assert tags return as expected (tags2)' + assert: + that: + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_snake) + ignore_errors: yes + + - name: 'Change the number of shards - Idempotency (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + shards: 2 + register: result + - name: 'Assert state is not changed when not changing the number of shards (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (CM) + ignore_errors: yes + + - name: 'Change the number of shards - Idempotency' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + shards: 2 + register: result + - name: 'Assert state is not changed when not changing the number of shards' + assert: + that: + - result is success + - result is not changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 2 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + #- result.tags == kinesis_stream_tags_2 + # Merge this into the main assertion when the tag keys are no longer + # snake_cased + - name: 'Assert tags return as expected (tags2)' + assert: + that: + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_snake) + ignore_errors: yes + + # ============================================================ + # Shards has to be passed we can't test that it's not updated when we're not + # setting it. Let's reset it to the value we set in the module_defaults + + - name: 'Reset the number of shards' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + register: result + - name: 'Assert the change was successful' + assert: + that: + - result is success + - result is changed + - result.open_shards_count == 1 + + # DISABLED BY DEFAULT - KMS key creation/deletion not supported in CI at this time + - name: 'KMS tests - only run when explicitly enabled' + when: + - run_kms_tests | default(False) | bool + block: + # ============================================================ + # Encryption + - name: 'Test encryption' + vars: + key_type: '{{ item.type }}' + kinesis_key: '{{ item.key }}' + kinesis_key_id: '{{ kms_cmk_id_1 }}' + kinesis_key_alias: 'alias/{{ kms_cmk_alias_1 }}' + kinesis_key_arn: '{{ kms_cmk_arn_1 }}' + include_tasks: 'test_encryption.yml' + # Loop through and test the management and idempotency when using the + # various combinations of ID, alias and ARN of a CMK + loop: + - type: 'ID' + key: '{{ kms_cmk_id_1 }}' + - type: 'Alias' + key: 'alias/{{ kms_cmk_alias_1 }}' + - type: 'ARN' + key: '{{ kms_cmk_arn_1 }}' + + - name: 'Disable encryption - Idempotency (CHECK_MODE)' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'disabled' + - name: 'Assert state is not changed when encryption_state not changed (CHECK_MODE)' + ignore_errors: yes + assert: + that: + - result is success + - result is not changed + # XXX BUG (Enc_idemp) + + - name: 'Disable encryption - Idempotency' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'disabled' + - name: 'Assert state is not changed when encryption_state not changed (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (Enc_idemp) + ignore_errors: yes + # Merge this into the main assertion when the main return keys are + # snake_cased + - name: 'Assert expected return values' + assert: + that: + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + #- result.tags == kinesis_stream_tags_2 + # XXX BUG (Enc_snake) + ignore_errors: yes + # Merge this into the main assertion when the tag keys are no longer + # snake_cased + - name: 'Assert tags return as expected (tags2)' + assert: + that: + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_snake) + ignore_errors: yes + + - name: 'Enable encryption' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kms_cmk_id_1 }}' + - name: 'Assert that state is changed when enabling encryption' + assert: + that: + - result is success + - result is changed + + - name: 'Test encryption changed state when updating key (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kms_cmk_id_2 }}' + - name: 'Assert state is changed when stream encryption key is changed (CHECK_MODE)' + assert: + that: + - result is success + - result is changed + + - name: 'Test encryption changed state when updating key' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kms_cmk_id_2 }}' + - name: 'Assert state is changed when stream encryption key is changed' + assert: + that: + - result is success + - result is changed + # Merge this into the main assertion when the main return keys are + # snake_cased + - name: 'Assert expected return values' + assert: + that: + - result.encryption_type == 'KMS' + - result.key_id in kms_cmk_2 + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + #- result.tags == kinesis_stream_tags_2 + # XXX BUG (Enc_snake) + ignore_errors: yes + # Merge this into the main assertion when the tag keys are no longer + # snake_cased + - name: 'Assert tags return as expected (tags2)' + assert: + that: + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_snake) + ignore_errors: yes + + # ============================================================ + + - name: 'Delete stream (CHECK_MODE)' + check_mode: yes + module_defaults: { kinesis_stream: {} } + kinesis_stream: + name: '{{ kinesis_stream_name }}' + state: absent + register: result + - name: 'Assert state is changed when deleting a stream (CHECK_MODE)' + assert: + that: + - result is success + - result is changed + + - name: 'Delete stream' + module_defaults: { kinesis_stream: {} } + kinesis_stream: + name: '{{ kinesis_stream_name }}' + state: absent + register: result + - name: 'Assert state is changed when deleting a stream' + assert: + that: + - result is success + - result is changed + + - name: 'Delete stream - Idempotency (CHECK_MODE)' + check_mode: yes + module_defaults: { kinesis_stream: {} } + kinesis_stream: + name: '{{ kinesis_stream_name }}' + state: absent + register: result + - name: 'Assert state is not changed when deleting a stream that was previously deleted (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (CM) + ignore_errors: yes + + - name: 'Delete stream - Idempotency' + module_defaults: { kinesis_stream: {} } + kinesis_stream: + name: '{{ kinesis_stream_name }}' + state: absent + register: result + - name: 'Assert state is not changed when deleting a stream that was previously deleted' + assert: + that: + - result is success + - result is not changed + + always: + # ============================================================ + - name: 'Ensure Kinesis stream is gone' + ignore_errors: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + state: absent + + - name: 'KMS test preperation - only run when explicitly enabled' + when: + - run_kms_tests | default(False) | bool + block: + - name: 'Delete the KMS keys' + ignore_errors: yes + aws_kms: + state: absent + alias: '{{ item }}' + loop: + - '{{ kms_cmk_alias_1 }}' + - '{{ kms_cmk_alias_2 }}' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/tasks/test_encryption.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/tasks/test_encryption.yml new file mode 100644 index 00000000..1ce24369 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/kinesis_stream/tasks/test_encryption.yml @@ -0,0 +1,262 @@ +--- +# Run through the different ways we can enable/change encryption +# Enable (check_mode) +# Enable +# Idempotency - compared to ID (idempotency) +# Idempotency - compared to ID +# Idempotency - compared to Alias (idempotency) +# Idempotency - compared to Alias +# Idempotency - compared to ARN (idempotency) +# Idempotency - compared to ARN +# Disable (check_mode) +# Disable +# +- name: 'Enable encryption using {{ key_type }} (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kinesis_key }}' +- name: 'Assert state is changed when enabling encryption (CHECK_MODE)' + assert: + that: + - result is success + - result is changed + +- name: 'Enable encryption using {{ key_type }}' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kinesis_key }}' +- name: 'Assert that state is changed when enabling encryption' + assert: + that: + - result is success + - result is changed +# Merge this into the main assertion when the main return keys are +# snake_cased +- name: 'Assert expected return values' + assert: + that: + - result.encryption_type == 'KMS' + - result.key_id in kms_cmk_1 + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + #- result.tags == kinesis_stream_tags_2 + # XXX BUG (Enc_snake) + ignore_errors: yes +# Merge this into the main assertion when the tag keys are no longer +# snake_cased +- name: 'Assert tags return as expected (tags2)' + assert: + that: + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_snake) + ignore_errors: yes + +- name: 'Test encryption idempotency comparing {{ key_type }} and ID (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kinesis_key_id }}' +- name: 'Assert state is changed when enabling encryption (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (Enc_Idemp) + ignore_errors: yes + +- name: 'Test encryption idempotency comparing {{ key_type }} and ID' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kinesis_key_id }}' +- name: 'Assert that state is changed when enabling encryption' + assert: + that: + - result is success + - result is not changed + # XXX BUG (Enc_Idemp) + ignore_errors: yes +# Merge this into the main assertion when the main return keys are +# snake_cased +- name: 'Assert expected return values' + assert: + that: + - result.encryption_type == 'KMS' + - result.key_id in kms_cmk_1 + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + #- result.tags == kinesis_stream_tags_2 + # XXX BUG (Enc_snake) + ignore_errors: yes +# Merge this into the main assertion when the tag keys are no longer +# snake_cased +- name: 'Assert tags return as expected (tags2)' + assert: + that: + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_snake) + ignore_errors: yes + + +- name: 'Test encryption idempotency comparing {{ key_type }} and Alias (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kinesis_key_alias }}' +- name: 'Assert state is changed when enabling encryption (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (Enc_Idemp) + ignore_errors: yes + +- name: 'Test encryption idempotency comparing {{ key_type }} and Alias' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kinesis_key_alias }}' +- name: 'Assert that state is changed when enabling encryption' + assert: + that: + - result is success + - result is not changed + # XXX BUG (Enc_Idemp) + ignore_errors: yes +# Merge this into the main assertion when the main return keys are +# snake_cased +- name: 'Assert expected return values' + assert: + that: + - result.encryption_type == 'KMS' + - result.key_id in kms_cmk_1 + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + #- result.tags == kinesis_stream_tags_2 + # XXX BUG (Enc_snake) + ignore_errors: yes +# Merge this into the main assertion when the tag keys are no longer +# snake_cased +- name: 'Assert tags return as expected (tags2)' + assert: + that: + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_snake) + ignore_errors: yes + +- name: 'Test encryption idempotency comparing {{ key_type }} and ARN (CHECK_MODE)' + check_mode: yes + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kinesis_key_arn }}' +- name: 'Assert state is changed when enabling encryption (CHECK_MODE)' + assert: + that: + - result is success + - result is not changed + # XXX BUG (Enc_Idemp) + ignore_errors: yes + +- name: 'Test encryption idempotency comparing {{ key_type }} and ARN' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'enabled' + encryption_type: 'KMS' + key_id: '{{ kinesis_key_arn }}' +- name: 'Assert that state is changed when enabling encryption' + assert: + that: + - result is success + - result is not changed + # XXX BUG (Enc_Idemp) + ignore_errors: yes +# Merge this into the main assertion when the main return keys are +# snake_cased +- name: 'Assert expected return values' + assert: + that: + - result.encryption_type == 'KMS' + - result.key_id in kms_cmk_1 + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + #- result.tags == kinesis_stream_tags_2 + # XXX BUG (Enc_snake) + ignore_errors: yes +# Merge this into the main assertion when the tag keys are no longer +# snake_cased +- name: 'Assert tags return as expected (tags2)' + assert: + that: + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_snake) + ignore_errors: yes + +- name: 'Disable encryption (CHECK_MODE)' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'disabled' + # XXX BUG (Enc_Disable) + encryption_type: 'KMS' + # XXX Oddity of Kinesis - This needs to match the existing setting + key_id: '{{ kinesis_key_arn }}' +- name: 'Assert state is changed when disabling encryption (CHECK_MODE)' + # XXX BUG (CM) + ignore_errors: yes + assert: + that: + - result is success + - result is changed + +- name: 'Disable encryption' + kinesis_stream: + name: '{{ kinesis_stream_name }}' + encryption_state: 'disabled' + # XXX BUG (Enc_Disable) + encryption_type: 'KMS' + # XXX Oddity of Kinesis - This needs to match the existing setting + key_id: '{{ kinesis_key_arn }}' +- name: 'Assert state is not changed when disabling encryption (CHECK_MODE)' + assert: + that: + - result is success + - result is changed + - result.encryption_type == 'NONE' + - result.open_shards_count == 1 + - result.retention_period_hours == 48 + - result.stream_arn == kinesis_stream_arn + - result.stream_name == kinesis_stream_name + - result.stream_status == 'ACTIVE' + #- result.tags == kinesis_stream_tags_2 +# Merge this into the main assertion when the tag keys are no longer +# snake_cased +- name: 'Assert tags return as expected (tags2)' + assert: + that: + - result.tags == kinesis_stream_tags_2 + # XXX BUG (Tag_snake) + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/aliases new file mode 100644 index 00000000..c11244e5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/aliases @@ -0,0 +1,4 @@ +cloud/aws +shippable/aws/group2 +execute_lambda +lambda_info diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/defaults/main.yml new file mode 100644 index 00000000..ea29794e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/defaults/main.yml @@ -0,0 +1,10 @@ +--- +# defaults file for lambda integration test +lambda_function_name: '{{ resource_prefix }}' +# IAM role names have to be less than 64 characters +# The 8 digit identifier at the end of resource_prefix helps determine during +# which test something was created and allows tests to be run in parallel +# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases +# we need both sets of digits to keep the resource name unique +unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +lambda_role_name: 'ansible-test-{{ unique_id }}-lambda' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/files/mini_lambda.py b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/files/mini_lambda.py new file mode 100644 index 00000000..901f6b55 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/files/mini_lambda.py @@ -0,0 +1,48 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json +import os + + +def handler(event, context): + """ + The handler function is the function which gets called each time + the lambda is run. + """ + # printing goes to the cloudwatch log allowing us to simply debug the lambda if we can find + # the log entry. + print("got event:\n" + json.dumps(event)) + + # if the name parameter isn't present this can throw an exception + # which will result in an amazon chosen failure from the lambda + # which can be completely fine. + + name = event["name"] + + # we can use environment variables as part of the configuration of the lambda + # which can change the behaviour of the lambda without needing a new upload + + extra = os.environ.get("EXTRA_MESSAGE") + if extra is not None and len(extra) > 0: + greeting = "hello {0}. {1}".format(name, extra) + else: + greeting = "hello " + name + + return {"message": greeting} + + +def main(): + """ + This main function will normally never be called during normal + lambda use. It is here for testing the lambda program only. + """ + event = {"name": "james"} + context = None + print(handler(event, context)) + + +if __name__ == '__main__': + main() diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/files/minimal_trust_policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/files/minimal_trust_policy.json new file mode 100644 index 00000000..fb84ae9d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/files/minimal_trust_policy.json @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/tasks/main.yml new file mode 100644 index 00000000..823f479e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda/tasks/main.yml @@ -0,0 +1,433 @@ +- name: set connection information for AWS modules and run tests + module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + collections: + - community.general + block: + # Preparation + - name: create minimal lambda role + iam_role: + name: '{{ lambda_role_name }}' + assume_role_policy_document: '{{ lookup("file", "minimal_trust_policy.json") }}' + create_instance_profile: false + managed_policies: + - 'arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess' + register: iam_role + - name: wait 10 seconds for role to become available + pause: + seconds: 10 + when: iam_role.changed + - name: move lambda into place for archive module + copy: + src: mini_lambda.py + dest: '{{ output_dir }}/mini_lambda.py' + mode: preserve + - name: bundle lambda into a zip + register: zip_res + archive: + format: zip + path: '{{ output_dir }}/mini_lambda.py' + dest: '{{ output_dir }}/mini_lambda.zip' + + # Parameter tests + - name: test with no parameters + lambda: + register: result + ignore_errors: true + - name: assert failure when called with no parameters + assert: + that: + - result.failed + - 'result.msg.startswith("missing required arguments: name")' + + - name: test with no parameters except state absent + lambda: + state: absent + register: result + ignore_errors: true + - name: assert failure when called with no parameters + assert: + that: + - result.failed + - 'result.msg.startswith("missing required arguments: name")' + + - name: test with no role or handler + lambda: + name: ansible-testing-fake-should-not-be-created + runtime: python2.7 + register: result + ignore_errors: true + - name: assert failure when called with no parameters + assert: + that: + - result.failed + - 'result.msg.startswith("state is present but all of the following are missing: handler")' + + - name: test state=present with security group but no vpc + lambda: + name: '{{ lambda_function_name }}' + runtime: 'python2.7' + role: '{{ lambda_role_name }}' + zip_file: '{{ zip_res.dest }}' + handler: '{{ omit }}' + description: '{{ omit }}' + vpc_subnet_ids: '{{ omit }}' + vpc_security_group_ids: 'sg-FA6E' + environment_variables: '{{ omit }}' + dead_letter_arn: '{{ omit }}' + register: result + ignore_errors: true + - name: assert lambda fails with proper message + assert: + that: + - result is failed + - result.msg != "MODULE FAILURE" + - result.changed == False + - '"parameters are required together" in result.msg' + + # Prepare minimal Lambda + + - name: test state=present - upload the lambda + lambda: + name: '{{ lambda_function_name }}' + runtime: python2.7 + handler: mini_lambda.handler + role: '{{ lambda_role_name }}' + zip_file: '{{ zip_res.dest }}' + register: result + - name: assert lambda upload succeeded + assert: + that: + - result is not failed + - result.configuration.tracing_config.mode == "PassThrough" + + # Test basic operation of Uploaded lambda + - name: test lambda works + execute_lambda: + name: '{{lambda_function_name}}' + payload: + name: Mr Ansible Tests + register: result + - name: assert lambda manages to respond as expected + assert: + that: + - result is not failed + - result.result.output.message == "hello Mr Ansible Tests" + + # Test updating Lambda + - name: test lambda config updates + lambda: + name: '{{lambda_function_name}}' + runtime: nodejs10.x + tracing_mode: Active + handler: mini_lambda.handler + role: '{{ lambda_role_name }}' + register: update_result + - name: assert that update succeeded + assert: + that: + - update_result is not failed + - update_result.changed == True + - update_result.configuration.runtime == 'nodejs10.x' + - update_result.configuration.tracing_config.mode == 'Active' + + - name: test no changes are made with the same parameters repeated + lambda: + name: '{{lambda_function_name}}' + runtime: nodejs10.x + tracing_mode: Active + handler: mini_lambda.handler + role: '{{ lambda_role_name }}' + register: update_result + - name: assert that update succeeded + assert: + that: + - update_result is not failed + - update_result.changed == False + - update_result.configuration.runtime == 'nodejs10.x' + - update_result.configuration.tracing_config.mode == 'Active' + + - name: reset config updates for the following tests + lambda: + name: '{{lambda_function_name}}' + runtime: python2.7 + tracing_mode: PassThrough + handler: mini_lambda.handler + role: '{{ lambda_role_name }}' + register: result + - name: assert that reset succeeded + assert: + that: + - result is not failed + - result.changed == True + - result.configuration.runtime == 'python2.7' + - result.configuration.tracing_config.mode == 'PassThrough' + + # Query the Lambda + - name: lambda_info | Gather all infos for given lambda function + lambda_info: + name: '{{ lambda_function_name }}' + query: all + register: lambda_infos_all + - name: lambda_info | Assert successfull retrieval of all information + assert: + that: + - lambda_infos_all is not failed + - lambda_infos_all.function[lambda_function_name].function_name == lambda_function_name + - lambda_infos_all.function[lambda_function_name].runtime == "python2.7" + - lambda_infos_all.function[lambda_function_name].versions is defined + - lambda_infos_all.function[lambda_function_name].aliases is defined + - lambda_infos_all.function[lambda_function_name].policy is defined + - lambda_infos_all.function[lambda_function_name].mappings is defined + - lambda_infos_all.function[lambda_function_name].description == "" + - lambda_infos_all.function[lambda_function_name].function_arn is defined + - lambda_infos_all.function[lambda_function_name].handler == "mini_lambda.handler" + + - name: lambda_info | Gather version infos for given lambda function + lambda_info: + name: '{{ lambda_function_name }}' + query: versions + register: lambda_infos_versions + - name: lambda_info | Assert successfull retrieval of versions information + assert: + that: + - lambda_infos_versions is not failed + - lambda_infos_versions.function[lambda_function_name].versions|length > 0 + - lambda_infos_versions.function[lambda_function_name].function_name is undefined + + - name: lambda_info | Gather config infos for given lambda function + lambda_info: + name: '{{ lambda_function_name }}' + query: config + register: lambda_infos_config + - name: lambda_info | Assert successfull retrieval of config information + assert: + that: + - lambda_infos_config is not failed + - lambda_infos_config.function[lambda_function_name].function_name == lambda_function_name + - lambda_infos_config.function[lambda_function_name].description is defined + - lambda_infos_config.function[lambda_function_name].versions is undefined + + - name: lambda_info | Gather policy infos for given lambda function + lambda_info: + name: '{{ lambda_function_name }}' + query: policy + register: lambda_infos_policy + - name: lambda_info | Assert successfull retrieval of policy information + assert: + that: + - lambda_infos_policy is not failed + - lambda_infos_policy.function[lambda_function_name].policy is defined + - lambda_infos_policy.function[lambda_function_name].versions is undefined + + - name: lambda_info | Gather aliases infos for given lambda function + lambda_info: + name: '{{ lambda_function_name }}' + query: aliases + register: lambda_infos_aliases + - name: lambda_info | Assert successfull retrieval of aliases information + assert: + that: + - lambda_infos_aliases is not failed + - lambda_infos_aliases.function[lambda_function_name].aliases is defined + + - name: lambda_info | Gather mappings infos for given lambda function + lambda_info: + name: '{{ lambda_function_name }}' + query: mappings + register: lambda_infos_mappings + - name: lambda_info | Assert successfull retrieval of mappings information + assert: + that: + - lambda_infos_mappings is not failed + - lambda_infos_mappings.function[lambda_function_name].mappings is defined + + # More Lambda update tests + - name: test state=present with all nullable variables explicitly set to null + lambda: + name: '{{lambda_function_name}}' + runtime: python2.7 + role: '{{ lambda_role_name }}' + zip_file: '{{zip_res.dest}}' + handler: mini_lambda.handler + description: null + vpc_subnet_ids: null + vpc_security_group_ids: null + environment_variables: null + dead_letter_arn: null + register: result + - name: assert lambda remains as before + assert: + that: + - result is not failed + - result.changed == False + + - name: test putting an environment variable changes lambda + lambda: + name: '{{lambda_function_name}}' + runtime: python2.7 + handler: mini_lambda.handler + role: '{{ lambda_role_name }}' + zip_file: '{{zip_res.dest}}' + environment_variables: + EXTRA_MESSAGE: I think you are great!! + register: result + - name: assert lambda upload succeeded + assert: + that: + - result is not failed + - result.changed == True + - name: test lambda works + execute_lambda: + name: '{{lambda_function_name}}' + payload: + name: Mr Ansible Tests + register: result + - name: assert lambda manages to respond as expected + assert: + that: + - result is not failed + - result.result.output.message == "hello Mr Ansible Tests. I think you are great!!" + + # Deletion behavious + - name: test state=absent (expect changed=True) + lambda: + name: '{{lambda_function_name}}' + state: absent + register: result + + - name: assert state=absent + assert: + that: + - result is not failed + - result is changed + + - name: test state=absent (expect changed=False) when already deleted + lambda: + name: '{{lambda_function_name}}' + state: absent + register: result + + - name: assert state=absent + assert: + that: + - result is not failed + - result is not changed + + # Parallel creations and deletions + - name: parallel lambda creation 1/4 + lambda: + name: '{{lambda_function_name}}_1' + runtime: python2.7 + handler: mini_lambda.handler + role: '{{ lambda_role_name }}' + zip_file: '{{zip_res.dest}}' + async: 1000 + register: async_1 + - name: parallel lambda creation 2/4 + lambda: + name: '{{lambda_function_name}}_2' + runtime: python2.7 + handler: mini_lambda.handler + role: '{{ lambda_role_name }}' + zip_file: '{{zip_res.dest}}' + async: 1000 + register: async_2 + - name: parallel lambda creation 3/4 + lambda: + name: '{{lambda_function_name}}_3' + runtime: python2.7 + handler: mini_lambda.handler + role: '{{ lambda_role_name }}' + zip_file: '{{zip_res.dest}}' + async: 1000 + register: async_3 + - name: parallel lambda creation 4/4 + lambda: + name: '{{lambda_function_name}}_4' + runtime: python2.7 + handler: mini_lambda.handler + role: '{{ lambda_role_name }}' + zip_file: '{{zip_res.dest}}' + register: result + - name: assert lambda manages to respond as expected + assert: + that: + - result is not failed + - name: wait for async job 1 + async_status: jid={{ async_1.ansible_job_id }} + register: job_result + until: job_result is finished + retries: 30 + - name: wait for async job 2 + async_status: jid={{ async_1.ansible_job_id }} + register: job_result + until: job_result is finished + retries: 30 + - name: wait for async job 3 + async_status: jid={{ async_3.ansible_job_id }} + register: job_result + until: job_result is finished + retries: 30 + - name: parallel lambda deletion 1/4 + lambda: + name: '{{lambda_function_name}}_1' + state: absent + zip_file: '{{zip_res.dest}}' + async: 1000 + register: async_1 + - name: parallel lambda deletion 2/4 + lambda: + name: '{{lambda_function_name}}_2' + state: absent + zip_file: '{{zip_res.dest}}' + async: 1000 + register: async_2 + - name: parallel lambda deletion 3/4 + lambda: + name: '{{lambda_function_name}}_3' + state: absent + zip_file: '{{zip_res.dest}}' + async: 1000 + register: async_3 + - name: parallel lambda deletion 4/4 + lambda: + name: '{{lambda_function_name}}_4' + state: absent + zip_file: '{{zip_res.dest}}' + register: result + - name: assert lambda creation has succeeded + assert: + that: + - result is not failed + - name: wait for async job 1 + async_status: jid={{ async_1.ansible_job_id }} + register: job_result + until: job_result is finished + retries: 30 + - name: wait for async job 2 + async_status: jid={{ async_1.ansible_job_id }} + register: job_result + until: job_result is finished + retries: 30 + - name: wait for async job 3 + async_status: jid={{ async_3.ansible_job_id }} + register: job_result + until: job_result is finished + retries: 30 + + always: + - name: ensure function is absent at end of test + lambda: + name: '{{lambda_function_name}}' + state: absent + ignore_errors: true + - name: ensure role has been removed at end of test + iam_role: + name: '{{ lambda_role_name }}' + state: absent + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/aliases new file mode 100644 index 00000000..a112c3d1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group1 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/defaults/main.yml new file mode 100644 index 00000000..5bcb2027 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/defaults/main.yml @@ -0,0 +1,10 @@ +--- +# defaults file for lambda_policy integration test +lambda_function_name: '{{ resource_prefix }}-api-endpoint' +# IAM role names have to be less than 64 characters +# The 8 digit identifier at the end of resource_prefix helps determine during +# which test something was created and allows tests to be run in parallel +# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases +# we need both sets of digits to keep the resource name unique +unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +lambda_role_name: 'ansible-test-{{ unique_id }}-lambda-policy' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/files/mini_http_lambda.py b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/files/mini_http_lambda.py new file mode 100644 index 00000000..caccac90 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/files/mini_http_lambda.py @@ -0,0 +1,40 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + + +def handler(event, context): + """ + The handler function is the function which gets called each time + the lambda is run. + """ + # printing goes to the cloudwatch log allowing us to simply debug the lambda if we can find + # the log entry. + print("got event:\n" + json.dumps(event)) + + # if the name parameter isn't present this can throw an exception + # which will result in an amazon chosen failure from the lambda + # which can be completely fine. + + name = event["pathParameters"]["greet_name"] + + return {"statusCode": 200, + "body": 'hello: "' + name + '"', + "headers": {}} + + +def main(): + """ + This main function will normally never be called during normal + lambda use. It is here for testing the lambda program only. + """ + event = {"name": "james"} + context = None + print(handler(event, context)) + + +if __name__ == '__main__': + main() diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/files/minimal_trust_policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/files/minimal_trust_policy.json new file mode 100644 index 00000000..fb84ae9d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/files/minimal_trust_policy.json @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/tasks/main.yml new file mode 100644 index 00000000..855e9fba --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/tasks/main.yml @@ -0,0 +1,176 @@ +- name: Integration testing for lambda_policy + module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + collections: + - community.general + - amazon.aws + + block: + - name: create minimal lambda role + iam_role: + name: '{{ lambda_role_name }}' + assume_role_policy_document: '{{ lookup("file", "minimal_trust_policy.json") }}' + create_instance_profile: false + managed_policies: + - 'arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess' + register: iam_role + - name: wait 10 seconds for role to become available + pause: + seconds: 10 + when: iam_role.changed + + - name: test with no parameters + module_defaults: { group/aws: {} } + lambda_policy: null + register: result + ignore_errors: true + - name: assert failure when called with no parameters + assert: + that: + - result.failed + - 'result.msg.startswith("missing required arguments: ")' + - name: test with all required dummy parameters but no region + module_defaults: { group/aws: {} } + lambda_policy: + statement_id: dummy + principal: api_fakeway + action: fake:do_something_fake + function_name: dummy_fake_function + ignore_errors: true + register: result + - name: assert failure and appropriate message when called without region + assert: + that: + - result.failed + - '"requires a region and none was found" in result.msg' + - name: test exceptions generated by forcing bad ec2 url + module_defaults: { group/aws: {} } + lambda_policy: + function_name: '{{ lambda_function_name }}' + state: present + statement_id: api-gateway-invoke-lambdas + action: lambda:InvokeFunction + principal: apigateway.amazonaws.com + source_arn: arn:aws:execute-api:no-north-0:1234567:*/* + ec2_url: https://noexist.example.com + ec2_region: no-north-0 + ec2_access_key: iamnotreallyanaccesskey + ec2_secret_key: thisisabadsecretkey + security_token: andthisisabadsecuritytoken + register: result + ignore_errors: true + - name: assert lambda manages to respond as expected + assert: + that: + - result is failed + - result.msg != "MODULE FAILURE" + - result.changed == False + - name: move lambda into place for archive module + copy: + src: mini_http_lambda.py + dest: '{{ output_dir }}/mini_http_lambda.py' + mode: preserve + - name: bundle lambda into a zip + register: zip_res + archive: + format: zip + path: '{{ output_dir }}/mini_http_lambda.py' + dest: '{{ output_dir }}/mini_http_lambda.zip' + - name: create minimal lambda role + iam_role: + name: ansible_lambda_role + assume_role_policy_document: '{{ lookup(''file'', ''minimal_trust_policy.json'', convert_data=False) }}' + create_instance_profile: false + register: iam_role + - name: wait 10 seconds for role to become available + pause: + seconds: 10 + when: iam_role.changed + - name: test state=present - upload the lambda + lambda: + name: '{{lambda_function_name}}' + runtime: python2.7 + handler: mini_http_lambda.handler + role: '{{ lambda_role_name }}' + zip_file: '{{zip_res.dest}}' + register: lambda_result + - name: get the aws account ID for use in future commands + aws_caller_info: {} + register: aws_caller_info + - name: register lambda uri for use in template + set_fact: + mini_lambda_uri: arn:aws:apigateway:{{ aws_region }}:lambda:path/2015-03-31/functions/arn:aws:lambda:{{ aws_region }}:{{ aws_caller_info.account }}:function:{{ lambda_result.configuration.function_name }}/invocations + - name: build API file + template: + src: endpoint-test-swagger-api.yml.j2 + dest: '{{output_dir}}/endpoint-test-swagger-api.yml.j2' + - name: deploy new API + aws_api_gateway: + api_file: '{{output_dir}}/endpoint-test-swagger-api.yml.j2' + stage: lambdabased + register: create_result + - name: register api id for later + set_fact: + api_id: '{{ create_result.api_id }}' + - name: check API fails with permissions failure + uri: + url: https://{{create_result.api_id}}.execute-api.{{aws_region}}.amazonaws.com/lambdabased/mini/Mr_Ansible_Tester + register: unauth_uri_result + ignore_errors: true + - name: assert internal server error due to permissions + assert: + that: + - unauth_uri_result is failed + - unauth_uri_result.status == 500 + - name: give api gateway execute permissions on lambda + lambda_policy: + function_name: '{{ lambda_function_name }}' + state: present + statement_id: api-gateway-invoke-lambdas + action: lambda:InvokeFunction + principal: apigateway.amazonaws.com + source_arn: arn:aws:execute-api:{{ aws_region }}:{{ aws_caller_info.account }}:*/* + - name: try again but with ARN + lambda_policy: + function_name: '{{ lambda_result.configuration.function_arn }}' + state: present + statement_id: api-gateway-invoke-lambdas + action: lambda:InvokeFunction + principal: apigateway.amazonaws.com + source_arn: arn:aws:execute-api:{{ aws_region }}:{{ aws_caller_info.account }}:*/* + - name: check API works with execute permissions + uri: + url: https://{{create_result.api_id}}.execute-api.{{aws_region}}.amazonaws.com/lambdabased/mini/Mr_Ansible_Tester + register: uri_result + - name: assert API works success + assert: + that: + - uri_result + - name: deploy new API + aws_api_gateway: + api_file: '{{output_dir}}/endpoint-test-swagger-api.yml.j2' + stage: lambdabased + register: create_result + ignore_errors: true + always: + - name: destroy lambda for test cleanup if created + lambda: + name: '{{lambda_function_name}}' + state: absent + register: result + ignore_errors: true + - name: destroy API for test cleanup if created + aws_api_gateway: + state: absent + api_id: '{{api_id}}' + register: destroy_result + ignore_errors: true + - name: Clean up test role + iam_role: + name: '{{ lambda_role_name }}' + state: absent + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/templates/endpoint-test-swagger-api.yml.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/templates/endpoint-test-swagger-api.yml.j2 new file mode 100644 index 00000000..d6218847 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lambda_policy/templates/endpoint-test-swagger-api.yml.j2 @@ -0,0 +1,39 @@ +--- +swagger: "2.0" +info: + version: "2017-05-11T12:14:59Z" + title: "{{resource_prefix}}LambdaBased_API" +host: "fakeexample.execute-api.us-east-1.amazonaws.com" +basePath: "/lambdabased" +schemes: +- "https" +paths: + /mini/{greet_name}: + get: + produces: + - "application/json" + parameters: + - name: "greet_name" + in: "path" + required: true + type: "string" + responses: + 200: + description: "200 response" + schema: + $ref: "#/definitions/Empty" + x-amazon-apigateway-integration: + responses: + default: + statusCode: "200" + uri: "{{mini_lambda_uri}}" + requestTemplates: + application/json: "{\"statusCode\": 200}" + passthroughBehavior: "when_no_match" + httpMethod: "POST" + contentHandling: "CONVERT_TO_TEXT" + type: "aws_proxy" +definitions: + Empty: + type: "object" + title: "Empty Schema" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lightsail/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lightsail/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lightsail/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lightsail/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lightsail/defaults/main.yml new file mode 100644 index 00000000..46f5b34e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lightsail/defaults/main.yml @@ -0,0 +1,2 @@ +instance_name: "{{ resource_prefix }}_instance" +zone: "{{ aws_region }}a" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lightsail/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lightsail/tasks/main.yml new file mode 100644 index 00000000..91f13a8b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/lightsail/tasks/main.yml @@ -0,0 +1,122 @@ +--- + +- module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key | default(omit) }}' + aws_secret_key: '{{ aws_secret_key | default(omit) }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region | default(omit) }}' + + block: + + # ==== Tests =================================================== + + - name: Create a new instance + lightsail: + name: "{{ instance_name }}" + zone: "{{ zone }}" + blueprint_id: amazon_linux + bundle_id: nano_2_0 + wait: yes + register: result + + - assert: + that: + - result.changed == True + - "'instance' in result and result.instance.name == instance_name" + - "result.instance.state.name == 'running'" + + - name: Make sure create is idempotent + lightsail: + name: "{{ instance_name }}" + zone: "{{ zone }}" + blueprint_id: amazon_linux + bundle_id: nano_2_0 + register: result + + - assert: + that: + - result.changed == False + + - name: Start the running instance + lightsail: + name: "{{ instance_name }}" + state: running + register: result + + - assert: + that: + - result.changed == False + + - name: Stop the instance + lightsail: + name: "{{ instance_name }}" + state: stopped + wait: yes + register: result + + - assert: + that: + - result.changed == True + - "result.instance.state.name == 'stopped'" + + - name: Stop the stopped instance + lightsail: + name: "{{ instance_name }}" + state: stopped + register: result + + - assert: + that: + - result.changed == False + + - name: Start the instance + lightsail: + name: "{{ instance_name }}" + state: running + register: result + + - assert: + that: + - result.changed == True + - "result.instance.state.name == 'running'" + + - name: Restart the instance + lightsail: + name: "{{ instance_name }}" + state: restarted + register: result + + - assert: + that: + - result.changed == True + + - name: Delete the instance + lightsail: + name: "{{ instance_name }}" + state: absent + register: result + + - assert: + that: + - result.changed == True + + - name: Make sure instance deletion is idempotent + lightsail: + name: "{{ instance_name }}" + state: absent + register: result + + - assert: + that: + - result.changed == False + + # ==== Cleanup ==================================================== + + always: + + - name: Cleanup - delete instance + lightsail: + name: "{{ instance_name }}" + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/prepare_tests/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/prepare_tests/tasks/main.yml new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/prepare_tests/tasks/main.yml diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/defaults/main.yml new file mode 100644 index 00000000..a2d215ba --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/defaults/main.yml @@ -0,0 +1,23 @@ +--- +instance_id: "{{ resource_prefix }}" +modified_instance_id: "{{ resource_prefix }}-updated" +username: test +password: test12345678 +db_instance_class: db.t2.micro +storage_encrypted_db_instance_class: db.t2.small +modified_db_instance_class: db.t2.medium +allocated_storage: 20 +modified_allocated_storage: 30 + +# For aurora tests +cluster_id: "{{ resource_prefix }}-cluster" +aurora_db_instance_class: db.t2.medium + +# For oracle tests +oracle_ee_db_instance_class: db.r3.xlarge +processor_features: + coreCount: 1 + threadsPerCore: 1 +modified_processor_features: + coreCount: 2 + threadsPerCore: 2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/credential_tests.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/credential_tests.yml new file mode 100644 index 00000000..1aa1c3a2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/credential_tests.yml @@ -0,0 +1,36 @@ +--- +- name: test without credentials + rds_instance: + db_instance_identifier: test-rds-instance + register: result + ignore_errors: yes + +- assert: + that: + - result.failed + - 'result.msg == "The rds_instance module requires a region and none was found in configuration, environment variables or module parameters"' + +- name: test without credentials + rds_instance: + db_instance_identifier: test-rds-instance + region: us-east-1 + register: result + ignore_errors: yes + +- assert: + that: + - result.failed + - '"Unable to locate credentials" in result.msg' + +- name: test with invalid credentials + rds_instance: + db_instance_identifier: test-rds-instance + region: us-east-1 + profile: doesnotexist + register: result + ignore_errors: yes + +- assert: + that: + - result.failed + - 'result.msg == "The config profile (doesnotexist) could not be found"' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/main.yml new file mode 100644 index 00000000..bb368c47 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/main.yml @@ -0,0 +1,29 @@ +--- +- block: + + - include: ./credential_tests.yml + tags: credentials + - include: ./test_states.yml + tags: states + - include: ./test_tags.yml + tags: tags + - include: ./test_modification.yml # TODO: test availability_zone and multi_az + tags: modification + - include: ./test_bad_options.yml + tags: bad_options + - include: ./test_processor_features.yml + tags: processor_features + - include: ./test_encryption.yml + tags: encryption + - include: ./test_final_snapshot.yml + tags: final_snapshot + - include: ./test_read_replica.yml + tags: read_replica + - include: ./test_vpc_security_groups.yml + tags: vpc_security_groups + - include: ./test_restore_instance.yml # TODO: snapshot, s3 + tags: restore + - include: ./test_snapshot.yml + tags: snapshot + # TODO: uncomment after adding rds_cluster module + #- include: ./test_aurora.yml diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_aurora.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_aurora.yml new file mode 100644 index 00000000..14d28b24 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_aurora.yml @@ -0,0 +1,144 @@ +--- + - block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create minimal aurora cluster in default VPC and default subnet group + rds_cluster: + state: present + engine: aurora + cluster_id: "{{ cluster_id }}" + username: "{{ username }}" + password: "{{ password }}" + <<: *aws_connection_info + + - name: Create an Aurora instance + rds_instance: + id: "{{ instance_id }}" + cluster_id: "{{ cluster_id }}" + engine: aurora + state: present + db_instance_class: "{{ aurora_db_instance_class }}" + tags: + CreatedBy: rds_instance integration tests + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.db_instance_identifier == '{{ instance_id }}'" + - "result.tags | length == 1" + + - name: Modify tags + rds_instance: + id: "{{ instance_id }}" + state: present + tags: + Test: rds_instance + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - result.tags | length == 1 + - "result.tags.Test == 'rds_instance'" + + - name: Test idempotence + rds_instance: + id: "{{ instance_id }}" + state: present + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + + - name: Attempt to modify password (a cluster-managed attribute) + rds_instance: + id: "{{ instance_id }}" + state: present + password: "{{ password }}" + force_update_password: True + apply_immediately: True + <<: *aws_connection_info + register: result + ignore_errors: yes + + - assert: + that: + - result.failed + - "'Modify master user password for the DB Cluster using the ModifyDbCluster API' in result.msg" + - "'Please see rds_cluster' in result.msg" + + - name: Modify aurora instance port (a cluster-managed attribute) + rds_instance: + id: "{{ instance_id }}" + state: present + port: 1150 + <<: *aws_connection_info + register: result + ignore_errors: yes + + - assert: + that: + - not result.changed + - "'Modify database endpoint port number for the DB Cluster using the ModifyDbCluster API' in result.msg" + - "'Please see rds_cluster' in result.msg" + + - name: Modify Aurora instance identifier + rds_instance: + id: "{{ instance_id }}" + state: present + purge_tags: False + new_id: "{{ modified_instance_id }}" + apply_immediately: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.db_instance_identifier == '{{ modified_instance_id }}'" + + always: + + - name: Delete the instance + rds_instance: + id: "{{ item }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + loop: + - "{{ instance_id }}" + - "{{ modified_instance_id }}" + ignore_errors: yes + + - name: Delete the cluster + rds_cluster: + cluster_id: "{{ cluster_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_bad_options.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_bad_options.yml new file mode 100644 index 00000000..21de862d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_bad_options.yml @@ -0,0 +1,41 @@ +--- + - block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create a DB instance with an invalid engine + rds_instance: + id: "{{ instance_id }}" + state: present + engine: thisisnotavalidengine + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + <<: *aws_connection_info + register: result + ignore_errors: True + + - assert: + that: + - result.failed + - '"DB engine thisisnotavalidengine should be one of" in result.msg' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_encryption.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_encryption.yml new file mode 100644 index 00000000..dc9a8d96 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_encryption.yml @@ -0,0 +1,53 @@ +--- + - block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create a mariadb instance + rds_instance: + id: "{{ instance_id }}" + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ storage_encrypted_db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + storage_encrypted: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.db_instance_identifier == '{{ instance_id }}'" + - result.kms_key_id + - result.storage_encrypted == true + + always: + + - name: Delete DB instance + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_final_snapshot.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_final_snapshot.yml new file mode 100644 index 00000000..bbada420 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_final_snapshot.yml @@ -0,0 +1,75 @@ +--- + - block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create a mariadb instance + rds_instance: + id: "{{ instance_id }}" + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + <<: *aws_connection_info + register: result + + - name: Delete the DB instance + rds_instance: + id: "{{ instance_id }}" + state: absent + final_snapshot_identifier: "{{ instance_id }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.final_snapshot.db_instance_identifier == '{{ instance_id }}'" + + - name: Check that snapshot exists + rds_snapshot_info: + db_snapshot_identifier: "{{ instance_id }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - "result.snapshots | length == 1" + - "result.snapshots.0.engine == 'mariadb'" + + always: + - name: Remove the snapshot + rds_snapshot: + db_snapshot_identifier: "{{ instance_id }}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: Remove the DB instance + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_modification.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_modification.yml new file mode 100644 index 00000000..ff874447 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_modification.yml @@ -0,0 +1,195 @@ +--- + - block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create a mariadb instance + rds_instance: + id: "{{ instance_id }}" + state: present + engine: mariadb + engine_version: "10.1.26" + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.db_instance_identifier == '{{ instance_id }}'" + + - name: Modify the instance name without immediate application + rds_instance: + id: "{{ instance_id }}" + state: present + new_id: "{{ modified_instance_id }}" + apply_immediately: False + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - 'result.db_instance_identifier == "{{ instance_id }}"' + + - name: Immediately apply the pending update + rds_instance: + id: "{{ instance_id }}" + state: present + new_id: "{{ modified_instance_id }}" + apply_immediately: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - 'result.db_instance_identifier == "{{ modified_instance_id }}"' + + - name: Modify the instance immediately + rds_instance: + id: '{{ modified_instance_id }}' + state: present + new_id: '{{ instance_id }}' + apply_immediately: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - 'result.db_instance_identifier == "{{ instance_id }}"' + + - name: Check mode - modify the password + rds_instance: + id: '{{ instance_id }}' + state: present + password: '{{ password }}' + force_update_password: True + apply_immediately: True + <<: *aws_connection_info + register: result + check_mode: True + + - assert: + that: + - result.changed + + - name: Modify the password + rds_instance: + id: '{{ instance_id }}' + state: present + password: '{{ password }}' + force_update_password: True + apply_immediately: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + # TODO: test modifying db_subnet_group_name, db_security_groups, db_parameter_group_name, option_group_name, + # monitoring_role_arn, monitoring_interval, domain, domain_iam_role_name, cloudwatch_logs_export_configuration + + - name: Modify several attributes + rds_instance: + id: '{{ instance_id }}' + state: present + allocated_storage: 30 + db_instance_class: "{{ modified_db_instance_class }}" + backup_retention_period: 2 + preferred_backup_window: "05:00-06:00" + preferred_maintenance_window: "mon:06:20-mon:06:50" + engine_version: "10.2.21" + allow_major_version_upgrade: true + auto_minor_version_upgrade: false + port: 1150 + max_allocated_storage: 100 + apply_immediately: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - '"allocated_storage" in result.pending_modified_values or result.allocated_storage == 30' + - '"max_allocated_storage" in result.pending_modified_values or result.max_allocated_storage == 100' + - '"port" in result.pending_modified_values or result.endpoint.port == 1150' + - '"db_instance_class" in result.pending_modified_values or result.db_instance_class == "db.t2.medium"' + - '"engine_version" in result.pending_modified_values or result.engine_version == "10.2.21"' + + - name: Idempotence modifying several pending attributes + rds_instance: + id: '{{ instance_id }}' + state: present + allocated_storage: 30 + db_instance_class: "{{ modified_db_instance_class }}" + backup_retention_period: 2 + preferred_backup_window: "05:00-06:00" + preferred_maintenance_window: "mon:06:20-mon:06:50" + engine_version: "10.2.21" + allow_major_version_upgrade: true + auto_minor_version_upgrade: false + port: 1150 + max_allocated_storage: 100 + <<: *aws_connection_info + register: result + retries: 30 + delay: 10 + until: result is not failed + + - assert: + that: + - not result.changed + - '"allocated_storage" in result.pending_modified_values or result.allocated_storage == 30' + - '"max_allocated_storage" in result.pending_modified_values or result.max_allocated_storage == 100' + - '"port" in result.pending_modified_values or result.endpoint.port == 1150' + - '"db_instance_class" in result.pending_modified_values or result.db_instance_class == "db.t2.medium"' + - '"engine_version" in result.pending_modified_values or result.engine_version == "10.2.21"' + + - name: Delete the instance + rds_instance: + id: '{{ instance_id }}' + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - '"pending_modified_values" not in result' + + always: + + - name: Delete the instance + rds_instance: + id: '{{ item }}' + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + loop: ['{{ instance_id }}', '{{ modified_instance_id }}'] + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_processor_features.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_processor_features.yml new file mode 100644 index 00000000..2fb3d895 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_processor_features.yml @@ -0,0 +1,126 @@ +--- + - block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create an oracle-ee DB instance + rds_instance: + id: "{{ instance_id }}" + state: present + engine: oracle-ee + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ oracle_ee_db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + storage_encrypted: True + processor_features: "{{ processor_features }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - 'result.processor_features.coreCount == "{{ processor_features.coreCount }}"' + - 'result.processor_features.threadsPerCore == "{{ processor_features.threadsPerCore }}"' + + - name: Check mode - modify the processor features + rds_instance: + id: "{{ instance_id }}" + state: present + engine: oracle-ee + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ oracle_ee_db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + storage_encrypted: True + processor_features: "{{ modified_processor_features }}" + apply_immediately: true + <<: *aws_connection_info + register: result + check_mode: True + + - assert: + that: + - result.changed + + - name: Modify the processor features + rds_instance: + id: "{{ instance_id }}" + state: present + engine: oracle-ee + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ oracle_ee_db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + storage_encrypted: True + processor_features: "{{ modified_processor_features }}" + apply_immediately: true + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - 'result.pending_modified_values.processor_features.coreCount == "{{ modified_processor_features.coreCount }}"' + - 'result.pending_modified_values.processor_features.threadsPerCore == "{{ modified_processor_features.threadsPerCore }}"' + + - name: Check mode - use the default processor features + rds_instance: + id: "{{ instance_id }}" + state: present + processor_features: {} + apply_immediately: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + - name: Use the default processor features + rds_instance: + id: "{{ instance_id }}" + state: present + processor_features: {} + apply_immediately: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - 'result.pending_modified_values.processor_features.coreCount == "DEFAULT"' + - 'result.pending_modified_values.processor_features.threadsPerCore == "DEFAULT"' + + always: + + - name: Delete the DB instance + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_read_replica.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_read_replica.yml new file mode 100644 index 00000000..3ed091b3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_read_replica.yml @@ -0,0 +1,162 @@ +--- + - block: + + - name: set the two regions for the source DB and the replica + set_fact: + region_src: "{{ aws_region }}" + region_dest: "{{ aws_region }}" + + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + no_log: yes + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + region: "{{ region_src }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create a source DB instance + rds_instance: + id: "{{ instance_id }}" + state: present + engine: mysql + backup_retention_period: 1 + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + region: "{{ region_src }}" + tags: + Name: "{{ instance_id }}" + Created_by: Ansible rds_instance tests + <<: *aws_connection_info + register: source_db + + - assert: + that: + - source_db.changed + - "source_db.db_instance_identifier == '{{ instance_id }}'" + + - name: Create a read replica in a different region + rds_instance: + id: "{{ instance_id }}-replica" + state: present + source_db_instance_identifier: "{{ instance_id }}" + engine: mysql + username: "{{ username }}" + password: "{{ password }}" + read_replica: True + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + region: "{{ region_dest }}" + tags: + Name: "{{ instance_id }}" + Created_by: Ansible rds_instance tests + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.db_instance_identifier == '{{ instance_id }}-replica'" + - "result.tags | length == 2" + - "result.tags.Name == '{{ instance_id }}'" + - "result.tags.Created_by == 'Ansible rds_instance tests'" + + - name: Test idempotence with a read replica + rds_instance: + id: "{{ instance_id }}-replica" + state: present + source_db_instance_identifier: "{{ instance_id }}" + engine: mysql + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + region: "{{ region_dest }}" + tags: + Name: "{{ instance_id }}" + Created_by: Ansible rds_instance tests + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + + - name: Test idempotence with read_replica=True + rds_instance: + id: "{{ instance_id }}-replica" + state: present + read_replica: True + source_db_instance_identifier: "{{ instance_id }}" + engine: mysql + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + region: "{{ region_dest }}" + tags: + Name: "{{ instance_id }}" + Created_by: Ansible rds_instance tests + <<: *aws_connection_info + register: result + + - name: Promote the read replica + rds_instance: + id: "{{ instance_id }}-replica" + state: present + read_replica: False + region: "{{ region_dest }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + - name: Test idempotence + rds_instance: + id: "{{ instance_id }}-replica" + state: present + read_replica: False + region: "{{ region_dest }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + + always: + + - name: Remove the DB instance + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + region: "{{ region_src }}" + <<: *aws_connection_info + ignore_errors: yes + + - name: Remove the DB replica + rds_instance: + id: "{{ instance_id }}-replica" + state: absent + skip_final_snapshot: True + region: "{{ region_dest }}" + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_restore_instance.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_restore_instance.yml new file mode 100644 index 00000000..b40e487d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_restore_instance.yml @@ -0,0 +1,95 @@ +--- + - block: + + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create a source DB instance + rds_instance: + id: "{{ instance_id }}" + state: present + engine: mysql + backup_retention_period: 1 + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + <<: *aws_connection_info + register: source_db + + - assert: + that: + - source_db.changed + - "source_db.db_instance_identifier == '{{ instance_id }}'" + + - name: Create a point in time DB instance + rds_instance: + id: "{{ instance_id }}-point-in-time" + state: present + source_db_instance_identifier: "{{ instance_id }}" + creation_source: instance + engine: mysql + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + use_latest_restorable_time: True + <<: *aws_connection_info + register: result + + - name: Test idempotence with a point in time replica + rds_instance: + id: "{{ instance_id }}-point-in-time" + state: present + source_db_instance_identifier: "{{ instance_id }}" + creation_source: instance + engine: mysql + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + restore_time: "{{ result.latest_restorable_time }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + + always: + + - name: Remove the DB instance + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + ignore_errors: yes + + + - name: Remove the point in time restored DB + rds_instance: + id: "{{ instance_id }}-point-in-time" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_snapshot.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_snapshot.yml new file mode 100644 index 00000000..7e88db43 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_snapshot.yml @@ -0,0 +1,85 @@ +--- + - block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: Getting shared snapshots + rds_snapshot_info: + snapshot_type: "shared" + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + - result.cluster_snapshots is defined + - result.snapshots is defined + + - name: Ensure the resource doesn't exist + rds_instance: + db_instance_identifier: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create a mariadb instance + rds_instance: + db_instance_identifier: "{{ instance_id }}" + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + tags: + Name: "{{ instance_id }}" + Created_by: Ansible rds_instance tests + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.db_instance_identifier == '{{ instance_id }}'" + - "result.tags | length == 2" + - "result.tags.Name == '{{ instance_id }}'" + - "result.tags.Created_by == 'Ansible rds_instance tests'" + + - name: Getting public snapshots + rds_snapshot_info: + db_instance_identifier: "{{ instance_id }}" + snapshot_type: "public" + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + - result.cluster_snapshots is not defined + - result.snapshots is defined + + - name: Ensure the resource doesn't exist + rds_instance: + db_instance_identifier: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + # TODO ideally we test with an actual shared snapshot - but we'd need a second account - making tests fairly complicated? diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_states.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_states.yml new file mode 100644 index 00000000..f55ffe70 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_states.yml @@ -0,0 +1,277 @@ +--- + - block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Check Mode - Create a mariadb instance + rds_instance: + id: "{{ instance_id }}" + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + <<: *aws_connection_info + register: result + check_mode: yes + + - assert: + that: + - result.changed + + - name: Create a mariadb instance + rds_instance: + id: "{{ instance_id }}" + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.db_instance_identifier == '{{ instance_id }}'" + + - name: Idempotence + rds_instance: + id: '{{ instance_id }}' + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + - result.db_instance_identifier + + - name: Idempotence with minimal options + rds_instance: + id: '{{ instance_id }}' + state: present + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + - result.db_instance_identifier + + - name: Check Mode - stop the instance + rds_instance: + id: '{{ instance_id }}' + state: stopped + <<: *aws_connection_info + register: result + check_mode: yes + + - assert: + that: + - result.changed + + - name: Stop the instance + rds_instance: + id: '{{ instance_id }}' + state: stopped + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + - name: Check Mode - idempotence + rds_instance: + id: '{{ instance_id }}' + state: stopped + <<: *aws_connection_info + register: result + check_mode: yes + + - assert: + that: + - not result.changed + + - name: Idempotence + rds_instance: + id: '{{ instance_id }}' + state: stopped + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + + - name: Check mode - reboot a stopped instance + rds_instance: + id: '{{ instance_id }}' + state: rebooted + <<: *aws_connection_info + register: result + check_mode: yes + + - assert: + that: + - result.changed + + - name: Reboot a stopped instance + rds_instance: + id: '{{ instance_id }}' + state: rebooted + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + - name: Check Mode - start the instance + rds_instance: + id: '{{ instance_id }}' + state: started + <<: *aws_connection_info + register: result + check_mode: yes + + - assert: + that: + - not result.changed + + - name: Stop the instance + rds_instance: + id: '{{ instance_id }}' + state: stopped + <<: *aws_connection_info + + - name: Start the instance + rds_instance: + id: '{{ instance_id }}' + state: started + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + - name: take a snapshot + rds_snapshot: + db_instance_identifier: '{{ instance_id }}' + db_snapshot_identifier: '{{ resource_prefix }}-test-snapshot' + state: present + wait: yes + <<: *aws_connection_info + + - name: take a snapshot - idempotence + rds_snapshot: + db_instance_identifier: '{{ instance_id }}' + db_snapshot_identifier: '{{ resource_prefix }}-test-snapshot' + state: present + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + + - name: check snapshot is ok + rds_snapshot_info: + db_snapshot_identifier: '{{ resource_prefix }}-test-snapshot' + <<: *aws_connection_info + register: result + + - assert: + that: + - (result.snapshots | length) == 1 + + - name: remove a snapshot without wait + rds_snapshot: + db_snapshot_identifier: '{{ resource_prefix }}-test-snapshot' + state: absent + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + - name: remove a snapshot without wait - idempotence + rds_snapshot: + db_snapshot_identifier: '{{ resource_prefix }}-test-snapshot' + state: absent + wait: yes + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + + - name: remove a snapshot with wait - idempotence + rds_snapshot: + db_snapshot_identifier: '{{ resource_prefix }}-test-snapshot' + state: absent + wait: yes + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + + - name: check snapshot is removed + rds_snapshot_info: + db_snapshot_identifier: '{{ resource_prefix }}-test-snapshot' + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.snapshots + + always: + + - name: remove snapshot + rds_snapshot: + db_snapshot_identifier: '{{ resource_prefix }}-test-snapshot' + state: absent + wait: yes + <<: *aws_connection_info + ignore_errors: yes + + - name: Remove DB instance + rds_instance: + id: '{{ instance_id }}' + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_tags.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_tags.yml new file mode 100644 index 00000000..f5003ad7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_tags.yml @@ -0,0 +1,265 @@ +--- + - block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: Ensure the resource doesn't exist + rds_instance: + db_instance_identifier: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create a mariadb instance + rds_instance: + db_instance_identifier: "{{ instance_id }}" + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + tags: + Name: "{{ instance_id }}" + Created_by: Ansible rds_instance tests + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.db_instance_identifier == '{{ instance_id }}'" + - "result.tags | length == 2" + - "result.tags.Name == '{{ instance_id }}'" + - "result.tags.Created_by == 'Ansible rds_instance tests'" + + - name: Test idempotence omitting tags + rds_instance: + db_instance_identifier: "{{ instance_id }}" + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + - "result.tags | length == 2" + + - name: Test tags are not purged if purge_tags is False + rds_instance: + db_instance_identifier: "{{ instance_id }}" + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + tags: {} + purge_tags: False + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + - "result.tags | length == 2" + + - name: Add a tag and remove a tag + rds_instance: + db_instance_identifier: "{{ instance_id }}" + state: present + tags: + Name: "{{ instance_id }}-new" + Created_by: Ansible rds_instance tests + purge_tags: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.tags | length == 2" + - "result.tags.Name == '{{ instance_id }}-new'" + + - name: Remove all tags + rds_instance: + db_instance_identifier: "{{ instance_id }}" + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + tags: {} + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - not result.tags + + - name: snapshot instance without tags + rds_snapshot: + db_instance_identifier: "{{ instance_id }}" + db_snapshot_identifier: "{{ resource_prefix }}-test-tags" + state: present + wait: yes + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - not result.tags + + - name: add tags to snapshot + rds_snapshot: + db_instance_identifier: "{{ instance_id }}" + db_snapshot_identifier: "{{ resource_prefix }}-test-tags" + state: present + tags: + one: hello + two: world + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - result.tags | length == 2 + + - name: add tags to snapshot - idempotence + rds_snapshot: + db_instance_identifier: "{{ instance_id }}" + db_snapshot_identifier: "{{ resource_prefix }}-test-tags" + state: present + tags: + one: hello + two: world + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + - result.tags | length == 2 + + - name: add tag to snapshot using purge_tags False + rds_snapshot: + db_instance_identifier: "{{ instance_id }}" + db_snapshot_identifier: "{{ resource_prefix }}-test-tags" + state: present + tags: + one: hello + three: another + purge_tags: False + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - result.tags | length == 3 + + - name: rerun tags but not setting purge_tags + rds_snapshot: + db_instance_identifier: "{{ instance_id }}" + db_snapshot_identifier: "{{ resource_prefix }}-test-tags" + state: present + tags: + one: hello + three: another + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - result.tags | length == 2 + + - name: rerun tags but not setting purge_tags - idempotence + rds_snapshot: + db_instance_identifier: "{{ instance_id }}" + db_snapshot_identifier: "{{ resource_prefix }}-test-tags" + state: present + tags: + one: hello + three: another + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + - result.tags | length == 2 + + - name: remove snapshot + rds_snapshot: + db_instance_identifier: "{{ instance_id }}" + db_snapshot_identifier: "{{ resource_prefix }}-test-tags" + state: absent + wait: yes + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + - name: create snapshot with tags + rds_snapshot: + db_instance_identifier: "{{ instance_id }}" + db_snapshot_identifier: "{{ resource_prefix }}-test-tags" + state: present + tags: + one: hello + three: another + purge_tags: yes + wait: yes + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - result.tags | length == 2 + + always: + + - name: tidy up snapshot + rds_snapshot: + db_instance_identifier: "{{ instance_id }}" + db_snapshot_identifier: "{{ resource_prefix }}-test-tags" + state: absent + <<: *aws_connection_info + ignore_errors: yes + + - name: Ensure the resource doesn't exist + rds_instance: + db_instance_identifier: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_vpc_security_groups.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_vpc_security_groups.yml new file mode 100644 index 00000000..53c7e9d0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_instance/tasks/test_vpc_security_groups.yml @@ -0,0 +1,169 @@ +--- + - name: rds_instance test_vpc_security_groups tests + collections: + - amazon.aws + block: + - name: set up aws connection info + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: yes + + - name: create a VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: present + cidr_block: "10.122.122.128/26" + tags: + Name: "{{ resource_prefix }}-vpc" + Description: "created by rds_instance integration tests" + <<: *aws_connection_info + register: vpc_result + + - name: create subnets + ec2_vpc_subnet: + cidr: "{{ item.cidr }}" + az: "{{ item.zone }}" + vpc_id: "{{ vpc_result.vpc.id }}" + tags: + Name: "{{ resource_prefix }}-subnet" + Description: "created by rds_instance integration tests" + state: present + <<: *aws_connection_info + register: subnets_result + loop: + - {"cidr": "10.122.122.128/28", "zone": "{{ aws_region }}a"} + - {"cidr": "10.122.122.144/28", "zone": "{{ aws_region }}b"} + - {"cidr": "10.122.122.160/28", "zone": "{{ aws_region }}c"} + - {"cidr": "10.122.122.176/28", "zone": "{{ aws_region }}d"} + + - name: Create security groups + ec2_group: + name: "{{ item }}" + description: "created by rds_instance integration tests" + state: present + <<: *aws_connection_info + register: sgs_result + loop: + - "{{ resource_prefix }}-sg-1" + - "{{ resource_prefix }}-sg-2" + - "{{ resource_prefix }}-sg-3" + + - debug: var=sgs_result + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + + - assert: + that: + - not result.changed + ignore_errors: yes + + - name: Create a DB instance in the VPC with two security groups + rds_instance: + id: "{{ instance_id }}" + state: present + engine: mariadb + username: "{{ username }}" + password: "{{ password }}" + db_instance_class: "{{ db_instance_class }}" + allocated_storage: "{{ allocated_storage }}" + vpc_security_group_ids: + - "{{ sgs_result.results.0.group_id }}" + - "{{ sgs_result.results.1.group_id }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + - "result.db_instance_identifier == '{{ instance_id }}'" + + - name: Add a new security group + rds_instance: + id: "{{ instance_id }}" + state: present + vpc_security_group_ids: + - "{{ sgs_result.results.2.group_id }}" + <<: *aws_connection_info + register: result + + - assert: + that: + - result.changed + + always: + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + ignore_errors: yes + + - name: Remove security groups + ec2_group: + name: "{{ item }}" + description: "created by rds_instance integration tests" + state: absent + <<: *aws_connection_info + register: sgs_result + loop: + - "{{ resource_prefix }}-sg-1" + - "{{ resource_prefix }}-sg-2" + - "{{ resource_prefix }}-sg-3" + + - name: remove subnets + ec2_vpc_subnet: + cidr: "{{ item.cidr }}" + az: "{{ item.zone }}" + vpc_id: "{{ vpc_result.vpc.id }}" + tags: + Name: "{{ resource_prefix }}-subnet" + Description: "created by rds_instance integration tests" + state: absent + <<: *aws_connection_info + register: subnets + ignore_errors: yes + retries: 30 + until: subnets is not failed + delay: 10 + loop: + - {"cidr": "10.122.122.128/28", "zone": "{{ aws_region }}a"} + - {"cidr": "10.122.122.144/28", "zone": "{{ aws_region }}b"} + - {"cidr": "10.122.122.160/28", "zone": "{{ aws_region }}c"} + - {"cidr": "10.122.122.176/28", "zone": "{{ aws_region }}d"} + + - name: create a VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: absent + cidr_block: "10.122.122.128/26" + tags: + Name: "{{ resource_prefix }}-vpc" + Description: "created by rds_instance integration tests" + <<: *aws_connection_info + register: vpc_result + ignore_errors: yes + retries: 30 + until: vpc_result is not failed + delay: 10 + + - name: Ensure the resource doesn't exist + rds_instance: + id: "{{ instance_id }}" + state: absent + skip_final_snapshot: True + <<: *aws_connection_info + register: result + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/defaults/main.yml new file mode 100644 index 00000000..8f9de71f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/defaults/main.yml @@ -0,0 +1,30 @@ +--- +rds_param_group: + name: "{{ resource_prefix}}rds-param-group" + description: "Test group for rds_param_group Ansible module" + engine: postgres9.6 + +rds_long_param_list: + application_name: Test + logging_collector: on + log_directory: /var/log/postgresql + log_filename: postgresql.log.%Y-%m-%d-%H + log_file_mode: 0600 + event_source: RDS + log_min_messages: INFO + log_min_duration_statement: 500 + log_rotation_age: 60 + debug_print_parse: on + debug_print_rewritten: on + debug_print_plan: on + debug_pretty_print: on + log_checkpoints: on + log_connections: on + log_disconnections: on + log_duration: on + log_error_verbosity: VERBOSE + log_lock_waits: on + log_temp_files: 10K + log_timezone: UTC + log_statement: 'all' + log_replication_commands: on diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/tasks/main.yml new file mode 100644 index 00000000..9af2776b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_param_group/tasks/main.yml @@ -0,0 +1,321 @@ +--- +# A Note about ec2 environment variable name preference: +# - EC2_URL -> AWS_URL +# - EC2_ACCESS_KEY -> AWS_ACCESS_KEY_ID -> AWS_ACCESS_KEY +# - EC2_SECRET_KEY -> AWS_SECRET_ACCESS_KEY -> AWX_SECRET_KEY +# - EC2_REGION -> AWS_REGION +# +# TODO - name: test 'region' parameter +# TODO - name: test 'state=absent' parameter for existing key +# TODO - name: test 'state=absent' parameter for missing key +# TODO - name: test 'validate_certs' parameter + +# ============================================================ +# - include: ../../setup_ec2/tasks/common.yml module_name=rds_param_group + +- block: + + # ============================================================ + - name: test empty parameter group + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + description: "{{ rds_param_group.description }}" + state: present + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert rds parameter group changed + assert: + that: + - 'result.changed' + - "'{{ result.db_parameter_group_name | lower }}' == '{{ rds_param_group.name | lower }}'" + - 'result.tags == {}' + + # ============================================================ + - name: test empty parameter group with no arguments changes nothing + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + description: "{{ rds_param_group.description }}" + state: present + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert no change when running empty parameter group a second time + assert: + that: + - 'not result.changed' + + # ============================================================ + - name: test adding numeric tag + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + description: "{{ rds_param_group.description }}" + state: present + tags: + Environment: test + Test: 123 + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: adding numeric tag just silently converts + assert: + that: + - 'result.changed' + - 'result.tags.Test == "123"' + + # ============================================================ + - name: test tagging existing group + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + description: "{{ rds_param_group.description }}" + state: present + tags: + Environment: test + Test: "123" + NewTag: "hello" + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert tagging existing group changes it and adds tags + assert: + that: + - 'result.changed' + - 'result.tags.NewTag == "hello"' + + # ============================================================ + - name: test repeating tagging existing group + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + description: "{{ rds_param_group.description }}" + state: present + tags: + Environment: test + Test: "123" + NewTag: "hello" + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert tagging existing group changes it and adds tags + assert: + that: + - 'not result.changed' + - 'result.tags.Test == "123"' + + # ============================================================ + - name: test deleting tags from existing group + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + description: "{{ rds_param_group.description }}" + state: present + tags: + Environment: test + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + purge_tags: yes + register: result + ignore_errors: true + + - name: assert removing tags from existing group changes it + assert: + that: + - 'result.changed' + - 'result.tags.Environment == "test"' + - '"NewTag" not in result.tags' + + # ============================================================ + - name: test state=absent with engine defined (expect changed=true) + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + state: absent + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert state=absent with engine defined (expect changed=true) + assert: + that: + - 'result.changed' + + # ============================================================ + - name: test creating group with parameters + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + description: "{{ rds_param_group.description }}" + state: present + params: + log_directory: /var/log/postgresql + log_statement: 'all' + log_duration: on + this_param_does_not_exist: oh_no + tags: + Environment: test + Test: "123" + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert creating a new group with parameter changes it + assert: + that: + - 'result.changed' + - 'result.tags.Test == "123"' + - 'result.errors|length == 2' + + # ============================================================ + - name: test repeating group with parameters + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + description: "{{ rds_param_group.description }}" + state: present + params: + log_directory: /var/log/postgresql + log_statement: 'all' + log_duration: on + this_param_does_not_exist: oh_no + tags: + Environment: test + Test: "123" + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert repeating group with parameters does not change it + assert: + that: + - 'not result.changed' + - 'result.tags.Test == "123"' + - 'result.errors|length == 2' + + # ============================================================ + - name: test state=absent with engine defined (expect changed=true) + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + state: absent + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert state=absent with engine defined (expect changed=true) + assert: + that: + - 'result.changed' + + # ============================================================ + - name: test repeating state=absent (expect changed=false) + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + state: absent + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert repeating state=absent (expect changed=false) + assert: + that: + - 'not result.changed' + + # ============================================================ + - name: test creating group with more than 20 parameters + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + description: "{{ rds_param_group.description }}" + params: "{{ rds_long_param_list }}" + state: present + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert creating a new group with lots of parameter changes it + assert: + that: + - 'result.changed' + + # ============================================================ + - name: test creating group with more than 20 parameters + rds_param_group: + name: "{{ rds_param_group.name }}" + engine: "{{ rds_param_group.engine }}" + description: "{{ rds_param_group.description }}" + params: "{{ rds_long_param_list }}" + region: "{{ ec2_region }}" + state: present + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert repeating a group with lots of parameter does not change it + assert: + that: + - 'not result.changed' + + always: + # ============================================================ + - name: test state=absent (expect changed=false) + rds_param_group: + name: "{{ rds_param_group.name }}" + state: absent + region: "{{ ec2_region }}" + ec2_access_key: '{{ aws_access_key }}' + ec2_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token }}' + register: result + ignore_errors: true + + - name: assert state=absent (expect changed=false) + assert: + that: + - 'result.changed' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/defaults/main.yml new file mode 100644 index 00000000..07e0fe93 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/defaults/main.yml @@ -0,0 +1,8 @@ +vpc_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.0.0/16' +subnet_a: '10.{{ 256 | random(seed=resource_prefix) }}.10.0/24' +subnet_b: '10.{{ 256 | random(seed=resource_prefix) }}.11.0/24' +subnet_c: '10.{{ 256 | random(seed=resource_prefix) }}.12.0/24' +subnet_d: '10.{{ 256 | random(seed=resource_prefix) }}.13.0/24' + +group_description: 'Created by integration test : {{ resource_prefix }}' +group_description_changed: 'Created by integration test : {{ resource_prefix }} - changed' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/meta/main.yml new file mode 100644 index 00000000..9d91be17 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: +- prepare_tests +- setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/tasks/main.yml new file mode 100644 index 00000000..664d78ed --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/tasks/main.yml @@ -0,0 +1,115 @@ +--- +# Tests for rds_subnet_group +# +# Note: (From Amazon's documentation) +# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/rds.html#RDS.Client.modify_db_subnet_group +# DB subnet groups must contain at least one subnet in at least two AZs in the +# AWS Region. + +- module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + collections: + - amazon.aws + block: + + # ============================================================ + + - name: 'Fetch AZ availability' + aws_az_info: + register: az_info + + - name: 'Assert that we have multiple AZs available to us' + assert: + that: az_info.availability_zones | length >= 2 + + - name: 'Pick AZs' + set_fact: + az_one: '{{ az_info.availability_zones[0].zone_name }}' + az_two: '{{ az_info.availability_zones[1].zone_name }}' + + # ============================================================ + + - name: 'Create a VPC' + ec2_vpc_net: + state: present + cidr_block: '{{ vpc_cidr }}' + name: '{{ resource_prefix }}' + register: vpc + + - name: 'Create subnets' + ec2_vpc_subnet: + state: present + cidr: '{{ item.cidr }}' + az: '{{ item.az }}' + vpc_id: '{{ vpc.vpc.id }}' + tags: + Name: '{{ item.name }}' + with_items: + - cidr: '{{ subnet_a }}' + az: '{{ az_one }}' + name: '{{ resource_prefix }}-subnet-a' + - cidr: '{{ subnet_b }}' + az: '{{ az_two }}' + name: '{{ resource_prefix }}-subnet-b' + - cidr: '{{ subnet_c }}' + az: '{{ az_one }}' + name: '{{ resource_prefix }}-subnet-c' + - cidr: '{{ subnet_d }}' + az: '{{ az_two }}' + name: '{{ resource_prefix }}-subnet-d' + register: subnets + + - set_fact: + subnet_ids: '{{ subnets | community.general.json_query("results[].subnet.id") | list }}' + + # ============================================================ + + - include_tasks: 'params.yml' + + - include_tasks: 'tests.yml' + + # ============================================================ + + always: + - name: 'Remove subnet group' + rds_subnet_group: + state: absent + name: '{{ resource_prefix }}' + ignore_errors: yes + + - name: 'Remove subnets' + ec2_vpc_subnet: + state: absent + cidr: '{{ item.cidr }}' + vpc_id: '{{ vpc.vpc.id }}' + with_items: + - cidr: '{{ subnet_a }}' + name: '{{ resource_prefix }}-subnet-a' + - cidr: '{{ subnet_b }}' + name: '{{ resource_prefix }}-subnet-b' + - cidr: '{{ subnet_c }}' + name: '{{ resource_prefix }}-subnet-c' + - cidr: '{{ subnet_d }}' + name: '{{ resource_prefix }}-subnet-d' + ignore_errors: yes + register: removed_subnets + until: removed_subnets is succeeded + retries: 5 + delay: 5 + + - name: 'Remove the VPC' + ec2_vpc_net: + state: absent + cidr_block: '{{ vpc_cidr }}' + name: '{{ resource_prefix }}' + ignore_errors: yes + register: removed_vpc + until: removed_vpc is success + retries: 5 + delay: 5 + + # ============================================================ diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/tasks/params.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/tasks/params.yml new file mode 100644 index 00000000..e6b042f7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/tasks/params.yml @@ -0,0 +1,30 @@ +--- +# Try creating without a description +- name: "Create a subnet group (no description)" + rds_subnet_group: + state: present + name: "{{ resource_prefix }}" + subnets: + - "{{ subnet_ids[0] }}" + - "{{ subnet_ids[1] }}" + ignore_errors: yes + register: create_missing_param +- assert: + that: + - create_missing_param is failed + - "'description' in create_missing_param.msg" + - "'state is present but all of the following are missing' in create_missing_param.msg" + +# Try creating without subnets +- name: "Create a subnet group (no subnets)" + rds_subnet_group: + state: present + name: "{{ resource_prefix }}" + description: "{{ group_description }}" + ignore_errors: yes + register: create_missing_param +- assert: + that: + - create_missing_param is failed + - "'subnets' in create_missing_param.msg" + - "'state is present but all of the following are missing' in create_missing_param.msg" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/tasks/tests.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/tasks/tests.yml new file mode 100644 index 00000000..0b4e3d1b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/rds_subnet_group/tasks/tests.yml @@ -0,0 +1,221 @@ +--- +# XXX rds_subnet_group doesn't support check_mode yet + +# ============================================================ +# Basic creation +- name: 'Create a subnet group' + rds_subnet_group: + state: present + name: '{{ resource_prefix }}' + description: '{{ group_description }}' + subnets: + - '{{ subnet_ids[0] }}' + - '{{ subnet_ids[1] }}' + register: result + +- assert: + that: + - result is changed + - result.subnet_group.description == group_description + - result.subnet_group.name == resource_prefix + - result.subnet_group.vpc_id == vpc.vpc.id + - result.subnet_group.subnet_ids | length == 2 + - subnet_ids[0] in result.subnet_group.subnet_ids + - subnet_ids[1] in result.subnet_group.subnet_ids + +- name: 'Create a subnet group (idempotency)' + rds_subnet_group: + state: present + name: '{{ resource_prefix }}' + description: '{{ group_description }}' + subnets: + - '{{ subnet_ids[0] }}' + - '{{ subnet_ids[1] }}' + register: result + +- assert: + that: + - result is not changed + - result.subnet_group.description == group_description + - result.subnet_group.name == resource_prefix + - result.subnet_group.vpc_id == vpc.vpc.id + - result.subnet_group.subnet_ids | length == 2 + - subnet_ids[0] in result.subnet_group.subnet_ids + - subnet_ids[1] in result.subnet_group.subnet_ids + +# ============================================================ +# Update description + +- name: 'Update subnet group description' + rds_subnet_group: + state: present + name: '{{ resource_prefix }}' + description: '{{ group_description_changed }}' + subnets: + - '{{ subnet_ids[0] }}' + - '{{ subnet_ids[1] }}' + register: result + +- assert: + that: + - result is changed + - result.subnet_group.description == group_description_changed + - result.subnet_group.name == resource_prefix + - result.subnet_group.vpc_id == vpc.vpc.id + - result.subnet_group.subnet_ids | length == 2 + - subnet_ids[0] in result.subnet_group.subnet_ids + - subnet_ids[1] in result.subnet_group.subnet_ids + +- name: 'Update subnet group description (idempotency)' + rds_subnet_group: + state: present + name: '{{ resource_prefix }}' + description: '{{ group_description_changed }}' + subnets: + - '{{ subnet_ids[0] }}' + - '{{ subnet_ids[1] }}' + register: result + +- assert: + that: + - result is not changed + - result.subnet_group.description == group_description_changed + - result.subnet_group.name == resource_prefix + - result.subnet_group.vpc_id == vpc.vpc.id + - result.subnet_group.subnet_ids | length == 2 + - subnet_ids[0] in result.subnet_group.subnet_ids + - subnet_ids[1] in result.subnet_group.subnet_ids + +- name: 'Restore subnet group description' + rds_subnet_group: + state: present + name: '{{ resource_prefix }}' + description: '{{ group_description }}' + subnets: + - '{{ subnet_ids[0] }}' + - '{{ subnet_ids[1] }}' + register: result + +- assert: + that: + - result is changed + - result.subnet_group.description == group_description + - result.subnet_group.name == resource_prefix + - result.subnet_group.vpc_id == vpc.vpc.id + - result.subnet_group.subnet_ids | length == 2 + - subnet_ids[0] in result.subnet_group.subnet_ids + - subnet_ids[1] in result.subnet_group.subnet_ids + +# ============================================================ +# Update subnets + +- name: 'Update subnet group list' + rds_subnet_group: + state: present + name: '{{ resource_prefix }}' + description: '{{ group_description }}' + subnets: + - '{{ subnet_ids[2] }}' + - '{{ subnet_ids[3] }}' + register: result + +- assert: + that: + - result is changed + - result.subnet_group.description == group_description + - result.subnet_group.name == resource_prefix + - result.subnet_group.vpc_id == vpc.vpc.id + - result.subnet_group.subnet_ids | length == 2 + - subnet_ids[2] in result.subnet_group.subnet_ids + - subnet_ids[3] in result.subnet_group.subnet_ids + +- name: 'Update subnet group list (idempotency)' + rds_subnet_group: + state: present + name: '{{ resource_prefix }}' + description: '{{ group_description }}' + subnets: + - '{{ subnet_ids[2] }}' + - '{{ subnet_ids[3] }}' + register: result + +- assert: + that: + - result is not changed + - result.subnet_group.description == group_description + - result.subnet_group.name == resource_prefix + - result.subnet_group.vpc_id == vpc.vpc.id + - result.subnet_group.subnet_ids | length == 2 + - subnet_ids[2] in result.subnet_group.subnet_ids + - subnet_ids[3] in result.subnet_group.subnet_ids + +- name: 'Add more subnets subnet group list' + rds_subnet_group: + state: present + name: '{{ resource_prefix }}' + description: '{{ group_description }}' + subnets: + - '{{ subnet_ids[0] }}' + - '{{ subnet_ids[1] }}' + - '{{ subnet_ids[2] }}' + - '{{ subnet_ids[3] }}' + register: result + +- assert: + that: + - result is changed + - result.subnet_group.description == group_description + - result.subnet_group.name == resource_prefix + - result.subnet_group.vpc_id == vpc.vpc.id + - result.subnet_group.subnet_ids | length == 4 + - subnet_ids[0] in result.subnet_group.subnet_ids + - subnet_ids[1] in result.subnet_group.subnet_ids + - subnet_ids[2] in result.subnet_group.subnet_ids + - subnet_ids[3] in result.subnet_group.subnet_ids + +- name: 'Add more members to subnet group list (idempotency)' + rds_subnet_group: + state: present + name: '{{ resource_prefix }}' + description: '{{ group_description }}' + subnets: + - '{{ subnet_ids[0] }}' + - '{{ subnet_ids[1] }}' + - '{{ subnet_ids[2] }}' + - '{{ subnet_ids[3] }}' + register: result + +- assert: + that: + - result is not changed + - result.subnet_group.description == group_description + - result.subnet_group.name == resource_prefix + - result.subnet_group.vpc_id == vpc.vpc.id + - result.subnet_group.subnet_ids | length == 4 + - subnet_ids[0] in result.subnet_group.subnet_ids + - subnet_ids[1] in result.subnet_group.subnet_ids + - subnet_ids[2] in result.subnet_group.subnet_ids + - subnet_ids[3] in result.subnet_group.subnet_ids + +# ============================================================ +# Deletion + +- name: 'Delete a subnet group' + rds_subnet_group: + state: absent + name: '{{ resource_prefix }}' + register: result + +- assert: + that: + - result is changed + +- name: 'Delete a subnet group (idempotency)' + rds_subnet_group: + state: absent + name: '{{ resource_prefix }}' + register: result + +- assert: + that: + - result is not changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/aliases new file mode 100644 index 00000000..a112c3d1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group1 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/defaults/main.yml new file mode 100644 index 00000000..f1cd2cb1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/defaults/main.yml @@ -0,0 +1,6 @@ +--- +# defaults file for test_redshift +redshift_cluster_name: '{{ resource_prefix }}' +reshift_master_password: "th1s_is_A_test" +redshift_master_username: "master_user" +node_type: "dc2.large" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/tasks/main.yml new file mode 100644 index 00000000..83504b29 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/redshift/tasks/main.yml @@ -0,0 +1,357 @@ +--- +# A Note about ec2 environment variable name preference: +# - EC2_URL -> AWS_URL +# - EC2_ACCESS_KEY -> AWS_ACCESS_KEY_ID -> AWS_ACCESS_KEY +# - EC2_SECRET_KEY -> AWS_SECRET_ACCESS_KEY -> AWX_SECRET_KEY +# - EC2_REGION -> AWS_REGION +# + +- module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + block: + + # ============================================================ + - name: test failure with no parameters + redshift: + register: result + ignore_errors: true + + - name: assert failure with no parameters + assert: + that: + - 'result.failed' + - 'result.msg == "missing required arguments: command, identifier"' + + # ============================================================ + - name: test failure with only identifier + redshift: + identifier: '{{ redshift_cluster_name }}' + register: result + ignore_errors: true + + - name: assert failure with only identifier + assert: + that: + - 'result.failed' + - 'result.msg == "missing required arguments: command"' + + # ============================================================ + - name: test create with no identifier + redshift: + command: create + register: result + ignore_errors: true + + - name: assert failure with no identifier + assert: + that: + - 'result.failed' + - 'result.msg == "missing required arguments: identifier"' + + # ============================================================ + - name: test create with missing node_type + redshift: + command: create + identifier: "{{ redshift_cluster_name }}" + register: result + ignore_errors: true + + - name: assert failure with missing node_type + assert: + that: + - 'result.failed' + - 'result.msg == "command is create but all of the following are missing: node_type, username, password"' + + # ============================================================ + + - name: test create with missing password + redshift: + command: create + identifier: "{{ redshift_cluster_name }}" + username: "{{ redshift_master_username }}" + register: result + ignore_errors: true + + - name: assert create failure with missing password + assert: + that: + - 'result.failed' + - 'result.msg == "command is create but all of the following are missing: node_type, password"' + + # ============================================================ + + - name: test create with missing username + redshift: + command: create + identifier: "{{ redshift_cluster_name }}" + password: "{{ reshift_master_password }}" + register: result + ignore_errors: true + + - name: assert create failure with missing username + assert: + that: + - 'result.failed' + - 'result.msg == "command is create but all of the following are missing: node_type, username"' + + # ============================================================ + + - name: test create with default params + redshift: + command: create + identifier: "{{ redshift_cluster_name }}" + username: "{{ redshift_master_username }}" + password: "{{ reshift_master_password }}" + node_type: "{{ node_type }}" + wait: yes + wait_timeout: 1000 + tags: + foo: bar + Tizio: Caio + register: result + - debug: + msg: "{{ result }}" + verbosity: 1 + - name: assert create success + assert: + that: + - 'result.changed' + - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - 'result.cluster.tags.foo == "bar"' + - 'result.cluster.tags.Tizio == "Caio"' + + # ============================================================ + + - name: test create again with default params + redshift: + command: create + identifier: "{{ redshift_cluster_name }}" + username: "{{ redshift_master_username }}" + password: "{{ reshift_master_password }}" + node_type: "{{ node_type }}" + tags: + foo: bar + Tizio: Caio + register: result + + - name: assert no change gets made to the existing cluster + assert: + that: + - 'not result.changed' + - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - 'result.cluster.tags.foo == "bar"' + - 'result.cluster.tags.Tizio == "Caio"' + - 'result.cluster.tags | count() == 2' + + # ============================================================ + + - name: test modify cluster + redshift: + command: modify + identifier: "{{ redshift_cluster_name }}" + new_cluster_identifier: "{{ redshift_cluster_name }}-modified" + enhanced_vpc_routing: True + wait: yes + wait_timeout: 1000 + tags: + foo: bar + register: result + + - name: assert cluster was modified + assert: + that: + - 'result.changed' + - 'result.cluster.identifier == "{{ redshift_cluster_name }}-modified"' + - 'result.cluster.enhanced_vpc_routing == True' + - 'result.cluster.tags | count() == 1' + - 'result.cluster.tags.foo == "bar"' + + # ============================================================ + - name: test delete with no cluster identifier + redshift: + command: delete + register: result + ignore_errors: true + + - name: assert failure with no identifier + assert: + that: + - 'result.failed' + - 'result.msg == "missing required arguments: identifier"' + + # ============================================================ + - name: test delete with no snapshot id + redshift: + command: delete + identifier: "{{ redshift_cluster_name }}" + register: result + ignore_errors: true + + - name: assert failure for no snapshot identifier + assert: + that: + - 'result.failed' + - 'result.msg == "Need to specify final_cluster_snapshot_identifier if skip_final_cluster_snapshot is False"' + + + # ============================================================ + - name: test successful delete + redshift: + command: delete + identifier: "{{ redshift_cluster_name }}-modified" + skip_final_cluster_snapshot: true + wait: yes + wait_timeout: 1200 + register: result + + - name: assert delete + assert: + that: + - 'result.changed' + + # ============================================================ + + - name: test create multi-node cluster with custom db-name + redshift: + command: create + identifier: "{{ redshift_cluster_name }}" + username: "{{ redshift_master_username }}" + password: "{{ reshift_master_password }}" + node_type: "{{ node_type }}" + cluster_type: multi-node + number_of_nodes: 3 + wait: yes + db_name: "integration_test" + wait_timeout: 1800 + register: result + + - name: assert create + assert: + that: + - 'result.changed' + - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - 'result.cluster.db_name == "integration_test"' + + # ============================================================ + + - name: test tag update on existing cluster + redshift: + command: create + identifier: "{{ redshift_cluster_name }}" + username: "{{ redshift_master_username }}" + password: "{{ reshift_master_password }}" + node_type: "{{ node_type }}" + cluster_type: multi-node + number_of_nodes: 3 + wait: yes + db_name: "integration_test" + tags: + foo: bar + wait_timeout: 1800 + register: result + + + - name: assert tags change + assert: + that: + - 'result.changed' + - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - 'result.cluster.db_name == "integration_test"' + - 'result.cluster.tags.foo == "bar"' + + + # ============================================================ + + - name: test purge tags + redshift: + command: create + identifier: "{{ redshift_cluster_name }}" + username: "{{ redshift_master_username }}" + password: "{{ reshift_master_password }}" + node_type: "{{ node_type }}" + cluster_type: multi-node + number_of_nodes: 3 + wait: yes + db_name: "integration_test" + tags: + test1: value1 + purge_tags: false + wait_timeout: 1800 + register: result + + + - name: assert tags change + assert: + that: + - 'result.changed' + - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - 'result.cluster.db_name == "integration_test"' + - 'result.cluster.tags.test1 == "value1"' + - 'result.cluster.tags.foo == "bar"' + - 'result.cluster.tags | count() == 2' + + + + # ============================================================ + + - name: test no change to tags when tags is None + redshift: + command: create + identifier: "{{ redshift_cluster_name }}" + username: "{{ redshift_master_username }}" + password: "{{ reshift_master_password }}" + node_type: "{{ node_type }}" + cluster_type: multi-node + number_of_nodes: 3 + wait: yes + db_name: "integration_test" + wait_timeout: 1800 + register: result + + + - name: assert create + assert: + that: + - 'not result.changed' + - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - 'result.cluster.db_name == "integration_test"' + - 'result.cluster.tags | count() == 2' + + + # ============================================================ + + - name: test successful delete of multi-node cluster + redshift: + command: delete + identifier: "{{ redshift_cluster_name }}" + skip_final_cluster_snapshot: true + wait: yes + wait_timeout: 1200 + register: result + + - name: assert delete + assert: + that: + - 'result.changed' + + always: + + - name: Remove cluster if tests failed + redshift: + command: delete + identifier: "{{ item }}" + skip_final_cluster_snapshot: true + wait: yes + wait_timeout: 1200 + register: cleanup + ignore_errors: yes + retries: 10 + delay: 10 + until: cleanup is success + loop: + - "{{ redshift_cluster_name }}" + - "{{ redshift_cluster_name }}-modified" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/aliases new file mode 100644 index 00000000..f6cc7ad0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/aliases @@ -0,0 +1,3 @@ +route53_info +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/defaults/main.yml new file mode 100644 index 00000000..cc0d3b78 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for route53 tests diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/tasks/main.yml new file mode 100644 index 00000000..de332a7b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/tasks/main.yml @@ -0,0 +1,252 @@ +--- +# tasks file for Route53 integration tests + +- set_fact: + zone_one: '{{ resource_prefix | replace("-", "") }}.one.fakeansible.com.' + zone_two: '{{ resource_prefix | replace("-", "") }}.two.fakeansible.com.' +- debug: msg='Set zones {{ zone_one }} and {{ zone_two }}' + +- name: Test basics (new zone, A and AAAA records) + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + route53: + region: null + block: + - route53_zone: + zone: '{{ zone_one }}' + comment: Created in Ansible test {{ resource_prefix }} + register: z1 + + - assert: + that: + - z1 is success + - z1 is changed + - "z1.comment == 'Created in Ansible test {{ resource_prefix }}'" + + - name: Get zone details + route53_info: + query: hosted_zone + hosted_zone_id: '{{ z1.zone_id }}' + hosted_zone_method: details + register: hosted_zones + + - name: Assert newly created hosted zone only has NS and SOA records + assert: + that: + - hosted_zones.HostedZone.ResourceRecordSetCount == 2 + + - name: Create A record using zone fqdn + route53: + state: present + zone: '{{ zone_one }}' + record: 'qdn_test.{{ zone_one }}' + type: A + value: 1.2.3.4 + register: qdn + - assert: + that: + - qdn is not failed + - qdn is changed + + - name: Create same A record using zone non-qualified domain + route53: + state: present + zone: '{{ zone_one[:-1] }}' + record: 'qdn_test.{{ zone_one[:-1] }}' + type: A + value: 1.2.3.4 + register: non_qdn + - assert: + that: + - non_qdn is not failed + - non_qdn is not changed + + - name: Create A record using zone ID + route53: + state: present + hosted_zone_id: '{{ z1.zone_id }}' + record: 'zid_test.{{ zone_one }}' + type: A + value: 1.2.3.4 + register: zid + - assert: + that: + - zid is not failed + - zid is changed + + - name: Create a multi-value A record with values in different order + route53: + state: present + zone: '{{ zone_one }}' + record: 'order_test.{{ zone_one }}' + type: A + value: + - 4.5.6.7 + - 1.2.3.4 + register: mv_a_record + - assert: + that: + - mv_a_record is not failed + - mv_a_record is changed + + - name: Create same multi-value A record with values in different order + route53: + state: present + zone: '{{ zone_one }}' + record: 'order_test.{{ zone_one }}' + type: A + value: + - 4.5.6.7 + - 1.2.3.4 + register: mv_a_record + - assert: + that: + - mv_a_record is not failed + - mv_a_record is not changed + + - name: get Route53 A record information + route53_info: + type: A + query: record_sets + hosted_zone_id: '{{ z1.zone_id }}' + start_record_name: 'order_test.{{ zone_one }}' + max_items: 50 + register: records + - assert: + that: + - records.ResourceRecordSets|length == 3 + - records.ResourceRecordSets[0].ResourceRecords|length == 2 + - records.ResourceRecordSets[0].ResourceRecords[0].Value == "4.5.6.7" + - records.ResourceRecordSets[0].ResourceRecords[1].Value == "1.2.3.4" + + - name: Remove a member from multi-value A record with values in different order + route53: + state: present + zone: '{{ zone_one }}' + record: 'order_test.{{ zone_one }}' + type: A + value: + - 4.5.6.7 + register: del_a_record + ignore_errors: true + - name: This should fail, because `overwrite` is false + assert: + that: + - del_a_record is failed + + - name: Remove a member from multi-value A record with values in different order + route53: + state: present + zone: '{{ zone_one }}' + record: 'order_test.{{ zone_one }}' + overwrite: true + type: A + value: + - 4.5.6.7 + register: del_a_record + ignore_errors: true + - name: This should not fail, because `overwrite` is true + assert: + that: + - del_a_record is not failed + - del_a_record is changed + + - name: get Route53 zone A record information + route53_info: + type: A + query: record_sets + hosted_zone_id: '{{ z1.zone_id }}' + start_record_name: 'order_test.{{ zone_one }}' + max_items: 50 + register: records + - assert: + that: + - records.ResourceRecordSets|length == 3 + - records.ResourceRecordSets[0].ResourceRecords|length == 1 + - records.ResourceRecordSets[0].ResourceRecords[0].Value == "4.5.6.7" + + - name: Create a LetsEncrypt CAA record + route53: + state: present + zone: '{{ zone_one }}' + record: '{{ zone_one }}' + type: CAA + value: + - 0 issue "letsencrypt.org;" + - 0 issuewild "letsencrypt.org;" + overwrite: true + register: caa + - assert: + that: + - caa is not failed + - caa is changed + + - name: Re-create the same LetsEncrypt CAA record + route53: + state: present + zone: '{{ zone_one }}' + record: '{{ zone_one }}' + type: CAA + value: + - 0 issue "letsencrypt.org;" + - 0 issuewild "letsencrypt.org;" + overwrite: true + register: caa + - assert: + that: + - caa is not failed + - caa is not changed + + - name: Re-create the same LetsEncrypt CAA record in opposite-order + route53: + state: present + zone: '{{ zone_one }}' + record: '{{ zone_one }}' + type: CAA + value: + - 0 issuewild "letsencrypt.org;" + - 0 issue "letsencrypt.org;" + overwrite: true + register: caa + - name: This should not be changed, as CAA records are not order sensitive + assert: + that: + - caa is not failed + - caa is not changed + + + always: + - route53_info: + query: record_sets + hosted_zone_id: '{{ z1.zone_id }}' + register: z1_records + - debug: var=z1_records + - name: Loop over A/AAAA/CNAME records and delete them + route53: + state: absent + zone: '{{ zone_one }}' + record: '{{ item.Name }}' + type: '{{ item.Type }}' + value: '{{ item.ResourceRecords | map(attribute="Value") | join(",") }}' + loop: '{{ z1_records.ResourceRecordSets | selectattr("Type", "in", ["A", "AAAA", "CNAME", "CAA"]) | list }}' + - name: Delete test zone one '{{ zone_one }}' + route53_zone: + state: absent + zone: '{{ zone_one }}' + register: delete_one + ignore_errors: yes + retries: 10 + until: delete_one is not failed + - name: Delete test zone two '{{ zone_two }}' + route53_zone: + state: absent + zone: '{{ zone_two }}' + register: delete_two + ignore_errors: yes + retries: 10 + until: delete_two is not failed + when: false diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/vars/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/vars/main.yml new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53/vars/main.yml diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53_zone/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53_zone/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53_zone/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53_zone/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53_zone/tasks/main.yml new file mode 100644 index 00000000..f6baa68f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/route53_zone/tasks/main.yml @@ -0,0 +1,396 @@ +--- +- name: route53_zone tests + collections: + - amazon.aws + block: + + # ============================================================ + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: true + + - name: Create VPC for use in testing + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.22.32.0/23 + tags: + Name: Ansible ec2_instance Testing VPC + tenancy: default + <<: *aws_connection_info + register: testing_vpc + + # ============================================================ + - name: Create a public zone + route53_zone: + zone: "{{ resource_prefix }}.public" + comment: original comment + state: present + <<: *aws_connection_info + register: output + + - assert: + that: + - output.changed + - output.comment == 'original comment' + - output.name == '{{ resource_prefix }}.public.' + - not output.private_zone + + # ============================================================ + - name: Create a public zone (CHECK MODE) + route53_zone: + zone: "{{ resource_prefix }}.check.public" + comment: original comment + state: present + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - output.changed + - output.comment == 'original comment' + - output.name == '{{ resource_prefix }}.check.public.' + - not output.private_zone + + # ============================================================ + - name: Do an idemptotent update of a public zone + route53_zone: + zone: "{{ resource_prefix }}.public" + comment: original comment + state: present + <<: *aws_connection_info + register: output + + - assert: + that: + - not output.changed + - output.comment == 'original comment' + - output.name == '{{ resource_prefix }}.public.' + - not output.private_zone + + - name: Do an idemptotent update of a public zone (CHECK MODE) + route53_zone: + zone: "{{ resource_prefix }}.public" + comment: original comment + state: present + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - not output.changed + - output.comment == 'original comment' + - output.name == '{{ resource_prefix }}.public.' + - not output.private_zone + + # ============================================================ + - name: Update comment of a public zone + route53_zone: + zone: "{{ resource_prefix }}.public" + comment: updated comment + state: present + <<: *aws_connection_info + register: output + + - assert: + that: + - output.changed + - output.result.comment == "updated comment" + + - name: Update comment of a public zone (CHECK MODE) + route53_zone: + zone: "{{ resource_prefix }}.public" + comment: updated comment for check + state: present + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - output.changed + - output.result.comment == "updated comment for check" + + # ============================================================ + - name: Delete public zone (CHECK MODE) + route53_zone: + zone: "{{ resource_prefix }}.public" + state: absent + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - output.changed + - "'Successfully deleted' in output.result" + + - name: Delete public zone + route53_zone: + zone: "{{ resource_prefix }}.public" + state: absent + <<: *aws_connection_info + register: output + + - assert: + that: + - output.changed + - "'Successfully deleted' in output.result" + + # ============================================================ + - name: Create a private zone (CHECK MODE) + route53_zone: + vpc_id: "{{ testing_vpc.vpc.id }}" + vpc_region: "{{ aws_region }}" + zone: "{{ resource_prefix }}.private" + comment: original comment + state: present + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - output.changed + + - name: Create a private zone + route53_zone: + vpc_id: "{{ testing_vpc.vpc.id }}" + vpc_region: "{{ aws_region }}" + zone: "{{ resource_prefix }}.private" + comment: original comment + state: present + <<: *aws_connection_info + register: output + + - assert: + that: + - output.changed + # ============================================================ + - name: Idemptotent update a private zone + route53_zone: + vpc_id: "{{ testing_vpc.vpc.id }}" + vpc_region: "{{ aws_region }}" + zone: "{{ resource_prefix }}.private" + comment: original comment + state: present + <<: *aws_connection_info + register: output + + - assert: + that: + - not output.changed + - "'There is already a private hosted zone in the same region with the same VPC' in output.msg" + + - name: Idemptotent update a private zone (CHECK MODE) + route53_zone: + vpc_id: "{{ testing_vpc.vpc.id }}" + vpc_region: "{{ aws_region }}" + zone: "{{ resource_prefix }}.private" + comment: original comment + state: present + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - not output.changed + - "'There is already a private hosted zone in the same region with the same VPC' in output.msg" + + # ============================================================ + - name: Update private zone comment + route53_zone: + vpc_id: "{{ testing_vpc.vpc.id }}" + vpc_region: "{{ aws_region }}" + zone: "{{ resource_prefix }}.private" + comment: updated_comment + state: present + <<: *aws_connection_info + register: output + + - assert: + that: + - output.changed + - output.result.comment == "updated_comment" + + - name: Update private zone comment (CHECK MODE) + route53_zone: + vpc_id: "{{ testing_vpc.vpc.id }}" + vpc_region: "{{ aws_region }}" + zone: "{{ resource_prefix }}.private" + comment: updated_comment check + state: present + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - output.changed + - output.result.comment == "updated_comment check" + + # ============================================================ + - name: Try to delete private zone without setting vpc_id and vpc_region + route53_zone: + zone: "{{ resource_prefix }}.private" + state: absent + <<: *aws_connection_info + register: output + + - assert: + that: + - not output.changed + - "output.result == 'No zone to delete.'" + + - name: Try to delete private zone without setting vpc_id and vpc_region (CHECK MODE) + route53_zone: + zone: "{{ resource_prefix }}.private" + state: absent + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - not output.changed + - "output.result == 'No zone to delete.'" + + # ============================================================ + - name: Try to delete a public zone that does not exists + route53_zone: + zone: "{{ resource_prefix }}.publicfake" + comment: original comment + state: absent + <<: *aws_connection_info + register: output + + - assert: + that: + - not output.changed + - "output.result == 'No zone to delete.'" + + - name: Try to delete a public zone that does not exists (CHECK MODE) + route53_zone: + zone: "{{ resource_prefix }}.publicfake" + comment: original comment + state: absent + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - not output.changed + - "output.result == 'No zone to delete.'" + + # ============================================================ + - name: Delete private zone (CHECK MODE) + route53_zone: + vpc_id: "{{ testing_vpc.vpc.id }}" + vpc_region: "{{ aws_region }}" + zone: "{{ resource_prefix }}.private" + state: absent + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - output.changed + - "'Successfully deleted' in output.result" + + - name: Delete private zone + route53_zone: + vpc_id: "{{ testing_vpc.vpc.id }}" + vpc_region: "{{ aws_region }}" + zone: "{{ resource_prefix }}.private" + state: absent + <<: *aws_connection_info + register: output + + - assert: + that: + - output.changed + - "'Successfully deleted' in output.result" + + # ============================================================ + - name: Create a public zone + route53_zone: + zone: "{{ resource_prefix }}.public2" + comment: this is an example + state: present + <<: *aws_connection_info + register: new_zone + + # Delete zone using its id + - name: Delete zone using attribute hosted_zone_id (CHECK MODE) + route53_zone: + zone: "{{ resource_prefix }}.public2" + hosted_zone_id: "{{new_zone.zone_id}}" + state: absent + <<: *aws_connection_info + register: output + check_mode: yes + + - assert: + that: + - output.changed + - "'Successfully deleted' in output.result" + + - name: Delete zone using attribute hosted_zone_id + route53_zone: + zone: "{{ resource_prefix }}.public2" + hosted_zone_id: "{{new_zone.zone_id}}" + state: absent + <<: *aws_connection_info + register: output + + - assert: + that: + - output.changed + - "'Successfully deleted' in output.result" + + # ============================================================ + always: + - name: Ensure public zone is deleted + route53_zone: + zone: "{{ item }}" + state: absent + <<: *aws_connection_info + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + with_items: + - "{{ resource_prefix }}.public" + - "{{ resource_prefix }}.public2" + + - name: Ensure private zone is deleted + route53_zone: + vpc_id: "{{ testing_vpc.vpc.id }}" + vpc_region: "{{ aws_region }}" + zone: "{{ resource_prefix }}.private" + state: absent + <<: *aws_connection_info + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 + + - name: remove the VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + cidr_block: 10.22.32.0/23 + state: absent + <<: *aws_connection_info + register: removed + until: removed is not failed + ignore_errors: yes + retries: 10 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/defaults/main.yml new file mode 100644 index 00000000..ad2a4c68 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/defaults/main.yml @@ -0,0 +1,10 @@ +--- +# defaults file for s3_bucket_notifications integration test +lambda_function_name: '{{ resource_prefix }}' +# IAM role names have to be less than 64 characters +# The 8 digit identifier at the end of resource_prefix helps determine during +# which test something was created and allows tests to be run in parallel +# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases +# we need both sets of digits to keep the resource name unique +unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +lambda_role_name: 'ansible-test-{{ unique_id }}-s3-notifications' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/files/lambda-trust-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/files/lambda-trust-policy.json new file mode 100644 index 00000000..fb84ae9d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/files/lambda-trust-policy.json @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/files/mini_lambda.py b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/files/mini_lambda.py new file mode 100644 index 00000000..d0d08dae --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/files/mini_lambda.py @@ -0,0 +1,13 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + + +def lambda_handler(event, context): + return { + 'statusCode': 200, + 'body': json.dumps('Hello from Lambda!') + } diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/tasks/main.yml new file mode 100644 index 00000000..38ef3bb2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/tasks/main.yml @@ -0,0 +1,326 @@ +- name: test add s3 bucket notification + collections: + - amazon.aws + - community.general + module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + block: + - name: create minimal lambda role + iam_role: + name: '{{ lambda_role_name }}' + assume_role_policy_document: '{{ lookup("file", "lambda-trust-policy.json") }}' + create_instance_profile: false + managed_policies: + - 'arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess' + register: iam_role + - name: pause if role was created + pause: + seconds: 10 + when: iam_role is changed + - name: move lambda into place for archive module + copy: + src: mini_lambda.py + dest: '{{ output_dir }}/mini_lambda.py' + mode: preserve + - name: bundle lambda into a zip + register: function_res + archive: + format: zip + path: '{{ output_dir }}/mini_lambda.py' + dest: '{{ output_dir }}/mini_lambda.zip' + - name: register bucket + s3_bucket: + name: '{{resource_prefix}}-bucket' + state: present + register: bucket_info + - name: register lambda + lambda: + name: '{{resource_prefix}}-lambda' + state: present + role: '{{ lambda_role_name }}' + runtime: python3.7 + zip_file: '{{function_res.dest}}' + handler: lambda_function.lambda_handler + memory_size: '128' + timeout: '30' + register: lambda_info + - name: register notification without invoke permissions + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:* + - s3:ObjectRemoved:* + prefix: images/ + suffix: .jpg + register: result + ignore_errors: true + - name: assert nice message returned + assert: + that: + - result is failed + - result.msg != 'MODULE FAILURE' + - name: Add invocation permission of Lambda function on AWS + lambda_policy: + function_name: '{{ lambda_info.configuration.function_arn }}' + statement_id: allow_lambda_invoke + action: lambda:InvokeFunction + principal: s3.amazonaws.com + source_arn: arn:aws:s3:::{{bucket_info.name}} + - name: register s3 bucket notification + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:* + - s3:ObjectRemoved:* + prefix: images/ + suffix: .jpg + register: result + - name: assert result.changed == True + assert: + that: + - result.changed == True + - name: test check_mode without change + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:* + - s3:ObjectRemoved:* + prefix: images/ + suffix: .jpg + register: result + check_mode: true + - name: assert result.changed == False + assert: + that: + - result.changed == False + - name: test check_mode change events + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:* + prefix: images/ + suffix: .jpg + register: result + check_mode: true + - name: assert result.changed == True + assert: + that: + - result.changed == True + - name: test that check_mode didn't change events + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:* + - s3:ObjectRemoved:* + prefix: images/ + suffix: .jpg + register: result + - name: assert result.changed == False + assert: + that: + - result.changed == False + - name: test mutually exclusive parameters + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:Post + prefix: photos/ + suffix: .gif + lambda_version: 0 + lambda_alias: 0 + register: result + ignore_errors: true + - name: assert task failed + assert: + that: + - result is failed + - 'result.msg == ''parameters are mutually exclusive: lambda_alias|lambda_version''' + - name: test configuration change on suffix + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:* + - s3:ObjectRemoved:* + prefix: images/ + suffix: .gif + register: result + - name: assert result.changed == True + assert: + that: + - result.changed == True + - name: test configuration change on prefix + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:* + - s3:ObjectRemoved:* + prefix: photos/ + suffix: .gif + register: result + - name: assert result.changed == True + assert: + that: + - result.changed == True + - name: test configuration change on new events added + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:* + - s3:ObjectRemoved:* + - s3:ObjectRestore:Post + prefix: photos/ + suffix: .gif + register: result + - name: assert result.changed == True + assert: + that: + - result.changed == True + - name: test configuration change on events removed + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:Post + prefix: photos/ + suffix: .gif + register: result + - name: assert result.changed == True + assert: + that: + - result.changed == True + - name: change events + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:* + - s3:ObjectRemoved:* + - s3:ObjectRestore:Post + prefix: photos/ + suffix: .gif + register: result + - name: test that event order does not matter + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectRestore:Post + - s3:ObjectRemoved:* + - s3:ObjectCreated:* + prefix: photos/ + suffix: .gif + register: result + - name: assert result.changed == False + assert: + that: + - result.changed == False + - name: test that configuration is the same as previous task + s3_bucket_notification: + state: present + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' + events: + - s3:ObjectCreated:* + - s3:ObjectRemoved:* + - s3:ObjectRestore:Post + prefix: photos/ + suffix: .gif + register: result + - name: assert result.changed == False + assert: + that: + - result.changed == False + - name: test remove notification + s3_bucket_notification: + state: absent + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + register: result + - name: assert result.changed == True + assert: + that: + - result.changed == True + - name: test that events is already removed + s3_bucket_notification: + state: absent + event_name: '{{resource_prefix}}-on_file_add_or_remove' + bucket_name: '{{resource_prefix}}-bucket' + register: result + - name: assert result.changed == False + assert: + that: + - result.changed == False + always: + - name: clean-up bucket + s3_bucket: + name: '{{resource_prefix}}-bucket' + state: absent + ignore_errors: true + - name: clean-up lambda + lambda: + name: '{{resource_prefix}}-lambda' + state: absent + ignore_errors: true + - name: cleam-up role + iam_role: + name: '{{ lambda_role_name }}' + state: absent + ignore_errors: true + +- block: + - name: test with no parameters except state absent + s3_bucket_notification: state=absent + register: result + ignore_errors: true + - name: assert failure when called with no parameters + assert: + that: + - result.failed + - '"missing required arguments" in result.msg' + - name: test abesnt + s3_bucket_notification: state=absent + register: result + ignore_errors: true + - name: assert failure when called with no parameters + assert: + that: + - result.failed + - '"missing required arguments" in result.msg' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_lifecycle/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_lifecycle/aliases new file mode 100644 index 00000000..0cc87f1a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_lifecycle/aliases @@ -0,0 +1,3 @@ +cloud/aws +shippable/aws/group1 +disabled diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_lifecycle/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_lifecycle/tasks/main.yml new file mode 100644 index 00000000..f6dc2ab3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_lifecycle/tasks/main.yml @@ -0,0 +1,435 @@ +--- + +- block: + + # ============================================================ + - name: set connection information for all tasks + set_fact: + aws_connection_info: &aws_connection_info + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + no_log: true + + # ============================================================ + - name: Create simple s3_bucket + s3_bucket: + name: "{{ resource_prefix }}-testbucket-ansible" + state: present + <<: *aws_connection_info + register: output + + - assert: + that: + - output.changed + - output.name == '{{ resource_prefix }}-testbucket-ansible' + - not output.requester_pays + # ============================================================ + - name: Create a lifecycle policy + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + expiration_days: 300 + prefix: '' + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Create a lifecycle policy (idempotency) + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + expiration_days: 300 + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Create a second lifecycle policy + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + transition_days: 30 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Create a second lifecycle policy (idempotency) + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + transition_days: 30 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Disable the second lifecycle policy + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + status: disabled + transition_days: 30 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Disable the second lifecycle policy (idempotency) + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + status: disabled + transition_days: 30 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Re-enable the second lifecycle policy + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + status: enabled + transition_days: 300 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Re-enable the second lifecycle policy (idempotency) + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + status: enabled + transition_days: 300 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Delete the second lifecycle policy + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + state: absent + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Delete the second lifecycle policy (idempotency) + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + state: absent + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Create a second lifecycle policy, with infrequent access + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + transition_days: 30 + storage_class: standard_ia + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Create a second lifecycle policy, with infrequent access (idempotency) + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + storage_class: standard_ia + transition_days: 30 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Create a second lifecycle policy, with glacier + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + transition_days: 300 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Create a second lifecycle policy, with glacier (idempotency) + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + transition_days: 300 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Create a lifecycle policy with infrequent access + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + transition_days: 30 + storage_class: standard_ia + prefix: /something + <<: *aws_connection_info + register: output + + - name: Create a second lifecycle policy, with glacier + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + transition_days: 300 + prefix: /something + purge_transitions: false + <<: *aws_connection_info + register: output + + - name: Create a lifecycle policy with infrequent access (idempotency) + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + storage_class: standard_ia + transition_days: 30 + prefix: /something + purge_transitions: false + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + + - name: Create a second lifecycle policy, with glacier (idempotency) + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + transition_days: 300 + prefix: /something + purge_transitions: false + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Create a lifecycle policy, with noncurrent expiration + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + noncurrent_version_expiration_days: 300 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Create a lifecycle policy, with noncurrent expiration + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + noncurrent_version_expiration_days: 300 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Create a lifecycle policy, with noncurrent transition + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + noncurrent_version_transition_days: 300 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Create a lifecycle policy, with noncurrent transitions and expirations + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + noncurrent_version_transition_days: 300 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Create a lifecycle policy, with noncurrent transition + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + noncurrent_version_transition_days: 300 + noncurrent_version_storage_class: standard_ia + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Create a lifecycle policy, with noncurrent transitions and expirations + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + noncurrent_version_storage_class: standard_ia + noncurrent_version_transition_days: 300 + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + - name: Create a lifecycle policy, with noncurrent transitions + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + noncurrent_version_transitions: + - transition_days: 30 + storage_class: standard_ia + - transition_days: 60 + storage_class: onezone_ia + - transition_days: 90 + storage_class: glacier + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is changed + # ============================================================ + - name: Create a lifecycle policy, with noncurrent transitions + s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + noncurrent_version_transitions: + - transition_days: 30 + storage_class: standard_ia + - transition_days: 60 + storage_class: onezone_ia + - transition_days: 90 + storage_class: glacier + prefix: /something + <<: *aws_connection_info + register: output + + - assert: + that: + - output is not changed + # ============================================================ + # test all the examples + # Configure a lifecycle rule on a bucket to expire (delete) items with a prefix of /logs/ after 30 days + - s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + expiration_days: 30 + prefix: /logs/ + status: enabled + <<: *aws_connection_info + state: present + + # Configure a lifecycle rule to transition all items with a prefix of /logs/ to glacier after 7 days and then delete after 90 days + - s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + transition_days: 7 + expiration_days: 90 + prefix: /logs/ + status: enabled + <<: *aws_connection_info + state: present + + # Configure a lifecycle rule to transition all items with a prefix of /logs/ to glacier on 31 Dec 2020 and then delete on 31 Dec 2030. + # Note that midnight GMT must be specified. + # Be sure to quote your date strings + - s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + transition_date: "2020-12-30T00:00:00.000Z" + expiration_date: "2030-12-30T00:00:00.000Z" + prefix: /logs/ + status: enabled + <<: *aws_connection_info + state: present + + # Disable the rule created above + - s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + prefix: /logs/ + status: disabled + <<: *aws_connection_info + state: present + + # Delete the lifecycle rule created above + - s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + <<: *aws_connection_info + prefix: /logs/ + state: absent + + # Configure a lifecycle rule to transition all backup files older than 31 days in /backups/ to standard infrequent access class. + - s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + prefix: /backups/ + storage_class: standard_ia + transition_days: 31 + state: present + <<: *aws_connection_info + status: enabled + + # Configure a lifecycle rule to transition files to infrequent access after 30 days and glacier after 90 + - s3_lifecycle: + name: "{{ resource_prefix }}-testbucket-ansible" + prefix: /other_logs/ + state: present + <<: *aws_connection_info + status: enabled + transitions: + - transition_days: 30 + storage_class: standard_ia + - transition_days: 90 + storage_class: glacier + # ============================================================ + always: + - name: Ensure all buckets are deleted + s3_bucket: + name: "{{item}}" + state: absent + <<: *aws_connection_info + ignore_errors: yes + with_items: + - "{{ resource_prefix }}-testbucket-ansible" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_logging/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_logging/aliases new file mode 100644 index 00000000..3431a6a5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_logging/aliases @@ -0,0 +1,4 @@ +cloud/aws +#shippable/aws/group1 +# when running tests we saw an ~20% failure rate +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_logging/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_logging/defaults/main.yml new file mode 100644 index 00000000..a0f9b7b3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_logging/defaults/main.yml @@ -0,0 +1,4 @@ +--- +test_bucket: '{{ resource_prefix }}-testbucket' +log_bucket_1: '{{ resource_prefix }}-logs-1' +log_bucket_2: '{{ resource_prefix }}-logs-2' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_logging/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_logging/tasks/main.yml new file mode 100644 index 00000000..3e7ffc7c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_logging/tasks/main.yml @@ -0,0 +1,205 @@ +--- +# Integration tests for s3_logging +# +# Notes: +# - s3_logging doesn't support check_mode and the only output is 'changed' +# - During initial testing we hit issues with boto reporting +# "You must give the log-delivery group WRITE and READ_ACP permissions +# to the target bucket" +# a long term solution might be to port s3_logging to AnsibleAWSModule +# so we can add retries +# +- module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key | default(omit) }}' + aws_secret_key: '{{ aws_secret_key | default(omit) }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region | default(omit) }}' + collections: + - amazon.aws + block: + + # ============================================================ + + - name: Try to enable logging without providing target_bucket + s3_logging: + state: present + name: '{{ test_bucket }}' + register: result + ignore_errors: yes + + - assert: + that: + - result is failed + + # ============================================================ + - name: Create simple s3_bucket to be logged + s3_bucket: + state: present + name: '{{ test_bucket }}' + register: output + + - assert: + that: + - output is changed + - output.name == test_bucket + + - name: Create simple s3_bucket as target for logs + s3_bucket: + state: present + name: '{{ log_bucket_1 }}' + register: output + + - assert: + that: + - output is changed + - output.name == log_bucket_1 + + - name: Create simple s3_bucket as second target for logs + s3_bucket: + state: present + name: '{{ log_bucket_2 }}' + register: output + + - assert: + that: + - output is changed + - output.name == log_bucket_2 + +# ============================================================ + + - name: Enable logging + s3_logging: + state: present + name: '{{ test_bucket }}' + target_bucket: '{{ log_bucket_1 }}' + register: result + + - assert: + that: + - result is changed + + - name: Enable logging idempotency + s3_logging: + state: present + name: '{{ test_bucket }}' + target_bucket: '{{ log_bucket_1 }}' + register: result + + - assert: + that: + - result is not changed + +# ============================================================ + + - name: Change logging bucket + s3_logging: + state: present + name: '{{ test_bucket }}' + target_bucket: '{{ log_bucket_2 }}' + register: result + + - assert: + that: + - result is changed + + - name: Change logging bucket idempotency + s3_logging: + state: present + name: '{{ test_bucket }}' + target_bucket: '{{ log_bucket_2 }}' + register: result + + - assert: + that: + - result is not changed + +# ============================================================ + + - name: Change logging prefix + s3_logging: + state: present + name: '{{ test_bucket }}' + target_bucket: '{{ log_bucket_2 }}' + target_prefix: '/{{ resource_prefix }}/' + register: result + + - assert: + that: + - result is changed + + - name: Change logging prefix idempotency + s3_logging: + state: present + name: '{{ test_bucket }}' + target_bucket: '{{ log_bucket_2 }}' + target_prefix: '/{{ resource_prefix }}/' + register: result + + - assert: + that: + - result is not changed + +# ============================================================ + + - name: Remove logging prefix + s3_logging: + state: present + name: '{{ test_bucket }}' + target_bucket: '{{ log_bucket_2 }}' + register: result + + - assert: + that: + - result is changed + + - name: Remove logging prefix idempotency + s3_logging: + state: present + name: '{{ test_bucket }}' + target_bucket: '{{ log_bucket_2 }}' + register: result + + - assert: + that: + - result is not changed + +# ============================================================ + + - name: Disable logging + s3_logging: + state: absent + name: '{{ test_bucket }}' + register: result + + - assert: + that: + - result is changed + + - name: Disable logging idempotency + s3_logging: + state: absent + name: '{{ test_bucket }}' + register: result + + - assert: + that: + - result is not changed + +# ============================================================ + always: + - name: Delete bucket being logged + s3_bucket: + name: '{{ test_bucket }}' + state: absent + ignore_errors: yes + - name: Delete first bucket containing logs + s3_bucket: + name: '{{ log_bucket_1 }}' + state: absent + ignore_errors: yes + - name: Delete second bucket containing logs + s3_bucket: + name: '{{ log_bucket_2 }}' + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/aliases new file mode 100644 index 00000000..fd132af5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group1
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/defaults/main.yml new file mode 100644 index 00000000..844e5cc2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/defaults/main.yml @@ -0,0 +1,2 @@ +--- +test_bucket: '{{ resource_prefix }}-testbucket' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/tasks/main.yml new file mode 100644 index 00000000..ba5cce9e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/tasks/main.yml @@ -0,0 +1,243 @@ +--- +# Integration tests for s3_metrics_configuration +# +# Notes: +# - The module only outputs 'changed' since its very simple +# +- module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key | default(omit) }}' + aws_secret_key: '{{ aws_secret_key | default(omit) }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region | default(omit) }}' + collections: + - amazon.aws + block: + + # TODO: Until there's a module to get info s3 metrics configuration, awscli is needed + - name: Install awscli + pip: + state: present + name: awscli + + # ============================================================ + - name: Try to create metrics configuration for non-existing bucket + s3_metrics_configuration: + bucket_name: '{{ test_bucket }}' + id: 'EntireBucket' + state: present + register: result + ignore_errors: yes + + - assert: + that: + - result is failed + + # ============================================================ + - name: Create simple s3_bucket to act upon it + s3_bucket: + name: '{{ test_bucket }}' + state: present + register: output + + - assert: + that: + - output is changed + - output.name == test_bucket + + # ============================================================ + - name: Create a metrics configuration under check mode + s3_metrics_configuration: + bucket_name: '{{ test_bucket }}' + id: 'EntireBucket' + state: present + check_mode: yes + register: result + + - include_tasks: './s3_metrics_info.yml' + + - assert: + that: + - result is changed + - metrics_info | selectattr('Id', 'search', 'EntireBucket') | list | length == 0 + + # ============================================================ + - name: Create a metrics configuration that enables metrics for an entire bucket + s3_metrics_configuration: + bucket_name: '{{ test_bucket }}' + id: 'EntireBucket' + state: present + register: result + + - include_tasks: './s3_metrics_info.yml' + + - assert: + that: + - result is changed + - metrics_info | selectattr('Id', 'search', 'EntireBucket') | list | length == 1 + + # ============================================================ + - name: Create a metrics configuration idempotency under check mode + s3_metrics_configuration: + bucket_name: '{{ test_bucket }}' + id: 'EntireBucket' + state: present + check_mode: yes + register: result + + - assert: + that: + - result is not changed + + # ============================================================ + - name: Create a metrics configuration idempotency + s3_metrics_configuration: + bucket_name: '{{ test_bucket }}' + id: 'EntireBucket' + state: present + register: result + + - assert: + that: + - result is not changed + + # ============================================================ + - name: Put a metrics configuration that enables metrics for objects starting with a prefix + s3_metrics_configuration: + bucket_name: "{{ test_bucket }}" + id: Assets + filter_prefix: assets + state: present + register: result + + - include_tasks: './s3_metrics_info.yml' + + - assert: + that: + - result is changed + - (metrics_info | selectattr('Id', 'search', 'Assets') | list | first).Filter.Prefix == 'assets' + + # ============================================================ + - name: Update existing metrics configuration under check mode + s3_metrics_configuration: + bucket_name: "{{ test_bucket }}" + id: Assets + filter_tag: + kind: Asset + state: present + check_mode: yes + register: result + + - include_tasks: './s3_metrics_info.yml' + + - assert: + that: + - result is changed + - (metrics_info | selectattr('Id', 'search', 'Assets') | list | first).Filter.Prefix == 'assets' + - (metrics_info | selectattr('Id', 'search', 'Assets') | list | first).Filter.Tag is not defined + + # ============================================================ + - name: Update existing metrics configuration and enable metrics for objects with specific tag + s3_metrics_configuration: + bucket_name: "{{ test_bucket }}" + id: Assets + filter_tag: + kind: Asset + state: present + register: result + + - include_tasks: './s3_metrics_info.yml' + + - assert: + that: + - result is changed + - (metrics_info | selectattr('Id', 'search', 'Assets') | list | first).Filter.Prefix is not defined + - (metrics_info | selectattr('Id', 'search', 'Assets') | list | first).Filter.Tag.Key == 'kind' + - (metrics_info | selectattr('Id', 'search', 'Assets') | list | first).Filter.Tag.Value == 'Asset' + + # ============================================================ + - name: Put a metrics configuration that enables metrics for objects that start with a particular prefix and have specific tags applied + s3_metrics_configuration: + bucket_name: "{{ test_bucket }}" + id: ImportantBlueDocuments + filter_prefix: documents + filter_tags: + priority: High + class: Blue + state: present + register: result + + - include_tasks: './s3_metrics_info.yml' + + - assert: + that: + - result is changed + - (metrics_info | selectattr('Id', 'search', 'ImportantBlueDocuments') | list | first).Filter.And.Prefix == 'documents' + - (metrics_info | selectattr('Id', 'search', 'ImportantBlueDocuments') | list | first).Filter.And.Tags[0].Key == 'priority' + - (metrics_info | selectattr('Id', 'search', 'ImportantBlueDocuments') | list | first).Filter.And.Tags[0].Value == 'High' + - (metrics_info | selectattr('Id', 'search', 'ImportantBlueDocuments') | list | first).Filter.And.Tags[1].Key == 'class' + - (metrics_info | selectattr('Id', 'search', 'ImportantBlueDocuments') | list | first).Filter.And.Tags[1].Value == 'Blue' + + # ============================================================ + - name: Delete metrics configuration in check mode + s3_metrics_configuration: + bucket_name: '{{ test_bucket }}' + id: 'EntireBucket' + state: absent + check_mode: yes + register: result + + - include_tasks: './s3_metrics_info.yml' + + - assert: + that: + - result is changed + - metrics_info | selectattr('Id', 'search', 'EntireBucket') | list | length == 1 # still present + + # ============================================================ + - name: Delete metrics configuration + s3_metrics_configuration: + bucket_name: '{{ test_bucket }}' + id: 'EntireBucket' + state: absent + register: result + + - include_tasks: './s3_metrics_info.yml' + + - assert: + that: + - result is changed + - metrics_info | selectattr('Id', 'search', 'EntireBucket') | list | length == 0 + + # ============================================================ + - name: Try to delete non-existing metrics configuration + s3_metrics_configuration: + bucket_name: '{{ test_bucket }}' + id: 'EntireBucket' + state: absent + register: result + + - assert: + that: + - result is not changed + + # ============================================================ + - name: Try to delete metrics configuration for non-existing bucket + s3_metrics_configuration: + bucket_name: '{{ test_bucket }}-non-existing' + id: 'EntireBucket' + state: absent + register: result + ignore_errors: yes + + - assert: + that: + - result is failed + + # ============================================================ + always: + - name: Delete test bucket + s3_bucket: + name: '{{ test_bucket }}' + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/tasks/s3_metrics_info.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/tasks/s3_metrics_info.yml new file mode 100644 index 00000000..cca7cad0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_metrics_configuration/tasks/s3_metrics_info.yml @@ -0,0 +1,16 @@ +--- +# Utility tasks to list bucket metrics configurations +# TODO: Update this when an s3_metrics_configuration_info module exists +- name: List s3 bucket metrics configurations + command: > + aws s3api list-bucket-metrics-configurations + --bucket {{ test_bucket }} + environment: + AWS_ACCESS_KEY_ID: "{{ aws_access_key | default(omit) }}" + AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key | default(omit) }}" + AWS_SESSION_TOKEN: "{{ security_token | default(omit) }}" + AWS_DEFAULT_REGION: "{{ aws_region | default(omit) }}" + register: list_comand_result + +- set_fact: + metrics_info: "{{ (list_comand_result.stdout | from_json)['MetricsConfigurationList'] | default([]) }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/aliases new file mode 100644 index 00000000..efe35f38 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/aliases @@ -0,0 +1,3 @@ +cloud/aws +shippable/aws/group1 + diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/files/test1.txt b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/files/test1.txt new file mode 100644 index 00000000..f079749c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/files/test1.txt @@ -0,0 +1 @@ +test1
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/files/test2.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/files/test2.yml new file mode 100644 index 00000000..b80aba06 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/files/test2.yml @@ -0,0 +1,2 @@ +--- +test2: example diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/files/test3.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/files/test3.json new file mode 100644 index 00000000..23483fb2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/files/test3.json @@ -0,0 +1,3 @@ +{ + "test3": "value" +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/tasks/main.yml new file mode 100644 index 00000000..965e1182 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/s3_sync/tasks/main.yml @@ -0,0 +1,108 @@ +--- +- name: S3 bucket creation + collections: + - amazon.aws + - community.general + module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + block: + # ============================================================ + - name: Create simple s3_bucket + s3_bucket: + name: "{{ resource_prefix }}-testbucket-ansible" + state: present + register: output + + - assert: + that: + - output.changed + - output.name == '{{ resource_prefix }}-testbucket-ansible' + - not output.requester_pays + # ============================================================ + - name: Prepare fixtures folder + file: + path: "{{ output_dir }}/s3_sync" + state: directory + mode: '0755' + + - name: Prepare files to sync + copy: + src: "{{ item }}" + dest: "{{ output_dir }}/s3_sync/{{ item }}" + mode: preserve + with_items: + - test1.txt + - test2.yml + - test3.json + + - name: Prepare file with size bigger than chunk size + shell: | + dd if=/dev/zero of=test4.txt bs=1M count=10 + args: + chdir: "{{ output_dir }}/s3_sync" + + - name: Sync files with remote bucket + s3_sync: + bucket: "{{ resource_prefix }}-testbucket-ansible" + file_root: "{{ output_dir }}/s3_sync" + register: output + - assert: + that: + - output is changed + + # ============================================================ + - name: Sync files already present + s3_sync: + bucket: "{{ resource_prefix }}-testbucket-ansible" + file_root: "{{ output_dir }}/s3_sync" + register: output + - assert: + that: + - output is not changed + + # ============================================================ + - name: Sync files with etag calculation + s3_sync: + bucket: "{{ resource_prefix }}-testbucket-ansible" + file_root: "{{ output_dir }}/s3_sync" + file_change_strategy: checksum + register: output + - assert: + that: + - output is not changed + + # ============================================================ + # DOCUMENTATION EXAMPLES + # ============================================================ + - name: all the options + s3_sync: + bucket: "{{ resource_prefix }}-testbucket-ansible" + file_root: "{{ output_dir }}/s3_sync" + mime_map: + .yml: application/text + .json: application/text + key_prefix: config_files/web + file_change_strategy: force + permission: public-read + cache_control: "public, max-age=31536000" + include: "*" + exclude: "*.txt,.*" + register: output + + - assert: + that: + - output is changed + + always: + - name: Ensure all buckets are deleted + s3_bucket: + name: "{{item}}" + state: absent + force: true + ignore_errors: yes + with_items: + - "{{ resource_prefix }}-testbucket-ansible" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/aliases new file mode 100644 index 00000000..092d6ac6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/aliases @@ -0,0 +1,2 @@ +shippable/posix/group2 +needs/file/contrib/inventory/ec2.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/ec2.sh b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/ec2.sh new file mode 100644 index 00000000..9ae9dee5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/ec2.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Wrapper to use the correct Python interpreter and support code coverage. +ABS_SCRIPT=$(python -c "import os; print(os.path.abspath('../../../../contrib/inventory/ec2.py'))") +cd "${OUTPUT_DIR}" +python.py "${ABS_SCRIPT}" "$@" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/inventory_diff.py b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/inventory_diff.py new file mode 100644 index 00000000..3aaeff50 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/inventory_diff.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json +import sys + + +def check_hosts(contrib, plugin): + contrib_hosts = sorted(contrib['_meta']['hostvars'].keys()) + plugin_hosts = sorted(plugin['_meta']['hostvars'].keys()) + assert contrib_hosts == plugin_hosts + return contrib_hosts, plugin_hosts + + +def check_groups(contrib, plugin): + contrib_groups = set(contrib.keys()) + plugin_groups = set(plugin.keys()) + missing_groups = contrib_groups.difference(plugin_groups) + if missing_groups: + print("groups: %s are missing from the plugin" % missing_groups) + assert not missing_groups + return contrib_groups, plugin_groups + + +def check_host_vars(key, value, plugin, host): + # tags are a dict in the plugin + if key.startswith('ec2_tag'): + print('assert tag', key, value) + assert 'tags' in plugin['_meta']['hostvars'][host], 'b file does not have tags in host' + btags = plugin['_meta']['hostvars'][host]['tags'] + tagkey = key.replace('ec2_tag_', '') + assert tagkey in btags, '%s tag not in b file host tags' % tagkey + assert value == btags[tagkey], '%s != %s' % (value, btags[tagkey]) + else: + print('assert var', key, value, key in plugin['_meta']['hostvars'][host], plugin['_meta']['hostvars'][host].get(key)) + assert key in plugin['_meta']['hostvars'][host], "%s not in b's %s hostvars" % (key, host) + assert value == plugin['_meta']['hostvars'][host][key], "%s != %s" % (value, plugin['_meta']['hostvars'][host][key]) + + +def main(): + # a should be the source of truth (the script output) + a = sys.argv[1] + # b should be the thing to check (the plugin output) + b = sys.argv[2] + + with open(a, 'r') as f: + adata = json.loads(f.read()) + with open(b, 'r') as f: + bdata = json.loads(f.read()) + + # all hosts should be present obviously + ahosts, bhosts = check_hosts(adata, bdata) + + # all groups should be present obviously + agroups, bgroups = check_groups(adata, bdata) + + # check host vars can be reconstructed + for ahost in ahosts: + contrib_host_vars = adata['_meta']['hostvars'][ahost] + for key, value in contrib_host_vars.items(): + check_host_vars(key, value, bdata, ahost) + + +if __name__ == "__main__": + main() diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/runme.sh b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/runme.sh new file mode 100644 index 00000000..05772955 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/script_inventory_ec2/runme.sh @@ -0,0 +1,151 @@ +#!/usr/bin/env bash + +set -eux + +source virtualenv.sh + +pip install "python-dateutil>=2.1,<2.7.0" jmespath "Jinja2==2.10" + +# create boto3 symlinks +ln -s "$(pwd)/lib/boto" "$(pwd)/lib/boto3" +ln -s "$(pwd)/lib/boto" "$(pwd)/lib/botocore" + +# override boto's import path(s) +export PYTHONPATH +PYTHONPATH="$(pwd)/lib:$PYTHONPATH" + +################################################# +# RUN THE SCRIPT +################################################# + +# run the script first +cat << EOF > "$OUTPUT_DIR/ec2.ini" +[ec2] +regions = us-east-1 +cache_path = $(pwd)/.cache +cache_max_age = 0 +group_by_tag_none = False + +[credentials] +aws_access_key_id = FOO +aws_secret_acccess_key = BAR +EOF + +ANSIBLE_JINJA2_NATIVE=1 ansible-inventory -vvvv -i ./ec2.sh --list --output="$OUTPUT_DIR/script.out" +RC=$? +if [[ $RC != 0 ]]; then + exit $RC +fi + +################################################# +# RUN THE PLUGIN +################################################# + +# run the plugin second +export ANSIBLE_INVENTORY_ENABLED=aws_ec2 +export ANSIBLE_INVENTORY=test.aws_ec2.yml +export AWS_ACCESS_KEY_ID=FOO +export AWS_SECRET_ACCESS_KEY=BAR +export ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS=never + +cat << EOF > "$OUTPUT_DIR/test.aws_ec2.yml" +plugin: aws_ec2 +cache: False +use_contrib_script_compatible_sanitization: True +strict: True +regions: + - us-east-1 +hostnames: + - network-interface.addresses.association.public-ip + - dns-name +filters: + instance-state-name: running +compose: + # vars that don't exist anymore in any meaningful way + ec2_item: undefined | default("") + ec2_monitoring: undefined | default("") + ec2_previous_state: undefined | default("") + ec2_previous_state_code: undefined | default(0) + ec2__in_monitoring_element: undefined | default(false) + # the following three will be accessible again after #53645 + ec2_requester_id: undefined | default("") + ec2_eventsSet: undefined | default("") + ec2_persistent: undefined | default(false) + + # vars that change + ansible_host: public_ip_address + ec2_block_devices: dict(block_device_mappings | map(attribute='device_name') | map('basename') | list | zip(block_device_mappings | map(attribute='ebs.volume_id') | list)) + ec2_dns_name: public_dns_name + ec2_group_name: placement['group_name'] + ec2_id: instance_id + ec2_instance_profile: iam_instance_profile | default("") + ec2_ip_address: public_ip_address + ec2_kernel: kernel_id | default("") + ec2_monitored: monitoring['state'] in ['enabled', 'pending'] + ec2_monitoring_state: monitoring['state'] + ec2_account_id: owner_id + ec2_placement: placement['availability_zone'] + ec2_ramdisk: ramdisk_id | default("") + ec2_reason: state_transition_reason + ec2_security_group_ids: security_groups | map(attribute='group_id') | list | sort | join(',') + ec2_security_group_names: security_groups | map(attribute='group_name') | list | sort | join(',') + ec2_state: state['name'] + ec2_state_code: state['code'] + ec2_state_reason: state_reason['message'] if state_reason is defined else "" + ec2_sourceDestCheck: source_dest_check | lower | string # butchered snake_case case not a typo. + + # vars that just need ec2_ prefix + ec2_ami_launch_index: ami_launch_index | string + ec2_architecture: architecture + ec2_client_token: client_token + ec2_ebs_optimized: ebs_optimized + ec2_hypervisor: hypervisor + ec2_image_id: image_id + ec2_instance_type: instance_type + ec2_key_name: key_name + ec2_launch_time: 'launch_time | regex_replace(" ", "T") | regex_replace("(\+)(\d\d):(\d)(\d)$", ".\g<2>\g<3>Z")' + ec2_platform: platform | default("") + ec2_private_dns_name: private_dns_name + ec2_private_ip_address: private_ip_address + ec2_public_dns_name: public_dns_name + ec2_region: placement['region'] + ec2_root_device_name: root_device_name + ec2_root_device_type: root_device_type + ec2_spot_instance_request_id: spot_instance_request_id | default("") + ec2_subnet_id: subnet_id + ec2_virtualization_type: virtualization_type + ec2_vpc_id: vpc_id + tags: dict(tags.keys() | map('regex_replace', '[^A-Za-z0-9\_]', '_') | list | zip(tags.values() | list)) + +keyed_groups: + - key: '"ec2"' + separator: "" + - key: 'instance_id' + separator: "" + - key: tags + prefix: tag + - key: key_name | regex_replace('-', '_') + prefix: key + - key: placement['region'] + separator: "" + - key: placement['availability_zone'] + separator: "" + - key: platform | default('undefined') + prefix: platform + - key: vpc_id | regex_replace('-', '_') + prefix: vpc_id + - key: instance_type + prefix: type + - key: "image_id | regex_replace('-', '_')" + separator: "" + - key: security_groups | map(attribute='group_name') | map("regex_replace", "-", "_") | list + prefix: security_group +EOF + +ANSIBLE_JINJA2_NATIVE=1 ansible-inventory -vvvv -i "$OUTPUT_DIR/test.aws_ec2.yml" --list --output="$OUTPUT_DIR/plugin.out" + +################################################# +# DIFF THE RESULTS +################################################# + +./inventory_diff.py "$OUTPUT_DIR/script.out" "$OUTPUT_DIR/plugin.out" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_ec2/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_ec2/defaults/main.yml new file mode 100644 index 00000000..fb1f88b1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_ec2/defaults/main.yml @@ -0,0 +1,2 @@ +--- +resource_prefix: 'ansible-testing-' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_ec2/tasks/common.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_ec2/tasks/common.yml new file mode 100644 index 00000000..bf23f539 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_ec2/tasks/common.yml @@ -0,0 +1,119 @@ +--- + +# ============================================================ +- name: test with no parameters + action: "{{module_name}}" + register: result + ignore_errors: true + +- name: assert failure when called with no parameters + assert: + that: + - 'result.failed' + - 'result.msg == "missing required arguments: name"' + +# ============================================================ +- name: test with only name + action: "{{module_name}} name={{ec2_key_name}}" + register: result + ignore_errors: true + +- name: assert failure when called with only 'name' + assert: + that: + - 'result.failed' + - 'result.msg == "Either region or ec2_url must be specified"' + +# ============================================================ +- name: test invalid region parameter + action: "{{module_name}} name='{{ec2_key_name}}' region='asdf querty 1234'" + register: result + ignore_errors: true + +- name: assert invalid region parameter + assert: + that: + - 'result.failed' + - 'result.msg.startswith("value of region must be one of:")' + +# ============================================================ +- name: test valid region parameter + action: "{{module_name}} name='{{ec2_key_name}}' region='{{ec2_region}}'" + register: result + ignore_errors: true + +- name: assert valid region parameter + assert: + that: + - 'result.failed' + - 'result.msg.startswith("No handler was ready to authenticate.")' + +# ============================================================ +- name: test environment variable EC2_REGION + action: "{{module_name}} name='{{ec2_key_name}}'" + environment: + EC2_REGION: '{{ec2_region}}' + register: result + ignore_errors: true + +- name: assert environment variable EC2_REGION + assert: + that: + - 'result.failed' + - 'result.msg.startswith("No handler was ready to authenticate.")' + +# ============================================================ +- name: test invalid ec2_url parameter + action: "{{module_name}} name='{{ec2_key_name}}'" + environment: + EC2_URL: bogus.example.com + register: result + ignore_errors: true + +- name: assert invalid ec2_url parameter + assert: + that: + - 'result.failed' + - 'result.msg.startswith("No handler was ready to authenticate.")' + +# ============================================================ +- name: test valid ec2_url parameter + action: "{{module_name}} name='{{ec2_key_name}}'" + environment: + EC2_URL: '{{ec2_url}}' + register: result + ignore_errors: true + +- name: assert valid ec2_url parameter + assert: + that: + - 'result.failed' + - 'result.msg.startswith("No handler was ready to authenticate.")' + +# ============================================================ +- name: test credentials from environment + action: "{{module_name}} name='{{ec2_key_name}}'" + environment: + EC2_REGION: '{{ec2_region}}' + EC2_ACCESS_KEY: bogus_access_key + EC2_SECRET_KEY: bogus_secret_key + register: result + ignore_errors: true + +- name: assert ec2_key with valid ec2_url + assert: + that: + - 'result.failed' + - '"EC2ResponseError: 401 Unauthorized" in result.msg' + +# ============================================================ +- name: test credential parameters + action: "{{module_name}} name='{{ec2_key_name}}' ec2_region='{{ec2_region}}' ec2_access_key=bogus_access_key ec2_secret_key=bogus_secret_key" + register: result + ignore_errors: true + +- name: assert credential parameters + assert: + that: + - 'result.failed' + - '"EC2ResponseError: 401 Unauthorized" in result.msg' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_ec2/vars/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_ec2/vars/main.yml new file mode 100644 index 00000000..3d7209ef --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_ec2/vars/main.yml @@ -0,0 +1,3 @@ +--- +ec2_url: ec2.amazonaws.com +ec2_region: us-east-1 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/handlers/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/handlers/main.yml new file mode 100644 index 00000000..229037c8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/handlers/main.yml @@ -0,0 +1,5 @@ +- name: delete temporary directory + include_tasks: default-cleanup.yml + +- name: delete temporary directory (windows) + include_tasks: windows-cleanup.yml diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml new file mode 100644 index 00000000..39872d74 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml @@ -0,0 +1,5 @@ +- name: delete temporary directory + file: + path: "{{ remote_tmp_dir }}" + state: absent + no_log: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/default.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/default.yml new file mode 100644 index 00000000..1e0f51b8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/default.yml @@ -0,0 +1,11 @@ +- name: create temporary directory + tempfile: + state: directory + suffix: .test + register: remote_tmp_dir + notify: + - delete temporary directory + +- name: record temporary directory + set_fact: + remote_tmp_dir: "{{ remote_tmp_dir.path }}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/main.yml new file mode 100644 index 00000000..f8df391b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/main.yml @@ -0,0 +1,10 @@ +- name: make sure we have the ansible_os_family and ansible_distribution_version facts + setup: + gather_subset: distribution + when: ansible_facts == {} + +- include_tasks: "{{ lookup('first_found', files)}}" + vars: + files: + - "{{ ansible_os_family | lower }}.yml" + - "default.yml" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/windows-cleanup.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/windows-cleanup.yml new file mode 100644 index 00000000..32f372d0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/windows-cleanup.yml @@ -0,0 +1,4 @@ +- name: delete temporary directory (windows) + ansible.windows.win_file: + path: '{{ remote_tmp_dir }}' + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/windows.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/windows.yml new file mode 100644 index 00000000..317c146d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/setup_remote_tmp_dir/tasks/windows.yml @@ -0,0 +1,10 @@ +- name: create temporary directory + register: remote_tmp_dir + notify: + - delete temporary directory (windows) + ansible.windows.win_tempfile: + state: directory + suffix: .test +- name: record temporary directory + set_fact: + remote_tmp_dir: '{{ remote_tmp_dir.path }}' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns/defaults/main.yml new file mode 100644 index 00000000..59ef6564 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns/defaults/main.yml @@ -0,0 +1 @@ +sns_topic_name: "{{ resource_prefix }}-topic" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns/tasks/main.yml new file mode 100644 index 00000000..bc39b9ce --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns/tasks/main.yml @@ -0,0 +1,50 @@ +- name: set up AWS connection info + module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + collections: + - amazon.aws + + block: + - name: Create an SNS topic + sns_topic: + name: "{{ sns_topic_name }}" + display_name: "Test topic" + register: sns_topic + + - name: Publish to the topic by name + sns: + topic: "{{ sns_topic_name }}" + subject: Test message + msg: Default test message + http: Test message for HTTP + https: Test message for HTTPS + email: Test message for email + email_json: Test message for email-json + sms: Short test message for SMS + sqs: Test message for SQS + application: Test message for apps + lambda: Test message for Lambda + register: result + + - name: Check for expected result structure + assert: + that: + - result is not changed + - "'message_id' in result" + + - name: Publish to the topic by ARN + sns: + topic: "{{ sns_topic.sns_arn }}" + subject: Second test message + msg: Simple test message + + always: + - name: Remove topic + sns_topic: + name: "{{ sns_topic_name }}" + state: absent + ignore_errors: yes diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/aliases new file mode 100644 index 00000000..56927195 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/aliases @@ -0,0 +1,2 @@ +cloud/aws +unsupported diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/defaults/main.yml new file mode 100644 index 00000000..4082236c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/defaults/main.yml @@ -0,0 +1,15 @@ +sns_topic_topic_name: "{{ resource_prefix }}-topic" +sns_topic_subscriptions: + - endpoint: "{{ sns_topic_subscriber_arn }}" + protocol: "lambda" +sns_topic_third_party_topic_arn: "arn:aws:sns:us-east-1:806199016981:AmazonIpSpaceChanged" +sns_topic_third_party_region: "{{ sns_topic_third_party_topic_arn.split(':')[3] }}" +sns_topic_lambda_function: "sns_topic_lambda" +sns_topic_lambda_name: "{{ resource_prefix }}-{{ sns_topic_lambda_function }}" +# IAM role names have to be less than 64 characters +# The 8 digit identifier at the end of resource_prefix helps determine during +# which test something was created and allows tests to be run in parallel +# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases +# we need both sets of digits to keep the resource name unique +unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +sns_topic_lambda_role: "ansible-test-{{ unique_id }}-sns-lambda" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/files/lambda-trust-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/files/lambda-trust-policy.json new file mode 100644 index 00000000..fb84ae9d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/files/lambda-trust-policy.json @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/files/sns_topic_lambda/sns_topic_lambda.py b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/files/sns_topic_lambda/sns_topic_lambda.py new file mode 100644 index 00000000..98f65783 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/files/sns_topic_lambda/sns_topic_lambda.py @@ -0,0 +1,9 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + + +def handler(event, context): + print(event) + return True diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/tasks/main.yml new file mode 100644 index 00000000..4d494f2e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/tasks/main.yml @@ -0,0 +1,303 @@ +- module_defaults: + group/aws: + aws_secret_key: '{{ aws_secret_key }}' + aws_access_key: '{{ aws_access_key }}' + security_token: '{{ security_token|default(omit) }}' + region: '{{ aws_region }}' + collections: + - community.general + block: + - name: create minimal lambda role + iam_role: + name: '{{ sns_topic_lambda_role }}' + assume_role_policy_document: '{{ lookup("file", "lambda-trust-policy.json") }}' + create_instance_profile: false + managed_policies: + - 'arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess' + register: iam_role + - name: pause if role was created + pause: + seconds: 10 + when: iam_role is changed + + - name: create topic + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My topic name + register: sns_topic_create + - name: assert that creation worked + assert: + that: + - sns_topic_create.changed + - name: set sns_arn fact + set_fact: + sns_arn: '{{ sns_topic_create.sns_arn }}' + - name: create topic again (expect changed=False) + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My topic name + register: sns_topic_no_change + - name: assert that recreation had no effect + assert: + that: + - not sns_topic_no_change.changed + - sns_topic_no_change.sns_arn == sns_topic_create.sns_arn + - name: update display name + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My new topic name + register: sns_topic_update_name + - name: assert that updating name worked + assert: + that: + - sns_topic_update_name.changed + - sns_topic_update_name.sns_topic.display_name == "My new topic name" + - name: add policy + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My new topic name + policy: '{{ lookup(''template'', ''initial-policy.json'') }}' + register: sns_topic_add_policy + - name: assert that adding policy worked + assert: + that: + - sns_topic_add_policy.changed + - name: rerun same policy + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My new topic name + policy: '{{ lookup(''template'', ''initial-policy.json'') }}' + register: sns_topic_rerun_policy + - name: assert that rerunning policy had no effect + assert: + that: + - not sns_topic_rerun_policy.changed + - name: update policy + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My new topic name + policy: '{{ lookup(''template'', ''updated-policy.json'') }}' + register: sns_topic_update_policy + - name: assert that updating policy worked + assert: + that: + - sns_topic_update_policy.changed + - name: add delivery policy + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My new topic name + delivery_policy: + http: + defaultHealthyRetryPolicy: + minDelayTarget: 20 + maxDelayTarget: 20 + numRetries: 3 + numMaxDelayRetries: 0 + numNoDelayRetries: 0 + numMinDelayRetries: 0 + backoffFunction: linear + register: sns_topic_add_delivery_policy + - name: assert that adding delivery policy worked + vars: + delivery_policy: '{{ sns_topic_add_delivery_policy.sns_topic.delivery_policy | from_json }}' + assert: + that: + - sns_topic_add_delivery_policy.changed + - delivery_policy.http.defaultHealthyRetryPolicy.minDelayTarget == 20 + - delivery_policy.http.defaultHealthyRetryPolicy.maxDelayTarget == 20 + - delivery_policy.http.defaultHealthyRetryPolicy.numRetries == 3 + - name: rerun same delivery policy + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My new topic name + delivery_policy: + http: + defaultHealthyRetryPolicy: + minDelayTarget: 20 + maxDelayTarget: 20 + numRetries: 3 + numMaxDelayRetries: 0 + numNoDelayRetries: 0 + numMinDelayRetries: 0 + backoffFunction: linear + register: sns_topic_rerun_delivery_policy + - name: assert that rerunning delivery_policy had no effect + vars: + delivery_policy: '{{ sns_topic_rerun_delivery_policy.sns_topic.delivery_policy | from_json }}' + assert: + that: + - not sns_topic_rerun_delivery_policy.changed + - delivery_policy.http.defaultHealthyRetryPolicy.minDelayTarget == 20 + - delivery_policy.http.defaultHealthyRetryPolicy.maxDelayTarget == 20 + - delivery_policy.http.defaultHealthyRetryPolicy.numRetries == 3 + - name: rerun a slightly different delivery policy + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My new topic name + delivery_policy: + http: + defaultHealthyRetryPolicy: + minDelayTarget: 40 + maxDelayTarget: 40 + numRetries: 6 + numMaxDelayRetries: 0 + numNoDelayRetries: 0 + numMinDelayRetries: 0 + backoffFunction: linear + register: sns_topic_rerun_delivery_policy + - name: assert that rerunning delivery_policy worked + vars: + delivery_policy: '{{ sns_topic_rerun_delivery_policy.sns_topic.delivery_policy | from_json }}' + assert: + that: + - sns_topic_rerun_delivery_policy.changed + - delivery_policy.http.defaultHealthyRetryPolicy.minDelayTarget == 40 + - delivery_policy.http.defaultHealthyRetryPolicy.maxDelayTarget == 40 + - delivery_policy.http.defaultHealthyRetryPolicy.numRetries == 6 + - name: create temp dir + tempfile: + state: directory + register: tempdir + - name: ensure zip file exists + archive: + path: '{{ lookup(''first_found'', sns_topic_lambda_function) }}' + dest: '{{ tempdir.path }}/{{ sns_topic_lambda_function }}.zip' + format: zip + - name: create lambda for subscribing (only auto-subscribing target available) + lambda: + name: '{{ sns_topic_lambda_name }}' + state: present + zip_file: '{{ tempdir.path }}/{{ sns_topic_lambda_function }}.zip' + runtime: python2.7 + role: '{{ sns_topic_lambda_role }}' + handler: '{{ sns_topic_lambda_function }}.handler' + register: lambda_result + - set_fact: + sns_topic_subscriber_arn: '{{ lambda_result.configuration.function_arn }}' + - name: subscribe to topic + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My new topic name + purge_subscriptions: false + subscriptions: '{{ sns_topic_subscriptions }}' + register: sns_topic_subscribe + - name: assert that subscribing worked + assert: + that: + - sns_topic_subscribe.changed + - sns_topic_subscribe.sns_topic.subscriptions|length == 1 + - name: run again with purge_subscriptions set to false + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My new topic name + purge_subscriptions: false + register: sns_topic_no_purge + - name: assert that not purging subscriptions had no effect + assert: + that: + - not sns_topic_no_purge.changed + - sns_topic_no_purge.sns_topic.subscriptions|length == 1 + - name: run again with purge_subscriptions set to true + sns_topic: + name: '{{ sns_topic_topic_name }}' + display_name: My new topic name + purge_subscriptions: true + register: sns_topic_purge + - name: assert that purging subscriptions worked + assert: + that: + - sns_topic_purge.changed + - sns_topic_purge.sns_topic.subscriptions|length == 0 + - name: delete topic + sns_topic: + name: '{{ sns_topic_topic_name }}' + state: absent + - name: no-op with third party topic (effectively get existing subscriptions) + sns_topic: + name: '{{ sns_topic_third_party_topic_arn }}' + region: '{{ sns_topic_third_party_region }}' + register: third_party_topic + - name: subscribe to third party topic + sns_topic: + name: '{{ sns_topic_third_party_topic_arn }}' + subscriptions: '{{ sns_topic_subscriptions }}' + region: '{{ sns_topic_third_party_region }}' + register: third_party_topic_subscribe + - name: assert that subscribing worked + assert: + that: + - third_party_topic_subscribe is changed + - (third_party_topic_subscribe.sns_topic.subscriptions|length) - (third_party_topic.sns_topic.subscriptions|length) == 1 + - name: attempt to change name of third party topic + sns_topic: + name: '{{ sns_topic_third_party_topic_arn }}' + display_name: This should not work + subscriptions: '{{ sns_topic_subscriptions }}' + region: '{{ sns_topic_third_party_region }}' + ignore_errors: true + register: third_party_name_change + - name: assert that attempting to change display name does not work + assert: + that: + - third_party_name_change is failed + - name: unsubscribe from third party topic (purge_subscription defaults to true) + sns_topic: + name: '{{ sns_topic_third_party_topic_arn }}' + subscriptions: '{{ third_party_topic.sns_topic.subscriptions }}' + region: '{{ sns_topic_third_party_region }}' + register: third_party_unsubscribe + - name: assert that unsubscribing from third party topic works + assert: + that: + - third_party_unsubscribe.changed + - third_party_topic.sns_topic.subscriptions|length == third_party_unsubscribe.sns_topic.subscriptions|length + - name: attempt to delete third party topic + sns_topic: + name: '{{ sns_topic_third_party_topic_arn }}' + state: absent + subscriptions: '{{ subscriptions }}' + region: '{{ sns_topic_third_party_region }}' + ignore_errors: true + register: third_party_deletion + - name: no-op after third party deletion + sns_topic: + name: '{{ sns_topic_third_party_topic_arn }}' + region: '{{ sns_topic_third_party_region }}' + register: third_party_deletion_facts + - name: assert that attempting to delete third party topic does not work and preser + assert: + that: + - third_party_deletion is failed + - third_party_topic.sns_topic.subscriptions|length == third_party_deletion_facts.sns_topic.subscriptions|length + always: + - name: announce teardown start + debug: + msg: '************** TEARDOWN STARTS HERE *******************' + - name: remove topic + sns_topic: + name: '{{ sns_topic_topic_name }}' + state: absent + ignore_errors: true + - name: unsubscribe from third party topic + sns_topic: + name: '{{ sns_topic_third_party_topic_arn }}' + subscriptions: [] + purge_subscriptions: true + region: '{{ sns_topic_third_party_region }}' + ignore_errors: true + - name: remove lambda + lambda: + name: '{{ sns_topic_lambda_name }}' + state: absent + ignore_errors: true + - name: remove tempdir + file: + path: '{{ tempdir.path }}' + state: absent + when: tempdir is defined + ignore_errors: true + - name: remove iam role + iam_role: + name: '{{ sns_topic_lambda_role }}' + state: absent + ignore_errors: true diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/templates/initial-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/templates/initial-policy.json new file mode 100644 index 00000000..235c5995 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/templates/initial-policy.json @@ -0,0 +1,20 @@ +{ + "Version":"2012-10-17", + "Id":"SomePolicyId", + "Statement" :[ + { + "Sid":"Statement1", + "Effect":"Allow", + "Principal" :{ + "AWS":"{{ sns_arn.split(':')[4] }}" + }, + "Action":["sns:Subscribe"], + "Resource": "{{ sns_arn }}", + "Condition" :{ + "StringEquals" :{ + "sns:Protocol":"email" + } + } + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/templates/updated-policy.json b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/templates/updated-policy.json new file mode 100644 index 00000000..c796bb4d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sns_topic/templates/updated-policy.json @@ -0,0 +1,20 @@ +{ + "Version":"2012-10-17", + "Id":"SomePolicyId", + "Statement" :[ + { + "Sid":"ANewSid", + "Effect":"Allow", + "Principal" :{ + "AWS":"{{ sns_arn.split(':')[4] }}" + }, + "Action":["sns:Subscribe"], + "Resource": "{{ sns_arn }}", + "Condition" :{ + "StringEquals" :{ + "sns:Protocol":"email" + } + } + } + ] +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sqs_queue/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sqs_queue/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sqs_queue/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sqs_queue/defaults/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sqs_queue/defaults/main.yml new file mode 100644 index 00000000..ed97d539 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sqs_queue/defaults/main.yml @@ -0,0 +1 @@ +--- diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sqs_queue/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sqs_queue/tasks/main.yml new file mode 100644 index 00000000..b689c9eb --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sqs_queue/tasks/main.yml @@ -0,0 +1,106 @@ +--- +- name: Main test block + module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + block: + - block: + - name: Test creating SQS queue + sqs_queue: + name: "{{ resource_prefix }}{{ 1000 | random }}" + register: create_result + - name: Assert SQS queue created + assert: + that: + - create_result.changed + - create_result.region == "{{ aws_region }}" + always: + - name: Test deleting SQS queue + sqs_queue: + name: "{{ create_result.name }}" + state: absent + register: delete_result + retries: 3 + delay: 3 + until: delete_result.changed + - name: Assert SQS queue deleted + assert: + that: + - delete_result.changed + - name: Test delete SQS queue that doesn't exist + sqs_queue: + name: "{{ resource_prefix }}{{ 1000 | random }}" + state: absent + register: delete_result + - name: Assert delete non-existant queue returns cleanly + assert: + that: + - delete_result.changed == False + - name: Test queue features + block: + - name: Test create queue with attributes + sqs_queue: + name: "{{ resource_prefix }}{{ 1000 | random }}" + default_visibility_timeout: 900 + delivery_delay: 900 + maximum_message_size: 9009 + message_retention_period: 900 + receive_message_wait_time: 10 + policy: + Version: "2012-10-17" + Statement: + Effect: Allow + Action: "*" + register: create_result + - name: Assert queue created with configuration + assert: + that: + - create_result.changed + - create_result.default_visibility_timeout == 900 + - create_result.delivery_delay == 900 + - create_result.maximum_message_size == 9009 + - create_result.message_retention_period == 900 + - create_result.receive_message_wait_time == 10 + - create_result.policy.Version == "2012-10-17" + - create_result.policy.Statement[0].Effect == "Allow" + - create_result.policy.Statement[0].Action == "*" + always: + - name: Cleaning up queue + sqs_queue: + name: "{{ create_result.name }}" + state: absent + register: delete_result + retries: 3 + delay: 3 + until: delete_result.changed + - name: Test queue with redrive + block: + - name: Creating dead letter queue + sqs_queue: + name: "{{ resource_prefix }}{{ 1000 | random }}" + register: dead_letter_queue + - name: Test create queue with redrive_policy + sqs_queue: + name: "{{ resource_prefix }}{{ 1000 | random }}" + redrive_policy: + maxReceiveCount: 5 + deadLetterTargetArn: "{{ dead_letter_queue.queue_arn }}" + register: create_result + - name: Assert queue created with configuration + assert: + that: + - create_result.changed + always: + - name: Cleaning up queue + sqs_queue: + name: "{{ item.name }}" + state: absent + register: delete_result + retries: 3 + delay: 3 + with_items: + - { name: "{{ create_result.name }}" } + - { name: "{{ dead_letter_queue.name }}" } diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/aliases b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/aliases new file mode 100644 index 00000000..6e3860be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/aliases @@ -0,0 +1,2 @@ +cloud/aws +shippable/aws/group2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/meta/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/meta/main.yml new file mode 100644 index 00000000..1f64f116 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/tasks/main.yml b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/tasks/main.yml new file mode 100644 index 00000000..34545493 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/tasks/main.yml @@ -0,0 +1,384 @@ +--- +# tasks file for sts_assume_role + +- block: + + # ============================================================ + # TODO create simple ansible sts_get_caller_identity module + - blockinfile: + path: "{{ output_dir }}/sts.py" + create: yes + block: | + #!/usr/bin/env python + import boto3 + sts = boto3.client('sts') + response = sts.get_caller_identity() + print(response['Account']) + + - name: get the aws account id + command: "{{ ansible_python.executable }} '{{ output_dir }}/sts.py'" + environment: + AWS_ACCESS_KEY_ID: "{{ aws_access_key }}" + AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key }}" + AWS_SESSION_TOKEN: "{{ security_token }}" + register: result + + - name: register account id + set_fact: + aws_account: "{{ result.stdout | replace('\n', '') }}" + + # ============================================================ + - name: create test iam role + iam_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + name: "ansible-test-sts-{{ resource_prefix }}" + assume_role_policy_document: "{{ lookup('template','policy.json.j2') }}" + create_instance_profile: False + managed_policy: + - arn:aws:iam::aws:policy/IAMReadOnlyAccess + state: present + register: test_role + + # ============================================================ + - name: pause to ensure role exists before using + pause: + seconds: 30 + + # ============================================================ + - name: test with no parameters + sts_assume_role: + register: result + ignore_errors: true + + - name: assert with no parameters + assert: + that: + - 'result.failed' + - "'missing required arguments:' in result.msg" + + # ============================================================ + - name: test with empty parameters + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region}}" + role_arn: + role_session_name: + policy: + duration_seconds: + external_id: + mfa_token: + mfa_serial_number: + register: result + ignore_errors: true + + - name: assert with empty parameters + assert: + that: + - 'result.failed' + - "'Missing required parameter in input:' in result.msg" + when: result.module_stderr is not defined + + - name: assert with empty parameters + assert: + that: + - 'result.failed' + - "'Member must have length greater than or equal to 20' in result.module_stderr" + when: result.module_stderr is defined + + # ============================================================ + - name: test with only 'role_arn' parameter + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + role_arn: "{{ test_role.iam_role.arn }}" + register: result + ignore_errors: true + + - name: assert with only 'role_arn' parameter + assert: + that: + - 'result.failed' + - "'missing required arguments: role_session_name' in result.msg" + + # ============================================================ + - name: test with only 'role_session_name' parameter + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + role_session_name: "AnsibleTest" + register: result + ignore_errors: true + + - name: assert with only 'role_session_name' parameter + assert: + that: + - 'result.failed' + - "'missing required arguments: role_arn' in result.msg" + + # ============================================================ + - name: test assume role with invalid policy + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + role_arn: "{{ test_role.iam_role.arn }}" + role_session_name: "AnsibleTest" + policy: "invalid policy" + register: result + ignore_errors: true + + - name: assert assume role with invalid policy + assert: + that: + - 'result.failed' + - "'The policy is not in the valid JSON format.' in result.msg" + when: result.module_stderr is not defined + + - name: assert assume role with invalid policy + assert: + that: + - 'result.failed' + - "'The policy is not in the valid JSON format.' in result.module_stderr" + when: result.module_stderr is defined + + # ============================================================ + - name: test assume role with invalid duration seconds + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region}}" + role_arn: "{{ test_role.iam_role.arn }}" + role_session_name: AnsibleTest + duration_seconds: invalid duration + register: result + ignore_errors: true + + - name: assert assume role with invalid duration seconds + assert: + that: + - result is failed + - 'result.msg is search("argument \w+ is of type <.*> and we were unable to convert to int: <.*> cannot be converted to an int")' + + # ============================================================ + - name: test assume role with invalid external id + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region}}" + role_arn: "{{ test_role.iam_role.arn }}" + role_session_name: AnsibleTest + external_id: invalid external id + register: result + ignore_errors: true + + - name: assert assume role with invalid external id + assert: + that: + - 'result.failed' + - "'Member must satisfy regular expression pattern:' in result.msg" + when: result.module_stderr is not defined + + - name: assert assume role with invalid external id + assert: + that: + - 'result.failed' + - "'Member must satisfy regular expression pattern:' in result.module_stderr" + when: result.module_stderr is defined + + # ============================================================ + - name: test assume role with invalid mfa serial number + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region}}" + role_arn: "{{ test_role.iam_role.arn }}" + role_session_name: AnsibleTest + mfa_serial_number: invalid serial number + register: result + ignore_errors: true + + - name: assert assume role with invalid mfa serial number + assert: + that: + - 'result.failed' + - "'Member must satisfy regular expression pattern:' in result.msg" + when: result.module_stderr is not defined + + - name: assert assume role with invalid mfa serial number + assert: + that: + - 'result.failed' + - "'Member must satisfy regular expression pattern:' in result.module_stderr" + when: result.module_stderr is defined + + # ============================================================ + - name: test assume role with invalid mfa token code + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region}}" + role_arn: "{{ test_role.iam_role.arn }}" + role_session_name: AnsibleTest + mfa_token: invalid token code + register: result + ignore_errors: true + + - name: assert assume role with invalid mfa token code + assert: + that: + - 'result.failed' + - "'Member must satisfy regular expression pattern:' in result.msg" + when: result.module_stderr is not defined + + - name: assert assume role with invalid mfa token code + assert: + that: + - 'result.failed' + - "'Member must satisfy regular expression pattern:' in result.module_stderr" + when: result.module_stderr is defined + + # ============================================================ + - name: test assume role with invalid role_arn + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region}}" + role_arn: invalid role arn + role_session_name: AnsibleTest + register: result + ignore_errors: true + + - name: assert assume role with invalid role_arn + assert: + that: + - result.failed + - "'Invalid length for parameter RoleArn' in result.msg" + when: result.module_stderr is not defined + + - name: assert assume role with invalid role_arn + assert: + that: + - 'result.failed' + - "'Member must have length greater than or equal to 20' in result.module_stderr" + when: result.module_stderr is defined + + # ============================================================ + - name: test assume not existing sts role + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region}}" + role_arn: "arn:aws:iam::123456789:role/non-existing-role" + role_session_name: "AnsibleTest" + register: result + ignore_errors: true + + - name: assert assume not existing sts role + assert: + that: + - 'result.failed' + - "'is not authorized to perform: sts:AssumeRole' in result.msg" + when: result.module_stderr is not defined + + - name: assert assume not existing sts role + assert: + that: + - 'result.failed' + - "'is not authorized to perform: sts:AssumeRole' in result.msg" + when: result.module_stderr is defined + + # ============================================================ + - name: test assume role + sts_assume_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + region: "{{ aws_region }}" + role_arn: "{{ test_role.iam_role.arn }}" + role_session_name: AnsibleTest + register: assumed_role + + - name: assert assume role + assert: + that: + - 'not assumed_role.failed' + - "'sts_creds' in assumed_role" + - "'access_key' in assumed_role.sts_creds" + - "'secret_key' in assumed_role.sts_creds" + - "'session_token' in assumed_role.sts_creds" + + # ============================================================ + - name: test that assumed credentials have IAM read-only access + iam_role: + aws_access_key: "{{ assumed_role.sts_creds.access_key }}" + aws_secret_key: "{{ assumed_role.sts_creds.secret_key }}" + security_token: "{{ assumed_role.sts_creds.session_token }}" + region: "{{ aws_region}}" + name: "ansible-test-sts-{{ resource_prefix }}" + assume_role_policy_document: "{{ lookup('template','policy.json.j2') }}" + create_instance_profile: False + state: present + register: result + + - name: assert assumed role with privileged action (expect changed=false) + assert: + that: + - 'not result.failed' + - 'not result.changed' + - "'iam_role' in result" + + # ============================================================ + - name: test assumed role with unprivileged action + iam_role: + aws_access_key: "{{ assumed_role.sts_creds.access_key }}" + aws_secret_key: "{{ assumed_role.sts_creds.secret_key }}" + security_token: "{{ assumed_role.sts_creds.session_token }}" + region: "{{ aws_region}}" + name: "ansible-test-sts-{{ resource_prefix }}-new" + assume_role_policy_document: "{{ lookup('template','policy.json.j2') }}" + state: present + register: result + ignore_errors: true + + - name: assert assumed role with unprivileged action (expect changed=false) + assert: + that: + - 'result.failed' + - "'is not authorized to perform: iam:CreateRole' in result.msg" + # runs on Python2 + when: result.module_stderr is not defined + + - name: assert assumed role with unprivileged action (expect changed=false) + assert: + that: + - 'result.failed' + - "'is not authorized to perform: iam:CreateRole' in result.module_stderr" + # runs on Python3 + when: result.module_stderr is defined + + # ============================================================ + always: + + - name: delete test iam role + iam_role: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token }}" + name: "ansible-test-sts-{{ resource_prefix }}" + assume_role_policy_document: "{{ lookup('template','policy.json.j2') }}" + managed_policy: + - arn:aws:iam::aws:policy/IAMReadOnlyAccess + state: absent diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/templates/policy.json.j2 b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/templates/policy.json.j2 new file mode 100644 index 00000000..559562fd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/integration/targets/sts_assume_role/templates/policy.json.j2 @@ -0,0 +1,12 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::{{ aws_account }}:root" + }, + "Action": "sts:AssumeRole" + } + ] +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/requirements.yml b/collections-debian-merged/ansible_collections/community/aws/tests/requirements.yml new file mode 100644 index 00000000..d7efc78d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/requirements.yml @@ -0,0 +1,7 @@ +integration_tests_dependencies: +- amazon.aws >= 1.3.0 +- ansible.windows +- community.crypto +- community.general +unit_tests_dependencies: +- amazon.aws >= 1.3.0 diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/sanity/ignore-2.10.txt b/collections-debian-merged/ansible_collections/community/aws/tests/sanity/ignore-2.10.txt new file mode 100644 index 00000000..5670c301 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/sanity/ignore-2.10.txt @@ -0,0 +1,3 @@ +plugins/modules/route53.py validate-modules:parameter-state-invalid-choice +tests/utils/shippable/check_matrix.py replace-urlopen +tests/utils/shippable/timing.py shebang diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/sanity/ignore-2.11.txt b/collections-debian-merged/ansible_collections/community/aws/tests/sanity/ignore-2.11.txt new file mode 100644 index 00000000..5670c301 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/sanity/ignore-2.11.txt @@ -0,0 +1,3 @@ +plugins/modules/route53.py validate-modules:parameter-state-invalid-choice +tests/utils/shippable/check_matrix.py replace-urlopen +tests/utils/shippable/timing.py shebang diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/sanity/ignore-2.9.txt b/collections-debian-merged/ansible_collections/community/aws/tests/sanity/ignore-2.9.txt new file mode 100644 index 00000000..45e370f6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/sanity/ignore-2.9.txt @@ -0,0 +1,47 @@ +plugins/modules/aws_acm_info.py pylint:ansible-deprecated-no-version +plugins/modules/aws_kms.py pylint:ansible-deprecated-no-version +plugins/modules/aws_kms_info.py pylint:ansible-deprecated-no-version +plugins/modules/aws_region_info.py pylint:ansible-deprecated-no-version +plugins/modules/aws_s3_bucket_info.py pylint:ansible-deprecated-no-version +plugins/modules/aws_sgw_info.py pylint:ansible-deprecated-no-version +plugins/modules/aws_waf_info.py pylint:ansible-deprecated-no-version +plugins/modules/cloudfront_info.py pylint:ansible-deprecated-no-version +plugins/modules/cloudwatchlogs_log_group_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_asg_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_customer_gateway_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_eip_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_elb_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_instance_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_lc_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_metric_alarm.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_placement_group_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_vpc_endpoint_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_vpc_igw_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_vpc_nacl_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_vpc_nat_gateway_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_vpc_peering_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_vpc_route_table_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_vpc_vgw_info.py pylint:ansible-deprecated-no-version +plugins/modules/ec2_vpc_vpn_info.py pylint:ansible-deprecated-no-version +plugins/modules/ecs_service_info.py pylint:ansible-deprecated-no-version +plugins/modules/ecs_taskdefinition_info.py pylint:ansible-deprecated-no-version +plugins/modules/efs_info.py pylint:ansible-deprecated-no-version +plugins/modules/elasticache_info.py pylint:ansible-deprecated-no-version +plugins/modules/elb_application_lb_info.py pylint:ansible-deprecated-no-version +plugins/modules/elb_classic_lb_info.py pylint:ansible-deprecated-no-version +plugins/modules/elb_network_lb.py pylint:ansible-deprecated-no-version +plugins/modules/elb_target_group_info.py pylint:ansible-deprecated-no-version +plugins/modules/elb_target_info.py pylint:ansible-deprecated-no-version +plugins/modules/iam_mfa_device_info.py pylint:ansible-deprecated-no-version +plugins/modules/iam_policy.py pylint:ansible-deprecated-no-version +plugins/modules/iam_role.py pylint:ansible-deprecated-no-version +plugins/modules/iam_role_info.py pylint:ansible-deprecated-no-version +plugins/modules/iam_server_certificate_info.py pylint:ansible-deprecated-no-version +plugins/modules/lambda_facts.py validate-modules:deprecation-mismatch +plugins/modules/lambda_facts.py validate-modules:invalid-documentation +plugins/modules/rds_instance_info.py pylint:ansible-deprecated-no-version +plugins/modules/rds_snapshot_info.py pylint:ansible-deprecated-no-version +plugins/modules/redshift_info.py pylint:ansible-deprecated-no-version +plugins/modules/route53_info.py pylint:ansible-deprecated-no-version +tests/utils/shippable/check_matrix.py replace-urlopen +tests/utils/shippable/timing.py shebang diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/builtins.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/builtins.py new file mode 100644 index 00000000..f60ee678 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/builtins.py @@ -0,0 +1,33 @@ +# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com> +# +# 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 <http://www.gnu.org/licenses/>. + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +# +# Compat for python2.7 +# + +# One unittest needs to import builtins via __import__() so we need to have +# the string that represents it +try: + import __builtin__ +except ImportError: + BUILTINS = 'builtins' +else: + BUILTINS = '__builtin__' diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/mock.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/mock.py new file mode 100644 index 00000000..0972cd2e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/mock.py @@ -0,0 +1,122 @@ +# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com> +# +# 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 <http://www.gnu.org/licenses/>. + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +''' +Compat module for Python3.x's unittest.mock module +''' +import sys + +# Python 2.7 + +# Note: Could use the pypi mock library on python3.x as well as python2.x. It +# is the same as the python3 stdlib mock library + +try: + # Allow wildcard import because we really do want to import all of mock's + # symbols into this compat shim + # pylint: disable=wildcard-import,unused-wildcard-import + from unittest.mock import * +except ImportError: + # Python 2 + # pylint: disable=wildcard-import,unused-wildcard-import + try: + from mock import * + except ImportError: + print('You need the mock library installed on python2.x to run tests') + + +# Prior to 3.4.4, mock_open cannot handle binary read_data +if sys.version_info >= (3,) and sys.version_info < (3, 4, 4): + file_spec = None + + def _iterate_read_data(read_data): + # Helper for mock_open: + # Retrieve lines from read_data via a generator so that separate calls to + # readline, read, and readlines are properly interleaved + sep = b'\n' if isinstance(read_data, bytes) else '\n' + data_as_list = [l + sep for l in read_data.split(sep)] + + if data_as_list[-1] == sep: + # If the last line ended in a newline, the list comprehension will have an + # extra entry that's just a newline. Remove this. + data_as_list = data_as_list[:-1] + else: + # If there wasn't an extra newline by itself, then the file being + # emulated doesn't have a newline to end the last line remove the + # newline that our naive format() added + data_as_list[-1] = data_as_list[-1][:-1] + + for line in data_as_list: + yield line + + def mock_open(mock=None, read_data=''): + """ + A helper function to create a mock to replace the use of `open`. It works + for `open` called directly or used as a context manager. + + The `mock` argument is the mock object to configure. If `None` (the + default) then a `MagicMock` will be created for you, with the API limited + to methods or attributes available on standard file handles. + + `read_data` is a string for the `read` methoddline`, and `readlines` of the + file handle to return. This is an empty string by default. + """ + def _readlines_side_effect(*args, **kwargs): + if handle.readlines.return_value is not None: + return handle.readlines.return_value + return list(_data) + + def _read_side_effect(*args, **kwargs): + if handle.read.return_value is not None: + return handle.read.return_value + return type(read_data)().join(_data) + + def _readline_side_effect(): + if handle.readline.return_value is not None: + while True: + yield handle.readline.return_value + for line in _data: + yield line + + global file_spec + if file_spec is None: + import _io + file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO)))) + + if mock is None: + mock = MagicMock(name='open', spec=open) + + handle = MagicMock(spec=file_spec) + handle.__enter__.return_value = handle + + _data = _iterate_read_data(read_data) + + handle.write.return_value = None + handle.read.return_value = None + handle.readline.return_value = None + handle.readlines.return_value = None + + handle.read.side_effect = _read_side_effect + handle.readline.side_effect = _readline_side_effect() + handle.readlines.side_effect = _readlines_side_effect + + mock.return_value = handle + return mock diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/unittest.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/unittest.py new file mode 100644 index 00000000..98f08ad6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/compat/unittest.py @@ -0,0 +1,38 @@ +# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com> +# +# 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 <http://www.gnu.org/licenses/>. + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +''' +Compat module for Python2.7's unittest module +''' + +import sys + +# Allow wildcard import because we really do want to import all of +# unittests's symbols into this compat shim +# pylint: disable=wildcard-import,unused-wildcard-import +if sys.version_info < (2, 7): + try: + # Need unittest2 on python2.6 + from unittest2 import * + except ImportError: + print('You need unittest2 installed on python2.6.x to run tests') +else: + from unittest import * diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/loader.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/loader.py new file mode 100644 index 00000000..0ee47fbb --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/loader.py @@ -0,0 +1,116 @@ +# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> +# +# 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 <http://www.gnu.org/licenses/>. + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os + +from ansible.errors import AnsibleParserError +from ansible.parsing.dataloader import DataLoader +from ansible.module_utils._text import to_bytes, to_text + + +class DictDataLoader(DataLoader): + + def __init__(self, file_mapping=None): + file_mapping = {} if file_mapping is None else file_mapping + assert type(file_mapping) == dict + + super(DictDataLoader, self).__init__() + + self._file_mapping = file_mapping + self._build_known_directories() + self._vault_secrets = None + + def load_from_file(self, path, cache=True, unsafe=False): + path = to_text(path) + if path in self._file_mapping: + return self.load(self._file_mapping[path], path) + return None + + # TODO: the real _get_file_contents returns a bytestring, so we actually convert the + # unicode/text it's created with to utf-8 + def _get_file_contents(self, path): + path = to_text(path) + if path in self._file_mapping: + return (to_bytes(self._file_mapping[path]), False) + else: + raise AnsibleParserError("file not found: %s" % path) + + def path_exists(self, path): + path = to_text(path) + return path in self._file_mapping or path in self._known_directories + + def is_file(self, path): + path = to_text(path) + return path in self._file_mapping + + def is_directory(self, path): + path = to_text(path) + return path in self._known_directories + + def list_directory(self, path): + ret = [] + path = to_text(path) + for x in (list(self._file_mapping.keys()) + self._known_directories): + if x.startswith(path): + if os.path.dirname(x) == path: + ret.append(os.path.basename(x)) + return ret + + def is_executable(self, path): + # FIXME: figure out a way to make paths return true for this + return False + + def _add_known_directory(self, directory): + if directory not in self._known_directories: + self._known_directories.append(directory) + + def _build_known_directories(self): + self._known_directories = [] + for path in self._file_mapping: + dirname = os.path.dirname(path) + while dirname not in ('/', ''): + self._add_known_directory(dirname) + dirname = os.path.dirname(dirname) + + def push(self, path, content): + rebuild_dirs = False + if path not in self._file_mapping: + rebuild_dirs = True + + self._file_mapping[path] = content + + if rebuild_dirs: + self._build_known_directories() + + def pop(self, path): + if path in self._file_mapping: + del self._file_mapping[path] + self._build_known_directories() + + def clear(self): + self._file_mapping = dict() + self._known_directories = [] + + def get_basedir(self): + return os.getcwd() + + def set_vault_secrets(self, vault_secrets): + self._vault_secrets = vault_secrets diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/path.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/path.py new file mode 100644 index 00000000..676b35ab --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/path.py @@ -0,0 +1,10 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible_collections.community.aws.tests.unit.compat.mock import MagicMock +from ansible.utils.path import unfrackpath + + +mock_unfrackpath_noop = MagicMock(spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/procenv.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/procenv.py new file mode 100644 index 00000000..e516a945 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/procenv.py @@ -0,0 +1,90 @@ +# (c) 2016, Matt Davis <mdavis@ansible.com> +# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com> +# +# 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 <http://www.gnu.org/licenses/>. + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import sys +import json + +from contextlib import contextmanager +from io import BytesIO, StringIO +from ansible_collections.community.aws.tests.unit.compat import unittest +from ansible.module_utils.six import PY3 +from ansible.module_utils._text import to_bytes + + +@contextmanager +def swap_stdin_and_argv(stdin_data='', argv_data=tuple()): + """ + context manager that temporarily masks the test runner's values for stdin and argv + """ + real_stdin = sys.stdin + real_argv = sys.argv + + if PY3: + fake_stream = StringIO(stdin_data) + fake_stream.buffer = BytesIO(to_bytes(stdin_data)) + else: + fake_stream = BytesIO(to_bytes(stdin_data)) + + try: + sys.stdin = fake_stream + sys.argv = argv_data + + yield + finally: + sys.stdin = real_stdin + sys.argv = real_argv + + +@contextmanager +def swap_stdout(): + """ + context manager that temporarily replaces stdout for tests that need to verify output + """ + old_stdout = sys.stdout + + if PY3: + fake_stream = StringIO() + else: + fake_stream = BytesIO() + + try: + sys.stdout = fake_stream + + yield fake_stream + finally: + sys.stdout = old_stdout + + +class ModuleTestCase(unittest.TestCase): + def setUp(self, module_args=None): + if module_args is None: + module_args = {'_ansible_remote_tmp': '/tmp', '_ansible_keep_remote_files': False} + + args = json.dumps(dict(ANSIBLE_MODULE_ARGS=module_args)) + + # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually + self.stdin_swap = swap_stdin_and_argv(stdin_data=args) + self.stdin_swap.__enter__() + + def tearDown(self): + # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually + self.stdin_swap.__exit__(None, None, None) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/vault_helper.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/vault_helper.py new file mode 100644 index 00000000..b54629da --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/vault_helper.py @@ -0,0 +1,27 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible.module_utils._text import to_bytes + +from ansible.parsing.vault import VaultSecret + + +class TextVaultSecret(VaultSecret): + '''A secret piece of text. ie, a password. Tracks text encoding. + + The text encoding of the text may not be the default text encoding so + we keep track of the encoding so we encode it to the same bytes.''' + + def __init__(self, text, encoding=None, errors=None, _bytes=None): + super(TextVaultSecret, self).__init__() + self.text = text + self.encoding = encoding or 'utf-8' + self._bytes = _bytes + self.errors = errors or 'strict' + + @property + def bytes(self): + '''The text encoded with encoding, unless we specifically set _bytes.''' + return self._bytes or to_bytes(self.text, encoding=self.encoding, errors=self.errors) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/yaml_helper.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/yaml_helper.py new file mode 100644 index 00000000..a646c024 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/mock/yaml_helper.py @@ -0,0 +1,126 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import io +import yaml + +from ansible.module_utils.six import PY3 +from ansible.parsing.yaml.loader import AnsibleLoader +from ansible.parsing.yaml.dumper import AnsibleDumper + + +class YamlTestUtils(object): + """Mixin class to combine with a unittest.TestCase subclass.""" + def _loader(self, stream): + """Vault related tests will want to override this. + + Vault cases should setup a AnsibleLoader that has the vault password.""" + return AnsibleLoader(stream) + + def _dump_stream(self, obj, stream, dumper=None): + """Dump to a py2-unicode or py3-string stream.""" + if PY3: + return yaml.dump(obj, stream, Dumper=dumper) + else: + return yaml.dump(obj, stream, Dumper=dumper, encoding=None) + + def _dump_string(self, obj, dumper=None): + """Dump to a py2-unicode or py3-string""" + if PY3: + return yaml.dump(obj, Dumper=dumper) + else: + return yaml.dump(obj, Dumper=dumper, encoding=None) + + def _dump_load_cycle(self, obj): + # Each pass though a dump or load revs the 'generation' + # obj to yaml string + string_from_object_dump = self._dump_string(obj, dumper=AnsibleDumper) + + # wrap a stream/file like StringIO around that yaml + stream_from_object_dump = io.StringIO(string_from_object_dump) + loader = self._loader(stream_from_object_dump) + # load the yaml stream to create a new instance of the object (gen 2) + obj_2 = loader.get_data() + + # dump the gen 2 objects directory to strings + string_from_object_dump_2 = self._dump_string(obj_2, + dumper=AnsibleDumper) + + # The gen 1 and gen 2 yaml strings + self.assertEqual(string_from_object_dump, string_from_object_dump_2) + # the gen 1 (orig) and gen 2 py object + self.assertEqual(obj, obj_2) + + # again! gen 3... load strings into py objects + stream_3 = io.StringIO(string_from_object_dump_2) + loader_3 = self._loader(stream_3) + obj_3 = loader_3.get_data() + + string_from_object_dump_3 = self._dump_string(obj_3, dumper=AnsibleDumper) + + self.assertEqual(obj, obj_3) + # should be transitive, but... + self.assertEqual(obj_2, obj_3) + self.assertEqual(string_from_object_dump, string_from_object_dump_3) + + def _old_dump_load_cycle(self, obj): + '''Dump the passed in object to yaml, load it back up, dump again, compare.''' + stream = io.StringIO() + + yaml_string = self._dump_string(obj, dumper=AnsibleDumper) + self._dump_stream(obj, stream, dumper=AnsibleDumper) + + yaml_string_from_stream = stream.getvalue() + + # reset stream + stream.seek(0) + + loader = self._loader(stream) + # loader = AnsibleLoader(stream, vault_password=self.vault_password) + obj_from_stream = loader.get_data() + + stream_from_string = io.StringIO(yaml_string) + loader2 = self._loader(stream_from_string) + # loader2 = AnsibleLoader(stream_from_string, vault_password=self.vault_password) + obj_from_string = loader2.get_data() + + stream_obj_from_stream = io.StringIO() + stream_obj_from_string = io.StringIO() + + if PY3: + yaml.dump(obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper) + yaml.dump(obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper) + else: + yaml.dump(obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper, encoding=None) + yaml.dump(obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper, encoding=None) + + yaml_string_stream_obj_from_stream = stream_obj_from_stream.getvalue() + yaml_string_stream_obj_from_string = stream_obj_from_string.getvalue() + + stream_obj_from_stream.seek(0) + stream_obj_from_string.seek(0) + + if PY3: + yaml_string_obj_from_stream = yaml.dump(obj_from_stream, Dumper=AnsibleDumper) + yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper) + else: + yaml_string_obj_from_stream = yaml.dump(obj_from_stream, Dumper=AnsibleDumper, encoding=None) + yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper, encoding=None) + + assert yaml_string == yaml_string_obj_from_stream + assert yaml_string == yaml_string_obj_from_stream == yaml_string_obj_from_string + assert (yaml_string == yaml_string_obj_from_stream == yaml_string_obj_from_string == yaml_string_stream_obj_from_stream == + yaml_string_stream_obj_from_string) + assert obj == obj_from_stream + assert obj == obj_from_string + assert obj == yaml_string_obj_from_stream + assert obj == yaml_string_obj_from_string + assert obj == obj_from_stream == obj_from_string == yaml_string_obj_from_stream == yaml_string_obj_from_string + return {'obj': obj, + 'yaml_string': yaml_string, + 'yaml_string_from_stream': yaml_string_from_stream, + 'obj_from_stream': obj_from_stream, + 'obj_from_string': obj_from_string, + 'yaml_string_obj_from_string': yaml_string_obj_from_string} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/conftest.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/conftest.py new file mode 100644 index 00000000..a7d1e047 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/conftest.py @@ -0,0 +1,31 @@ +# Copyright (c) 2017 Ansible Project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + +import pytest + +from ansible.module_utils.six import string_types +from ansible.module_utils._text import to_bytes +from ansible.module_utils.common._collections_compat import MutableMapping + + +@pytest.fixture +def patch_ansible_module(request, mocker): + if isinstance(request.param, string_types): + args = request.param + elif isinstance(request.param, MutableMapping): + if 'ANSIBLE_MODULE_ARGS' not in request.param: + request.param = {'ANSIBLE_MODULE_ARGS': request.param} + if '_ansible_remote_tmp' not in request.param['ANSIBLE_MODULE_ARGS']: + request.param['ANSIBLE_MODULE_ARGS']['_ansible_remote_tmp'] = '/tmp' + if '_ansible_keep_remote_files' not in request.param['ANSIBLE_MODULE_ARGS']: + request.param['ANSIBLE_MODULE_ARGS']['_ansible_keep_remote_files'] = False + args = json.dumps(request.param) + else: + raise Exception('Malformed data to the patch_ansible_module pytest fixture') + + mocker.patch('ansible.module_utils.basic._ANSIBLE_ARGS', to_bytes(args)) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/a.pem b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/a.pem new file mode 100644 index 00000000..4412f325 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/a.pem @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFVTCCBD2gAwIBAgISAx4pnfwvGxYrrQhr/UXiN7HCMA0GCSqGSIb3DQEBCwUA +MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD +ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xOTA3MjUwMDI4NTdaFw0x +OTEwMjMwMDI4NTdaMBoxGDAWBgNVBAMTD2NyeXB0b2dyYXBoeS5pbzCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAKJDpCL99DVo83587MrVp6gunmKRoUfY +vcgk5u2v0tB9OmZkcIY37z6AunHWr18Yj55zHmm6G8Nf35hmu3ql2A26WThCbmOe +WXbxhgarkningZI9opUWnI2dIllguVIsq99GzhpNnDdCb26s5+SRhJI4cr4hYaKC +XGDKooKWyXUX09SJTq7nW/1+pq3y9ZMvldRKjJALeAdwnC7kmUB6pK7q8J2VlpfQ +wqGu6q/WHVdgnhWARw3GEFJWDn9wkxBAF08CpzhVaEj+iK+Ut/1HBgNYwqI47h7S +q+qv0G2qklRVUtEM0zYRsp+y/6vivdbFLlPw8VaerbpJN3gLtpVNcGECAwEAAaOC +AmMwggJfMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYB +BQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUjbe0bE1aZ8HiqtwqUfCe15bF +V8UwHwYDVR0jBBgwFoAUqEpqYwR93brm0Tm3pkVl7/Oo7KEwbwYIKwYBBQUHAQEE +YzBhMC4GCCsGAQUFBzABhiJodHRwOi8vb2NzcC5pbnQteDMubGV0c2VuY3J5cHQu +b3JnMC8GCCsGAQUFBzAChiNodHRwOi8vY2VydC5pbnQteDMubGV0c2VuY3J5cHQu +b3JnLzAaBgNVHREEEzARgg9jcnlwdG9ncmFwaHkuaW8wTAYDVR0gBEUwQzAIBgZn +gQwBAgEwNwYLKwYBBAGC3xMBAQEwKDAmBggrBgEFBQcCARYaaHR0cDovL2Nwcy5s +ZXRzZW5jcnlwdC5vcmcwggEDBgorBgEEAdZ5AgQCBIH0BIHxAO8AdgB0ftqDMa0z +EJEhnM4lT0Jwwr/9XkIgCMY3NXnmEHvMVgAAAWwmvtnXAAAEAwBHMEUCIFXHYX/E +xtbYCvjjQ3dN0HOLW1d8+aduktmax4mu3KszAiEAvTpxuSVVXJnVGA4tU2GOnI60 +sqTh/IK6hvrFN1k1HBUAdQApPFGWVMg5ZbqqUPxYB9S3b79Yeily3KTDDPTlRUf0 +eAAAAWwmvtm9AAAEAwBGMEQCIDn7sgzD+7JzR+XTvjKf7VyLWwX37O8uwCfCTKo7 ++tEhAiB05bHiICU5wkfRBrwcvqXf4bPF7NT5LVlRQYzJ/hbpvzANBgkqhkiG9w0B +AQsFAAOCAQEAcMU8E6D+5WC07QSeTppRTboC++7YgQg5NiSWm7OE2FlyiRZXnu0Y +uBoaqAkZIqj7dom9wy1c1UauxOfM9lUZKhYnDTBu9tIhBAvCS0J0avv1j1KQygQ1 +qV+urJsunUwqV/vPWo1GfWophvyXVN6MAycv34ZXZvAjtG7oDcoQVLLvK1SIo2vu +4/dNkOQzaeZez8q6Ij9762TbBWaK5C789VMdUWZCADWoToPIK533cWbDEp4IhBU/ +K73d7lGGl7S59SjT2V/XE6eJS9Zlj0M+A8pf/8tjM/ImHAjlOHB02sM/VfZ7HAuZ +61TPxohL+e+X1FYeqIXYGXJmCEuB8WEmBg== +-----END CERTIFICATE----- diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/b.pem b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/b.pem new file mode 100644 index 00000000..2be4bca5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/b.pem @@ -0,0 +1,47 @@ +-----BEGIN CERTIFICATE----- +MIIIUjCCB/egAwIBAgIRALiJR3zQjp0MevT/Hk89sfAwCgYIKoZIzj0EAwIwgZIx +CzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNV +BAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMTgwNgYDVQQD +Ey9DT01PRE8gRUNDIERvbWFpbiBWYWxpZGF0aW9uIFNlY3VyZSBTZXJ2ZXIgQ0Eg +MjAeFw0xOTA3MzEwMDAwMDBaFw0yMDAyMDYyMzU5NTlaMGwxITAfBgNVBAsTGERv +bWFpbiBDb250cm9sIFZhbGlkYXRlZDEhMB8GA1UECxMYUG9zaXRpdmVTU0wgTXVs +dGktRG9tYWluMSQwIgYDVQQDExtzc2wzODczMzcuY2xvdWRmbGFyZXNzbC5jb20w +WTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARPFdjdnBIJRPnHCPsCBJ/MmPytXnZX +KV6lD2bbG5EVNuUQln4Na8heCY+sfpV+SPuuiNzZxgDA46GvyzdRYFhxo4IGUTCC +Bk0wHwYDVR0jBBgwFoAUQAlhZ/C8g3FP3hIILG/U1Ct2PZYwHQYDVR0OBBYEFGLh +bHk1KAYIRfVwXA3L+yDf0CxjMA4GA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAA +MB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBPBgNVHSAESDBGMDoGCysG +AQQBsjEBAgIHMCswKQYIKwYBBQUHAgEWHWh0dHBzOi8vc2VjdXJlLmNvbW9kby5j +b20vQ1BTMAgGBmeBDAECATBWBgNVHR8ETzBNMEugSaBHhkVodHRwOi8vY3JsLmNv +bW9kb2NhNC5jb20vQ09NT0RPRUNDRG9tYWluVmFsaWRhdGlvblNlY3VyZVNlcnZl +ckNBMi5jcmwwgYgGCCsGAQUFBwEBBHwwejBRBggrBgEFBQcwAoZFaHR0cDovL2Ny +dC5jb21vZG9jYTQuY29tL0NPTU9ET0VDQ0RvbWFpblZhbGlkYXRpb25TZWN1cmVT +ZXJ2ZXJDQTIuY3J0MCUGCCsGAQUFBzABhhlodHRwOi8vb2NzcC5jb21vZG9jYTQu +Y29tMIIDkAYDVR0RBIIDhzCCA4OCG3NzbDM4NzMzNy5jbG91ZGZsYXJlc3NsLmNv +bYIMKi5hanJ0Y3QuY29tghMqLmFrcmVwYnVyY3UuZ2VuLnRyghUqLmFuZHJlYXNr +YW5lbGxvcy5jb22CDSouYW5zaWJsZS5jb22CGSouYXJ0b2Z0b3VjaC1raW5nd29v +ZC5jb22CFyouYm91bGRlcnN3YXRlcmhvbGUuY29tghcqLmJyb2Nrc3RlY2hzdXBw +b3J0LmNvbYIQKi5idXJjbGFyLndlYi50coIcKi5ob3Blc29uZ2ZyZW5jaGJ1bGxk +b2dzLm5ldIIMKi5odXJyZW0uY29tghAqLmh5dmVsaWNvbnMuY29tghAqLmthcm1h +Zml0LmNvLnVrghUqLmxvd3J5c3lzdGVtc2luYy5jb22CDioubWFuaWNydW4uY29t +ghUqLm11dHVvZmluYW5jaWVyYS5jb22CDyoucGlsZ3JpbWFnZS5waIINKi5wa2dh +bWVzLm9yZ4IbKi5ybHBjb25zdWx0aW5nc2VydmljZXMuY29tghYqLnJ1eWF0YWJp +cmxlcmkuZ2VuLnRyghQqLnJ5YW5hcHBoeXNpY3NjLmNvbYIVKi53ZWFyaXRiYWNr +d2FyZHMub3Jngg8qLnlldGlzbmFjay5jb22CCmFqcnRjdC5jb22CEWFrcmVwYnVy +Y3UuZ2VuLnRyghNhbmRyZWFza2FuZWxsb3MuY29tggthbnNpYmxlLmNvbYIXYXJ0 +b2Z0b3VjaC1raW5nd29vZC5jb22CFWJvdWxkZXJzd2F0ZXJob2xlLmNvbYIVYnJv +Y2tzdGVjaHN1cHBvcnQuY29tgg5idXJjbGFyLndlYi50coIaaG9wZXNvbmdmcmVu +Y2hidWxsZG9ncy5uZXSCCmh1cnJlbS5jb22CDmh5dmVsaWNvbnMuY29tgg5rYXJt +YWZpdC5jby51a4ITbG93cnlzeXN0ZW1zaW5jLmNvbYIMbWFuaWNydW4uY29tghNt +dXR1b2ZpbmFuY2llcmEuY29tgg1waWxncmltYWdlLnBoggtwa2dhbWVzLm9yZ4IZ +cmxwY29uc3VsdGluZ3NlcnZpY2VzLmNvbYIUcnV5YXRhYmlybGVyaS5nZW4udHKC +EnJ5YW5hcHBoeXNpY3NjLmNvbYITd2Vhcml0YmFja3dhcmRzLm9yZ4INeWV0aXNu +YWNrLmNvbTCCAQQGCisGAQQB1nkCBAIEgfUEgfIA8AB2ALIeBcyLos2KIE6HZvkr +uYolIGdr2vpw57JJUy3vi5BeAAABbEVw8SgAAAQDAEcwRQIgE2YeTfb/d4BBUwpZ +ihWXSR+vRyNNUg8GlOak2MFMHv0CIQCLBvtU401m5/Psg9KirQZs321BSxgUKgSQ +m9M691d3eQB2AF6nc/nfVsDntTZIfdBJ4DJ6kZoMhKESEoQYdZaBcUVYAAABbEVw +8VgAAAQDAEcwRQIgGYsGfr3/mekjzMS9+ALAjx1ryfIfhXB/+UghTcw4Y8ICIQDS +K2L18WX3+Oh4TjJhjh5tV1iYyZVYivcwwbr7mtmOqjAKBggqhkjOPQQDAgNJADBG +AiEAjNt7LF78GV7snky9jwFcBsLH55ndzduvsrkJ7Ne1SgYCIQDsMJsTr9VP6kar +4Kv8V9zNBmpGrGNuE7A1GixBvzNaHA== +-----END CERTIFICATE----- diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.0.cert b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.0.cert new file mode 100644 index 00000000..6997766a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.0.cert @@ -0,0 +1,121 @@ +subject=/C=AU/ST=Victoria/L=Melbourne/O=Telstra Corporation Limited/OU=Telstra Energy/CN=dev.energy.inside.telstra.com +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +-----BEGIN CERTIFICATE----- +MIIIHTCCBgWgAwIBAgIUCqrrzSfjzaoyB3DOxst2kMxFp/MwDQYJKoZIhvcNAQEL +BQAwTTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxIzAh +BgNVBAMTGlF1b1ZhZGlzIEdsb2JhbCBTU0wgSUNBIEczMB4XDTE5MDgyMTIyMjIy +OFoXDTIxMDgyMTIyMzIwMFowgZsxCzAJBgNVBAYTAkFVMREwDwYDVQQIDAhWaWN0 +b3JpYTESMBAGA1UEBwwJTWVsYm91cm5lMSQwIgYDVQQKDBtUZWxzdHJhIENvcnBv +cmF0aW9uIExpbWl0ZWQxFzAVBgNVBAsMDlRlbHN0cmEgRW5lcmd5MSYwJAYDVQQD +DB1kZXYuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbTCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAMPAPH2y206qios2NMzlCNJv1mrwC1/8tH2HOqJGiYZB +O7QOBRSvJsV++IozCB8ap99e8B64OOAQPOyykrdXd2axhftmMb1SFMF56eukHSuz +KhKWRUgHs0UFRU51lDcBcOvphwJ+5SOgqrqKFFFBgJ0ZpcP54JpFwKIdh3ac10x2 +mBaW5ccqdv5X9oEMu1D/yivBmy34tsbLYyfttCjP76iVT7UVYHjHWynnIhsEyMsU +gdM90NzrTlrvTSi/EcCD1W3+8b0f+G1TI5rhHbKwR0n/mv5QLFm7EABoYPhxS8bX +B+9tE67yb0RyWbgvUiHySRynQLNMRpRx8Y9bA8uC8n8CAwEAAaOCA6QwggOgMAkG +A1UdEwQCMAAwHwYDVR0jBBgwFoAUsxKJtalLNbwVAPCA6dh4h/ETfHYwcwYIKwYB +BQUHAQEEZzBlMDcGCCsGAQUFBzAChitodHRwOi8vdHJ1c3QucXVvdmFkaXNnbG9i +YWwuY29tL3F2c3NsZzMuY3J0MCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5xdW92 +YWRpc2dsb2JhbC5jb20wgZ8GA1UdEQSBlzCBlIIdZGV2LmVuZXJneS5pbnNpZGUu +dGVsc3RyYS5jb22CJXJlcG9ydHMuZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5j +b22CJ2dyZWVuc3luYy5kZXYuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbYIjbmdv +c3MuZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5jb20wUQYDVR0gBEowSDBGBgwr +BgEEAb5YAAJkAQEwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5xdW92YWRpc2ds +b2JhbC5jb20vcmVwb3NpdG9yeTAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH +AwEwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL2NybC5xdW92YWRpc2dsb2JhbC5j +b20vcXZzc2xnMy5jcmwwHQYDVR0OBBYEFEoJQRpPC/V5ZK3mMkszZE2v6vh+MA4G +A1UdDwEB/wQEAwIFoDCCAXwGCisGAQQB1nkCBAIEggFsBIIBaAFmAHUAVhQGmi/X +wuzT9eG9RLI+x0Z2ubyZEVzA75SYVdaJ0N0AAAFstk9Y+gAABAMARjBEAiBFMZa6 +O9iXVjy2kqQa54vgNFdU7shgFJJhm//fSAQZUAIgBIL/yPdh+XiuQS2xPhCzNYkh +bxf7BbN4qUISESgiZpsAdgBvU3asMfAxGdiZAKRRFf93FRwR2QLBACkGjbIImjfZ +EwAAAWy2T1nKAAAEAwBHMEUCIG0tp63jLsDsfCTDlcvV5ItjRkbUJBnkxlPdP2PH +88sTAiEApgaPofVdn2hdI12iDDex72ta+9wpwQ1MxoaJn2nt+qEAdQDuS723dc5g +uuFCaR+r4Z5mow9+X7By2IMAxHuJeqj9ywAAAWy2T1iJAAAEAwBGMEQCIE/mzEFp +CJUc71jvwJa4Px86R3ZYK4mHmUlQAUZqd0ZkAiBdEmT8xxTuleSUlYHEkKCK/FZX +L+vsYJpPrA9TsO5IsTANBgkqhkiG9w0BAQsFAAOCAgEApE9WLz3S8tqA9Dk3r9LF +rJy8km9cBt1O9SQZwFsduGKGdF3Fd+/Y0V7UrFDzrX+NIzqcmgBHKxaIXorMBF70 +ajMaaROP2ymkpEXnruEwoR47fbW+JRAWDRm2xnouQveQX9ZcgCLbBvAWBqpndQj2 +DGmLJhNz5GlFBjh3PQZlU1w8hU7TrDxa7M1GMtVnk8X+o3l/MX9iPeEs+PiC4dHD +hpj84RY1VQJz8+10rql47SB5YgbwcqaizTG4ax/OAv1JHNWtfAodIMX8Y8X00zoz +A20LQv880jCCNANVNbrXJ3h4X3xwW/C1X9vYk0shymZJbT5u17JbPD1cy39bA7kT +F4L7scdQRxvcqazYN4/IdgvgMji9OltiYufP88Ti8KB2tcl2accpiC5St/zllGD1 +hqEeYLMzjyvUKR/1uvURQQtc0DPvBRmvkB+aI4g+sLkTTFWj5bsA1vKU8SDCyMuB +RQV11DId5+RNNCmWnskORUZJQssvY49pnfCxCES2nt3l/XzTzVtLYmd6G9uAqVac +e2ibnmDrFVlmlyRsCiMfZl5/OTJzt7Cj3az59m5Syfw/lnS9YP82t/r/ufuKkO5Q +q5a9aI8DuNNmAjR4lpIJNqIpX/y+dG2aGmx4XTc31MR9szWtiTgOHe0MkMupOAL0 +qkHrBgwo1zjuTMf3QOg6Z5Q= +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +MIIGFzCCA/+gAwIBAgIUftbnnMmtgcTIGT75XUQodw40ExcwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjExMDYxNDUwMThaFw0y +MjExMDYxNDUwMThaME0xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMSMwIQYDVQQDExpRdW9WYWRpcyBHbG9iYWwgU1NMIElDQSBHMzCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANf8Od17be6c6lTGJDhEXpmkTs4y +Q39Rr5VJyBeWCg06nSS71s6xF3sZvKcV0MbXlXCYM2ZX7cNTbJ81gs7uDsKFp+vK +EymiKyEiI2SImOtECNnSg+RVR4np/xz/UlC0yFUisH75cZsJ8T1pkGMfiEouR0EM +7O0uFgoboRfUP582TTWy0F7ynSA6YfGKnKj0OFwZJmGHVkLs1VevWjhj3R1fsPan +H05P5moePFnpQdj1FofoSxUHZ0c7VB+sUimboHm/uHNY1LOsk77qiSuVC5/yrdg3 +2EEfP/mxJYT4r/5UiD7VahySzeZHzZ2OibQm2AfgfMN3l57lCM3/WPQBhMAPS1jz +kE+7MjajM2f0aZctimW4Hasrj8AQnfAdHqZehbhtXaAlffNEzCdpNK584oCTVR7N +UR9iZFx83ruTqpo+GcLP/iSYqhM4g7fy45sNhU+IS+ca03zbxTl3TTlkofXunI5B +xxE30eGSQpDZ5+iUJcEOAuVKrlYocFbB3KF45hwcbzPWQ1DcO2jFAapOtQzeS+MZ +yZzT2YseJ8hQHKu8YrXZWwKaNfyl8kFkHUBDICowNEoZvBwRCQp8sgqL6YRZy0uD +JGxmnC2e0BVKSjcIvmq/CRWH7yiTk9eWm73xrsg9iIyD/kwJEnLyIk8tR5V8p/hc +1H2AjDrZH12PsZ45AgMBAAGjgfMwgfAwEgYDVR0TAQH/BAgwBgEB/wIBATARBgNV +HSAECjAIMAYGBFUdIAAwOgYIKwYBBQUHAQEELjAsMCoGCCsGAQUFBzABhh5odHRw +Oi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wDgYDVR0PAQH/BAQDAgEGMB8GA1Ud +IwQYMBaAFO3nb3Zav2DsSVvGpXe7chZxm8Q9MDsGA1UdHwQ0MDIwMKAuoCyGKmh0 +dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2cmNhMmczLmNybDAdBgNVHQ4E +FgQUsxKJtalLNbwVAPCA6dh4h/ETfHYwDQYJKoZIhvcNAQELBQADggIBAFGm1Fqp +RMiKr7a6h707M+km36PVXZnX1NZocCn36MrfRvphotbOCDm+GmRkar9ZMGhc8c/A +Vn7JSCjwF9jNOFIOUyNLq0w4luk+Pt2YFDbgF8IDdx53xIo8Gv05e9xpTvQYaIto +qeHbQjGXfSGc91olfX6JUwZlxxbhdJH+rxTFAg0jcbqToJoScWTfXSr1QRcNbSTs +Y4CPG6oULsnhVvrzgldGSK+DxFi2OKcDsOKkV7W4IGg8Do2L/M588AfBnV8ERzpl +qgMBBQxC2+0N6RdFHbmZt0HQE/NIg1s0xcjGx1XW3YTOfje31rmAXKHOehm4Bu48 +gr8gePq5cdQ2W9tA0Dnytb9wzH2SyPPIXRI7yNxaX9H8wYeDeeiKSSmQtfh1v5cV +7RXvm8F6hLJkkco/HOW3dAUwZFcKsUH+1eUJKLN18eDGwB8yGawjHvOKqcfg5Lf/ +TvC7hgcx7pDYaCCaqHaekgUwXbB2Enzqr1fdwoU1c01W5YuQAtAx5wk1bf34Yq/J +ph7wNXGvo88N0/EfP9AdVGmJzy7VuRXeVAOyjKAIeADMlwpjBRhcbs9m3dkqvoMb +SXKJxv/hFmNgEOvOlaFsXX1dbKg1v+C1AzKAFdiuAIa62JzASiEhigqNSdqdTsOh +8W8hdONuKKpe9zKedhBFAvuxhDgKmnySglYc +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00 +MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIgRzMwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFhZiFf +qq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMW +n4rjyduYNM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ym +c5GQYaYDFCDy54ejiK2toIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+ +O7q414AB+6XrW7PFXmAqMaCvN+ggOp+oMiwMzAkd056OXbxMmO7FGmh77FOm6RQ1 +o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+lV0POKa2Mq1W/xPtbAd0j +IaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZoL1NesNKq +IcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz +8eQQsSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43eh +vNURG3YBZwjgQQvD6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l +7ZizlWNof/k19N+IxWA1ksB8aRxhlRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALG +cC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZIhvcNAQELBQAD +ggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 +AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RC +roijQ1h5fq7KpVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0Ga +W/ZZGYjeVYg3UQt4XAoeo0L9x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4n +lv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgzdWqTHBLmYF5vHX/JHyPLhGGfHoJE ++V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6XU/IyAgkwo1jwDQHV +csaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+NwmNtd +dbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNg +KCLjsZWDzYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeM +HVOyToV7BjjHLPj4sHKNJeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4 +WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.1.cert b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.1.cert new file mode 100644 index 00000000..51f64f08 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.1.cert @@ -0,0 +1,69 @@ +subject=/C=AU/ST=Victoria/L=Melbourne/O=Telstra Corporation Limited/OU=Telstra Energy/CN=dev.energy.inside.telstra.com +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +-----BEGIN CERTIFICATE----- +MIIIHTCCBgWgAwIBAgIUCqrrzSfjzaoyB3DOxst2kMxFp/MwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxIzAh +BgNVBAMTGlF1b1ZhZGlzIEdsb2JhbCBTU0wgSUNBIEczMB4XDTE5MDgyMTIyMjIyOFoXDTIxMDgyMTIyMzIwMFowgZsxCzAJBgNVBAYTAkFVMREwDwYDVQQIDAhWaWN0 +b3JpYTESMBAGA1UEBwwJTWVsYm91cm5lMSQwIgYDVQQKDBtUZWxzdHJhIENvcnBvcmF0aW9uIExpbWl0ZWQxFzAVBgNVBAsMDlRlbHN0cmEgRW5lcmd5MSYwJAYDVQQD +DB1kZXYuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMPAPH2y206qios2NMzlCNJv1mrwC1/8tH2HOqJGiYZB +O7QOBRSvJsV++IozCB8ap99e8B64OOAQPOyykrdXd2axhftmMb1SFMF56eukHSuzKhKWRUgHs0UFRU51lDcBcOvphwJ+5SOgqrqKFFFBgJ0ZpcP54JpFwKIdh3ac10x2 +mBaW5ccqdv5X9oEMu1D/yivBmy34tsbLYyfttCjP76iVT7UVYHjHWynnIhsEyMsUgdM90NzrTlrvTSi/EcCD1W3+8b0f+G1TI5rhHbKwR0n/mv5QLFm7EABoYPhxS8bX +B+9tE67yb0RyWbgvUiHySRynQLNMRpRx8Y9bA8uC8n8CAwEAAaOCA6QwggOgMAkGA1UdEwQCMAAwHwYDVR0jBBgwFoAUsxKJtalLNbwVAPCA6dh4h/ETfHYwcwYIKwYB +BQUHAQEEZzBlMDcGCCsGAQUFBzAChitodHRwOi8vdHJ1c3QucXVvdmFkaXNnbG9iYWwuY29tL3F2c3NsZzMuY3J0MCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5xdW92 +YWRpc2dsb2JhbC5jb20wgZ8GA1UdEQSBlzCBlIIdZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5jb22CJXJlcG9ydHMuZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5j +b22CJ2dyZWVuc3luYy5kZXYuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbYIjbmdvc3MuZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5jb20wUQYDVR0gBEowSDBGBgwr +BgEEAb5YAAJkAQEwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5xdW92YWRpc2dsb2JhbC5jb20vcmVwb3NpdG9yeTAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH +AwEwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL2NybC5xdW92YWRpc2dsb2JhbC5jb20vcXZzc2xnMy5jcmwwHQYDVR0OBBYEFEoJQRpPC/V5ZK3mMkszZE2v6vh+MA4G +A1UdDwEB/wQEAwIFoDCCAXwGCisGAQQB1nkCBAIEggFsBIIBaAFmAHUAVhQGmi/XwuzT9eG9RLI+x0Z2ubyZEVzA75SYVdaJ0N0AAAFstk9Y+gAABAMARjBEAiBFMZa6 +O9iXVjy2kqQa54vgNFdU7shgFJJhm//fSAQZUAIgBIL/yPdh+XiuQS2xPhCzNYkhbxf7BbN4qUISESgiZpsAdgBvU3asMfAxGdiZAKRRFf93FRwR2QLBACkGjbIImjfZ +EwAAAWy2T1nKAAAEAwBHMEUCIG0tp63jLsDsfCTDlcvV5ItjRkbUJBnkxlPdP2PH88sTAiEApgaPofVdn2hdI12iDDex72ta+9wpwQ1MxoaJn2nt+qEAdQDuS723dc5g +uuFCaR+r4Z5mow9+X7By2IMAxHuJeqj9ywAAAWy2T1iJAAAEAwBGMEQCIE/mzEFpCJUc71jvwJa4Px86R3ZYK4mHmUlQAUZqd0ZkAiBdEmT8xxTuleSUlYHEkKCK/FZX +L+vsYJpPrA9TsO5IsTANBgkqhkiG9w0BAQsFAAOCAgEApE9WLz3S8tqA9Dk3r9LFrJy8km9cBt1O9SQZwFsduGKGdF3Fd+/Y0V7UrFDzrX+NIzqcmgBHKxaIXorMBF70 +ajMaaROP2ymkpEXnruEwoR47fbW+JRAWDRm2xnouQveQX9ZcgCLbBvAWBqpndQj2DGmLJhNz5GlFBjh3PQZlU1w8hU7TrDxa7M1GMtVnk8X+o3l/MX9iPeEs+PiC4dHD +hpj84RY1VQJz8+10rql47SB5YgbwcqaizTG4ax/OAv1JHNWtfAodIMX8Y8X00zozA20LQv880jCCNANVNbrXJ3h4X3xwW/C1X9vYk0shymZJbT5u17JbPD1cy39bA7kT +F4L7scdQRxvcqazYN4/IdgvgMji9OltiYufP88Ti8KB2tcl2accpiC5St/zllGD1hqEeYLMzjyvUKR/1uvURQQtc0DPvBRmvkB+aI4g+sLkTTFWj5bsA1vKU8SDCyMuB +RQV11DId5+RNNCmWnskORUZJQssvY49pnfCxCES2nt3l/XzTzVtLYmd6G9uAqVace2ibnmDrFVlmlyRsCiMfZl5/OTJzt7Cj3az59m5Syfw/lnS9YP82t/r/ufuKkO5Q +q5a9aI8DuNNmAjR4lpIJNqIpX/y+dG2aGmx4XTc31MR9szWtiTgOHe0MkMupOAL0qkHrBgwo1zjuTMf3QOg6Z5Q= +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +MIIGFzCCA/+gAwIBAgIUftbnnMmtgcTIGT75XUQodw40ExcwDQYJKoZIhvcNAQELBQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjExMDYxNDUwMThaFw0yMjExMDYxNDUwMThaME0xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMSMwIQYDVQQDExpRdW9WYWRpcyBHbG9iYWwgU1NMIElDQSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANf8Od17be6c6lTGJDhEXpmkTs4y +Q39Rr5VJyBeWCg06nSS71s6xF3sZvKcV0MbXlXCYM2ZX7cNTbJ81gs7uDsKFp+vKEymiKyEiI2SImOtECNnSg+RVR4np/xz/UlC0yFUisH75cZsJ8T1pkGMfiEouR0EM +7O0uFgoboRfUP582TTWy0F7ynSA6YfGKnKj0OFwZJmGHVkLs1VevWjhj3R1fsPanH05P5moePFnpQdj1FofoSxUHZ0c7VB+sUimboHm/uHNY1LOsk77qiSuVC5/yrdg3 +2EEfP/mxJYT4r/5UiD7VahySzeZHzZ2OibQm2AfgfMN3l57lCM3/WPQBhMAPS1jzkE+7MjajM2f0aZctimW4Hasrj8AQnfAdHqZehbhtXaAlffNEzCdpNK584oCTVR7N +UR9iZFx83ruTqpo+GcLP/iSYqhM4g7fy45sNhU+IS+ca03zbxTl3TTlkofXunI5BxxE30eGSQpDZ5+iUJcEOAuVKrlYocFbB3KF45hwcbzPWQ1DcO2jFAapOtQzeS+MZ +yZzT2YseJ8hQHKu8YrXZWwKaNfyl8kFkHUBDICowNEoZvBwRCQp8sgqL6YRZy0uDJGxmnC2e0BVKSjcIvmq/CRWH7yiTk9eWm73xrsg9iIyD/kwJEnLyIk8tR5V8p/hc +1H2AjDrZH12PsZ45AgMBAAGjgfMwgfAwEgYDVR0TAQH/BAgwBgEB/wIBATARBgNVHSAECjAIMAYGBFUdIAAwOgYIKwYBBQUHAQEELjAsMCoGCCsGAQUFBzABhh5odHRw +Oi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wDgYDVR0PAQH/BAQDAgEGMB8GA1UdIwQYMBaAFO3nb3Zav2DsSVvGpXe7chZxm8Q9MDsGA1UdHwQ0MDIwMKAuoCyGKmh0 +dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2cmNhMmczLmNybDAdBgNVHQ4EFgQUsxKJtalLNbwVAPCA6dh4h/ETfHYwDQYJKoZIhvcNAQELBQADggIBAFGm1Fqp +RMiKr7a6h707M+km36PVXZnX1NZocCn36MrfRvphotbOCDm+GmRkar9ZMGhc8c/AVn7JSCjwF9jNOFIOUyNLq0w4luk+Pt2YFDbgF8IDdx53xIo8Gv05e9xpTvQYaIto +qeHbQjGXfSGc91olfX6JUwZlxxbhdJH+rxTFAg0jcbqToJoScWTfXSr1QRcNbSTsY4CPG6oULsnhVvrzgldGSK+DxFi2OKcDsOKkV7W4IGg8Do2L/M588AfBnV8ERzpl +qgMBBQxC2+0N6RdFHbmZt0HQE/NIg1s0xcjGx1XW3YTOfje31rmAXKHOehm4Bu48gr8gePq5cdQ2W9tA0Dnytb9wzH2SyPPIXRI7yNxaX9H8wYeDeeiKSSmQtfh1v5cV +7RXvm8F6hLJkkco/HOW3dAUwZFcKsUH+1eUJKLN18eDGwB8yGawjHvOKqcfg5Lf/TvC7hgcx7pDYaCCaqHaekgUwXbB2Enzqr1fdwoU1c01W5YuQAtAx5wk1bf34Yq/J +ph7wNXGvo88N0/EfP9AdVGmJzy7VuRXeVAOyjKAIeADMlwpjBRhcbs9m3dkqvoMbSXKJxv/hFmNgEOvOlaFsXX1dbKg1v+C1AzKAFdiuAIa62JzASiEhigqNSdqdTsOh +8W8hdONuKKpe9zKedhBFAvuxhDgKmnySglYc +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIgRzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFhZiFf +qq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduYNM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ym +c5GQYaYDFCDy54ejiK2toIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+oMiwMzAkd056OXbxMmO7FGmh77FOm6RQ1 +o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+lV0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZoL1NesNKq +IcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQsSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43eh +vNURG3YBZwjgQQvD6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxhlRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALG +cC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZIhvcNAQELBQAD +ggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RC +roijQ1h5fq7KpVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4n +lv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgzdWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6XU/IyAgkwo1jwDQHV +csaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+NwmNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNg +KCLjsZWDzYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKNJeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4 +WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.2.cert b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.2.cert new file mode 100644 index 00000000..ce299241 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.2.cert @@ -0,0 +1,113 @@ +-----BEGIN CERTIFICATE----- +MIIIHTCCBgWgAwIBAgIUCqrrzSfjzaoyB3DOxst2kMxFp/MwDQYJKoZIhvcNAQEL +BQAwTTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxIzAh +BgNVBAMTGlF1b1ZhZGlzIEdsb2JhbCBTU0wgSUNBIEczMB4XDTE5MDgyMTIyMjIy +OFoXDTIxMDgyMTIyMzIwMFowgZsxCzAJBgNVBAYTAkFVMREwDwYDVQQIDAhWaWN0 +b3JpYTESMBAGA1UEBwwJTWVsYm91cm5lMSQwIgYDVQQKDBtUZWxzdHJhIENvcnBv +cmF0aW9uIExpbWl0ZWQxFzAVBgNVBAsMDlRlbHN0cmEgRW5lcmd5MSYwJAYDVQQD +DB1kZXYuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbTCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAMPAPH2y206qios2NMzlCNJv1mrwC1/8tH2HOqJGiYZB +O7QOBRSvJsV++IozCB8ap99e8B64OOAQPOyykrdXd2axhftmMb1SFMF56eukHSuz +KhKWRUgHs0UFRU51lDcBcOvphwJ+5SOgqrqKFFFBgJ0ZpcP54JpFwKIdh3ac10x2 +mBaW5ccqdv5X9oEMu1D/yivBmy34tsbLYyfttCjP76iVT7UVYHjHWynnIhsEyMsU +gdM90NzrTlrvTSi/EcCD1W3+8b0f+G1TI5rhHbKwR0n/mv5QLFm7EABoYPhxS8bX +B+9tE67yb0RyWbgvUiHySRynQLNMRpRx8Y9bA8uC8n8CAwEAAaOCA6QwggOgMAkG +A1UdEwQCMAAwHwYDVR0jBBgwFoAUsxKJtalLNbwVAPCA6dh4h/ETfHYwcwYIKwYB +BQUHAQEEZzBlMDcGCCsGAQUFBzAChitodHRwOi8vdHJ1c3QucXVvdmFkaXNnbG9i +YWwuY29tL3F2c3NsZzMuY3J0MCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5xdW92 +YWRpc2dsb2JhbC5jb20wgZ8GA1UdEQSBlzCBlIIdZGV2LmVuZXJneS5pbnNpZGUu +dGVsc3RyYS5jb22CJXJlcG9ydHMuZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5j +b22CJ2dyZWVuc3luYy5kZXYuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbYIjbmdv +c3MuZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5jb20wUQYDVR0gBEowSDBGBgwr +BgEEAb5YAAJkAQEwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5xdW92YWRpc2ds +b2JhbC5jb20vcmVwb3NpdG9yeTAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH +AwEwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL2NybC5xdW92YWRpc2dsb2JhbC5j +b20vcXZzc2xnMy5jcmwwHQYDVR0OBBYEFEoJQRpPC/V5ZK3mMkszZE2v6vh+MA4G +A1UdDwEB/wQEAwIFoDCCAXwGCisGAQQB1nkCBAIEggFsBIIBaAFmAHUAVhQGmi/X +wuzT9eG9RLI+x0Z2ubyZEVzA75SYVdaJ0N0AAAFstk9Y+gAABAMARjBEAiBFMZa6 +O9iXVjy2kqQa54vgNFdU7shgFJJhm//fSAQZUAIgBIL/yPdh+XiuQS2xPhCzNYkh +bxf7BbN4qUISESgiZpsAdgBvU3asMfAxGdiZAKRRFf93FRwR2QLBACkGjbIImjfZ +EwAAAWy2T1nKAAAEAwBHMEUCIG0tp63jLsDsfCTDlcvV5ItjRkbUJBnkxlPdP2PH +88sTAiEApgaPofVdn2hdI12iDDex72ta+9wpwQ1MxoaJn2nt+qEAdQDuS723dc5g +uuFCaR+r4Z5mow9+X7By2IMAxHuJeqj9ywAAAWy2T1iJAAAEAwBGMEQCIE/mzEFp +CJUc71jvwJa4Px86R3ZYK4mHmUlQAUZqd0ZkAiBdEmT8xxTuleSUlYHEkKCK/FZX +L+vsYJpPrA9TsO5IsTANBgkqhkiG9w0BAQsFAAOCAgEApE9WLz3S8tqA9Dk3r9LF +rJy8km9cBt1O9SQZwFsduGKGdF3Fd+/Y0V7UrFDzrX+NIzqcmgBHKxaIXorMBF70 +ajMaaROP2ymkpEXnruEwoR47fbW+JRAWDRm2xnouQveQX9ZcgCLbBvAWBqpndQj2 +DGmLJhNz5GlFBjh3PQZlU1w8hU7TrDxa7M1GMtVnk8X+o3l/MX9iPeEs+PiC4dHD +hpj84RY1VQJz8+10rql47SB5YgbwcqaizTG4ax/OAv1JHNWtfAodIMX8Y8X00zoz +A20LQv880jCCNANVNbrXJ3h4X3xwW/C1X9vYk0shymZJbT5u17JbPD1cy39bA7kT +F4L7scdQRxvcqazYN4/IdgvgMji9OltiYufP88Ti8KB2tcl2accpiC5St/zllGD1 +hqEeYLMzjyvUKR/1uvURQQtc0DPvBRmvkB+aI4g+sLkTTFWj5bsA1vKU8SDCyMuB +RQV11DId5+RNNCmWnskORUZJQssvY49pnfCxCES2nt3l/XzTzVtLYmd6G9uAqVac +e2ibnmDrFVlmlyRsCiMfZl5/OTJzt7Cj3az59m5Syfw/lnS9YP82t/r/ufuKkO5Q +q5a9aI8DuNNmAjR4lpIJNqIpX/y+dG2aGmx4XTc31MR9szWtiTgOHe0MkMupOAL0 +qkHrBgwo1zjuTMf3QOg6Z5Q= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIGFzCCA/+gAwIBAgIUftbnnMmtgcTIGT75XUQodw40ExcwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjExMDYxNDUwMThaFw0y +MjExMDYxNDUwMThaME0xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMSMwIQYDVQQDExpRdW9WYWRpcyBHbG9iYWwgU1NMIElDQSBHMzCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANf8Od17be6c6lTGJDhEXpmkTs4y +Q39Rr5VJyBeWCg06nSS71s6xF3sZvKcV0MbXlXCYM2ZX7cNTbJ81gs7uDsKFp+vK +EymiKyEiI2SImOtECNnSg+RVR4np/xz/UlC0yFUisH75cZsJ8T1pkGMfiEouR0EM +7O0uFgoboRfUP582TTWy0F7ynSA6YfGKnKj0OFwZJmGHVkLs1VevWjhj3R1fsPan +H05P5moePFnpQdj1FofoSxUHZ0c7VB+sUimboHm/uHNY1LOsk77qiSuVC5/yrdg3 +2EEfP/mxJYT4r/5UiD7VahySzeZHzZ2OibQm2AfgfMN3l57lCM3/WPQBhMAPS1jz +kE+7MjajM2f0aZctimW4Hasrj8AQnfAdHqZehbhtXaAlffNEzCdpNK584oCTVR7N +UR9iZFx83ruTqpo+GcLP/iSYqhM4g7fy45sNhU+IS+ca03zbxTl3TTlkofXunI5B +xxE30eGSQpDZ5+iUJcEOAuVKrlYocFbB3KF45hwcbzPWQ1DcO2jFAapOtQzeS+MZ +yZzT2YseJ8hQHKu8YrXZWwKaNfyl8kFkHUBDICowNEoZvBwRCQp8sgqL6YRZy0uD +JGxmnC2e0BVKSjcIvmq/CRWH7yiTk9eWm73xrsg9iIyD/kwJEnLyIk8tR5V8p/hc +1H2AjDrZH12PsZ45AgMBAAGjgfMwgfAwEgYDVR0TAQH/BAgwBgEB/wIBATARBgNV +HSAECjAIMAYGBFUdIAAwOgYIKwYBBQUHAQEELjAsMCoGCCsGAQUFBzABhh5odHRw +Oi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wDgYDVR0PAQH/BAQDAgEGMB8GA1Ud +IwQYMBaAFO3nb3Zav2DsSVvGpXe7chZxm8Q9MDsGA1UdHwQ0MDIwMKAuoCyGKmh0 +dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2cmNhMmczLmNybDAdBgNVHQ4E +FgQUsxKJtalLNbwVAPCA6dh4h/ETfHYwDQYJKoZIhvcNAQELBQADggIBAFGm1Fqp +RMiKr7a6h707M+km36PVXZnX1NZocCn36MrfRvphotbOCDm+GmRkar9ZMGhc8c/A +Vn7JSCjwF9jNOFIOUyNLq0w4luk+Pt2YFDbgF8IDdx53xIo8Gv05e9xpTvQYaIto +qeHbQjGXfSGc91olfX6JUwZlxxbhdJH+rxTFAg0jcbqToJoScWTfXSr1QRcNbSTs +Y4CPG6oULsnhVvrzgldGSK+DxFi2OKcDsOKkV7W4IGg8Do2L/M588AfBnV8ERzpl +qgMBBQxC2+0N6RdFHbmZt0HQE/NIg1s0xcjGx1XW3YTOfje31rmAXKHOehm4Bu48 +gr8gePq5cdQ2W9tA0Dnytb9wzH2SyPPIXRI7yNxaX9H8wYeDeeiKSSmQtfh1v5cV +7RXvm8F6hLJkkco/HOW3dAUwZFcKsUH+1eUJKLN18eDGwB8yGawjHvOKqcfg5Lf/ +TvC7hgcx7pDYaCCaqHaekgUwXbB2Enzqr1fdwoU1c01W5YuQAtAx5wk1bf34Yq/J +ph7wNXGvo88N0/EfP9AdVGmJzy7VuRXeVAOyjKAIeADMlwpjBRhcbs9m3dkqvoMb +SXKJxv/hFmNgEOvOlaFsXX1dbKg1v+C1AzKAFdiuAIa62JzASiEhigqNSdqdTsOh +8W8hdONuKKpe9zKedhBFAvuxhDgKmnySglYc +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00 +MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIgRzMwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFhZiFf +qq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMW +n4rjyduYNM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ym +c5GQYaYDFCDy54ejiK2toIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+ +O7q414AB+6XrW7PFXmAqMaCvN+ggOp+oMiwMzAkd056OXbxMmO7FGmh77FOm6RQ1 +o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+lV0POKa2Mq1W/xPtbAd0j +IaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZoL1NesNKq +IcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz +8eQQsSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43eh +vNURG3YBZwjgQQvD6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l +7ZizlWNof/k19N+IxWA1ksB8aRxhlRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALG +cC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZIhvcNAQELBQAD +ggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 +AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RC +roijQ1h5fq7KpVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0Ga +W/ZZGYjeVYg3UQt4XAoeo0L9x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4n +lv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgzdWqTHBLmYF5vHX/JHyPLhGGfHoJE ++V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6XU/IyAgkwo1jwDQHV +csaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+NwmNtd +dbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNg +KCLjsZWDzYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeM +HVOyToV7BjjHLPj4sHKNJeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4 +WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.3.cert b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.3.cert new file mode 100644 index 00000000..0c947b17 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.3.cert @@ -0,0 +1,124 @@ +subject=/C=AU/ST=Victoria/L=Melbourne/O=Telstra Corporation Limited/OU=Telstra Energy/CN=dev.energy.inside.telstra.com +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +-----BEGIN CERTIFICATE----- +MIIIHTCCBgWgAwIBAgIUCqrrzSfjzaoyB3DOxst2kMxFp/MwDQYJKoZIhvcNAQEL +BQAwTTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxIzAh +BgNVBAMTGlF1b1ZhZGlzIEdsb2JhbCBTU0wgSUNBIEczMB4XDTE5MDgyMTIyMjIy +OFoXDTIxMDgyMTIyMzIwMFowgZsxCzAJBgNVBAYTAkFVMREwDwYDVQQIDAhWaWN0 +b3JpYTESMBAGA1UEBwwJTWVsYm91cm5lMSQwIgYDVQQKDBtUZWxzdHJhIENvcnBv +cmF0aW9uIExpbWl0ZWQxFzAVBgNVBAsMDlRlbHN0cmEgRW5lcmd5MSYwJAYDVQQD +DB1kZXYuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbTCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAMPAPH2y206qios2NMzlCNJv1mrwC1/8tH2HOqJGiYZB +O7QOBRSvJsV++IozCB8ap99e8B64OOAQPOyykrdXd2axhftmMb1SFMF56eukHSuz +KhKWRUgHs0UFRU51lDcBcOvphwJ+5SOgqrqKFFFBgJ0ZpcP54JpFwKIdh3ac10x2 +mBaW5ccqdv5X9oEMu1D/yivBmy34tsbLYyfttCjP76iVT7UVYHjHWynnIhsEyMsU +gdM90NzrTlrvTSi/EcCD1W3+8b0f+G1TI5rhHbKwR0n/mv5QLFm7EABoYPhxS8bX +B+9tE67yb0RyWbgvUiHySRynQLNMRpRx8Y9bA8uC8n8CAwEAAaOCA6QwggOgMAkG +A1UdEwQCMAAwHwYDVR0jBBgwFoAUsxKJtalLNbwVAPCA6dh4h/ETfHYwcwYIKwYB +BQUHAQEEZzBlMDcGCCsGAQUFBzAChitodHRwOi8vdHJ1c3QucXVvdmFkaXNnbG9i +YWwuY29tL3F2c3NsZzMuY3J0MCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5xdW92 +YWRpc2dsb2JhbC5jb20wgZ8GA1UdEQSBlzCBlIIdZGV2LmVuZXJneS5pbnNpZGUu +dGVsc3RyYS5jb22CJXJlcG9ydHMuZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5j +b22CJ2dyZWVuc3luYy5kZXYuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbYIjbmdv +c3MuZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5jb20wUQYDVR0gBEowSDBGBgwr +BgEEAb5YAAJkAQEwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5xdW92YWRpc2ds +b2JhbC5jb20vcmVwb3NpdG9yeTAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH +AwEwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL2NybC5xdW92YWRpc2dsb2JhbC5j +b20vcXZzc2xnMy5jcmwwHQYDVR0OBBYEFEoJQRpPC/V5ZK3mMkszZE2v6vh+MA4G +A1UdDwEB/wQEAwIFoDCCAXwGCisGAQQB1nkCBAIEggFsBIIBaAFmAHUAVhQGmi/X +wuzT9eG9RLI+x0Z2ubyZEVzA75SYVdaJ0N0AAAFstk9Y+gAABAMARjBEAiBFMZa6 +O9iXVjy2kqQa54vgNFdU7shgFJJhm//fSAQZUAIgBIL/yPdh+XiuQS2xPhCzNYkh +bxf7BbN4qUISESgiZpsAdgBvU3asMfAxGdiZAKRRFf93FRwR2QLBACkGjbIImjfZ +EwAAAWy2T1nKAAAEAwBHMEUCIG0tp63jLsDsfCTDlcvV5ItjRkbUJBnkxlPdP2PH +88sTAiEApgaPofVdn2hdI12iDDex72ta+9wpwQ1MxoaJn2nt+qEAdQDuS723dc5g +uuFCaR+r4Z5mow9+X7By2IMAxHuJeqj9ywAAAWy2T1iJAAAEAwBGMEQCIE/mzEFp +CJUc71jvwJa4Px86R3ZYK4mHmUlQAUZqd0ZkAiBdEmT8xxTuleSUlYHEkKCK/FZX +L+vsYJpPrA9TsO5IsTANBgkqhkiG9w0BAQsFAAOCAgEApE9WLz3S8tqA9Dk3r9LF +rJy8km9cBt1O9SQZwFsduGKGdF3Fd+/Y0V7UrFDzrX+NIzqcmgBHKxaIXorMBF70 +ajMaaROP2ymkpEXnruEwoR47fbW+JRAWDRm2xnouQveQX9ZcgCLbBvAWBqpndQj2 +DGmLJhNz5GlFBjh3PQZlU1w8hU7TrDxa7M1GMtVnk8X+o3l/MX9iPeEs+PiC4dHD +hpj84RY1VQJz8+10rql47SB5YgbwcqaizTG4ax/OAv1JHNWtfAodIMX8Y8X00zoz +A20LQv880jCCNANVNbrXJ3h4X3xwW/C1X9vYk0shymZJbT5u17JbPD1cy39bA7kT +F4L7scdQRxvcqazYN4/IdgvgMji9OltiYufP88Ti8KB2tcl2accpiC5St/zllGD1 +hqEeYLMzjyvUKR/1uvURQQtc0DPvBRmvkB+aI4g+sLkTTFWj5bsA1vKU8SDCyMuB +RQV11DId5+RNNCmWnskORUZJQssvY49pnfCxCES2nt3l/XzTzVtLYmd6G9uAqVac +e2ibnmDrFVlmlyRsCiMfZl5/OTJzt7Cj3az59m5Syfw/lnS9YP82t/r/ufuKkO5Q +q5a9aI8DuNNmAjR4lpIJNqIpX/y+dG2aGmx4XTc31MR9szWtiTgOHe0MkMupOAL0 +qkHrBgwo1zjuTMf3QOg6Z5Q= +-----END CERTIFICATE----- + + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00 +MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIgRzMwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFhZiFf +qq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMW +n4rjyduYNM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ym +c5GQYaYDFCDy54ejiK2toIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+ +O7q414AB+6XrW7PFXmAqMaCvN+ggOp+oMiwMzAkd056OXbxMmO7FGmh77FOm6RQ1 +o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+lV0POKa2Mq1W/xPtbAd0j +IaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZoL1NesNKq +IcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz +8eQQsSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43eh +vNURG3YBZwjgQQvD6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l +7ZizlWNof/k19N+IxWA1ksB8aRxhlRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALG +cC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZIhvcNAQELBQAD +ggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 +AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RC +roijQ1h5fq7KpVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0Ga +W/ZZGYjeVYg3UQt4XAoeo0L9x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4n +lv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgzdWqTHBLmYF5vHX/JHyPLhGGfHoJE ++V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6XU/IyAgkwo1jwDQHV +csaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+NwmNtd +dbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNg +KCLjsZWDzYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeM +HVOyToV7BjjHLPj4sHKNJeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4 +WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + + + + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +MIIGFzCCA/+gAwIBAgIUftbnnMmtgcTIGT75XUQodw40ExcwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjExMDYxNDUwMThaFw0y +MjExMDYxNDUwMThaME0xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMSMwIQYDVQQDExpRdW9WYWRpcyBHbG9iYWwgU1NMIElDQSBHMzCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANf8Od17be6c6lTGJDhEXpmkTs4y +Q39Rr5VJyBeWCg06nSS71s6xF3sZvKcV0MbXlXCYM2ZX7cNTbJ81gs7uDsKFp+vK +EymiKyEiI2SImOtECNnSg+RVR4np/xz/UlC0yFUisH75cZsJ8T1pkGMfiEouR0EM +7O0uFgoboRfUP582TTWy0F7ynSA6YfGKnKj0OFwZJmGHVkLs1VevWjhj3R1fsPan +H05P5moePFnpQdj1FofoSxUHZ0c7VB+sUimboHm/uHNY1LOsk77qiSuVC5/yrdg3 +2EEfP/mxJYT4r/5UiD7VahySzeZHzZ2OibQm2AfgfMN3l57lCM3/WPQBhMAPS1jz +kE+7MjajM2f0aZctimW4Hasrj8AQnfAdHqZehbhtXaAlffNEzCdpNK584oCTVR7N +UR9iZFx83ruTqpo+GcLP/iSYqhM4g7fy45sNhU+IS+ca03zbxTl3TTlkofXunI5B +xxE30eGSQpDZ5+iUJcEOAuVKrlYocFbB3KF45hwcbzPWQ1DcO2jFAapOtQzeS+MZ +yZzT2YseJ8hQHKu8YrXZWwKaNfyl8kFkHUBDICowNEoZvBwRCQp8sgqL6YRZy0uD +JGxmnC2e0BVKSjcIvmq/CRWH7yiTk9eWm73xrsg9iIyD/kwJEnLyIk8tR5V8p/hc +1H2AjDrZH12PsZ45AgMBAAGjgfMwgfAwEgYDVR0TAQH/BAgwBgEB/wIBATARBgNV +HSAECjAIMAYGBFUdIAAwOgYIKwYBBQUHAQEELjAsMCoGCCsGAQUFBzABhh5odHRw +Oi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wDgYDVR0PAQH/BAQDAgEGMB8GA1Ud +IwQYMBaAFO3nb3Zav2DsSVvGpXe7chZxm8Q9MDsGA1UdHwQ0MDIwMKAuoCyGKmh0 +dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2cmNhMmczLmNybDAdBgNVHQ4E +FgQUsxKJtalLNbwVAPCA6dh4h/ETfHYwDQYJKoZIhvcNAQELBQADggIBAFGm1Fqp +RMiKr7a6h707M+km36PVXZnX1NZocCn36MrfRvphotbOCDm+GmRkar9ZMGhc8c/A +Vn7JSCjwF9jNOFIOUyNLq0w4luk+Pt2YFDbgF8IDdx53xIo8Gv05e9xpTvQYaIto +qeHbQjGXfSGc91olfX6JUwZlxxbhdJH+rxTFAg0jcbqToJoScWTfXSr1QRcNbSTs +Y4CPG6oULsnhVvrzgldGSK+DxFi2OKcDsOKkV7W4IGg8Do2L/M588AfBnV8ERzpl +qgMBBQxC2+0N6RdFHbmZt0HQE/NIg1s0xcjGx1XW3YTOfje31rmAXKHOehm4Bu48 +gr8gePq5cdQ2W9tA0Dnytb9wzH2SyPPIXRI7yNxaX9H8wYeDeeiKSSmQtfh1v5cV +7RXvm8F6hLJkkco/HOW3dAUwZFcKsUH+1eUJKLN18eDGwB8yGawjHvOKqcfg5Lf/ +TvC7hgcx7pDYaCCaqHaekgUwXbB2Enzqr1fdwoU1c01W5YuQAtAx5wk1bf34Yq/J +ph7wNXGvo88N0/EfP9AdVGmJzy7VuRXeVAOyjKAIeADMlwpjBRhcbs9m3dkqvoMb +SXKJxv/hFmNgEOvOlaFsXX1dbKg1v+C1AzKAFdiuAIa62JzASiEhigqNSdqdTsOh +8W8hdONuKKpe9zKedhBFAvuxhDgKmnySglYc +-----END CERTIFICATE----- diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.4.cert b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.4.cert new file mode 100644 index 00000000..adbb8edc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-1.4.cert @@ -0,0 +1,86 @@ +subject=/C=AU/ST=Victoria/L=Melbourne/O=Telstra Corporation Limited/OU=Telstra Energy/CN=dev.energy.inside.telstra.com +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +-----BEGIN CERTIFICATE----- +MIIIHTCCBgWgAwIBAgIUCqrrzSfjzaoyB3DOxst2kMxFp/MwDQYJKoZIhvcNAQEL +BQAwTTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxIzAh +BgNVBAMTGlF1b1ZhZGlzIEdsb2JhbCBTU0wgSUNBIEczMB4XDTE5MDgyMTIyMjIy +OFoXDTIxMDgyMTIyMzIwMFowgZsxCzAJBgNVBAYTAkFVMREwDwYDVQQIDAhWaWN0 +b3JpYTESMBAGA1UEBwwJTWVsYm91cm5lMSQwIgYDVQQKDBtUZWxzdHJhIENvcnBv +cmF0aW9uIExpbWl0ZWQxFzAVBgNVBAsMDlRlbHN0cmEgRW5lcmd5MSYwJAYDVQQD +DB1kZXYuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbTCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAMPAPH2y206qios2NMzlCNJv1mrwC1/8tH2HOqJGiYZB +O7QOBRSvJsV++IozCB8ap99e8B64OOAQPOyykrdXd2axhftmMb1SFMF56eukHSuz +KhKWRUgHs0UFRU51lDcBcOvphwJ+5SOgqrqKFFFBgJ0ZpcP54JpFwKIdh3ac10x2 +mBaW5ccqdv5X9oEMu1D/yivBmy34tsbLYyfttCjP76iVT7UVYHjHWynnIhsEyMsU +gdM90NzrTlrvTSi/EcCD1W3+8b0f+G1TI5rhHbKwR0n/mv5QLFm7EABoYPhxS8bX +B+9tE67yb0RyWbgvUiHySRynQLNMRpRx8Y9bA8uC8n8CAwEAAaOCA6QwggOgMAkG +A1UdEwQCMAAwHwYDVR0jBBgwFoAUsxKJtalLNbwVAPCA6dh4h/ETfHYwcwYIKwYB +BQUHAQEEZzBlMDcGCCsGAQUFBzAChitodHRwOi8vdHJ1c3QucXVvdmFkaXNnbG9i +YWwuY29tL3F2c3NsZzMuY3J0MCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5xdW92 +YWRpc2dsb2JhbC5jb20wgZ8GA1UdEQSBlzCBlIIdZGV2LmVuZXJneS5pbnNpZGUu +dGVsc3RyYS5jb22CJXJlcG9ydHMuZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5j +b22CJ2dyZWVuc3luYy5kZXYuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbYIjbmdv +c3MuZGV2LmVuZXJneS5pbnNpZGUudGVsc3RyYS5jb20wUQYDVR0gBEowSDBGBgwr +BgEEAb5YAAJkAQEwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5xdW92YWRpc2ds +b2JhbC5jb20vcmVwb3NpdG9yeTAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH +AwEwOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL2NybC5xdW92YWRpc2dsb2JhbC5j +b20vcXZzc2xnMy5jcmwwHQYDVR0OBBYEFEoJQRpPC/V5ZK3mMkszZE2v6vh+MA4G +A1UdDwEB/wQEAwIFoDCCAXwGCisGAQQB1nkCBAIEggFsBIIBaAFmAHUAVhQGmi/X +wuzT9eG9RLI+x0Z2ubyZEVzA75SYVdaJ0N0AAAFstk9Y+gAABAMARjBEAiBFMZa6 +O9iXVjy2kqQa54vgNFdU7shgFJJhm//fSAQZUAIgBIL/yPdh+XiuQS2xPhCzNYkh +bxf7BbN4qUISESgiZpsAdgBvU3asMfAxGdiZAKRRFf93FRwR2QLBACkGjbIImjfZ +EwAAAWy2T1nKAAAEAwBHMEUCIG0tp63jLsDsfCTDlcvV5ItjRkbUJBnkxlPdP2PH +88sTAiEApgaPofVdn2hdI12iDDex72ta+9wpwQ1MxoaJn2nt+qEAdQDuS723dc5g +uuFCaR+r4Z5mow9+X7By2IMAxHuJeqj9ywAAAWy2T1iJAAAEAwBGMEQCIE/mzEFp +CJUc71jvwJa4Px86R3ZYK4mHmUlQAUZqd0ZkAiBdEmT8xxTuleSUlYHEkKCK/FZX +L+vsYJpPrA9TsO5IsTANBgkqhkiG9w0BAQsFAAOCAgEApE9WLz3S8tqA9Dk3r9LF +rJy8km9cBt1O9SQZwFsduGKGdF3Fd+/Y0V7UrFDzrX+NIzqcmgBHKxaIXorMBF70 +ajMaaROP2ymkpEXnruEwoR47fbW+JRAWDRm2xnouQveQX9ZcgCLbBvAWBqpndQj2 +DGmLJhNz5GlFBjh3PQZlU1w8hU7TrDxa7M1GMtVnk8X+o3l/MX9iPeEs+PiC4dHD +hpj84RY1VQJz8+10rql47SB5YgbwcqaizTG4ax/OAv1JHNWtfAodIMX8Y8X00zoz +A20LQv880jCCNANVNbrXJ3h4X3xwW/C1X9vYk0shymZJbT5u17JbPD1cy39bA7kT +F4L7scdQRxvcqazYN4/IdgvgMji9OltiYufP88Ti8KB2tcl2accpiC5St/zllGD1 +hqEeYLMzjyvUKR/1uvURQQtc0DPvBRmvkB+aI4g+sLkTTFWj5bsA1vKU8SDCyMuB +RQV11DId5+RNNCmWnskORUZJQssvY49pnfCxCES2nt3l/XzTzVtLYmd6G9uAqVac +e2ibnmDrFVlmlyRsCiMfZl5/OTJzt7Cj3az59m5Syfw/lnS9YP82t/r/ufuKkO5Q +q5a9aI8DuNNmAjR4lpIJNqIpX/y+dG2aGmx4XTc31MR9szWtiTgOHe0MkMupOAL0 +qkHrBgwo1zjuTMf3QOg6Z5Q= +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +MIIGFzCCA/+gAwIBAgIUftbnnMmtgcTIGT75XUQodw40ExcwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjExMDYxNDUwMThaFw0y +MjExMDYxNDUwMThaME0xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMSMwIQYDVQQDExpRdW9WYWRpcyBHbG9iYWwgU1NMIElDQSBHMzCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANf8Od17be6c6lTGJDhEXpmkTs4y +Q39Rr5VJyBeWCg06nSS71s6xF3sZvKcV0MbXlXCYM2ZX7cNTbJ81gs7uDsKFp+vK +EymiKyEiI2SImOtECNnSg+RVR4np/xz/UlC0yFUisH75cZsJ8T1pkGMfiEouR0EM +7O0uFgoboRfUP582TTWy0F7ynSA6YfGKnKj0OFwZJmGHVkLs1VevWjhj3R1fsPan +H05P5moePFnpQdj1FofoSxUHZ0c7VB+sUimboHm/uHNY1LOsk77qiSuVC5/yrdg3 +2EEfP/mxJYT4r/5UiD7VahySzeZHzZ2OibQm2AfgfMN3l57lCM3/WPQBhMAPS1jz +kE+7MjajM2f0aZctimW4Hasrj8AQnfAdHqZehbhtXaAlffNEzCdpNK584oCTVR7N +UR9iZFx83ruTqpo+GcLP/iSYqhM4g7fy45sNhU+IS+ca03zbxTl3TTlkofXunI5B +xxE30eGSQpDZ5+iUJcEOAuVKrlYocFbB3KF45hwcbzPWQ1DcO2jFAapOtQzeS+MZ +yZzT2YseJ8hQHKu8YrXZWwKaNfyl8kFkHUBDICowNEoZvBwRCQp8sgqL6YRZy0uD +JGxmnC2e0BVKSjcIvmq/CRWH7yiTk9eWm73xrsg9iIyD/kwJEnLyIk8tR5V8p/hc +1H2AjDrZH12PsZ45AgMBAAGjgfMwgfAwEgYDVR0TAQH/BAgwBgEB/wIBATARBgNV +HSAECjAIMAYGBFUdIAAwOgYIKwYBBQUHAQEELjAsMCoGCCsGAQUFBzABhh5odHRw +Oi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wDgYDVR0PAQH/BAQDAgEGMB8GA1Ud +IwQYMBaAFO3nb3Zav2DsSVvGpXe7chZxm8Q9MDsGA1UdHwQ0MDIwMKAuoCyGKmh0 +dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2cmNhMmczLmNybDAdBgNVHQ4E +FgQUsxKJtalLNbwVAPCA6dh4h/ETfHYwDQYJKoZIhvcNAQELBQADggIBAFGm1Fqp +RMiKr7a6h707M+km36PVXZnX1NZocCn36MrfRvphotbOCDm+GmRkar9ZMGhc8c/A +Vn7JSCjwF9jNOFIOUyNLq0w4luk+Pt2YFDbgF8IDdx53xIo8Gv05e9xpTvQYaIto +qeHbQjGXfSGc91olfX6JUwZlxxbhdJH+rxTFAg0jcbqToJoScWTfXSr1QRcNbSTs +Y4CPG6oULsnhVvrzgldGSK+DxFi2OKcDsOKkV7W4IGg8Do2L/M588AfBnV8ERzpl +qgMBBQxC2+0N6RdFHbmZt0HQE/NIg1s0xcjGx1XW3YTOfje31rmAXKHOehm4Bu48 +gr8gePq5cdQ2W9tA0Dnytb9wzH2SyPPIXRI7yNxaX9H8wYeDeeiKSSmQtfh1v5cV +7RXvm8F6hLJkkco/HOW3dAUwZFcKsUH+1eUJKLN18eDGwB8yGawjHvOKqcfg5Lf/ +TvC7hgcx7pDYaCCaqHaekgUwXbB2Enzqr1fdwoU1c01W5YuQAtAx5wk1bf34Yq/J +ph7wNXGvo88N0/EfP9AdVGmJzy7VuRXeVAOyjKAIeADMlwpjBRhcbs9m3dkqvoMb +SXKJxv/hFmNgEOvOlaFsXX1dbKg1v+C1AzKAFdiuAIa62JzASiEhigqNSdqdTsOh +8W8hdONuKKpe9zKedhBFAvuxhDgKmnySglYc +-----END CERTIFICATE----- diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-4.cert b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-4.cert new file mode 100644 index 00000000..2b82edf6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/chain-4.cert @@ -0,0 +1,121 @@ +subject=/C=AU/ST=Victoria/L=Melbourne/O=Telstra Corporation Limited/OU=Telstra Energy/CN=prod.energy.inside.telstra.com +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +-----BEGIN CERTIFICATE----- +MIIIJDCCBgygAwIBAgIUP9S/56XvOFzWk1vp1+7JJT17brEwDQYJKoZIhvcNAQEL +BQAwTTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxIzAh +BgNVBAMTGlF1b1ZhZGlzIEdsb2JhbCBTU0wgSUNBIEczMB4XDTE5MDgyNzAzMTU1 +NFoXDTIxMDgyNzAzMjUwMFowgZwxCzAJBgNVBAYTAkFVMREwDwYDVQQIDAhWaWN0 +b3JpYTESMBAGA1UEBwwJTWVsYm91cm5lMSQwIgYDVQQKDBtUZWxzdHJhIENvcnBv +cmF0aW9uIExpbWl0ZWQxFzAVBgNVBAsMDlRlbHN0cmEgRW5lcmd5MScwJQYDVQQD +DB5wcm9kLmVuZXJneS5pbnNpZGUudGVsc3RyYS5jb20wggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQCrRouNZFOZwM1qyAU6v6ag9fzSx3y8zz36nR8HuqbA +/wqrbMmnpofwdx/9u1bilsHfJzIODv0hm7aGk+neTK3DIapiII3m0HKW0v+GLsl7 +JkDuc2o3XlakcXlA45qDKCZXbXZtY4/kdxKG0OSUZi7oQqohhYl/c/ojrTiey+4G +KhEVqWwOuQ1OC1DRw4qMH54d0koFxxSLPJ8JiiztLlK/e9n8BoJikj5fBqWy5R1F +bGXCdzjcfmPV6iSOzJShpUgj4ga91mO6j3S6LLfK5ibbTlY+pmUxUT+m9nKMon3h +mFptTYo9t9vUF/a/owjRxNLg01fJLNjYn8QV2vQvODGfAgMBAAGjggOqMIIDpjAJ +BgNVHRMEAjAAMB8GA1UdIwQYMBaAFLMSibWpSzW8FQDwgOnYeIfxE3x2MHMGCCsG +AQUFBwEBBGcwZTA3BggrBgEFBQcwAoYraHR0cDovL3RydXN0LnF1b3ZhZGlzZ2xv +YmFsLmNvbS9xdnNzbGczLmNydDAqBggrBgEFBQcwAYYeaHR0cDovL29jc3AucXVv +dmFkaXNnbG9iYWwuY29tMIGjBgNVHREEgZswgZiCHnByb2QuZW5lcmd5Lmluc2lk +ZS50ZWxzdHJhLmNvbYImcmVwb3J0cy5wcm9kLmVuZXJneS5pbnNpZGUudGVsc3Ry +YS5jb22CKGdyZWVuc3luYy5wcm9kLmVuZXJneS5pbnNpZGUudGVsc3RyYS5jb22C +JG5nb3NzLnByb2QuZW5lcmd5Lmluc2lkZS50ZWxzdHJhLmNvbTBRBgNVHSAESjBI +MEYGDCsGAQQBvlgAAmQBATA2MDQGCCsGAQUFBwIBFihodHRwOi8vd3d3LnF1b3Zh +ZGlzZ2xvYmFsLmNvbS9yZXBvc2l0b3J5MB0GA1UdJQQWMBQGCCsGAQUFBwMCBggr +BgEFBQcDATA6BgNVHR8EMzAxMC+gLaArhilodHRwOi8vY3JsLnF1b3ZhZGlzZ2xv +YmFsLmNvbS9xdnNzbGczLmNybDAdBgNVHQ4EFgQUoIME5TykVAI8VF5g0zeh0xdv +i3owDgYDVR0PAQH/BAQDAgWgMIIBfgYKKwYBBAHWeQIEAgSCAW4EggFqAWgAdgBW +FAaaL9fC7NP14b1Esj7HRna5vJkRXMDvlJhV1onQ3QAAAWzRG8r0AAAEAwBHMEUC +IQDShuQyYMiy7KKxWOzffolVIcPRgWD7ClNEbIcUATHKyQIgXnTZBXcpcbXBQXLs +tFuvY36TbKIYc2ql2nmdydGQ9wcAdgCkuQmQtBhYFIe7E6LMZ3AKPDWYBPkb37jj +d80OyA3cEAAAAWzRG8sAAAAEAwBHMEUCIGsLEoA9S7pNE3VoNZHxl2IAdeP3Dy2Q +Mk0rM46hp6CRAiEA08rOjswSdcn7qgDEoiyvlcrOTIFJAEcMlxSY65yLVUwAdgBV +gdTCFpA2AUrqC5tXPFPwwOQ4eHAlCBcvo6odBxPTDAAAAWzRG8q7AAAEAwBHMEUC +IAkVCcTFG8MBDI58JKIhMlPbzkdrKnYY3Kp9KqWuTAvMAiEAipeI7RCLBk8+T/p+ +gY7+vtFZxKDthcJMUpZz7qmica0wDQYJKoZIhvcNAQELBQADggIBAESe0U1qArxL +F2uk65q6x6HBcZuSocpceokzcUBv07Kxs6UJU9ybTbl8VYPuC+OUdpvut1kOJCJm +1TRrr5KMh+9as42xkbKRZnh5TQt7aHmVcLHLfA4x0UrELfNX3fVTDxwDAPAhE5oM +0w+d1foLakh7dXKKSxobEI3KRwFp19iuZeIqwI8XMWMr9ajhTC0T7D2QvKotpNBS +sNDHiIE3IXoa9o7UiOG8IfW0wAt7CEygv0F7ctHRTcQSP/SJIGYOUZ7uotULVL5i +elG31Y83Jx3sPNCy4IZfCip6Gw7MgsN2CZGApqi49edSqDWyRIfmCeXtMc7XI7Md +kqqWxbqGGTdYJCucoGqahqRR+BI9anEqTD9T5Gy0TpCi2pgp1i7czza71nfz0PcN +R0pw/1lqb9AqmJ2XELpBpo82B9XGple9thpincai7jPk3ezY5eEvDTmkHRlUFCp8 +8M66Ga19hZTgnHPWDKZYZzuZ7Lcl2WbapFOYYHJggSpBRy4GkH6eTSkUB9G9k8vU +gbvtS7sR5ggecbCBu0M4TWYmnUojR8UXtr0oOTlXysTHVGs5Tx9ChhOLyUqhX8tM +1zSDT8JJvbbw4RqpGzBKTNaO5nxRLgKVQOQdM8f1kjMr9/U58Lc4UiaTkJM14VfK +8GfV8+K/vRCBtME53ILvm1l18jtakG3c +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +MIIGFzCCA/+gAwIBAgIUftbnnMmtgcTIGT75XUQodw40ExcwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjExMDYxNDUwMThaFw0y +MjExMDYxNDUwMThaME0xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMSMwIQYDVQQDExpRdW9WYWRpcyBHbG9iYWwgU1NMIElDQSBHMzCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANf8Od17be6c6lTGJDhEXpmkTs4y +Q39Rr5VJyBeWCg06nSS71s6xF3sZvKcV0MbXlXCYM2ZX7cNTbJ81gs7uDsKFp+vK +EymiKyEiI2SImOtECNnSg+RVR4np/xz/UlC0yFUisH75cZsJ8T1pkGMfiEouR0EM +7O0uFgoboRfUP582TTWy0F7ynSA6YfGKnKj0OFwZJmGHVkLs1VevWjhj3R1fsPan +H05P5moePFnpQdj1FofoSxUHZ0c7VB+sUimboHm/uHNY1LOsk77qiSuVC5/yrdg3 +2EEfP/mxJYT4r/5UiD7VahySzeZHzZ2OibQm2AfgfMN3l57lCM3/WPQBhMAPS1jz +kE+7MjajM2f0aZctimW4Hasrj8AQnfAdHqZehbhtXaAlffNEzCdpNK584oCTVR7N +UR9iZFx83ruTqpo+GcLP/iSYqhM4g7fy45sNhU+IS+ca03zbxTl3TTlkofXunI5B +xxE30eGSQpDZ5+iUJcEOAuVKrlYocFbB3KF45hwcbzPWQ1DcO2jFAapOtQzeS+MZ +yZzT2YseJ8hQHKu8YrXZWwKaNfyl8kFkHUBDICowNEoZvBwRCQp8sgqL6YRZy0uD +JGxmnC2e0BVKSjcIvmq/CRWH7yiTk9eWm73xrsg9iIyD/kwJEnLyIk8tR5V8p/hc +1H2AjDrZH12PsZ45AgMBAAGjgfMwgfAwEgYDVR0TAQH/BAgwBgEB/wIBATARBgNV +HSAECjAIMAYGBFUdIAAwOgYIKwYBBQUHAQEELjAsMCoGCCsGAQUFBzABhh5odHRw +Oi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wDgYDVR0PAQH/BAQDAgEGMB8GA1Ud +IwQYMBaAFO3nb3Zav2DsSVvGpXe7chZxm8Q9MDsGA1UdHwQ0MDIwMKAuoCyGKmh0 +dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2cmNhMmczLmNybDAdBgNVHQ4E +FgQUsxKJtalLNbwVAPCA6dh4h/ETfHYwDQYJKoZIhvcNAQELBQADggIBAFGm1Fqp +RMiKr7a6h707M+km36PVXZnX1NZocCn36MrfRvphotbOCDm+GmRkar9ZMGhc8c/A +Vn7JSCjwF9jNOFIOUyNLq0w4luk+Pt2YFDbgF8IDdx53xIo8Gv05e9xpTvQYaIto +qeHbQjGXfSGc91olfX6JUwZlxxbhdJH+rxTFAg0jcbqToJoScWTfXSr1QRcNbSTs +Y4CPG6oULsnhVvrzgldGSK+DxFi2OKcDsOKkV7W4IGg8Do2L/M588AfBnV8ERzpl +qgMBBQxC2+0N6RdFHbmZt0HQE/NIg1s0xcjGx1XW3YTOfje31rmAXKHOehm4Bu48 +gr8gePq5cdQ2W9tA0Dnytb9wzH2SyPPIXRI7yNxaX9H8wYeDeeiKSSmQtfh1v5cV +7RXvm8F6hLJkkco/HOW3dAUwZFcKsUH+1eUJKLN18eDGwB8yGawjHvOKqcfg5Lf/ +TvC7hgcx7pDYaCCaqHaekgUwXbB2Enzqr1fdwoU1c01W5YuQAtAx5wk1bf34Yq/J +ph7wNXGvo88N0/EfP9AdVGmJzy7VuRXeVAOyjKAIeADMlwpjBRhcbs9m3dkqvoMb +SXKJxv/hFmNgEOvOlaFsXX1dbKg1v+C1AzKAFdiuAIa62JzASiEhigqNSdqdTsOh +8W8hdONuKKpe9zKedhBFAvuxhDgKmnySglYc +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00 +MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIgRzMwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFhZiFf +qq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMW +n4rjyduYNM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ym +c5GQYaYDFCDy54ejiK2toIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+ +O7q414AB+6XrW7PFXmAqMaCvN+ggOp+oMiwMzAkd056OXbxMmO7FGmh77FOm6RQ1 +o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+lV0POKa2Mq1W/xPtbAd0j +IaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZoL1NesNKq +IcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz +8eQQsSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43eh +vNURG3YBZwjgQQvD6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l +7ZizlWNof/k19N+IxWA1ksB8aRxhlRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALG +cC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZIhvcNAQELBQAD +ggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 +AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RC +roijQ1h5fq7KpVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0Ga +W/ZZGYjeVYg3UQt4XAoeo0L9x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4n +lv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgzdWqTHBLmYF5vHX/JHyPLhGGfHoJE ++V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6XU/IyAgkwo1jwDQHV +csaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+NwmNtd +dbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNg +KCLjsZWDzYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeM +HVOyToV7BjjHLPj4sHKNJeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4 +WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/ec2_win_password.pem b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/ec2_win_password.pem new file mode 100644 index 00000000..e1792109 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/ec2_win_password.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQDAt4WXUohebyTXAxEBkfCjuaKBgv5VgGwHeSWomB0IoKszlNHL +itadHg/vDi1gHSeRANw4KccpFAEIy4Oq3bMpI/rFrDdj/otp4wDcZKuIxq8OtU4b +KBXsSJD9vxAMZktaJ28gpv+mSjnmz+uC0QiuticKaO62pWPGdd6RjuylkwIDAQAB +AoGAUNSo069qQzGa4hQHLgFoTUOvRWMMChCzPu8xPGWQx+2b4SaqWBUDryLMzBfG +MGoKDmet9mCPiEs7o9S4hRI38m2dKBPHRjpFJDPrJmsKNyjk9yBrcJf6EysNEPbd +mYt7DxyUHVNQJpLOPXuMFSi/iloXTBRZ0dEzvhCp2nmX9wECQQD8+s89dwIm41QK +laqELxSVDtSkfLkBIYtw4xPEfuXufna7LHXnR6b9CELAD8L5ht5CiXHzVPpiuwz4 +AaIvK44tAkEAwwSHaT6AOeXKNnNLTM+UzFW4rKixsSMQVD/7OjU0/IabFOkE+uY/ +WTgLrp1OsqhhDRS/F/eN9uj0dXHXgBEavwJAImW77gCTg1QfpjzJbaW1J7tXgHIQ ++a1k91l445vZib8aR8L42RSuCPOpl9HM0f7bk7J6kvp3/Rqv3bzjH4TNlQJBAId1 +k+FEqqiMtsLPntRBs+ei+13i51pVMrhyoLyzzJRDo2EI4o6sdAAy79pgJhPu5UrC +yGGLcK667WLOqpOoTd0CQQC/4Bq12KCwk9VEWOzNV+kPFzTb85RuzwH5Tis+Fbp2 +CNc26WPeNwOvNxXgzAve4G4CaUNLnmATatr5BKjU8Xkr +-----END RSA PRIVATE KEY-----
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/simple-chain-a.cert b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/simple-chain-a.cert new file mode 100644 index 00000000..1d9bbe21 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/simple-chain-a.cert @@ -0,0 +1,18 @@ +subject=/C=AU/ST=Victoria/L=Melbourne/O=Telstra Corporation Limited/OU=Telstra Energy/CN=dev.energy.inside.telstra.com +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +-----BEGIN CERTIFICATE----- +aaa +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +bbb +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +ccc +-----END CERTIFICATE----- + diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/simple-chain-b.cert b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/simple-chain-b.cert new file mode 100644 index 00000000..1d9bbe21 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/certs/simple-chain-b.cert @@ -0,0 +1,18 @@ +subject=/C=AU/ST=Victoria/L=Melbourne/O=Telstra Corporation Limited/OU=Telstra Energy/CN=dev.energy.inside.telstra.com +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +-----BEGIN CERTIFICATE----- +aaa +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Global SSL ICA G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +bbb +-----END CERTIFICATE----- + +subject=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +issuer=/C=BM/O=QuoVadis Limited/CN=QuoVadis Root CA 2 G3 +-----BEGIN CERTIFICATE----- +ccc +-----END CERTIFICATE----- + diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/thezip.zip b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/thezip.zip Binary files differnew file mode 100644 index 00000000..6eaefdd5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/fixtures/thezip.zip diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/.gitkeep b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/.gitkeep diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/associations_are_not_updated/directconnect.DescribeConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/associations_are_not_updated/directconnect.DescribeConnections_1.json new file mode 100644 index 00000000..6fdcfb94 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/associations_are_not_updated/directconnect.DescribeConnections_1.json @@ -0,0 +1,27 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "df6f9966-5b55-11e7-a69f-95e467ba41d7", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:30:03 GMT", + "content-length": "214" + }, + "RequestId": "df6f9966-5b55-11e7-a69f-95e467ba41d7", + "HTTPStatusCode": 200 + }, + "connections": [ + { + "connectionState": "requested", + "connectionId": "dxcon-fgq9rgot", + "location": "EqSe2", + "connectionName": "ansible-test-connection", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } + ] + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/changed_properties/directconnect.DescribeConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/changed_properties/directconnect.DescribeConnections_1.json new file mode 100644 index 00000000..95223150 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/changed_properties/directconnect.DescribeConnections_1.json @@ -0,0 +1,27 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 1, + "HTTPHeaders": { + "x-amzn-requestid": "ded68d99-5b55-11e7-8bdd-db27cb754a2c", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:30:02 GMT", + "content-length": "214" + }, + "RequestId": "ded68d99-5b55-11e7-8bdd-db27cb754a2c", + "HTTPStatusCode": 200 + }, + "connections": [ + { + "connectionState": "requested", + "connectionId": "dxcon-fgq9rgot", + "location": "EqSe2", + "connectionName": "ansible-test-connection", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } + ] + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_does_not_exist/directconnect.DescribeConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_does_not_exist/directconnect.DescribeConnections_1.json new file mode 100644 index 00000000..d7de2523 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_does_not_exist/directconnect.DescribeConnections_1.json @@ -0,0 +1,17 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "connections": [] + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_exists_by_id/directconnect.DescribeConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_exists_by_id/directconnect.DescribeConnections_1.json new file mode 100644 index 00000000..362a5c47 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_exists_by_id/directconnect.DescribeConnections_1.json @@ -0,0 +1,27 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b8f5493c-5b55-11e7-a718-2b51b84a4672", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:28:58 GMT", + "content-length": "214" + }, + "RequestId": "b8f5493c-5b55-11e7-a718-2b51b84a4672", + "HTTPStatusCode": 200 + }, + "connections": [ + { + "connectionState": "requested", + "connectionId": "dxcon-fgq9rgot", + "location": "EqSe2", + "connectionName": "ansible-test-connection", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } + ] + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_exists_by_name/directconnect.DescribeConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_exists_by_name/directconnect.DescribeConnections_1.json new file mode 100644 index 00000000..9c77ef8f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_exists_by_name/directconnect.DescribeConnections_1.json @@ -0,0 +1,45 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9a0566c-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "586" + }, + "RequestId": "b9a0566c-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "connections": [ + { + "connectionState": "requested", + "connectionId": "dxcon-fgq9rgot", + "location": "EqSe2", + "connectionName": "ansible-test-connection", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + }, + { + "connectionState": "requested", + "connectionId": "dxcon-fh69i7ez", + "location": "PEH51", + "connectionName": "test2shertel", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + }, + { + "connectionState": "deleted", + "connectionId": "dxcon-fgcw1bgr", + "location": "EqSe2", + "connectionName": "ansible-test-2", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } + ] + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_status/directconnect.DescribeConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_status/directconnect.DescribeConnections_1.json new file mode 100644 index 00000000..63c3d250 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/connection_status/directconnect.DescribeConnections_1.json @@ -0,0 +1,27 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b85f71db-5b55-11e7-a718-2b51b84a4672", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:28:58 GMT", + "content-length": "214" + }, + "RequestId": "b85f71db-5b55-11e7-a718-2b51b84a4672", + "HTTPStatusCode": 200 + }, + "connections": [ + { + "connectionState": "requested", + "connectionId": "dxcon-fgq9rgot", + "location": "EqSe2", + "connectionName": "ansible-test-connection", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } + ] + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/create_and_delete/directconnect.CreateConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/create_and_delete/directconnect.CreateConnection_1.json new file mode 100644 index 00000000..75220648 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/create_and_delete/directconnect.CreateConnection_1.json @@ -0,0 +1,23 @@ +{ + "status_code": 200, + "data": { + "connectionState": "requested", + "connectionId": "dxcon-fgbw50lg", + "location": "EqSe2", + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "dfb3ce3c-5b55-11e7-8bdd-db27cb754a2c", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:30:03 GMT", + "content-length": "187" + }, + "RequestId": "dfb3ce3c-5b55-11e7-8bdd-db27cb754a2c", + "HTTPStatusCode": 200 + }, + "connectionName": "ansible-test-2", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/create_and_delete/directconnect.DeleteConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/create_and_delete/directconnect.DeleteConnection_1.json new file mode 100644 index 00000000..4e418abd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_connection/create_and_delete/directconnect.DeleteConnection_1.json @@ -0,0 +1,23 @@ +{ + "status_code": 200, + "data": { + "connectionState": "deleted", + "connectionId": "dxcon-fgbw50lg", + "location": "EqSe2", + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "dfccd47d-5b55-11e7-8bdd-db27cb754a2c", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:30:03 GMT", + "content-length": "185" + }, + "RequestId": "dfccd47d-5b55-11e7-8bdd-db27cb754a2c", + "HTTPStatusCode": 200 + }, + "connectionName": "ansible-test-2", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteConnection_1.json new file mode 100644 index 00000000..3916cfc4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteConnection_1.json @@ -0,0 +1,23 @@ +{ + "data": { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bf2372eb-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "216", + "date": "Mon, 24 Jul 2017 19:39:02 GMT" + }, + "RequestId": "bf2372eb-70a7-11e7-83ab-ef16f9ac5159" + }, + "location": "EqSe2", + "ownerAccount": "448830907657", + "region": "us-west-2", + "connectionState": "deleted", + "connectionId": "dxcon-ffx41o23" + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteLag_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteLag_1.json new file mode 100644 index 00000000..6fcdcb87 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DeleteLag_1.json @@ -0,0 +1,27 @@ +{ + "data": { + "lagState": "deleted", + "location": "EqSe2", + "region": "us-west-2", + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bf437e0e-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "266", + "date": "Mon, 24 Jul 2017 19:39:02 GMT" + }, + "RequestId": "bf437e0e-70a7-11e7-83ab-ef16f9ac5159" + }, + "lagId": "dxlag-fgkk4dja", + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [], + "connectionsBandwidth": "1Gbps", + "minimumLinks": 0, + "ownerAccount": "448830907657", + "numberOfConnections": 0, + "lagName": "ansible_lag_1" + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..3f97b141 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_1.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bd224baf-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:38:59 GMT" + }, + "RequestId": "bd224baf-70a7-11e7-83ab-ef16f9ac5159" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_2.json new file mode 100644 index 00000000..a6e0198e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_2.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bda84490-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:38:59 GMT" + }, + "RequestId": "bda84490-70a7-11e7-83ab-ef16f9ac5159" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_3.json new file mode 100644 index 00000000..cb819f0f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeLags_3.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "be79c564-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:39:01 GMT" + }, + "RequestId": "be79c564-70a7-11e7-83ab-ef16f9ac5159" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeVirtualInterfaces_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeVirtualInterfaces_1.json new file mode 100644 index 00000000..19a8af38 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DescribeVirtualInterfaces_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "virtualInterfaces": [], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "be66d9a3-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "24", + "date": "Mon, 24 Jul 2017 19:39:00 GMT" + }, + "RequestId": "be66d9a3-70a7-11e7-83ab-ef16f9ac5159" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DisassociateConnectionFromLag_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DisassociateConnectionFromLag_1.json new file mode 100644 index 00000000..70d1ed2f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.DisassociateConnectionFromLag_1.json @@ -0,0 +1,23 @@ +{ + "data": { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bf0c687a-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "218", + "date": "Mon, 24 Jul 2017 19:39:01 GMT" + }, + "RequestId": "bf0c687a-70a7-11e7-83ab-ef16f9ac5159" + }, + "location": "EqSe2", + "ownerAccount": "448830907657", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.UpdateLag_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.UpdateLag_1.json new file mode 100644 index 00000000..e464a0dd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections/directconnect.UpdateLag_1.json @@ -0,0 +1,38 @@ +{ + "data": { + "lagState": "pending", + "location": "EqSe2", + "region": "us-west-2", + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bef64869-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "509", + "date": "Mon, 24 Jul 2017 19:39:01 GMT" + }, + "RequestId": "bef64869-70a7-11e7-83ab-ef16f9ac5159" + }, + "lagId": "dxlag-fgkk4dja", + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "connectionsBandwidth": "1Gbps", + "minimumLinks": 0, + "ownerAccount": "448830907657", + "numberOfConnections": 1, + "lagName": "ansible_lag_1" + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..1aa22210 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_1.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bc1aedd9-70a7-11e7-a2a8-21d8bda1f5ec", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:38:57 GMT" + }, + "RequestId": "bc1aedd9-70a7-11e7-a2a8-21d8bda1f5ec" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_2.json new file mode 100644 index 00000000..5643faee --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_2.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bc4902ba-70a7-11e7-a2a8-21d8bda1f5ec", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:38:57 GMT" + }, + "RequestId": "bc4902ba-70a7-11e7-a2a8-21d8bda1f5ec" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_3.json new file mode 100644 index 00000000..a1792e1c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeLags_3.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bc7ff13c-70a7-11e7-a2a8-21d8bda1f5ec", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:38:57 GMT" + }, + "RequestId": "bc7ff13c-70a7-11e7-a2a8-21d8bda1f5ec" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeVirtualInterfaces_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeVirtualInterfaces_1.json new file mode 100644 index 00000000..5092b872 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_lag_with_connections_without_force_delete/directconnect.DescribeVirtualInterfaces_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "virtualInterfaces": [], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bc6dc8cb-70a7-11e7-a2a8-21d8bda1f5ec", + "content-length": "24", + "date": "Mon, 24 Jul 2017 19:38:57 GMT" + }, + "RequestId": "bc6dc8cb-70a7-11e7-a2a8-21d8bda1f5ec" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_nonexistent_lag/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_nonexistent_lag/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..6bc71aa7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/delete_nonexistent_lag/directconnect.DescribeLags_1.json @@ -0,0 +1,21 @@ +{ + "data": { + "Error": { + "Code": "DirectConnectClientException", + "Message": "Could not find Lag with ID dxlag-XXXXXXXX" + }, + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 400, + "HTTPHeaders": { + "connection": "close", + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "bb67ca78-70a7-11e7-a2a8-21d8bda1f5ec", + "content-length": "95", + "date": "Mon, 24 Jul 2017 19:38:56 GMT" + }, + "RequestId": "bb67ca78-70a7-11e7-a2a8-21d8bda1f5ec" + } + }, + "status_code": 400 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_changed_true/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_changed_true/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..2b29b0bf --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_changed_true/directconnect.DescribeLags_1.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "b8662323-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:38:50 GMT" + }, + "RequestId": "b8662323-70a7-11e7-83ab-ef16f9ac5159" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_changed_true_no/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_changed_true_no/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..e73e68b8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_changed_true_no/directconnect.DescribeLags_1.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "b91b4255-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:38:52 GMT" + }, + "RequestId": "b91b4255-70a7-11e7-83ab-ef16f9ac5159" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_exists/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_exists/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..01821531 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_exists/directconnect.DescribeLags_1.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "b5e4a858-70a7-11e7-a69f-95e467ba41d7", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:38:46 GMT" + }, + "RequestId": "b5e4a858-70a7-11e7-a69f-95e467ba41d7" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_exists_using_name/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_exists_using_name/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..26ebd063 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_exists_using_name/directconnect.DescribeLags_1.json @@ -0,0 +1,157 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-9uinh2jjnuu9", + "connections": [], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 0, + "lagName": "sherteltestlag", + "lagId": "dxlag-fgr4lfqt" + }, + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + }, + { + "awsDevice": "EqSe2-2bii1jufy4y7p", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgytkicv", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgytkicv", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-fgsxammv" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_2", + "lagId": "dxlag-fgytkicv" + }, + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [], + "lagState": "deleted", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 0, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgee5gk5" + }, + { + "awsDevice": "EqSe2-2bii1jufy4y7p", + "connections": [], + "lagState": "deleted", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 0, + "lagName": "ansible_lag_2_update", + "lagId": "dxlag-fg0hj0n3" + }, + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [], + "lagState": "deleted", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 0, + "lagName": "ansible_lag_1", + "lagId": "dxlag-ffg1zmo4" + }, + { + "awsDevice": "EqSe2-2oqu43nde4cs1", + "connections": [], + "lagState": "deleted", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 0, + "lagName": "ansible_lag_2_update", + "lagId": "dxlag-ffzm4jk8" + }, + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [], + "lagState": "deleted", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 0, + "lagName": "ansible_lag_1", + "lagId": "dxlag-ffuid1ql" + }, + { + "awsDevice": "EqSe2-2oqu43nde4cs1", + "connections": [], + "lagState": "deleted", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 0, + "lagName": "ansible_lag_2_update", + "lagId": "dxlag-ffpq2qa7" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "b6a0a55a-70a7-11e7-a69f-95e467ba41d7", + "content-length": "2920", + "date": "Mon, 24 Jul 2017 19:38:49 GMT" + }, + "RequestId": "b6a0a55a-70a7-11e7-a69f-95e467ba41d7" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_status/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_status/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..fa32a2cf --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/lag_status/directconnect.DescribeLags_1.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-1bwfvazist2k0", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgkk4dja", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgkk4dja", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-ffx41o23" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_1", + "lagId": "dxlag-fgkk4dja" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "b4aa057e-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:38:44 GMT" + }, + "RequestId": "b4aa057e-70a7-11e7-83ab-ef16f9ac5159" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_does_not_exist/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_does_not_exist/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..0b394f15 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_does_not_exist/directconnect.DescribeLags_1.json @@ -0,0 +1,21 @@ +{ + "data": { + "Error": { + "Code": "DirectConnectClientException", + "Message": "Could not find Lag with ID dxlag-XXXXXXXX" + }, + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 400, + "HTTPHeaders": { + "connection": "close", + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "b7f55ff2-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "95", + "date": "Mon, 24 Jul 2017 19:38:50 GMT" + }, + "RequestId": "b7f55ff2-70a7-11e7-83ab-ef16f9ac5159" + } + }, + "status_code": 400 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_status/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_status/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..e1464bd7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/nonexistent_lag_status/directconnect.DescribeLags_1.json @@ -0,0 +1,21 @@ +{ + "data": { + "Error": { + "Code": "DirectConnectClientException", + "Message": "Lag ID doesntexist has an invalid format." + }, + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 400, + "HTTPHeaders": { + "connection": "close", + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "b3c76dc0-70a7-11e7-a2a8-21d8bda1f5ec", + "content-length": "95", + "date": "Mon, 24 Jul 2017 19:38:42 GMT" + }, + "RequestId": "b3c76dc0-70a7-11e7-a2a8-21d8bda1f5ec" + } + }, + "status_code": 400 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.DescribeLags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.DescribeLags_1.json new file mode 100644 index 00000000..20434bbd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.DescribeLags_1.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-2bii1jufy4y7p", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgytkicv", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgytkicv", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-fgsxammv" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_2", + "lagId": "dxlag-fgytkicv" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "b9cc69e9-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "520", + "date": "Mon, 24 Jul 2017 19:38:53 GMT" + }, + "RequestId": "b9cc69e9-70a7-11e7-83ab-ef16f9ac5159" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.DescribeLags_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.DescribeLags_2.json new file mode 100644 index 00000000..08847e89 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.DescribeLags_2.json @@ -0,0 +1,42 @@ +{ + "data": { + "lags": [ + { + "awsDevice": "EqSe2-2bii1jufy4y7p", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgytkicv", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgytkicv", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-fgsxammv" + } + ], + "lagState": "pending", + "minimumLinks": 0, + "location": "EqSe2", + "connectionsBandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2", + "numberOfConnections": 1, + "lagName": "ansible_lag_2_update", + "lagId": "dxlag-fgytkicv" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "ba91197b-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "527", + "date": "Mon, 24 Jul 2017 19:38:54 GMT" + }, + "RequestId": "ba91197b-70a7-11e7-83ab-ef16f9ac5159" + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.UpdateLag_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.UpdateLag_1.json new file mode 100644 index 00000000..da5475f7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_link_aggregation_group/update_lag/directconnect.UpdateLag_1.json @@ -0,0 +1,38 @@ +{ + "data": { + "lagState": "pending", + "location": "EqSe2", + "region": "us-west-2", + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "HTTPHeaders": { + "content-type": "application/x-amz-json-1.1", + "x-amzn-requestid": "ba76658a-70a7-11e7-83ab-ef16f9ac5159", + "content-length": "516", + "date": "Mon, 24 Jul 2017 19:38:54 GMT" + }, + "RequestId": "ba76658a-70a7-11e7-83ab-ef16f9ac5159" + }, + "lagId": "dxlag-fgytkicv", + "awsDevice": "EqSe2-2bii1jufy4y7p", + "connections": [ + { + "bandwidth": "1Gbps", + "connectionName": "Requested Connection 1 for Lag dxlag-fgytkicv", + "location": "EqSe2", + "ownerAccount": "448830907657", + "lagId": "dxlag-fgytkicv", + "region": "us-west-2", + "connectionState": "requested", + "connectionId": "dxcon-fgsxammv" + } + ], + "connectionsBandwidth": "1Gbps", + "minimumLinks": 0, + "ownerAccount": "448830907657", + "numberOfConnections": 1, + "lagName": "ansible_lag_2_update" + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.CreatePrivateVirtualInterface_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.CreatePrivateVirtualInterface_1.json new file mode 100644 index 00000000..095ff705 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.CreatePrivateVirtualInterface_1.json @@ -0,0 +1,52 @@ +{ + "status_code": 200, + "data": { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_1.json new file mode 100644 index 00000000..de3e54bc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_1.json @@ -0,0 +1,18 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_2.json new file mode 100644 index 00000000..9c04d038 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_2.json @@ -0,0 +1,56 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [] + } + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_3.json new file mode 100644 index 00000000..9c04d038 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_private_vi/directconnect.DescribeVirtualInterfaces_3.json @@ -0,0 +1,56 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [] + } + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.CreatePublicVirtualInterface_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.CreatePublicVirtualInterface_1.json new file mode 100644 index 00000000..095ff705 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.CreatePublicVirtualInterface_1.json @@ -0,0 +1,52 @@ +{ + "status_code": 200, + "data": { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_1.json new file mode 100644 index 00000000..de3e54bc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_1.json @@ -0,0 +1,18 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_2.json new file mode 100644 index 00000000..9c04d038 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_2.json @@ -0,0 +1,56 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [] + } + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_3.json new file mode 100644 index 00000000..9c04d038 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/create_public_vi/directconnect.DescribeVirtualInterfaces_3.json @@ -0,0 +1,56 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [] + } + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/delete_vi/directconnect.DeleteVirtualInterface_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/delete_vi/directconnect.DeleteVirtualInterface_1.json new file mode 100644 index 00000000..226e0df0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/delete_vi/directconnect.DeleteVirtualInterface_1.json @@ -0,0 +1,16 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/delete_vi/directconnect.DescribeVirtualInterfaces_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/delete_vi/directconnect.DescribeVirtualInterfaces_1.json new file mode 100644 index 00000000..9c04d038 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/delete_vi/directconnect.DescribeVirtualInterfaces_1.json @@ -0,0 +1,56 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [] + } + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_connection_id/directconnect.DescribeVirtualInterfaces_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_connection_id/directconnect.DescribeVirtualInterfaces_1.json new file mode 100644 index 00000000..9c04d038 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_connection_id/directconnect.DescribeVirtualInterfaces_1.json @@ -0,0 +1,56 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [] + } + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_name/directconnect.DescribeVirtualInterfaces_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_name/directconnect.DescribeVirtualInterfaces_1.json new file mode 100644 index 00000000..9c04d038 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_name/directconnect.DescribeVirtualInterfaces_1.json @@ -0,0 +1,56 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [] + } + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_vi_id/directconnect.DescribeVirtualInterfaces_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_vi_id/directconnect.DescribeVirtualInterfaces_1.json new file mode 100644 index 00000000..9c04d038 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_by_vi_id/directconnect.DescribeVirtualInterfaces_1.json @@ -0,0 +1,56 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [] + } + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_returns_missing_for_vi_id/directconnect.DescribeVirtualInterfaces_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_returns_missing_for_vi_id/directconnect.DescribeVirtualInterfaces_1.json new file mode 100644 index 00000000..de3e54bc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_returns_missing_for_vi_id/directconnect.DescribeVirtualInterfaces_1.json @@ -0,0 +1,18 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_returns_multiple/directconnect.DescribeVirtualInterfaces_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_returns_multiple/directconnect.DescribeVirtualInterfaces_1.json new file mode 100644 index 00000000..7ec6af21 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/aws_direct_connect_virtual_interface/find_unique_vi_returns_multiple/directconnect.DescribeVirtualInterfaces_1.json @@ -0,0 +1,94 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPHeaders": { + "x-amzn-requestid": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "content-type": "application/x-amz-json-1.1", + "date": "Tue, 27 Jun 2017 16:29:00 GMT", + "content-length": "18" + }, + "RequestId": "b9e352dd-5b55-11e7-9750-d97c605bdcae", + "HTTPStatusCode": 200 + }, + "virtualInterfaces": [ + { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-aaaaaaaa", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "aaaaaaaa", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [] + }, + { + "ownerAccount": "123412341234", + "virtualInterfaceId": "dxvif-bbbbbbbb", + "location": "EqSe2", + "connectionId": "dxcon-aaaaaaaa", + "virtualInterfaceType": "private", + "virtualInterfaceName": "bbbbbbbb", + "vlan": 2, + "asn": 123, + "amazonSideAsn": 64512, + "authKey": "aaaabbbb", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualInterfaceState": "down", + "customerRouterConfig": "", + "mtu": 1500, + "jumboFrameCapable": true, + "virtualGatewayId": "", + "directConnectGatewayId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "routeFilterPrefixes": [], + "bgpPeers": [ + { + "bgpPeerId": "dxpeer-aaaaaaa", + "asn": 123, + "authKey": "aaaabbbb", + "addressFamily": "ipv4", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "bgpPeerState": "available", + "bgpStatus": "down", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa" + } + ], + "region": "us-west-2", + "awsDeviceV2": "EqSe2-aaaaaaaaaaaa", + "tags": [] + } + ] + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.CreateStack_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.CreateStack_1.json new file mode 100644 index 00000000..36f1489b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.CreateStack_1.json @@ -0,0 +1,17 @@ +{ + "status_code": 200, + "data": { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "03fbfc36-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "03fbfc36-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:07 GMT", + "content-length": "393", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DeleteStack_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DeleteStack_1.json new file mode 100644 index 00000000..d526155a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DeleteStack_1.json @@ -0,0 +1,16 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "170d1e02-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "170d1e02-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:39 GMT", + "content-length": "212", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_1.json new file mode 100644 index 00000000..3758c77b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_1.json @@ -0,0 +1,38 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-basic-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "LogicalResourceId": "ansible-test-basic-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "043d4a05-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "043d4a05-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:08 GMT", + "content-length": "1183", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_2.json new file mode 100644 index 00000000..2c5a7655 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_2.json @@ -0,0 +1,80 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-basic-yaml-mybucket-13m2y4v8bptj4", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-basic-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "LogicalResourceId": "ansible-test-basic-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "075d9d71-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "075d9d71-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "2730", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:13 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_3.json new file mode 100644 index 00000000..cf2c2450 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_3.json @@ -0,0 +1,80 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-basic-yaml-mybucket-13m2y4v8bptj4", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-basic-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "LogicalResourceId": "ansible-test-basic-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "0a7eb31b-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "0a7eb31b-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "2730", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:19 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_4.json new file mode 100644 index 00000000..32ee9c1c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_4.json @@ -0,0 +1,80 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-basic-yaml-mybucket-13m2y4v8bptj4", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-basic-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "LogicalResourceId": "ansible-test-basic-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "0d9e1c06-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "0d9e1c06-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "2730", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:24 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_5.json new file mode 100644 index 00000000..b547cd4d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_5.json @@ -0,0 +1,80 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-basic-yaml-mybucket-13m2y4v8bptj4", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-basic-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "LogicalResourceId": "ansible-test-basic-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "10bd84ca-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "10bd84ca-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "2730", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:29 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_6.json new file mode 100644 index 00000000..15bd043a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_6.json @@ -0,0 +1,100 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_COMPLETE-2017-10-20T19:51:33.200Z", + "ResourceStatus": "CREATE_COMPLETE", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 33, + "microsecond": 200000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-basic-yaml-mybucket-13m2y4v8bptj4", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-basic-yaml-mybucket-13m2y4v8bptj4", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-basic-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "LogicalResourceId": "ansible-test-basic-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "13dbb3fd-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "13dbb3fd-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "3490", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:34 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_7.json new file mode 100644 index 00000000..87db7c59 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStackEvents_7.json @@ -0,0 +1,119 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "140d7220-b5d0-11e7-933f-50a686be7356", + "ResourceStatus": "CREATE_COMPLETE", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 35, + "microsecond": 121000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "LogicalResourceId": "ansible-test-basic-yaml" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_COMPLETE-2017-10-20T19:51:33.200Z", + "ResourceStatus": "CREATE_COMPLETE", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 33, + "microsecond": 200000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-basic-yaml-mybucket-13m2y4v8bptj4", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-basic-yaml-mybucket-13m2y4v8bptj4", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-basic-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "LogicalResourceId": "ansible-test-basic-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "16faf590-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "16faf590-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "4276", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:39 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_1.json new file mode 100644 index 00000000..7acdb3ac --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_1.json @@ -0,0 +1,40 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EnableTerminationProtection": false, + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "StackStatusReason": "User Initiated", + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "042974db-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "042974db-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:08 GMT", + "content-length": "975", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_2.json new file mode 100644 index 00000000..0ed674b2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_2.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "074b26dc-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "074b26dc-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:13 GMT", + "content-length": "913", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_3.json new file mode 100644 index 00000000..633c5e15 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_3.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "0a6cb1b3-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "0a6cb1b3-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:18 GMT", + "content-length": "913", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_4.json new file mode 100644 index 00000000..e5ca69dd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_4.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "0d8cddf1-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "0d8cddf1-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:23 GMT", + "content-length": "913", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_5.json new file mode 100644 index 00000000..31a3057c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_5.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "10ac94d5-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "10ac94d5-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:28 GMT", + "content-length": "913", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_6.json new file mode 100644 index 00000000..90ca7467 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_6.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "13caeb1b-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "13caeb1b-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:33 GMT", + "content-length": "913", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_7.json new file mode 100644 index 00000000..905c04f4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/basic_s3_stack/cloudformation.DescribeStacks_7.json @@ -0,0 +1,45 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-basic-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "Outputs": [ + { + "OutputKey": "TheName", + "OutputValue": "ansible-test-basic-yaml-mybucket-13m2y4v8bptj4" + } + ], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-basic-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_COMPLETE", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "16ea53bb-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "16ea53bb-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:39 GMT", + "content-length": "1115", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.CreateStack_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.CreateStack_1.json new file mode 100644 index 00000000..9084936a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.CreateStack_1.json @@ -0,0 +1,17 @@ +{ + "status_code": 200, + "data": { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "03fbfc36-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "03fbfc36-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:07 GMT", + "content-length": "393", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DeleteStack_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DeleteStack_1.json new file mode 100644 index 00000000..d526155a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DeleteStack_1.json @@ -0,0 +1,16 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "170d1e02-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "170d1e02-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:39 GMT", + "content-length": "212", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_1.json new file mode 100644 index 00000000..399eab49 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_1.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "ansible-test-client-request-token-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "043d4a05-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "043d4a05-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:08 GMT", + "content-length": "1183", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_2.json new file mode 100644 index 00000000..f57dbf53 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_2.json @@ -0,0 +1,83 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-client-request-token-yaml-mybucket-13m2y4v8bptj4", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "ansible-test-client-request-token-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "075d9d71-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "075d9d71-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "2730", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:13 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_3.json new file mode 100644 index 00000000..c8b4d694 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_3.json @@ -0,0 +1,83 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-client-request-token-yaml-mybucket-13m2y4v8bptj4", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "ansible-test-client-request-token-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "0a7eb31b-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "0a7eb31b-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "2730", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:19 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_4.json new file mode 100644 index 00000000..8bb03ede --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_4.json @@ -0,0 +1,83 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-client-request-token-yaml-mybucket-13m2y4v8bptj4", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "ansible-test-client-request-token-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "0d9e1c06-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "0d9e1c06-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "2730", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:24 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_5.json new file mode 100644 index 00000000..311949d0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_5.json @@ -0,0 +1,83 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-client-request-token-yaml-mybucket-13m2y4v8bptj4", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "ansible-test-client-request-token-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "10bd84ca-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "10bd84ca-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "2730", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:29 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_6.json new file mode 100644 index 00000000..ddab94a5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_6.json @@ -0,0 +1,104 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_COMPLETE-2017-10-20T19:51:33.200Z", + "ResourceStatus": "CREATE_COMPLETE", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 33, + "microsecond": 200000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-client-request-token-yaml-mybucket-13m2y4v8bptj4", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-client-request-token-yaml-mybucket-13m2y4v8bptj4", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "ansible-test-client-request-token-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "13dbb3fd-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "13dbb3fd-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "3490", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:34 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_7.json new file mode 100644 index 00000000..86da5fb4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStackEvents_7.json @@ -0,0 +1,124 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "140d7220-b5d0-11e7-933f-50a686be7356", + "ResourceStatus": "CREATE_COMPLETE", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 35, + "microsecond": 121000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "ansible-test-client-request-token-yaml" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_COMPLETE-2017-10-20T19:51:33.200Z", + "ResourceStatus": "CREATE_COMPLETE", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 33, + "microsecond": 200000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-client-request-token-yaml-mybucket-13m2y4v8bptj4", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:12.754Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 12, + "microsecond": 754000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "Resource creation Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "ansible-test-client-request-token-yaml-mybucket-13m2y4v8bptj4", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "MyBucket-CREATE_IN_PROGRESS-2017-10-20T19:51:11.159Z", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::S3::Bucket", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 11, + "microsecond": 159000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "ResourceProperties": "{}\n", + "PhysicalResourceId": "", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "MyBucket" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EventId": "04032730-b5d0-11e7-86b8-503ac93168c5", + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "ResourceStatusReason": "User Initiated", + "StackName": "ansible-test-client-request-token-yaml", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "ClientRequestToken": "3faf3fb5-b289-41fc-b940-44151828f6cf", + "LogicalResourceId": "ansible-test-client-request-token-yaml" + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "16faf590-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "16faf590-b5d0-11e7-ae09-550cfe4b2358", + "vary": "Accept-Encoding", + "content-length": "4276", + "content-type": "text/xml", + "date": "Fri, 20 Oct 2017 19:51:39 GMT" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_1.json new file mode 100644 index 00000000..7734b0ca --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_1.json @@ -0,0 +1,40 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "EnableTerminationProtection": false, + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "StackStatusReason": "User Initiated", + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "042974db-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "042974db-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:08 GMT", + "content-length": "975", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_2.json new file mode 100644 index 00000000..0a1e74d7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_2.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "074b26dc-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "074b26dc-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:13 GMT", + "content-length": "913", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_3.json new file mode 100644 index 00000000..12d5839f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_3.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "0a6cb1b3-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "0a6cb1b3-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:18 GMT", + "content-length": "913", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_4.json new file mode 100644 index 00000000..a3cb0a8c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_4.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "0d8cddf1-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "0d8cddf1-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:23 GMT", + "content-length": "913", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_5.json new file mode 100644 index 00000000..251d71fa --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_5.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "10ac94d5-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "10ac94d5-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:28 GMT", + "content-length": "913", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_6.json new file mode 100644 index 00000000..2251125f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_6.json @@ -0,0 +1,39 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "13caeb1b-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "13caeb1b-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:33 GMT", + "content-length": "913", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_7.json new file mode 100644 index 00000000..aa8c7fd0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/client_request_token_s3_stack/cloudformation.DescribeStacks_7.json @@ -0,0 +1,45 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-client-request-token-yaml/04023cd0-b5d0-11e7-86b8-503ac93168c5", + "Description": "Basic template that creates an S3 bucket", + "Tags": [], + "Outputs": [ + { + "OutputKey": "TheName", + "OutputValue": "ansible-test-client-request-token-yaml-mybucket-13m2y4v8bptj4" + } + ], + "EnableTerminationProtection": false, + "CreationTime": { + "hour": 19, + "__class__": "datetime", + "month": 10, + "second": 8, + "microsecond": 324000, + "year": 2017, + "day": 20, + "minute": 51 + }, + "StackName": "ansible-test-client-request-token-yaml", + "NotificationARNs": [], + "StackStatus": "CREATE_COMPLETE", + "DisableRollback": false, + "RollbackConfiguration": {} + } + ], + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 200, + "RequestId": "16ea53bb-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "16ea53bb-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:39 GMT", + "content-length": "1115", + "content-type": "text/xml" + } + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/delete_nonexistent_stack/cloudformation.DescribeStackEvents_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/delete_nonexistent_stack/cloudformation.DescribeStackEvents_1.json new file mode 100644 index 00000000..109feacd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/delete_nonexistent_stack/cloudformation.DescribeStackEvents_1.json @@ -0,0 +1,22 @@ +{ + "status_code": 400, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 400, + "RequestId": "179d9e46-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "179d9e46-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:40 GMT", + "content-length": "301", + "content-type": "text/xml", + "connection": "close" + } + }, + "Error": { + "Message": "Stack [ansible-test-nonexist] does not exist", + "Code": "ValidationError", + "Type": "Sender" + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/delete_nonexistent_stack/cloudformation.DescribeStackEvents_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/delete_nonexistent_stack/cloudformation.DescribeStackEvents_2.json new file mode 100644 index 00000000..589f92cc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/delete_nonexistent_stack/cloudformation.DescribeStackEvents_2.json @@ -0,0 +1,22 @@ +{ + "status_code": 400, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 400, + "RequestId": "17d80f44-b5d0-11e7-80c4-9f499f779cdb", + "HTTPHeaders": { + "x-amzn-requestid": "17d80f44-b5d0-11e7-80c4-9f499f779cdb", + "date": "Fri, 20 Oct 2017 19:51:40 GMT", + "content-length": "301", + "content-type": "text/xml", + "connection": "close" + } + }, + "Error": { + "Message": "Stack [ansible-test-nonexist] does not exist", + "Code": "ValidationError", + "Type": "Sender" + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/delete_nonexistent_stack/cloudformation.DescribeStacks_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/delete_nonexistent_stack/cloudformation.DescribeStacks_1.json new file mode 100644 index 00000000..ea227415 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/delete_nonexistent_stack/cloudformation.DescribeStacks_1.json @@ -0,0 +1,22 @@ +{ + "status_code": 400, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 400, + "RequestId": "175fab26-b5d0-11e7-9d9b-45815c77100a", + "HTTPHeaders": { + "x-amzn-requestid": "175fab26-b5d0-11e7-9d9b-45815c77100a", + "date": "Fri, 20 Oct 2017 19:51:40 GMT", + "content-length": "307", + "content-type": "text/xml", + "connection": "close" + } + }, + "Error": { + "Message": "Stack with id ansible-test-nonexist does not exist", + "Code": "ValidationError", + "Type": "Sender" + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/get_nonexistent_stack/cloudformation.DescribeStacks_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/get_nonexistent_stack/cloudformation.DescribeStacks_1.json new file mode 100644 index 00000000..cf29c6c7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/get_nonexistent_stack/cloudformation.DescribeStacks_1.json @@ -0,0 +1,22 @@ +{ + "status_code": 400, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 400, + "RequestId": "181566c8-b5d0-11e7-9d9b-45815c77100a", + "HTTPHeaders": { + "x-amzn-requestid": "181566c8-b5d0-11e7-9d9b-45815c77100a", + "date": "Fri, 20 Oct 2017 19:51:41 GMT", + "content-length": "307", + "content-type": "text/xml", + "connection": "close" + } + }, + "Error": { + "Message": "Stack with id ansible-test-nonexist does not exist", + "Code": "ValidationError", + "Type": "Sender" + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/invalid_template_json/cloudformation.CreateStack_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/invalid_template_json/cloudformation.CreateStack_1.json new file mode 100644 index 00000000..7ad6cac9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/invalid_template_json/cloudformation.CreateStack_1.json @@ -0,0 +1,22 @@ +{ + "status_code": 400, + "data": { + "ResponseMetadata": { + "RetryAttempts": 0, + "HTTPStatusCode": 400, + "RequestId": "03b1107f-b5d0-11e7-ae09-550cfe4b2358", + "HTTPHeaders": { + "x-amzn-requestid": "03b1107f-b5d0-11e7-ae09-550cfe4b2358", + "date": "Fri, 20 Oct 2017 19:51:07 GMT", + "content-length": "320", + "content-type": "text/xml", + "connection": "close" + } + }, + "Error": { + "Message": "Template format error: JSON not well-formed. (line 4, column 4)", + "Code": "ValidationError", + "Type": "Sender" + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.CreateStack_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.CreateStack_1.json new file mode 100644 index 00000000..64c8e1f2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.CreateStack_1.json @@ -0,0 +1,17 @@ +{ + "status_code": 200, + "data": { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResponseMetadata": { + "RequestId": "c741ebcd-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "c741ebcd-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "407", + "date": "Tue, 26 Feb 2019 21:37:55 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_1.json new file mode 100644 index 00000000..7a6a4964 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_1.json @@ -0,0 +1,38 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "c74b1310-3a0e-11e9-9a48-067794494828", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ansible-test-on-create-failure-delete", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 37, + "second": 55, + "microsecond": 909000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "User Initiated" + } + ], + "ResponseMetadata": { + "RequestId": "c7b0b337-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "c7b0b337-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "1153", + "date": "Tue, 26 Feb 2019 21:37:56 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_2.json new file mode 100644 index 00000000..6218ed8b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_2.json @@ -0,0 +1,101 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_FAILED-2019-02-26T21:38:01.107Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 1, + "microsecond": 107000 + }, + "ResourceStatus": "CREATE_FAILED", + "ResourceStatusReason": "Invalid parameter at 'PolicyText' failed to satisfy constraint: 'Invalid repository policy provided' (Service: AmazonECR; Status Code: 400; Error Code: InvalidParameterException; Request ID: ca5769ae-3a0e-11e9-a183-3f277586a4cb)", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:38:00.657Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 0, + "microsecond": 657000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "Resource creation Initiated", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:38:00.221Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 0, + "microsecond": 221000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "c74b1310-3a0e-11e9-9a48-067794494828", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ansible-test-on-create-failure-delete", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 37, + "second": 55, + "microsecond": 909000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "User Initiated" + } + ], + "ResponseMetadata": { + "RequestId": "caf667e9-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "caf667e9-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "4312", + "vary": "Accept-Encoding", + "date": "Tue, 26 Feb 2019 21:38:01 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_3.json new file mode 100644 index 00000000..cde6beb8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_3.json @@ -0,0 +1,121 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "cafc8250-3a0e-11e9-86c5-02035744c0fa", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ansible-test-on-create-failure-delete", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 2, + "microsecond": 76000 + }, + "ResourceStatus": "DELETE_IN_PROGRESS", + "ResourceStatusReason": "The following resource(s) failed to create: [ECRRepo]. . Delete requested by user." + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_FAILED-2019-02-26T21:38:01.107Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 1, + "microsecond": 107000 + }, + "ResourceStatus": "CREATE_FAILED", + "ResourceStatusReason": "Invalid parameter at 'PolicyText' failed to satisfy constraint: 'Invalid repository policy provided' (Service: AmazonECR; Status Code: 400; Error Code: InvalidParameterException; Request ID: ca5769ae-3a0e-11e9-a183-3f277586a4cb)", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:38:00.657Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 0, + "microsecond": 657000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "Resource creation Initiated", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:38:00.221Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 0, + "microsecond": 221000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "c74b1310-3a0e-11e9-9a48-067794494828", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ansible-test-on-create-failure-delete", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 37, + "second": 55, + "microsecond": 909000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "User Initiated" + } + ], + "ResponseMetadata": { + "RequestId": "ce498af1-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "ce498af1-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "5207", + "vary": "Accept-Encoding", + "date": "Tue, 26 Feb 2019 21:38:06 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_4.json new file mode 100644 index 00000000..4f35d6dd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_4.json @@ -0,0 +1,180 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "d19c8600-3a0e-11e9-a4ba-0a3524ef8042", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ansible-test-on-create-failure-delete", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 13, + "microsecond": 177000 + }, + "ResourceStatus": "DELETE_COMPLETE" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-DELETE_COMPLETE-2019-02-26T21:38:12.486Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 12, + "microsecond": 486000 + }, + "ResourceStatus": "DELETE_COMPLETE", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-DELETE_IN_PROGRESS-2019-02-26T21:38:12.139Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 12, + "microsecond": 139000 + }, + "ResourceStatus": "DELETE_IN_PROGRESS", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "cafc8250-3a0e-11e9-86c5-02035744c0fa", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ansible-test-on-create-failure-delete", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 2, + "microsecond": 76000 + }, + "ResourceStatus": "DELETE_IN_PROGRESS", + "ResourceStatusReason": "The following resource(s) failed to create: [ECRRepo]. . Delete requested by user." + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_FAILED-2019-02-26T21:38:01.107Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 1, + "microsecond": 107000 + }, + "ResourceStatus": "CREATE_FAILED", + "ResourceStatusReason": "Invalid parameter at 'PolicyText' failed to satisfy constraint: 'Invalid repository policy provided' (Service: AmazonECR; Status Code: 400; Error Code: InvalidParameterException; Request ID: ca5769ae-3a0e-11e9-a183-3f277586a4cb)", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:38:00.657Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 0, + "microsecond": 657000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "Resource creation Initiated", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:38:00.221Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 0, + "microsecond": 221000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "c74b1310-3a0e-11e9-9a48-067794494828", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ansible-test-on-create-failure-delete", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 37, + "second": 55, + "microsecond": 909000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "User Initiated" + } + ], + "ResponseMetadata": { + "RequestId": "d19fbb1b-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "d19fbb1b-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "7857", + "vary": "Accept-Encoding", + "date": "Tue, 26 Feb 2019 21:38:12 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_5.json new file mode 100644 index 00000000..68a743f8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStackEvents_5.json @@ -0,0 +1,180 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "d19c8600-3a0e-11e9-a4ba-0a3524ef8042", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ansible-test-on-create-failure-delete", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 13, + "microsecond": 177000 + }, + "ResourceStatus": "DELETE_COMPLETE" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-DELETE_COMPLETE-2019-02-26T21:38:12.486Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 12, + "microsecond": 486000 + }, + "ResourceStatus": "DELETE_COMPLETE", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-DELETE_IN_PROGRESS-2019-02-26T21:38:12.139Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 12, + "microsecond": 139000 + }, + "ResourceStatus": "DELETE_IN_PROGRESS", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "cafc8250-3a0e-11e9-86c5-02035744c0fa", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ansible-test-on-create-failure-delete", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 2, + "microsecond": 76000 + }, + "ResourceStatus": "DELETE_IN_PROGRESS", + "ResourceStatusReason": "The following resource(s) failed to create: [ECRRepo]. . Delete requested by user." + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_FAILED-2019-02-26T21:38:01.107Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 1, + "microsecond": 107000 + }, + "ResourceStatus": "CREATE_FAILED", + "ResourceStatusReason": "Invalid parameter at 'PolicyText' failed to satisfy constraint: 'Invalid repository policy provided' (Service: AmazonECR; Status Code: 400; Error Code: InvalidParameterException; Request ID: ca5769ae-3a0e-11e9-a183-3f277586a4cb)", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:38:00.657Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-8jlpw72yz5x8", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 0, + "microsecond": 657000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "Resource creation Initiated", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:38:00.221Z", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 0, + "microsecond": 221000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "EventId": "c74b1310-3a0e-11e9-9a48-067794494828", + "StackName": "ansible-test-on-create-failure-delete", + "LogicalResourceId": "ansible-test-on-create-failure-delete", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 37, + "second": 55, + "microsecond": 909000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "User Initiated" + } + ], + "ResponseMetadata": { + "RequestId": "d4fbddab-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "d4fbddab-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "7857", + "vary": "Accept-Encoding", + "date": "Tue, 26 Feb 2019 21:38:18 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_1.json new file mode 100644 index 00000000..cf5f86ac --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_1.json @@ -0,0 +1,42 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "StackName": "ansible-test-on-create-failure-delete", + "CreationTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 37, + "second": 55, + "microsecond": 909000 + }, + "RollbackConfiguration": {}, + "StackStatus": "CREATE_IN_PROGRESS", + "StackStatusReason": "User Initiated", + "DisableRollback": false, + "NotificationARNs": [], + "Tags": [], + "EnableTerminationProtection": false, + "DriftInformation": { + "StackDriftStatus": "NOT_CHECKED" + } + } + ], + "ResponseMetadata": { + "RequestId": "c77fb823-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "c77fb823-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "1041", + "date": "Tue, 26 Feb 2019 21:37:56 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_2.json new file mode 100644 index 00000000..71a9f54b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_2.json @@ -0,0 +1,41 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "StackName": "ansible-test-on-create-failure-delete", + "CreationTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 37, + "second": 55, + "microsecond": 909000 + }, + "RollbackConfiguration": {}, + "StackStatus": "CREATE_IN_PROGRESS", + "DisableRollback": false, + "NotificationARNs": [], + "Tags": [], + "EnableTerminationProtection": false, + "DriftInformation": { + "StackDriftStatus": "NOT_CHECKED" + } + } + ], + "ResponseMetadata": { + "RequestId": "cad153b2-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "cad153b2-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "979", + "date": "Tue, 26 Feb 2019 21:38:01 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_3.json new file mode 100644 index 00000000..c2028183 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_3.json @@ -0,0 +1,52 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "StackName": "ansible-test-on-create-failure-delete", + "CreationTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 37, + "second": 55, + "microsecond": 909000 + }, + "DeletionTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 2, + "microsecond": 76000 + }, + "RollbackConfiguration": {}, + "StackStatus": "DELETE_IN_PROGRESS", + "StackStatusReason": "The following resource(s) failed to create: [ECRRepo]. . Delete requested by user.", + "DisableRollback": false, + "NotificationARNs": [], + "Tags": [], + "EnableTerminationProtection": false, + "DriftInformation": { + "StackDriftStatus": "NOT_CHECKED" + } + } + ], + "ResponseMetadata": { + "RequestId": "ce24289a-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "ce24289a-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "1171", + "date": "Tue, 26 Feb 2019 21:38:06 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_4.json new file mode 100644 index 00000000..89f83553 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_4.json @@ -0,0 +1,51 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "StackName": "ansible-test-on-create-failure-delete", + "CreationTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 37, + "second": 55, + "microsecond": 909000 + }, + "DeletionTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 2, + "microsecond": 76000 + }, + "RollbackConfiguration": {}, + "StackStatus": "DELETE_IN_PROGRESS", + "DisableRollback": false, + "NotificationARNs": [], + "Tags": [], + "EnableTerminationProtection": false, + "DriftInformation": { + "StackDriftStatus": "NOT_CHECKED" + } + } + ], + "ResponseMetadata": { + "RequestId": "d16c27f2-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "d16c27f2-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "1041", + "date": "Tue, 26 Feb 2019 21:38:12 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_5.json new file mode 100644 index 00000000..739c8293 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_delete/cloudformation.DescribeStacks_5.json @@ -0,0 +1,50 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-delete/c74a4fc0-3a0e-11e9-9a48-067794494828", + "StackName": "ansible-test-on-create-failure-delete", + "CreationTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 37, + "second": 55, + "microsecond": 909000 + }, + "DeletionTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 38, + "second": 2, + "microsecond": 76000 + }, + "RollbackConfiguration": {}, + "StackStatus": "DELETE_COMPLETE", + "DisableRollback": false, + "NotificationARNs": [], + "Tags": [], + "DriftInformation": { + "StackDriftStatus": "NOT_CHECKED" + } + } + ], + "ResponseMetadata": { + "RequestId": "d4c90dd6-3a0e-11e9-b25f-d1217e6893bf", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "d4c90dd6-3a0e-11e9-b25f-d1217e6893bf", + "content-type": "text/xml", + "content-length": "965", + "date": "Tue, 26 Feb 2019 21:38:18 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.CreateStack_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.CreateStack_1.json new file mode 100644 index 00000000..86f1945f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.CreateStack_1.json @@ -0,0 +1,17 @@ +{ + "status_code": 200, + "data": { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "ResponseMetadata": { + "RequestId": "a396a58a-3a0f-11e9-b7db-3fe3824c73cb", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "a396a58a-3a0f-11e9-b7db-3fe3824c73cb", + "content-type": "text/xml", + "content-length": "411", + "date": "Tue, 26 Feb 2019 21:44:05 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DeleteStack_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DeleteStack_1.json new file mode 100644 index 00000000..1a3a67c6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DeleteStack_1.json @@ -0,0 +1,16 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RequestId": "a78f0832-3a0f-11e9-b7db-3fe3824c73cb", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "a78f0832-3a0f-11e9-b7db-3fe3824c73cb", + "content-type": "text/xml", + "content-length": "212", + "date": "Tue, 26 Feb 2019 21:44:11 GMT" + }, + "RetryAttempts": 0 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStackEvents_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStackEvents_1.json new file mode 100644 index 00000000..58d7a89e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStackEvents_1.json @@ -0,0 +1,38 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "EventId": "a39e6ce0-3a0f-11e9-96ca-02f46dd00950", + "StackName": "ansible-test-on-create-failure-do-nothing", + "LogicalResourceId": "ansible-test-on-create-failure-do-nothing", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 44, + "second": 5, + "microsecond": 553000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "User Initiated" + } + ], + "ResponseMetadata": { + "RequestId": "a406cc84-3a0f-11e9-b7db-3fe3824c73cb", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "a406cc84-3a0f-11e9-b7db-3fe3824c73cb", + "content-type": "text/xml", + "content-length": "1169", + "date": "Tue, 26 Feb 2019 21:44:06 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStackEvents_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStackEvents_2.json new file mode 100644 index 00000000..0a7e32e4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStackEvents_2.json @@ -0,0 +1,121 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "EventId": "a6c32c80-3a0f-11e9-ac5e-06deb474fa52", + "StackName": "ansible-test-on-create-failure-do-nothing", + "LogicalResourceId": "ansible-test-on-create-failure-do-nothing", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 44, + "second": 10, + "microsecond": 804000 + }, + "ResourceStatus": "CREATE_FAILED", + "ResourceStatusReason": "The following resource(s) failed to create: [ECRRepo]. " + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "EventId": "ECRRepo-CREATE_FAILED-2019-02-26T21:44:09.905Z", + "StackName": "ansible-test-on-create-failure-do-nothing", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-a8g0mh5il4t5", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 44, + "second": 9, + "microsecond": 905000 + }, + "ResourceStatus": "CREATE_FAILED", + "ResourceStatusReason": "Invalid parameter at 'PolicyText' failed to satisfy constraint: 'Invalid repository policy provided' (Service: AmazonECR; Status Code: 400; Error Code: InvalidParameterException; Request ID: a62a6f71-3a0f-11e9-9164-457e0a3a5e1b)", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:44:09.497Z", + "StackName": "ansible-test-on-create-failure-do-nothing", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-a8g0mh5il4t5", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 44, + "second": 9, + "microsecond": 497000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "Resource creation Initiated", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:44:09.076Z", + "StackName": "ansible-test-on-create-failure-do-nothing", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 44, + "second": 9, + "microsecond": 76000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "EventId": "a39e6ce0-3a0f-11e9-96ca-02f46dd00950", + "StackName": "ansible-test-on-create-failure-do-nothing", + "LogicalResourceId": "ansible-test-on-create-failure-do-nothing", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 44, + "second": 5, + "microsecond": 553000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "User Initiated" + } + ], + "ResponseMetadata": { + "RequestId": "a75fbad0-3a0f-11e9-b7db-3fe3824c73cb", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "a75fbad0-3a0f-11e9-b7db-3fe3824c73cb", + "content-type": "text/xml", + "content-length": "5231", + "vary": "Accept-Encoding", + "date": "Tue, 26 Feb 2019 21:44:11 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStacks_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStacks_1.json new file mode 100644 index 00000000..53214331 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStacks_1.json @@ -0,0 +1,42 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "StackName": "ansible-test-on-create-failure-do-nothing", + "CreationTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 44, + "second": 5, + "microsecond": 553000 + }, + "RollbackConfiguration": {}, + "StackStatus": "CREATE_IN_PROGRESS", + "StackStatusReason": "User Initiated", + "DisableRollback": true, + "NotificationARNs": [], + "Tags": [], + "EnableTerminationProtection": false, + "DriftInformation": { + "StackDriftStatus": "NOT_CHECKED" + } + } + ], + "ResponseMetadata": { + "RequestId": "a3d44acf-3a0f-11e9-b7db-3fe3824c73cb", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "a3d44acf-3a0f-11e9-b7db-3fe3824c73cb", + "content-type": "text/xml", + "content-length": "1048", + "date": "Tue, 26 Feb 2019 21:44:05 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStacks_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStacks_2.json new file mode 100644 index 00000000..df17f5a7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_do_nothing/cloudformation.DescribeStacks_2.json @@ -0,0 +1,42 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-do-nothing/a39dd0a0-3a0f-11e9-96ca-02f46dd00950", + "StackName": "ansible-test-on-create-failure-do-nothing", + "CreationTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 44, + "second": 5, + "microsecond": 553000 + }, + "RollbackConfiguration": {}, + "StackStatus": "CREATE_FAILED", + "StackStatusReason": "The following resource(s) failed to create: [ECRRepo]. ", + "DisableRollback": true, + "NotificationARNs": [], + "Tags": [], + "EnableTerminationProtection": false, + "DriftInformation": { + "StackDriftStatus": "NOT_CHECKED" + } + } + ], + "ResponseMetadata": { + "RequestId": "a7301f4a-3a0f-11e9-b7db-3fe3824c73cb", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "a7301f4a-3a0f-11e9-b7db-3fe3824c73cb", + "content-type": "text/xml", + "content-length": "1084", + "date": "Tue, 26 Feb 2019 21:44:11 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.CreateStack_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.CreateStack_1.json new file mode 100644 index 00000000..f71422b9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.CreateStack_1.json @@ -0,0 +1,17 @@ +{ + "status_code": 200, + "data": { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "ResponseMetadata": { + "RequestId": "9139de54-3a0f-11e9-b938-97983b40cabe", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "9139de54-3a0f-11e9-b938-97983b40cabe", + "content-type": "text/xml", + "content-length": "409", + "date": "Tue, 26 Feb 2019 21:43:34 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DeleteStack_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DeleteStack_1.json new file mode 100644 index 00000000..111dc90d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DeleteStack_1.json @@ -0,0 +1,16 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RequestId": "988b3097-3a0f-11e9-b938-97983b40cabe", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "988b3097-3a0f-11e9-b938-97983b40cabe", + "content-type": "text/xml", + "content-length": "212", + "date": "Tue, 26 Feb 2019 21:43:46 GMT" + }, + "RetryAttempts": 0 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStackEvents_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStackEvents_1.json new file mode 100644 index 00000000..2bcac7f0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStackEvents_1.json @@ -0,0 +1,38 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "9140bc10-3a0f-11e9-94bf-0a9edf17d014", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ansible-test-on-create-failure-rollback", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 34, + "microsecond": 740000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "User Initiated" + } + ], + "ResponseMetadata": { + "RequestId": "9199b1a7-3a0f-11e9-b938-97983b40cabe", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "9199b1a7-3a0f-11e9-b938-97983b40cabe", + "content-type": "text/xml", + "content-length": "1161", + "date": "Tue, 26 Feb 2019 21:43:35 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStackEvents_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStackEvents_2.json new file mode 100644 index 00000000..3992fd39 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStackEvents_2.json @@ -0,0 +1,121 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "945b90a0-3a0f-11e9-adaf-0211d8bec7e2", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ansible-test-on-create-failure-rollback", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 39, + "microsecond": 920000 + }, + "ResourceStatus": "ROLLBACK_IN_PROGRESS", + "ResourceStatusReason": "The following resource(s) failed to create: [ECRRepo]. . Rollback requested by user." + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "ECRRepo-CREATE_FAILED-2019-02-26T21:43:39.210Z", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-1lsnxu2zpb20l", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 39, + "microsecond": 210000 + }, + "ResourceStatus": "CREATE_FAILED", + "ResourceStatusReason": "Invalid parameter at 'PolicyText' failed to satisfy constraint: 'Invalid repository policy provided' (Service: AmazonECR; Status Code: 400; Error Code: InvalidParameterException; Request ID: 93e0bb60-3a0f-11e9-a53c-7162bb423e4d)", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:43:38.793Z", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-1lsnxu2zpb20l", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 38, + "microsecond": 793000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "Resource creation Initiated", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:43:38.266Z", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 38, + "microsecond": 266000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "9140bc10-3a0f-11e9-94bf-0a9edf17d014", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ansible-test-on-create-failure-rollback", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 34, + "microsecond": 740000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "User Initiated" + } + ], + "ResponseMetadata": { + "RequestId": "94e16307-3a0f-11e9-b938-97983b40cabe", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "94e16307-3a0f-11e9-b938-97983b40cabe", + "content-type": "text/xml", + "content-length": "5241", + "vary": "Accept-Encoding", + "date": "Tue, 26 Feb 2019 21:43:40 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStackEvents_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStackEvents_3.json new file mode 100644 index 00000000..e272c734 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStackEvents_3.json @@ -0,0 +1,180 @@ +{ + "status_code": 200, + "data": { + "StackEvents": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "9743bc70-3a0f-11e9-b335-0ade61d04ee6", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ansible-test-on-create-failure-rollback", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 44, + "microsecond": 797000 + }, + "ResourceStatus": "ROLLBACK_COMPLETE" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "ECRRepo-DELETE_COMPLETE-2019-02-26T21:43:43.908Z", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-1lsnxu2zpb20l", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 43, + "microsecond": 908000 + }, + "ResourceStatus": "DELETE_COMPLETE", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "ECRRepo-DELETE_IN_PROGRESS-2019-02-26T21:43:43.478Z", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-1lsnxu2zpb20l", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 43, + "microsecond": 478000 + }, + "ResourceStatus": "DELETE_IN_PROGRESS", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "945b90a0-3a0f-11e9-adaf-0211d8bec7e2", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ansible-test-on-create-failure-rollback", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 39, + "microsecond": 920000 + }, + "ResourceStatus": "ROLLBACK_IN_PROGRESS", + "ResourceStatusReason": "The following resource(s) failed to create: [ECRRepo]. . Rollback requested by user." + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "ECRRepo-CREATE_FAILED-2019-02-26T21:43:39.210Z", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-1lsnxu2zpb20l", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 39, + "microsecond": 210000 + }, + "ResourceStatus": "CREATE_FAILED", + "ResourceStatusReason": "Invalid parameter at 'PolicyText' failed to satisfy constraint: 'Invalid repository policy provided' (Service: AmazonECR; Status Code: 400; Error Code: InvalidParameterException; Request ID: 93e0bb60-3a0f-11e9-a53c-7162bb423e4d)", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:43:38.793Z", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "ansib-ecrre-1lsnxu2zpb20l", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 38, + "microsecond": 793000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "Resource creation Initiated", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "ECRRepo-CREATE_IN_PROGRESS-2019-02-26T21:43:38.266Z", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ECRRepo", + "PhysicalResourceId": "", + "ResourceType": "AWS::ECR::Repository", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 38, + "microsecond": 266000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceProperties": "{\"RepositoryPolicyText\":{\"Version\":\"3000-10-17\",\"Statement\":[{\"Action\":[\"ecr:*\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}}" + }, + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "EventId": "9140bc10-3a0f-11e9-94bf-0a9edf17d014", + "StackName": "ansible-test-on-create-failure-rollback", + "LogicalResourceId": "ansible-test-on-create-failure-rollback", + "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "ResourceType": "AWS::CloudFormation::Stack", + "Timestamp": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 34, + "microsecond": 740000 + }, + "ResourceStatus": "CREATE_IN_PROGRESS", + "ResourceStatusReason": "User Initiated" + } + ], + "ResponseMetadata": { + "RequestId": "982d0bff-3a0f-11e9-b938-97983b40cabe", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "982d0bff-3a0f-11e9-b938-97983b40cabe", + "content-type": "text/xml", + "content-length": "7911", + "vary": "Accept-Encoding", + "date": "Tue, 26 Feb 2019 21:43:45 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStacks_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStacks_1.json new file mode 100644 index 00000000..25facea1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStacks_1.json @@ -0,0 +1,42 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "StackName": "ansible-test-on-create-failure-rollback", + "CreationTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 34, + "microsecond": 740000 + }, + "RollbackConfiguration": {}, + "StackStatus": "CREATE_IN_PROGRESS", + "StackStatusReason": "User Initiated", + "DisableRollback": false, + "NotificationARNs": [], + "Tags": [], + "EnableTerminationProtection": false, + "DriftInformation": { + "StackDriftStatus": "NOT_CHECKED" + } + } + ], + "ResponseMetadata": { + "RequestId": "91725383-3a0f-11e9-b938-97983b40cabe", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "91725383-3a0f-11e9-b938-97983b40cabe", + "content-type": "text/xml", + "content-length": "1045", + "date": "Tue, 26 Feb 2019 21:43:35 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStacks_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStacks_2.json new file mode 100644 index 00000000..55a80d8a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStacks_2.json @@ -0,0 +1,52 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "StackName": "ansible-test-on-create-failure-rollback", + "CreationTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 34, + "microsecond": 740000 + }, + "DeletionTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 39, + "microsecond": 920000 + }, + "RollbackConfiguration": {}, + "StackStatus": "ROLLBACK_IN_PROGRESS", + "StackStatusReason": "The following resource(s) failed to create: [ECRRepo]. . Rollback requested by user.", + "DisableRollback": false, + "NotificationARNs": [], + "Tags": [], + "EnableTerminationProtection": false, + "DriftInformation": { + "StackDriftStatus": "NOT_CHECKED" + } + } + ], + "ResponseMetadata": { + "RequestId": "94bb1651-3a0f-11e9-b938-97983b40cabe", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "94bb1651-3a0f-11e9-b938-97983b40cabe", + "content-type": "text/xml", + "content-length": "1179", + "date": "Tue, 26 Feb 2019 21:43:40 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStacks_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStacks_3.json new file mode 100644 index 00000000..7c00a836 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/cloudformation/on_create_failure_rollback/cloudformation.DescribeStacks_3.json @@ -0,0 +1,51 @@ +{ + "status_code": 200, + "data": { + "Stacks": [ + { + "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/ansible-test-on-create-failure-rollback/914046e0-3a0f-11e9-94bf-0a9edf17d014", + "StackName": "ansible-test-on-create-failure-rollback", + "CreationTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 34, + "microsecond": 740000 + }, + "DeletionTime": { + "__class__": "datetime", + "year": 2019, + "month": 2, + "day": 26, + "hour": 21, + "minute": 43, + "second": 39, + "microsecond": 920000 + }, + "RollbackConfiguration": {}, + "StackStatus": "ROLLBACK_COMPLETE", + "DisableRollback": false, + "NotificationARNs": [], + "Tags": [], + "EnableTerminationProtection": false, + "DriftInformation": { + "StackDriftStatus": "NOT_CHECKED" + } + } + ], + "ResponseMetadata": { + "RequestId": "98016814-3a0f-11e9-b938-97983b40cabe", + "HTTPStatusCode": 200, + "HTTPHeaders": { + "x-amzn-requestid": "98016814-3a0f-11e9-b938-97983b40cabe", + "content-type": "text/xml", + "content-length": "1044", + "date": "Tue, 26 Feb 2019 21:43:45 GMT" + }, + "RetryAttempts": 0 + } + } +} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.ActivatePipeline_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.ActivatePipeline_1.json new file mode 100644 index 00000000..3ae6a8c5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.ActivatePipeline_1.json @@ -0,0 +1,16 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RequestId": "bf44512b-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:16 GMT", + "x-amzn-requestid": "bf44512b-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "2" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..63717ea5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_1.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "bf07bcc3-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:15 GMT", + "x-amzn-requestid": "bf07bcc3-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_10.json new file mode 100644 index 00000000..d4fa7c93 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_10.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "e9c3fc64-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:23:27 GMT", + "x-amzn-requestid": "e9c3fc64-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_11.json new file mode 100644 index 00000000..dc391e35 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_11.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "efcd17aa-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:23:37 GMT", + "x-amzn-requestid": "efcd17aa-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_12.json new file mode 100644 index 00000000..475493c9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_12.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f5dcc189-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:23:47 GMT", + "x-amzn-requestid": "f5dcc189-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_13.json new file mode 100644 index 00000000..4bf47d64 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_13.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "fbea4982-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:23:58 GMT", + "x-amzn-requestid": "fbea4982-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_14.json new file mode 100644 index 00000000..7b48febb --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_14.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "01f44f22-68ca-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:24:08 GMT", + "x-amzn-requestid": "01f44f22-68ca-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_15.json new file mode 100644 index 00000000..0c0eb8c2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_15.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "07fd6963-68ca-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:24:18 GMT", + "x-amzn-requestid": "07fd6963-68ca-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_16.json new file mode 100644 index 00000000..5ccba8f7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_16.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "0e065d77-68ca-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:24:28 GMT", + "x-amzn-requestid": "0e065d77-68ca-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_17.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_17.json new file mode 100644 index 00000000..be45d910 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_17.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "140f9f9e-68ca-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:24:38 GMT", + "x-amzn-requestid": "140f9f9e-68ca-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_18.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_18.json new file mode 100644 index 00000000..6171a53c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_18.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "1a197dcb-68ca-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:24:48 GMT", + "x-amzn-requestid": "1a197dcb-68ca-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_19.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_19.json new file mode 100644 index 00000000..6bb36e61 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_19.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "2024946b-68ca-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:24:58 GMT", + "x-amzn-requestid": "2024946b-68ca-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_2.json new file mode 100644 index 00000000..a7b37943 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_2.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "bf3116b5-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:16 GMT", + "x-amzn-requestid": "bf3116b5-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_20.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_20.json new file mode 100644 index 00000000..b281b83c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_20.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "262e24bf-68ca-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:25:08 GMT", + "x-amzn-requestid": "262e24bf-68ca-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_21.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_21.json new file mode 100644 index 00000000..0fa7e039 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_21.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "2c360727-68ca-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:25:19 GMT", + "x-amzn-requestid": "2c360727-68ca-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_22.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_22.json new file mode 100644 index 00000000..e4cc111a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_22.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "323eacc0-68ca-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:25:28 GMT", + "x-amzn-requestid": "323eacc0-68ca-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_23.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_23.json new file mode 100644 index 00000000..c8c28866 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_23.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "38524edf-68ca-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:25:38 GMT", + "x-amzn-requestid": "38524edf-68ca-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_24.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_24.json new file mode 100644 index 00000000..c176c523 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_24.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "3e591fbf-68ca-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:25:49 GMT", + "x-amzn-requestid": "3e591fbf-68ca-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_25.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_25.json new file mode 100644 index 00000000..ee58417a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_25.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "44623acf-68ca-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:25:59 GMT", + "x-amzn-requestid": "44623acf-68ca-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_26.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_26.json new file mode 100644 index 00000000..08c8d7dc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_26.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "4a6d5137-68ca-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:26:09 GMT", + "x-amzn-requestid": "4a6d5137-68ca-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_27.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_27.json new file mode 100644 index 00000000..167d756f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_27.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "5073d37b-68ca-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:26:19 GMT", + "x-amzn-requestid": "5073d37b-68ca-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_28.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_28.json new file mode 100644 index 00000000..33b821db --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_28.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "567d8b04-68ca-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:26:29 GMT", + "x-amzn-requestid": "567d8b04-68ca-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_29.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_29.json new file mode 100644 index 00000000..a5b75c0f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_29.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "5c86a656-68ca-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:26:39 GMT", + "x-amzn-requestid": "5c86a656-68ca-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_3.json new file mode 100644 index 00000000..024c77bc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_3.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "bf84b4fb-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:16 GMT", + "x-amzn-requestid": "bf84b4fb-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_30.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_30.json new file mode 100644 index 00000000..66b7db20 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_30.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "62984c6d-68ca-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:26:50 GMT", + "x-amzn-requestid": "62984c6d-68ca-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_31.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_31.json new file mode 100644 index 00000000..4a34e4f7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_31.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "689f4441-68ca-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:26:59 GMT", + "x-amzn-requestid": "689f4441-68ca-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_32.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_32.json new file mode 100644 index 00000000..b118228c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_32.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "6eab44f8-68ca-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:27:10 GMT", + "x-amzn-requestid": "6eab44f8-68ca-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_33.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_33.json new file mode 100644 index 00000000..ac867d56 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_33.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "74b375a8-68ca-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:27:20 GMT", + "x-amzn-requestid": "74b375a8-68ca-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_34.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_34.json new file mode 100644 index 00000000..52189066 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_34.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "74c54ffa-68ca-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:27:20 GMT", + "x-amzn-requestid": "74c54ffa-68ca-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_35.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_35.json new file mode 100644 index 00000000..ba46b9a9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_35.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "74d6dc2b-68ca-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:27:20 GMT", + "x-amzn-requestid": "74d6dc2b-68ca-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_36.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_36.json new file mode 100644 index 00000000..372cef7c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_36.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "74e8dd8c-68ca-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:27:20 GMT", + "x-amzn-requestid": "74e8dd8c-68ca-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_4.json new file mode 100644 index 00000000..32e58f0c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_4.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "c58f574c-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:27 GMT", + "x-amzn-requestid": "c58f574c-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_5.json new file mode 100644 index 00000000..116adce1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_5.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "cb97871c-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:36 GMT", + "x-amzn-requestid": "cb97871c-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_6.json new file mode 100644 index 00000000..47f27792 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_6.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "d19f69b0-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:47 GMT", + "x-amzn-requestid": "d19f69b0-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_7.json new file mode 100644 index 00000000..6dfbd436 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_7.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "d7aa0b78-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:56 GMT", + "x-amzn-requestid": "d7aa0b78-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_8.json new file mode 100644 index 00000000..16f0f602 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_8.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "ddb19f29-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:23:06 GMT", + "x-amzn-requestid": "ddb19f29-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_9.json new file mode 100644 index 00000000..1c3727b2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.DescribePipelines_9.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:22:17", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:22:18", + "key": "@finishedTime" + }, + { + "stringValue": "2", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "e3ba9338-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:23:17 GMT", + "x-amzn-requestid": "e3ba9338-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.ListPipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.ListPipelines_1.json new file mode 100644 index 00000000..27f67f45 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_pipeline/datapipeline.ListPipelines_1.json @@ -0,0 +1,23 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "bf1ca4df-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:15 GMT", + "x-amzn-requestid": "bf1ca4df-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "114" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.ActivatePipeline_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.ActivatePipeline_1.json new file mode 100644 index 00000000..7fb2d13c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.ActivatePipeline_1.json @@ -0,0 +1,16 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RequestId": "f6f52c07-68c8-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:40 GMT", + "x-amzn-requestid": "f6f52c07-68c8-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "2" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..d8807dcd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_1.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f6e15657-68c8-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:39 GMT", + "x-amzn-requestid": "f6e15657-68c8-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_10.json new file mode 100644 index 00000000..7a261f68 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_10.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "27ea4875-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:18:02 GMT", + "x-amzn-requestid": "27ea4875-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_11.json new file mode 100644 index 00000000..d9d9673f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_11.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "2df3155e-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:18:12 GMT", + "x-amzn-requestid": "2df3155e-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_12.json new file mode 100644 index 00000000..f860a119 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_12.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "33fca5d4-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:18:22 GMT", + "x-amzn-requestid": "33fca5d4-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_13.json new file mode 100644 index 00000000..ad068259 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_13.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "3a06aa5e-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:18:32 GMT", + "x-amzn-requestid": "3a06aa5e-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_14.json new file mode 100644 index 00000000..4e801743 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_14.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "4010fe25-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:18:42 GMT", + "x-amzn-requestid": "4010fe25-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_15.json new file mode 100644 index 00000000..50c37c75 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_15.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "461a8e6d-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:18:52 GMT", + "x-amzn-requestid": "461a8e6d-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_16.json new file mode 100644 index 00000000..bf50700a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_16.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "4c241ddb-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:19:02 GMT", + "x-amzn-requestid": "4c241ddb-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_17.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_17.json new file mode 100644 index 00000000..5ea0b2f1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_17.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "522e9922-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:19:12 GMT", + "x-amzn-requestid": "522e9922-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_18.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_18.json new file mode 100644 index 00000000..a3a346d4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_18.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "583569c6-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:19:22 GMT", + "x-amzn-requestid": "583569c6-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_19.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_19.json new file mode 100644 index 00000000..6969db9d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_19.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "5e400aef-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:19:33 GMT", + "x-amzn-requestid": "5e400aef-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_2.json new file mode 100644 index 00000000..d955bd9b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_2.json @@ -0,0 +1,70 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f79eb2fb-68c8-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:40 GMT", + "x-amzn-requestid": "f79eb2fb-68c8-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "816" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_20.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_20.json new file mode 100644 index 00000000..26c98fbc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_20.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "644b972f-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:19:43 GMT", + "x-amzn-requestid": "644b972f-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_21.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_21.json new file mode 100644 index 00000000..5826dd80 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_21.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "6a55756a-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:19:53 GMT", + "x-amzn-requestid": "6a55756a-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_22.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_22.json new file mode 100644 index 00000000..7fb32f71 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_22.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "705f79f8-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:20:03 GMT", + "x-amzn-requestid": "705f79f8-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_23.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_23.json new file mode 100644 index 00000000..14159673 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_23.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "76690aa7-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:20:13 GMT", + "x-amzn-requestid": "76690aa7-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_24.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_24.json new file mode 100644 index 00000000..f9afda9b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_24.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "7c73f9be-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:20:23 GMT", + "x-amzn-requestid": "7c73f9be-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_25.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_25.json new file mode 100644 index 00000000..cd7b8af2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_25.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "827b3ff5-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:20:33 GMT", + "x-amzn-requestid": "827b3ff5-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_26.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_26.json new file mode 100644 index 00000000..59d320a6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_26.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "88843410-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:20:44 GMT", + "x-amzn-requestid": "88843410-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_27.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_27.json new file mode 100644 index 00000000..0ed0329b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_27.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "8e8e3994-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:20:53 GMT", + "x-amzn-requestid": "8e8e3994-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_28.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_28.json new file mode 100644 index 00000000..5964c906 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_28.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "949928d8-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:04 GMT", + "x-amzn-requestid": "949928d8-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_29.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_29.json new file mode 100644 index 00000000..5b3efb65 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_29.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "9aa502aa-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:15 GMT", + "x-amzn-requestid": "9aa502aa-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_3.json new file mode 100644 index 00000000..fa529208 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_3.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "fda8b75e-68c8-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:51 GMT", + "x-amzn-requestid": "fda8b75e-68c8-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_30.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_30.json new file mode 100644 index 00000000..a9462628 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_30.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "a0aee145-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:24 GMT", + "x-amzn-requestid": "a0aee145-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_31.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_31.json new file mode 100644 index 00000000..4bb2e216 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_31.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "a6bf4ec4-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:34 GMT", + "x-amzn-requestid": "a6bf4ec4-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_32.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_32.json new file mode 100644 index 00000000..020f7126 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_32.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "acc70a54-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:44 GMT", + "x-amzn-requestid": "acc70a54-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_33.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_33.json new file mode 100644 index 00000000..3bf3fde6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_33.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "acda9253-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:44 GMT", + "x-amzn-requestid": "acda9253-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_34.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_34.json new file mode 100644 index 00000000..286fb67b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_34.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "aceb5aed-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:45 GMT", + "x-amzn-requestid": "aceb5aed-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_35.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_35.json new file mode 100644 index 00000000..2908a3f3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_35.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "acfff4a4-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:45 GMT", + "x-amzn-requestid": "acfff4a4-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_4.json new file mode 100644 index 00000000..7427bc9a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_4.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "03b295e1-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:17:01 GMT", + "x-amzn-requestid": "03b295e1-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_5.json new file mode 100644 index 00000000..0f4ad7ab --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_5.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "09bb89f0-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:17:11 GMT", + "x-amzn-requestid": "09bb89f0-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_6.json new file mode 100644 index 00000000..209eefb9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_6.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "0fc6eeb0-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:17:21 GMT", + "x-amzn-requestid": "0fc6eeb0-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_7.json new file mode 100644 index 00000000..4aae89cd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_7.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "15ce3481-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:17:31 GMT", + "x-amzn-requestid": "15ce3481-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_8.json new file mode 100644 index 00000000..b99a4ef9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_8.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "1bd74fa4-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:17:41 GMT", + "x-amzn-requestid": "1bd74fa4-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_9.json new file mode 100644 index 00000000..daf99bec --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.DescribePipelines_9.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "21e06a01-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:17:51 GMT", + "x-amzn-requestid": "21e06a01-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.ListPipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.ListPipelines_1.json new file mode 100644 index 00000000..52bbd4d4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/activate_without_population/datapipeline.ListPipelines_1.json @@ -0,0 +1,23 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "f6d10235-68c8-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:39 GMT", + "x-amzn-requestid": "f6d10235-68c8-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "114" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/check_dp_exists_false/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/check_dp_exists_false/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..dd143dad --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/check_dp_exists_false/datapipeline.DescribePipelines_1.json @@ -0,0 +1,21 @@ +{ + "status_code": 400, + "data": { + "Error": { + "Message": "Pipeline with id: df-015440025PF7YGLDK47C does not exist", + "Code": "PipelineDeletedException" + }, + "ResponseMetadata": { + "RequestId": "be8212fd-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:15 GMT", + "x-amzn-requestid": "be8212fd-68c9-11e7-b0eb-93771d0a5156", + "content-length": "106", + "cneonction": "close", + "content-type": "application/x-amz-json-1.1" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 400 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/check_dp_exists_true/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/check_dp_exists_true/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..6d06e0d9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/check_dp_exists_true/datapipeline.DescribePipelines_1.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "be402786-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:14 GMT", + "x-amzn-requestid": "be402786-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/check_dp_status/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/check_dp_status/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..23a454b4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/check_dp_status/datapipeline.DescribePipelines_1.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "bec5ab3e-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:15 GMT", + "x-amzn-requestid": "bec5ab3e-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.CreatePipeline_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.CreatePipeline_1.json new file mode 100644 index 00000000..d3d66fc7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.CreatePipeline_1.json @@ -0,0 +1,17 @@ +{ + "status_code": 200, + "data": { + "pipelineId": "df-09359422DAX2M66ZHFVF", + "ResponseMetadata": { + "RequestId": "ad608b38-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:45 GMT", + "x-amzn-requestid": "ad608b38-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "40" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DeletePipeline_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DeletePipeline_1.json new file mode 100644 index 00000000..4eb0f69f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DeletePipeline_1.json @@ -0,0 +1,16 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RequestId": "adf8fab8-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:46 GMT", + "x-amzn-requestid": "adf8fab8-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "0" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..20feb718 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_1.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:21:46", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-09359422DAX2M66ZHFVF", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "9fee08b05473783e91357fadb089e036", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-09359422DAX2M66ZHFVF" + } + ], + "ResponseMetadata": { + "RequestId": "ad8e790b-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:45 GMT", + "x-amzn-requestid": "ad8e790b-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "757" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_2.json new file mode 100644 index 00000000..343e78e3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_2.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:21:46", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-09359422DAX2M66ZHFVF", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "9fee08b05473783e91357fadb089e036", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-09359422DAX2M66ZHFVF" + } + ], + "ResponseMetadata": { + "RequestId": "ad9f6906-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:45 GMT", + "x-amzn-requestid": "ad9f6906-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "757" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_3.json new file mode 100644 index 00000000..c98007e2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_3.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:21:46", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-09359422DAX2M66ZHFVF", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "9fee08b05473783e91357fadb089e036", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-09359422DAX2M66ZHFVF" + } + ], + "ResponseMetadata": { + "RequestId": "adb27bcf-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:46 GMT", + "x-amzn-requestid": "adb27bcf-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "757" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_4.json new file mode 100644 index 00000000..619eb3b0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_4.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:21:46", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-09359422DAX2M66ZHFVF", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "9fee08b05473783e91357fadb089e036", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-09359422DAX2M66ZHFVF" + } + ], + "ResponseMetadata": { + "RequestId": "adc31da7-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:47 GMT", + "x-amzn-requestid": "adc31da7-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "757" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_5.json new file mode 100644 index 00000000..ad10c0b7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_5.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:21:46", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-09359422DAX2M66ZHFVF", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "9fee08b05473783e91357fadb089e036", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-09359422DAX2M66ZHFVF" + } + ], + "ResponseMetadata": { + "RequestId": "add67e94-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:46 GMT", + "x-amzn-requestid": "add67e94-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "757" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_6.json new file mode 100644 index 00000000..ceebab8b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.DescribePipelines_6.json @@ -0,0 +1,21 @@ +{ + "status_code": 400, + "data": { + "Error": { + "Message": "Pipeline with id: df-09359422DAX2M66ZHFVF does not exist", + "Code": "PipelineDeletedException" + }, + "ResponseMetadata": { + "RequestId": "aeac4532-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:47 GMT", + "x-amzn-requestid": "aeac4532-68c9-11e7-b9c1-53eb374c7a33", + "content-length": "106", + "cneonction": "close", + "content-type": "application/x-amz-json-1.1" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 400 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.ListPipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.ListPipelines_1.json new file mode 100644 index 00000000..52879777 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.ListPipelines_1.json @@ -0,0 +1,23 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "ad4c18d7-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:45 GMT", + "x-amzn-requestid": "ad4c18d7-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "114" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.ListPipelines_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.ListPipelines_2.json new file mode 100644 index 00000000..db5bca68 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline/datapipeline.ListPipelines_2.json @@ -0,0 +1,27 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-unittest-create-pipeline", + "id": "df-09359422DAX2M66ZHFVF" + }, + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "ade6f959-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:47 GMT", + "x-amzn-requestid": "ade6f959-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "189" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..9674b9a9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_1.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f514fa3e-68c8-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:37 GMT", + "x-amzn-requestid": "f514fa3e-68c8-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_2.json new file mode 100644 index 00000000..16a6b016 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_2.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f53e7b42-68c8-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:37 GMT", + "x-amzn-requestid": "f53e7b42-68c8-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_3.json new file mode 100644 index 00000000..88e2b83b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_3.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f54f4483-68c8-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:36 GMT", + "x-amzn-requestid": "f54f4483-68c8-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_4.json new file mode 100644 index 00000000..73be9690 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.DescribePipelines_4.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f561bb16-68c8-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:37 GMT", + "x-amzn-requestid": "f561bb16-68c8-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.GetPipelineDefinition_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.GetPipelineDefinition_1.json new file mode 100644 index 00000000..37bfa294 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.GetPipelineDefinition_1.json @@ -0,0 +1,17 @@ +{ + "status_code": 200, + "data": { + "pipelineObjects": [], + "ResponseMetadata": { + "RequestId": "f525c381-68c8-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:36 GMT", + "x-amzn-requestid": "f525c381-68c8-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "22" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.ListPipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.ListPipelines_1.json new file mode 100644 index 00000000..ee0f1828 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_already_exists/datapipeline.ListPipelines_1.json @@ -0,0 +1,23 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "f503e33c-68c8-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:37 GMT", + "x-amzn-requestid": "f503e33c-68c8-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "114" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.CreatePipeline_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.CreatePipeline_1.json new file mode 100644 index 00000000..3bd2a7cc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.CreatePipeline_1.json @@ -0,0 +1,17 @@ +{ + "status_code": 200, + "data": { + "pipelineId": "df-04922542NBJ1I10KYE8", + "ResponseMetadata": { + "RequestId": "aefed20e-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:48 GMT", + "x-amzn-requestid": "aefed20e-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "39" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DeletePipeline_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DeletePipeline_1.json new file mode 100644 index 00000000..d289367b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DeletePipeline_1.json @@ -0,0 +1,16 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RequestId": "af93e632-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:49 GMT", + "x-amzn-requestid": "af93e632-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "0" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..5078ca00 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_1.json @@ -0,0 +1,75 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:21:49", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline_tags", + "key": "name" + }, + { + "stringValue": "df-04922542NBJ1I10KYE8", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "644685a53f98d695792be5e2e69f6504", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline_tags", + "description": "ansible-datapipeline-unit-test", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-04922542NBJ1I10KYE8" + } + ], + "ResponseMetadata": { + "RequestId": "af23e641-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:48 GMT", + "x-amzn-requestid": "af23e641-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "872" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_2.json new file mode 100644 index 00000000..d959f922 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_2.json @@ -0,0 +1,75 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:21:49", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline_tags", + "key": "name" + }, + { + "stringValue": "df-04922542NBJ1I10KYE8", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "644685a53f98d695792be5e2e69f6504", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline_tags", + "description": "ansible-datapipeline-unit-test", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-04922542NBJ1I10KYE8" + } + ], + "ResponseMetadata": { + "RequestId": "af35c095-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:48 GMT", + "x-amzn-requestid": "af35c095-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "872" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_3.json new file mode 100644 index 00000000..f7051574 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_3.json @@ -0,0 +1,75 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:21:49", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline_tags", + "key": "name" + }, + { + "stringValue": "df-04922542NBJ1I10KYE8", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "644685a53f98d695792be5e2e69f6504", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline_tags", + "description": "ansible-datapipeline-unit-test", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-04922542NBJ1I10KYE8" + } + ], + "ResponseMetadata": { + "RequestId": "af47c1f9-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:48 GMT", + "x-amzn-requestid": "af47c1f9-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "872" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_4.json new file mode 100644 index 00000000..dfb972d0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_4.json @@ -0,0 +1,75 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:21:49", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline_tags", + "key": "name" + }, + { + "stringValue": "df-04922542NBJ1I10KYE8", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "644685a53f98d695792be5e2e69f6504", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline_tags", + "description": "ansible-datapipeline-unit-test", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-04922542NBJ1I10KYE8" + } + ], + "ResponseMetadata": { + "RequestId": "af5ecc6b-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:48 GMT", + "x-amzn-requestid": "af5ecc6b-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "872" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_5.json new file mode 100644 index 00000000..08913669 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_5.json @@ -0,0 +1,75 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:21:49", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline_tags", + "key": "name" + }, + { + "stringValue": "df-04922542NBJ1I10KYE8", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "644685a53f98d695792be5e2e69f6504", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline_tags", + "description": "ansible-datapipeline-unit-test", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-04922542NBJ1I10KYE8" + } + ], + "ResponseMetadata": { + "RequestId": "af70a6bd-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:48 GMT", + "x-amzn-requestid": "af70a6bd-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "872" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_6.json new file mode 100644 index 00000000..5ee0110b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_6.json @@ -0,0 +1,79 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:21:49", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "2017-07-14T19:21:50", + "key": "@deletionRequestTime" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-unittest-create-pipeline_tags", + "key": "name" + }, + { + "stringValue": "df-04922542NBJ1I10KYE8", + "key": "@id" + }, + { + "stringValue": "DELETING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "644685a53f98d695792be5e2e69f6504", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-unittest-create-pipeline_tags", + "description": "ansible-datapipeline-unit-test", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-04922542NBJ1I10KYE8" + } + ], + "ResponseMetadata": { + "RequestId": "afe22d47-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:49 GMT", + "x-amzn-requestid": "afe22d47-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "940" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_7.json new file mode 100644 index 00000000..d47b5f1c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.DescribePipelines_7.json @@ -0,0 +1,21 @@ +{ + "status_code": 400, + "data": { + "Error": { + "Message": "Pipeline with id: df-04922542NBJ1I10KYE8 does not exist", + "Code": "PipelineDeletedException" + }, + "ResponseMetadata": { + "RequestId": "b5eb4768-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:00 GMT", + "x-amzn-requestid": "b5eb4768-68c9-11e7-8d5f-8781ccf20ee6", + "content-length": "105", + "cneonction": "close", + "content-type": "application/x-amz-json-1.1" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 400 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.ListPipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.ListPipelines_1.json new file mode 100644 index 00000000..734f84e2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.ListPipelines_1.json @@ -0,0 +1,23 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "aeec5b7d-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:48 GMT", + "x-amzn-requestid": "aeec5b7d-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "114" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.ListPipelines_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.ListPipelines_2.json new file mode 100644 index 00000000..54836373 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/create_pipeline_with_tags/datapipeline.ListPipelines_2.json @@ -0,0 +1,27 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + }, + { + "name": "ansible-unittest-create-pipeline_tags", + "id": "df-04922542NBJ1I10KYE8" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "af82f640-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:21:49 GMT", + "x-amzn-requestid": "af82f640-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "193" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..0f9e4f5a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_1.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f656a27e-68c8-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:38 GMT", + "x-amzn-requestid": "f656a27e-68c8-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_2.json new file mode 100644 index 00000000..f083c7f2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_2.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f66a5120-68c8-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:39 GMT", + "x-amzn-requestid": "f66a5120-68c8-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_3.json new file mode 100644 index 00000000..38e30295 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_3.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f67b1a71-68c8-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:38 GMT", + "x-amzn-requestid": "f67b1a71-68c8-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_4.json new file mode 100644 index 00000000..096d457c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.DescribePipelines_4.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f68d9103-68c8-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:38 GMT", + "x-amzn-requestid": "f68d9103-68c8-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.ListPipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.ListPipelines_1.json new file mode 100644 index 00000000..2a8689ca --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/deactivate_pipeline/datapipeline.ListPipelines_1.json @@ -0,0 +1,23 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "f6458b0d-68c8-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:39 GMT", + "x-amzn-requestid": "f6458b0d-68c8-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "114" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/define_pipeline/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/define_pipeline/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..1c8801e9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/define_pipeline/datapipeline.DescribePipelines_1.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f5e569e0-68c8-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:38 GMT", + "x-amzn-requestid": "f5e569e0-68c8-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/define_pipeline/datapipeline.PutPipelineDefinition_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/define_pipeline/datapipeline.PutPipelineDefinition_1.json new file mode 100644 index 00000000..37d4f9ac --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/define_pipeline/datapipeline.PutPipelineDefinition_1.json @@ -0,0 +1,19 @@ +{ + "status_code": 200, + "data": { + "validationErrors": [], + "validationWarnings": [], + "errored": false, + "ResponseMetadata": { + "RequestId": "f5f855d7-68c8-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:38 GMT", + "x-amzn-requestid": "f5f855d7-68c8-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "63" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_nonexistent_pipeline/datapipeline.ListPipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_nonexistent_pipeline/datapipeline.ListPipelines_1.json new file mode 100644 index 00000000..16a7c9b4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_nonexistent_pipeline/datapipeline.ListPipelines_1.json @@ -0,0 +1,23 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "b62fa386-68c9-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:00 GMT", + "x-amzn-requestid": "b62fa386-68c9-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "114" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.CreatePipeline_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.CreatePipeline_1.json new file mode 100644 index 00000000..9d780e9e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.CreatePipeline_1.json @@ -0,0 +1,17 @@ +{ + "status_code": 200, + "data": { + "pipelineId": "df-056994639BPQCQAZSAGU", + "ResponseMetadata": { + "RequestId": "b680d0bb-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:01 GMT", + "x-amzn-requestid": "b680d0bb-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "40" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DeletePipeline_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DeletePipeline_1.json new file mode 100644 index 00000000..f26a6c61 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DeletePipeline_1.json @@ -0,0 +1,16 @@ +{ + "status_code": 200, + "data": { + "ResponseMetadata": { + "RequestId": "b718cb0a-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:02 GMT", + "x-amzn-requestid": "b718cb0a-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "0" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..6a542412 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_1.json @@ -0,0 +1,75 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:22:01", + "key": "@creationTime" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "name" + }, + { + "stringValue": "df-056994639BPQCQAZSAGU", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "861ec422f1889d1124a9e84e63e37708", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-nonexistent", + "description": "ansible-test-nonexistent", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-056994639BPQCQAZSAGU" + } + ], + "ResponseMetadata": { + "RequestId": "b6a82ede-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:01 GMT", + "x-amzn-requestid": "b6a82ede-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "836" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_2.json new file mode 100644 index 00000000..beeabe99 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_2.json @@ -0,0 +1,75 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:22:01", + "key": "@creationTime" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "name" + }, + { + "stringValue": "df-056994639BPQCQAZSAGU", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "861ec422f1889d1124a9e84e63e37708", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-nonexistent", + "description": "ansible-test-nonexistent", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-056994639BPQCQAZSAGU" + } + ], + "ResponseMetadata": { + "RequestId": "b6baa570-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:01 GMT", + "x-amzn-requestid": "b6baa570-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "836" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_3.json new file mode 100644 index 00000000..52b679aa --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_3.json @@ -0,0 +1,75 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:22:01", + "key": "@creationTime" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "name" + }, + { + "stringValue": "df-056994639BPQCQAZSAGU", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "861ec422f1889d1124a9e84e63e37708", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-nonexistent", + "description": "ansible-test-nonexistent", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-056994639BPQCQAZSAGU" + } + ], + "ResponseMetadata": { + "RequestId": "b6cd9131-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:02 GMT", + "x-amzn-requestid": "b6cd9131-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "836" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_4.json new file mode 100644 index 00000000..d5186159 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_4.json @@ -0,0 +1,75 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:22:01", + "key": "@creationTime" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "name" + }, + { + "stringValue": "df-056994639BPQCQAZSAGU", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "861ec422f1889d1124a9e84e63e37708", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-nonexistent", + "description": "ansible-test-nonexistent", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-056994639BPQCQAZSAGU" + } + ], + "ResponseMetadata": { + "RequestId": "b6e11933-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:02 GMT", + "x-amzn-requestid": "b6e11933-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "836" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_5.json new file mode 100644 index 00000000..a66c459d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_5.json @@ -0,0 +1,75 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:22:01", + "key": "@creationTime" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "name" + }, + { + "stringValue": "df-056994639BPQCQAZSAGU", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "861ec422f1889d1124a9e84e63e37708", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-nonexistent", + "description": "ansible-test-nonexistent", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-056994639BPQCQAZSAGU" + } + ], + "ResponseMetadata": { + "RequestId": "b6f3dde4-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:02 GMT", + "x-amzn-requestid": "b6f3dde4-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "836" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_6.json new file mode 100644 index 00000000..8cc97aee --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_6.json @@ -0,0 +1,79 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "[{\"key\":\"ansible\",\"value\":\"test\"}]", + "key": "*tags" + }, + { + "stringValue": "2017-07-14T19:22:01", + "key": "@creationTime" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "description" + }, + { + "stringValue": "2017-07-14T19:22:02", + "key": "@deletionRequestTime" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-nonexistent", + "key": "name" + }, + { + "stringValue": "df-056994639BPQCQAZSAGU", + "key": "@id" + }, + { + "stringValue": "DELETING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "861ec422f1889d1124a9e84e63e37708", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-nonexistent", + "description": "ansible-test-nonexistent", + "tags": [ + { + "value": "test", + "key": "ansible" + } + ], + "pipelineId": "df-056994639BPQCQAZSAGU" + } + ], + "ResponseMetadata": { + "RequestId": "b75fbf1d-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:02 GMT", + "x-amzn-requestid": "b75fbf1d-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "904" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_7.json new file mode 100644 index 00000000..a9982a48 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.DescribePipelines_7.json @@ -0,0 +1,21 @@ +{ + "status_code": 400, + "data": { + "Error": { + "Message": "Pipeline with id: df-056994639BPQCQAZSAGU does not exist", + "Code": "PipelineDeletedException" + }, + "ResponseMetadata": { + "RequestId": "bd6a133d-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:13 GMT", + "x-amzn-requestid": "bd6a133d-68c9-11e7-b0eb-93771d0a5156", + "content-length": "106", + "cneonction": "close", + "content-type": "application/x-amz-json-1.1" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 400 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.ListPipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.ListPipelines_1.json new file mode 100644 index 00000000..e8de70f8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.ListPipelines_1.json @@ -0,0 +1,23 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "b66f4488-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:01 GMT", + "x-amzn-requestid": "b66f4488-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "114" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.ListPipelines_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.ListPipelines_2.json new file mode 100644 index 00000000..cefd11b5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/delete_pipeline/datapipeline.ListPipelines_2.json @@ -0,0 +1,27 @@ +{ + "status_code": 200, + "data": { + "pipelineIdList": [ + { + "name": "ansible-test-create-pipeline", + "id": "df-0590406117G8DPQZY2HA" + }, + { + "name": "ansible-test-nonexistent", + "id": "df-056994639BPQCQAZSAGU" + } + ], + "hasMoreResults": false, + "ResponseMetadata": { + "RequestId": "b706c9a6-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:02 GMT", + "x-amzn-requestid": "b706c9a6-68c9-11e7-8d5f-8781ccf20ee6", + "content-type": "application/x-amz-json-1.1", + "content-length": "181" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/pipeline_description/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/pipeline_description/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..851f9e2a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/pipeline_description/datapipeline.DescribePipelines_1.json @@ -0,0 +1,82 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:40", + "key": "@lastActivationTime" + }, + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "2017-07-14T19:16:42", + "key": "@finishedTime" + }, + { + "stringValue": "1", + "key": "@version" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "FINISHED", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + }, + { + "stringValue": "2017-07-14T19:16:40", + "key": "@firstActivationTime" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "bdbbdcc2-68c9-11e7-b0eb-93771d0a5156", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:13 GMT", + "x-amzn-requestid": "bdbbdcc2-68c9-11e7-b0eb-93771d0a5156", + "content-type": "application/x-amz-json-1.1", + "content-length": "980" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/pipeline_description_nonexistent/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/pipeline_description_nonexistent/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..9125d89d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/pipeline_description_nonexistent/datapipeline.DescribePipelines_1.json @@ -0,0 +1,21 @@ +{ + "status_code": 400, + "data": { + "Error": { + "Message": "Pipeline with id: df-015440025PF7YGLDK47C does not exist", + "Code": "PipelineDeletedException" + }, + "ResponseMetadata": { + "RequestId": "bdfe3c7d-68c9-11e7-8d5f-8781ccf20ee6", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:22:13 GMT", + "x-amzn-requestid": "bdfe3c7d-68c9-11e7-8d5f-8781ccf20ee6", + "content-length": "106", + "cneonction": "close", + "content-type": "application/x-amz-json-1.1" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 400 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/pipeline_field/datapipeline.DescribePipelines_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/pipeline_field/datapipeline.DescribePipelines_1.json new file mode 100644 index 00000000..0061b15d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/data_pipeline/pipeline_field/datapipeline.DescribePipelines_1.json @@ -0,0 +1,66 @@ +{ + "status_code": 200, + "data": { + "pipelineDescriptionList": [ + { + "fields": [ + { + "stringValue": "2017-07-14T19:16:35", + "key": "@creationTime" + }, + { + "stringValue": "ansible-datapipeline-unit-test", + "key": "description" + }, + { + "stringValue": "PIPELINE", + "key": "@sphere" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "pipelineCreator" + }, + { + "stringValue": "ansible-test-create-pipeline", + "key": "name" + }, + { + "stringValue": "df-0590406117G8DPQZY2HA", + "key": "@id" + }, + { + "stringValue": "PENDING", + "key": "@pipelineState" + }, + { + "stringValue": "448830907657", + "key": "@accountId" + }, + { + "stringValue": "881b104bff5f07052e897bd79048b951", + "key": "uniqueId" + }, + { + "stringValue": "AIDAJKBIP5ANB55M7EUTC", + "key": "@userId" + } + ], + "name": "ansible-test-create-pipeline", + "description": "ansible-datapipeline-unit-test", + "tags": [], + "pipelineId": "df-0590406117G8DPQZY2HA" + } + ], + "ResponseMetadata": { + "RequestId": "f5a52c58-68c8-11e7-b9c1-53eb374c7a33", + "HTTPHeaders": { + "date": "Fri, 14 Jul 2017 19:16:38 GMT", + "x-amzn-requestid": "f5a52c58-68c8-11e7-b9c1-53eb374c7a33", + "content-type": "application/x-amz-json-1.1", + "content-length": "749" + }, + "RetryAttempts": 0, + "HTTPStatusCode": 200 + } + } +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json new file mode 100644 index 00000000..2b8018f2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "22cf9d88-b0ca-4a6c-8bfa-a2969541f25b", + "HTTPHeaders": { + "content-length": "249", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json new file mode 100644 index 00000000..540cb22d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ee7493f2-1db0-4edb-a2c8-66dc31c41df8", + "HTTPHeaders": { + "content-length": "249", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..16510d83 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9b06e28e", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b0fe4793-77a1-4c92-978c-975c7b963c59", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..30d8ac08 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "92162d1f-1563-4b14-8fc5-0821c50687cb", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:48 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..97f64fd2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,179 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9843e24b-c094-451f-9be3-3f859dc39385", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5887", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:06 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..d67ec8ac --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d5d76451-0539-4de2-a197-dac87c4eb91b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:17:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..c6154402 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7906c368-77fc-4afc-9ee4-c822dab4864e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:17:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..95032ac3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b9e2ca97-e467-4dcc-a8fc-eff788e8ed49", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:17:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..76d21af3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "249f8e82-8137-4b69-8002-969e880dbcd2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..101822a5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "554aea72-2359-4c35-956b-1cd55c3b1ded", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..a4fd2ecc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a9203775-14d5-4020-aa61-f6709cd6c455", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:32 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000..6092812e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 18, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c0621c72-8851-4c34-9d3d-7ae4bb5de50f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_17.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000..ef7b5d37 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 18, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "62aae2fc-e699-4a66-9bea-1b4b2b26ce35", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_18.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_18.json new file mode 100644 index 00000000..afa295f3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_18.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 18, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0d20ed3c-a88e-42ba-87cc-f573d22b0a11", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_19.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_19.json new file mode 100644 index 00000000..320101d5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_19.json @@ -0,0 +1,235 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [ + { + "DestinationCidrBlock": "195.168.2.0/24", + "State": "available" + }, + { + "DestinationCidrBlock": "196.168.2.0/24", + "State": "available" + } + ], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 2, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 18, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 2, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d5ce628c-8270-4bb8-b0d9-c68b5834a9a8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:18:48 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..12e36ed1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "96ef43c9-1210-47a7-87f7-22c85a05eb2b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_20.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_20.json new file mode 100644 index 00000000..bca49264 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_20.json @@ -0,0 +1,39 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "Routes": [ + { + "DestinationCidrBlock": "196.168.2.0/24", + "State": "deleted" + }, + { + "DestinationCidrBlock": "195.168.2.0/24", + "State": "deleted" + } + ], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3a0d05ae-dbf7-4885-9b50-db2899bc30d5", + "HTTPHeaders": { + "content-length": "1066", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:48 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..b868885c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c4fb8aa0-39ad-4333-9b45-25b48ce5a8cd", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:22 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..619c4866 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b728a197-4790-4987-afe1-23ba2d2edf55", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:38 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..9ab3007c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "06bdac8b-d1ec-48d6-9af4-b2d5bf3fa2f4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:55 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..193586bf --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "baefffe5-7638-423e-84fc-fd21fa7fc6d1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:16:10 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..b8569545 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "591329e5-78f5-4655-90c0-bf2b312b54af", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:16:26 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..66e29949 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4e526b69-b5ea-4f05-a81b-831aa5825e18", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:16:42 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..35f03513 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9b06e28e\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.38</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.11.116.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.37</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.130</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.13.135</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.129</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "534f5ec5-2d5f-46ac-8216-453fc4cad713", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:16:58 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json new file mode 100644 index 00000000..8af115a9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9661b9b4-e18b-491b-8182-6548bfb680bb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:12:21 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..e7cd28ab --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9e06e28b", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0c445bcd-4e37-4368-b45d-b4560bde459f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5236", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..e190e232 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8deda3c9-1498-44ef-a663-111e93657c7f", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:22 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..6d975f1a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,149 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e3c0cd84-d327-4a9e-8cac-0361a0afaaac", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "4836", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..6066eb50 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3888db16-157b-404a-9fea-fe27e8bd556d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:11:34 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..92d1f1e7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ada7d223-32a6-4b60-81bb-63bca2cb2d56", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:11:50 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..e60cb21c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "def174a4-c5c2-4e5b-a5b6-1c2448e869f1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..055f7de9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7c65999e-0e70-4aac-a720-b2216dbe70af", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:20 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..e199f3c0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1153ff47-87b6-40b1-bcdd-ae66c4d4a3ae", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:21 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..f67a9160 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c0748f40-1e33-4f0b-9417-77092bfc9090", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:21 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000..8b6d7e2d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,202 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "16aa6a4d-0fca-4035-b607-c223fc424f81", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:12:22 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_17.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000..78a05ba8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,36 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0d463b0f-87ea-4ada-a79a-f2bb0910c31c", + "HTTPHeaders": { + "content-length": "878", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:22 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..5c0dea83 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bab29653-3411-49bb-af70-3d7b3284ca06", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..3b47382c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d3732d64-34fb-40eb-bddb-c34e5e571921", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..701f05ae --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bd3ccd25-a6d6-44cf-9371-f01ca22d3f57", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:10:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..f25da706 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "36906e17-078f-4c15-9e01-af3e233af2d3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:10:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..f8aa9ec9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "cab9bb1a-7afe-4c5f-b106-038b10cba813", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:10:31 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..1a8a4f86 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "938c6207-f582-4935-bef5-a9e3b01e18e1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:10:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..e7f974dc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0bf3fb58-412a-447c-8cf7-af7185ec7f93", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:11:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..dbbefcbc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9e06e28b\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.212.254.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.106</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.160.254.75</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.105</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b67d7024-2bad-4283-b440-5519b5541867", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:11:18 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..503422fc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9f06e28a", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3239a34a-f3ed-4ba7-9d31-99265ceda2a9", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5237", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..46de4d6a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bdcbf647-c1cc-4971-b133-3e1cd8ee36d5", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..835d53a9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,137 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "87d4db59-f8e6-4d4c-9800-7c0bda5ebee2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "4397", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:46 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..7ee030b7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "40e8326d-2f4b-4761-a2f9-011c989b0d11", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:08:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..9e4979b2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 3, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5c5688ae-0f6e-4d88-adb6-d9f654c74b42", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:08 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..ba464dc2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 3, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7a5c5c59-d48a-467b-9414-097a93c923ae", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..57967a5e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 3, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "cb26ba43-cfc6-466b-8bde-5e63d58728e0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..6f500939 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 3, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1005f435-3e86-461f-a96c-a4f45c32c795", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..55bbb311 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "edac5b19-14be-4b2d-ab47-a2279de47d40", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..a69976b5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "07ee7fe5-c16a-4940-b099-3cd39aa9c2c8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..b1254a9f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7f34b516-b810-4a2b-8e9c-2e4ac5ea32f2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:07:03 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..97128118 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3f0d6abf-421a-4e56-9f19-a95c4639cbe6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:07:18 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..71ccc5f0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8174eae1-ae94-492c-b8d3-369a912dc994", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:07:34 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..7fba5fbc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ab76cd4e-9a69-48f4-8fa6-7b1ea9710f2d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:07:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..e98f0cea --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9e552112-f325-4d3e-bb3d-0698b69a9074", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:08:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..9f3c0183 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1c10aa65-e78f-41e5-bb24-7902b7974bff", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:08:21 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..863aa635 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9f06e28a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.114</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.43.202.248</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.113</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>spNJGPBQfzbK8hNvpHNOaaml_paRZNKs</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.70.185.193</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>yE7hnuavW4SzersgnMyKIoKbd0rE8giW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1963dfb1-564a-4a0c-932c-ecddcdb39d41", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:08:37 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json new file mode 100644 index 00000000..32afe4c1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8738f361-b294-47d7-a6d7-82d289db5e5f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:06:44 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..0e22d719 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9c06e289", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d94359a8-8a4f-4087-b848-27de6253ff6c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..0d225110 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e780e8ce-5417-4a33-a39e-dd78a18b69a5", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..548dcfe9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,115 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "35740449-70e9-4723-b5c4-8c82dc5ec5e6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "3673", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..584a6216 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "2d618f80-4045-4951-8d2e-c8d33395a141", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:42 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..f328bac1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c9e48b82-1edc-4aa7-ac4d-c45c7bd4ae19", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:42 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..41376276 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b346f588-dc55-4be6-95c8-e4708609a4e2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:43 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..b8a3a18f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,162 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a5650999-a5ad-4eea-b407-6d9913738f24", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:06:43 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..56db26d9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5e8c0572-8f87-4708-9aca-997ea3736bc4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:43 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..84a774dd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,76 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "134576b2-43ed-40ac-aefb-c4770a81f587", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6407", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000..e2bdf29e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,76 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5daf9a13-6835-4e6d-be9f-040405da8dff", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6407", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_17.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000..4f365045 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,40 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "561b039d-ffee-42dc-a390-6dde1ae4fcfe", + "HTTPHeaders": { + "content-length": "990", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..ebd539e3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "29d88495-a6b4-4f53-9ec7-32ac21fd80c6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..9b004c2a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a647316d-7079-4a0a-8ad3-91a0a36dc124", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:51 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..9cf6f0ff --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f913c208-ac39-4b8e-aba5-1410f2e4d6cf", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:05:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..88eeadf4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "260f7ff4-ec3b-452e-90f3-9ffb3d5f6895", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:05:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..860dcfd3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fb308284-ea47-44f9-af61-3c0271809839", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:05:39 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..d71b6108 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5e0c4efb-8f23-4ce1-b1fe-c5bccac45063", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:05:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..6ca0be03 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "be516d5b-d999-4de7-bd3e-9c0cb5de857c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:09 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..633be413 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9c06e289\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.112.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.42</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.148.246.46</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.41</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>YANkpCz981zsiW_QkZCFrjN1QAiKm73G</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "007948c6-bac8-4f43-8b80-5e7c32f2d1e8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..c7f4a8a9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9006e285", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e312dbd3-7956-4b0e-bb66-29a85e65e477", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5233", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..933d9868 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fd2ddf0e-f378-46d7-92e7-1b6008d98b04", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:11 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..4c2a4f72 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bcdba325-fd96-4c4b-bb15-dc9a88c456ae", + "HTTPHeaders": { + "content-length": "1917", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..25f9a24c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ee75ebe8-0587-49b5-a231-0d31f713e3be", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:55:39 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..fde1cd4c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5cbe30a2-8771-4116-ba7d-78c32a06546e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:55:55 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..3c37b32a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 56, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3d3d8178-0359-4c80-85c7-410411a532f4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:11 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..e13b27d0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 56, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "67e4f285-2875-4615-ba4e-a36105d24dd7", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:11 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..beaa98a1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 56, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a31cc536-1f4b-46d7-a91d-c8d0909eb897", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:11 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..cf88d5b8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0cf4c8bf-4f69-4f9f-b6ae-aecbbcb60081", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:12 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..48037402 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "07019e0f-0012-47dc-8f86-950bb2b36e52", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..5e69b058 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8174c5d9-d54a-4173-aef3-5e9c3e86bac6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..47ad9060 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "46432541-20bd-444f-ab0a-38db7c36aab5", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:54:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..f7137760 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "84598175-301b-40e4-884d-4e4777267375", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:54:21 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..69249db3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "092fbf9c-c529-4f71-855e-20b4289dc6f4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:54:37 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..da618515 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6d1bb01f-6afe-418c-94c2-7d83c4f94a4d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:54:52 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..284e8b54 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "830ae224-6cdf-46e2-817b-92bcd5fa86ec", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:55:08 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..3f1a6a68 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9006e285\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.24.101.167</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.126.9</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>2hNRbfughR8JKpllR1mEg0uPRckXd0bR</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "51ec304a-3c90-4bbe-86dc-56d87d693ef6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:55:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..45abc721 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9306e286", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "541d2997-d79d-42b4-af0a-7d49754a99a0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5235", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:14 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..46c92879 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e9b91aeb-4237-44ba-9367-b9d240b3d8ba", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..5a1e79ea --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,79 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fc165fe7-372e-4517-a256-5e12138aa890", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "2356", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:14 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..06d4d837 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9e46eaa5-4f5b-42ff-ada0-d90504c0bd9c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:58:20 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..fc46769a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a3d938cd-ea4f-4739-87df-956db661c1a3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:58:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..0a7045f1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c49c942f-0408-4d6d-b04a-1778dc3a3c43", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:58:52 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..385a832a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "18debff6-05c3-44ad-8106-1c1099fba0e0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..cb313c52 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6fb7285e-c4ff-4f11-bdbc-464efbb66f15", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..4749c57d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "cffd1787-58a7-4506-b14b-0bab509b8a1a", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000..de15a8f2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "cb19e2ba-a42a-47d3-a20f-9ea9521978f4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_17.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000..33283151 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,126 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "de97618e-a5a7-4efd-925c-6ca24b2603c6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:59:24 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_18.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_18.json new file mode 100644 index 00000000..505d1a36 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_18.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "aa76261f-ab0e-4bd4-a412-a59e7fdfb6db", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_19.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_19.json new file mode 100644 index 00000000..caac14d2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_19.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9885231e-ee67-49cb-ada6-e8eb3c772e6b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..7e870bbe --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ca30a295-dfce-49f8-a1d1-f5af0dffd1c2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:14 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_20.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_20.json new file mode 100644 index 00000000..0f39c5aa --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_20.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "204f247b-ad5a-4917-bc3e-a793bf09bd48", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..1af37e30 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a8ebc328-fea9-430d-a546-c5e24d447cef", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..e8ab9803 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "edf29e1c-30a1-4d11-9e5a-feddd7f082ab", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:46 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..5e8203fe --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "51c5182c-f83e-496b-ba45-e4972064d690", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:57:01 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..cf06e0ad --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b9255f48-f509-42a9-8c0f-6626a492b46e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:57:17 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..e7965bd0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bab0deee-150b-4952-b949-4acefe6ebafe", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:57:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..e7c60045 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c90d25a2-7e6c-42cc-8f5a-17ab0c58e720", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:57:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..17bd7e73 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9306e286\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.146</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.213.145.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.145</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>iNsKYUCSTSepYCf0igJVeirisatbjYiw</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.86</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.202.36</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.85</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>KZpfPULAV7ahI1aUspYf9oy4412BFNoP</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b1da658d-a66a-4def-873f-193ede827765", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:58:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..21408b7a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9d06e288", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6b76950f-28f0-4e74-9b61-14780c62ced9", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..a27bc82c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e0e829b9-86e9-4b26-aa01-ccacf0a77edc", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:31 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..fc618a32 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,103 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "149f4f23-9fec-4995-acc5-0db46d4d698f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "3234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..958e8a98 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5bb89e85-8f96-43b1-96e3-0fd6c00f9b14", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:03:58 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..265a3496 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "40ebbb4a-0a18-494e-9666-3481637027fc", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:14 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..71caefcf --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 19, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a86ec01a-5ea5-4fba-8123-5567a04a3596", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..037ba1a1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 19, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6c96cc41-2657-47a0-b437-a79b0631bbd8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..7e74e95f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 19, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1f605613-e582-4b3b-8838-e9fcf0c58e67", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..5bbb025b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,150 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 19, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9e38c8b0-f339-463a-b92f-aa90fd3315e8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:04:31 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000..786f224e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0d2390b1-83fb-40f6-ab75-adf605a9a3fc", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:31 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..7abf137d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e29c19bc-d875-4b6b-83b2-bc2fdfb87bf0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..e7dc1a4a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "686ef8bb-a95e-4b86-b814-f272c54c8ea5", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:02:09 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..3e3f889f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c0583208-1fa5-4c6e-8970-8dd2f3ecd62d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:02:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..59d520d1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b10cdcbf-b16e-43c0-99b1-2fe2ad8db09b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:02:40 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..06ce44a4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "93d3176a-6d6a-44de-8a20-91bd4a64b3a3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:02:56 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..e15dc61e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "329c10c9-0ee8-48d3-acb2-b48668ddbab6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:03:12 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..806c717d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bf983aa1-224e-470a-b0a1-add5bda488b5", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:03:27 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..8e7c3ecc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9d06e288\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.166.247.180</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.126</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.167.45.7</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.125</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4857fe1d-dc96-4168-a7e1-9fbb73282ab2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:03:43 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..eebfb3a7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "VpnConnections": [], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8218208e-030d-4aea-9ae5-6e8534efe1ef", + "HTTPHeaders": { + "content-length": "243", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:32 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json new file mode 100644 index 00000000..9f4209ee --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ccf8e327-eeee-4db8-9ae6-006a8fe5628c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:48:04 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json new file mode 100644 index 00000000..062840fc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0e1859bf-b896-4a30-ab94-849441b914f9", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:48:05 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..c81bb5f5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-6a06e27f", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5db2e287-2d09-4a50-aaa1-a4615ece9bd6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5235", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:03 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json new file mode 100644 index 00000000..69c39a89 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-9e13c880", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9506e280", + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7533469a-5979-42fd-94de-c33a66d34065", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..cc17b12a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5670f275-006d-48db-91e0-72058d9d881f", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:06 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json new file mode 100644 index 00000000..d2fd5524 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "35514550-20a7-4f91-b175-d21182ad8bdd", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..d9d2f287 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "edae433c-c2f8-475a-95f9-5c3c00d0b54b", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:03 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..aeb32246 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a30a934b-5716-4d4d-958a-7e780e333a24", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:08 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..3132117c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "99b8bb83-e3f0-4b87-9121-5d862e2627f0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..89a6fd07 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c6d1bf65-4f3e-4f7f-9274-281ebf433b2b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..6c50e6b6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "28733dff-592e-4c48-94f9-b4d56bbc246a", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..c8ad595d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d38f939c-ded7-416b-a563-88161b71be1c", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..06fd99e1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "af7c54ed-ca7f-4013-adee-16133b822d53", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:26 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000..ef084594 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "24133f7b-2620-4f2b-98b5-427aaa5d04bd", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:41 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_17.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000..1a5bc6e7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5ac6d438-cae6-40cc-9c63-81073def54be", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:57 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_18.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_18.json new file mode 100644 index 00000000..77dbba5b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_18.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "968a8ebd-ed59-4a8d-a314-83a6430bebd3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:46:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_19.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_19.json new file mode 100644 index 00000000..6c01e2c6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_19.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "07f96ac8-f5ec-43e4-ab7d-6b989e071808", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:46:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..2f51af37 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b1b10bb7-e85c-44ca-b74e-85352550db52", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:04 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_20.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_20.json new file mode 100644 index 00000000..30ecbe4b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_20.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0750711f-fafd-4323-a685-65329a0a9302", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:46:43 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_21.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_21.json new file mode 100644 index 00000000..844fdab0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_21.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ec319bcc-2a61-43d3-a69c-9d94235aeb56", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:46:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_22.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_22.json new file mode 100644 index 00000000..be8c4aa5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_22.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6fe5a339-9436-4077-a201-dab2b7b95039", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:47:16 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_23.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_23.json new file mode 100644 index 00000000..0a98ebdf --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_23.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7897be6a-fc15-4608-bac0-c3cf7bba28c6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:47:31 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_24.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_24.json new file mode 100644 index 00000000..d3049152 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_24.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "898cc57f-ab56-47d7-920e-995814f532a4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:47:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_25.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_25.json new file mode 100644 index 00000000..79b0739f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_25.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "134c741c-757b-4a87-9a34-c8f1848ef33e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_26.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_26.json new file mode 100644 index 00000000..49b4c09a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_26.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8009af6c-6d35-45fa-a94d-5384d3b92573", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_27.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_27.json new file mode 100644 index 00000000..059a154e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_27.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7ef9e804-1eb9-4486-9285-584204a824a3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_28.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_28.json new file mode 100644 index 00000000..76ad9ba8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_28.json @@ -0,0 +1,78 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "05c178e1-3f1f-4e0f-bb43-027d2b41f56c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6561", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:04 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_29.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_29.json new file mode 100644 index 00000000..0b291828 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_29.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "92db5b5e-d7e6-4cfd-9d62-abdda5a6083c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:04 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..9f85a23b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "2a3a4fd7-189b-43b0-8a44-82ebd52dba01", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:19 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_30.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_30.json new file mode 100644 index 00000000..cad1188b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_30.json @@ -0,0 +1,72 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ffa7e24d-e004-4b4e-9317-80b97dc89cc8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6288", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:04 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_31.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_31.json new file mode 100644 index 00000000..94f87c7d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_31.json @@ -0,0 +1,78 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0cebf278-197b-4bdd-b8d9-c44250637154", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6559", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_32.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_32.json new file mode 100644 index 00000000..bba62063 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_32.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4bc3a17b-6896-4f8a-b3bc-07cbbf88e9e2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_33.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_33.json new file mode 100644 index 00000000..630ea016 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_33.json @@ -0,0 +1,72 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7371d436-849d-4717-a284-e33389f8982d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6288", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:06 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_34.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_34.json new file mode 100644 index 00000000..a294fb74 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_34.json @@ -0,0 +1,72 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9506e280\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.138</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.164.115.77</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.137</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>LOIUEOybh.7onRDbkA0jIjVgwAanpstb</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.14</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.32.43.175</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.13</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>gVdPYm2D00u04GU8PlcRg8NayCIB.8hu</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b645a20e-3689-4a13-8af1-2dcc38f70a9b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6288", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:06 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_35.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_35.json new file mode 100644 index 00000000..42ea2ec0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_35.json @@ -0,0 +1,36 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6e80e598-aeb2-4ae1-bfe3-2383505379cc", + "HTTPHeaders": { + "content-length": "871", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_36.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_36.json new file mode 100644 index 00000000..9a97df1f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_36.json @@ -0,0 +1,36 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f4072f73-ff8c-49ed-89a7-eaed0389b11a", + "HTTPHeaders": { + "content-length": "873", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:08 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..ad74fa06 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ed467717-f22a-4c33-a9e7-0f871d1b35b2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..9f2bb01f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "49f28398-4458-4c9d-9c04-598c9d8e76bd", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:50 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..58c773d2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bebb46be-76a1-486b-a9d0-7f0e33f68294", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:44:06 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..a15fd0e3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "090f369a-71f4-4e60-b860-c1f5cc52a5ab", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:44:21 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..2765a9f2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f98ad6e5-e3c6-48ae-b6c1-d9ed9824ea88", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:44:37 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..9b6e2ada --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6a06e27f\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.194</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.160.156</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.193</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.90</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.33.241.73</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.89</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ef918599-de1c-40e5-95ab-2a4b16356455", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:44:52 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json new file mode 100644 index 00000000..52ca9673 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f39595f7-c4f7-4e7c-9681-83e5619e0d84", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:50:34 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json new file mode 100644 index 00000000..3aeb21cf --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "61647610-452d-4a99-abce-d8e61a6ada95", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:53:28 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..17aca938 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9706e282", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "080cc661-516b-4d6c-806b-64f54b232f57", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5235", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json new file mode 100644 index 00000000..0080abe9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-9e13c880", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9606e283", + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d49ec118-3438-40cb-bcb5-8e98d9676688", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5236", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..ddce99bb --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "995f99a1-42d4-4d0f-b216-5e54c7052a71", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json new file mode 100644 index 00000000..65af7a36 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "701a2c53-ef2e-4b77-bb0c-b0e4904dc714", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..59bbeec7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,48 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "22e251ed-4e2b-49a4-8747-fcc9c39ad99e", + "HTTPHeaders": { + "content-length": "1310", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:12 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..334a32fc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 9, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "66c5b212-f514-4075-ab41-6c70424d13ef", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:17 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..27cf0e60 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 9, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4fa0db43-456e-491d-a6f6-2a2a262bc068", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..12afe81e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 9, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "521f0a1b-e935-40c2-b896-b13b5b6f2d1a", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:34 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..0c5d8ca7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,72 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 9, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "da5b58d2-4042-4ed5-8faf-daceb3d706c6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6290", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..861ebd74 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,48 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d4e21661-391e-48b9-80f8-6c04a13a653e", + "HTTPHeaders": { + "content-length": "1312", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..d54c6502 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3b4a1671-80a6-45a7-b620-885f88f5fd77", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000..41fc9a23 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "55115858-ebfd-4329-85e8-5bd15b31e62d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:51 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_17.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000..1d82c711 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "241b82e1-4611-495a-952d-21fce8354e6e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:51:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_18.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_18.json new file mode 100644 index 00000000..0b0861b6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_18.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "898fcbc8-4c89-49cd-943f-7c2f0e3a73b7", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:51:22 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_19.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_19.json new file mode 100644 index 00000000..c054486c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_19.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "2f8be95a-d488-412c-9bc3-bca1c66c3ccf", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:51:38 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..9900b9b0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bd0e67d4-f5a5-4e98-a388-e80af982bebf", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_20.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_20.json new file mode 100644 index 00000000..39ddd25e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_20.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "66fe299d-2a18-4693-bdc3-00475c529a7f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:51:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_21.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_21.json new file mode 100644 index 00000000..cd711acf --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_21.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b5ebc50e-0f1d-4d96-87c1-bf222c186911", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:52:09 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_22.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_22.json new file mode 100644 index 00000000..490f336b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_22.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4f123753-f797-4aff-83f2-edfdb31b679f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:52:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_23.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_23.json new file mode 100644 index 00000000..78223c6e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_23.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ff8ad5d4-4798-44f2-b89a-100387a1e1bc", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:52:40 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_24.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_24.json new file mode 100644 index 00000000..2a98e206 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_24.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c69b6d28-6925-4b09-9a23-c58bd23a952d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:52:56 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_25.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_25.json new file mode 100644 index 00000000..069b679c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_25.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "30239673-06bd-4122-8187-834e098e3035", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:12 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_26.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_26.json new file mode 100644 index 00000000..95f632a8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_26.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 14, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a35493d8-79cf-44ce-a5d9-a322984952bb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:27 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_27.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_27.json new file mode 100644 index 00000000..f3e37441 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_27.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 14, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a0d807f4-6947-474e-86bc-f1d978a1e6c6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:27 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_28.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_28.json new file mode 100644 index 00000000..0eb348b2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_28.json @@ -0,0 +1,72 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 14, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "123f065b-f06a-4464-93e9-f0c9224825dc", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6290", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_29.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_29.json new file mode 100644 index 00000000..15182c9c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_29.json @@ -0,0 +1,143 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9606e283\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.142</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.215.4.190</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.141</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.214</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.163.123.41</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.213</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 14, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 9, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + }, + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c6c78a9a-e004-4766-8ef6-16c52b25475d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:53:28 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..fb9619cd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "2b96bd10-97eb-44b0-9ab9-548b0ddf03b9", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_30.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_30.json new file mode 100644 index 00000000..4dd608bc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_30.json @@ -0,0 +1,36 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1b613de0-c6e1-48d3-9c9d-b94de070ccda", + "HTTPHeaders": { + "content-length": "873", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_31.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_31.json new file mode 100644 index 00000000..6e537944 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_31.json @@ -0,0 +1,36 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0e36b69f-39b7-40ac-8273-8003211fc5f5", + "HTTPHeaders": { + "content-length": "873", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..4a13f61e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ace0b6a9-e76f-4198-a077-1e2dffbc6c2e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:43 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..3695e622 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "434a478c-99ab-4da1-9446-0190d615553f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..337959a7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "406c570c-4ca9-4657-aab6-c3aec6943a24", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:49:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..171cce65 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bc262f2c-187c-45ff-bd0e-b8287760d26e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:49:31 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..9b63c6f5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "99bc2889-52c9-4933-ba37-9fc2524a6ec1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:49:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..a6472849 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9706e282\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.26</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>34.214.254.212</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.25</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.174</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.38.34.113</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.173</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "26fd3e6c-8c41-4e3b-8bda-47ee9b1ef167", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..288d2313 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,73 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "79832782-f6e3-483a-b848-306c43731940", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "2087", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..90b1f2dd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-6f06e27a", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ef16cc59-db82-49e8-b39f-5ed5035a6fba", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5236", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json new file mode 100644 index 00000000..dbb692fb --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-9e13c880", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-6906e27c", + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7311c482-6425-4bf5-b764-06652c9ea4b8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5232", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:37 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..7d346168 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "73286a1c-f428-4617-9b23-b0af8e8e2657", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json new file mode 100644 index 00000000..cde1d023 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6ff1e7ac-f41b-45f8-a925-99f12f15df72", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..079fe193 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "VpnConnections": [], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "784ab580-8495-4cff-b8a9-a70474686d99", + "HTTPHeaders": { + "content-length": "243", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..5a14e838 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "45a3a55f-4577-4292-9c88-6b20c8968bdb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:39:18 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..d70a4c40 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "dea0cb15-a87a-4340-836d-6cd460b2243e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:39:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..731805d6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c9f63be4-079d-4dcd-adb8-ab18f8787a9c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:39:48 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..b7406b64 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "75e6bdc7-dab7-428c-900b-f8566fcdd8b4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:04 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..a5f05224 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "02cad910-6d43-4d55-a031-4055a30bf411", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:20 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..f6635122 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 25, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "18e05aff-5c66-4e73-97bd-a63061019ed2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000..53623b87 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 25, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6df83c0e-40bd-41ed-8149-960375e0b0cf", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_17.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000..62f01fc3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 25, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a6f596eb-c6a8-4e31-8e1a-bc1ae80443c5", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_18.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_18.json new file mode 100644 index 00000000..2336ab51 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_18.json @@ -0,0 +1,17 @@ +{ + "data": { + "VpnConnections": [], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "dde896f2-98ea-45d2-8208-b71b46a88cd7", + "HTTPHeaders": { + "content-length": "243", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:37 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_19.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_19.json new file mode 100644 index 00000000..3741da64 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_19.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "22bd50ce-bac1-4b63-bef5-d91e10a27cb6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:38 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..7552a17a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "acad86c4-655b-488f-a552-f04c60502dcb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_20.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_20.json new file mode 100644 index 00000000..44895920 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_20.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4df8324c-5d9f-436e-b9c8-31d123170bcd", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_21.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_21.json new file mode 100644 index 00000000..fcfe2994 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_21.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b2fddbbe-070c-40c4-b3ff-31b4ab039a93", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:41:09 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_22.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_22.json new file mode 100644 index 00000000..819d4fb1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_22.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e4575384-f0ae-4ddb-a6f0-60bf09ae3431", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:41:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_23.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_23.json new file mode 100644 index 00000000..f7b5de10 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_23.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3c2df2d8-21ff-435b-a25e-309708e5d728", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:41:40 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_24.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_24.json new file mode 100644 index 00000000..d2b78998 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_24.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "47bedfce-6c4f-40e5-8d3c-2f7618670665", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:41:55 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_25.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_25.json new file mode 100644 index 00000000..bf69c4d5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_25.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "25fb78ea-cc25-427c-a1bb-c9bc06a0fcf0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:11 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_26.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_26.json new file mode 100644 index 00000000..005ca53b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_26.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "dfd25f0b-3331-46b0-9594-739e54b3633b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:27 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_27.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_27.json new file mode 100644 index 00000000..a8dc687f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_27.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 31, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e0ce84a4-b7fa-4c51-89c5-f689f5ab05e7", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:42 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_28.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_28.json new file mode 100644 index 00000000..207caacd --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_28.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 31, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 46, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fbb5d0bf-db4a-4865-b74a-15c9d5dc9acb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:58 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_29.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_29.json new file mode 100644 index 00000000..397ea49c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_29.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 31, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 46, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "06310935-6410-44da-ab8a-0a3a77b2ed02", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..6c2a473a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bc0abc0d-3217-4a9c-91b7-4cf7d1612270", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_30.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_30.json new file mode 100644 index 00000000..86a37a47 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_30.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6906e27c\">\n <customer_gateway_id>cgw-9e13c880</customer_gateway_id>\n <vpn_gateway_id>vgw-32d70c2c</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.78</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.40.19.84</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.77</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>5.4.3.2</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.46</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>54.149.194.122</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.45</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 31, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 46, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5ce492e4-a36b-4148-9db4-1cd1390f4d94", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_31.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_31.json new file mode 100644 index 00000000..c5d67fff --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_31.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 25, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fab3e62a-b821-40cc-ac9d-3b589ddd7be9", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_32.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_32.json new file mode 100644 index 00000000..66db65f6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_32.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c45356e9-b255-4886-bdeb-a200225b3066", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_33.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_33.json new file mode 100644 index 00000000..0abc8171 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_33.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "39d1181a-5c5b-4d7e-97cd-dcd5b83bc0b3", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..2c413581 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ed7c7fbb-b31b-4244-b588-e90821e65bff", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:45 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..6434571b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "096fa68d-3ed3-4483-b323-4b03cc2c1ebd", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..5e30b888 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e18b7cde-2baa-466e-a5ac-ac5cd94db089", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:38:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..c84d4c08 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5845f7f3-a0ea-4948-b3ee-d9ee3fc0f303", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:38:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..3b729ecc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4a29bfaa-c800-4ed7-858c-9ea4fc8de167", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:38:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..87dd4df8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-6f06e27a\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.34</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.161.239.138</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.33</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>XGAHy.QMOtIujnLKHvwNdGivflNQGbxc</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.230</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.108.105</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.229</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>hk9hgD21aBIIJSz4809scBxMT3dsX_0h</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8c873704-b869-4dc2-890d-ebc7d62d7963", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:39:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..1262491d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9206e287", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "686913e8-485a-4de0-880d-60a0c2444f65", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5235", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..2f8b7802 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ba0807f4-446e-471b-ad25-dc627d0917ff", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..3fe09832 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,91 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e85e108f-c5c6-4627-a409-ae5e57519e68", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "2795", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..57269488 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 32, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fe0912ad-2a87-4f24-a2e9-ecce88edd3a6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..c1593d62 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 32, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3d9c0acf-a5e7-41cf-a929-17a804c23cf1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..f1d5f5b4 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 32, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c59001df-f7a6-413d-8ba2-a3a3e1f3a08c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..686dfef8 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 32, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f9a5a6a9-a952-4183-8600-f0d709ca5902", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..5a65e1dc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ad7f2a01-f5a2-41cb-b572-e55cfff6f0fd", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:50 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..b2bbc32a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ffd0c558-1fb0-4e47-8a78-ad93241a8909", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:50 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..4ce279f3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "aefdae0c-715c-468d-b209-df744593d702", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..a2d6c448 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5e7d2b85-1951-4fa5-8003-dcae818ab111", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..9075e75e --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "648be063-6a5d-4871-8ccf-047275662818", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..ba6c47c5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e5f1a740-ef05-454b-a8ce-26c6c96d6822", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:00:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..089a0a16 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "240aa4a8-495f-4e22-973a-d1b8ca85a7b7", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:00:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..a93c555c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "71e9943b-886d-442f-bd0d-eb50d92522e2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:00:46 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..ca810951 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "518172bc-6355-4988-8a92-14c589fbfc6f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..2af22bb6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9206e287\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.206</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.26.213.112</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.13.205</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.226</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.36.80.33</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.14.225</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4679b3c8-f187-4207-81fc-79982e721cb0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:18 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000..f278854b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "VpnConnectionId": "vpn-9806e28d", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f5a54fbe-aabf-4b5e-82f6-0fc9cd13e50c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json new file mode 100644 index 00000000..bf0afd35 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "2714ec51-d05e-4034-8401-2c99f5247755", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:15:02 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000..5cdff416 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d635286c-b0e0-4048-9edd-5370c643aab4", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:03 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000..0e552275 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,167 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0a7676c6-68de-4301-b107-5ef0fcf5136e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5448", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_10.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000..f5afd3ed --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "68efe4ef-9c50-414b-bd65-cbf418c25f72", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:14:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_11.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000..56c742fa --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 38, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7b7f58cb-4e94-4cb2-9d93-ad6e82949476", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:14:46 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_12.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000..fd2890b7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 38, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1d06bb9d-234a-43b4-9465-0f0d6769e7cb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:01 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_13.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000..18c7b173 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 38, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d967fe54-4131-4d3c-8bec-ca51039d51f5", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:01 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_14.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000..3373af1d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 38, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9bdf35c6-373f-4a9f-a86a-4f01cd15f742", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_15.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000..bfe18c03 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,214 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 38, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bcdce0f0-10da-4e78-8fbe-ac147d62013b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:15:02 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_16.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000..1e44c3c5 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4d572583-1b0c-431f-a9f9-7acd45d588e8", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:03 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000..d337c7f6 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c8f872e5-ef0e-4517-8ab8-9ef0788a04bc", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:26 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000..1d65fb2c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d99d51ce-6b82-4f53-ade0-d4967b769c93", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:41 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000..3c63747c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f43f34f0-e4d7-4888-9037-2d3f99a30f8f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:57 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_5.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000..4b1ed8e7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5b03354b-e15d-4cb7-92e3-b359870a99a3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:13:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_6.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000..f10651be --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a022a838-4264-4f08-b309-bea8058706ae", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:13:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_7.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000..6f5406b3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f9ae9cd9-ce79-4245-863b-79fd5b39cdc1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:13:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_8.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000..25e0713f --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "57806378-a669-45b1-96ec-ab29ae8a47bb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:13:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_9.json b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000..98f25682 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-9806e28d\">\n <customer_gateway_id>cgw-6113c87f</customer_gateway_id>\n <vpn_gateway_id>vgw-35d70c2b</vpn_gateway_id>\n <vpn_connection_type>ipsec.1</vpn_connection_type>\n <vpn_connection_attributes>NoBGPVPNConnection</vpn_connection_attributes>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.22</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>35.165.156.252</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.12.21</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n <ipsec_tunnel>\n <customer_gateway>\n <tunnel_outside_address>\n <ip_address>9.8.7.6</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.58</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </customer_gateway>\n <vpn_gateway>\n <tunnel_outside_address>\n <ip_address>52.39.145.205</ip_address>\n </tunnel_outside_address>\n <tunnel_inside_address>\n <ip_address>169.254.15.57</ip_address>\n <network_mask>255.255.255.252</network_mask>\n <network_cidr>30</network_cidr>\n </tunnel_inside_address>\n </vpn_gateway>\n <ike>\n <authentication_protocol>sha1</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>28800</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>main</mode>\n <pre_shared_key>dsNLWo6G.KUBY99TYvBnEMohghrqm6.k</pre_shared_key>\n </ike>\n <ipsec>\n <protocol>esp</protocol>\n <authentication_protocol>hmac-sha1-96</authentication_protocol>\n <encryption_protocol>aes-128-cbc</encryption_protocol>\n <lifetime>3600</lifetime>\n <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n <mode>tunnel</mode>\n <clear_df_bit>true</clear_df_bit>\n <fragmentation_before_encryption>true</fragmentation_before_encryption>\n <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n <dead_peer_detection>\n <interval>10</interval>\n <retries>3</retries>\n </dead_peer_detection>\n </ipsec>\n </ipsec_tunnel>\n</vpn_connection>", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7efaeb2a-f071-4178-af9c-1bcdbb383d0d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:14:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +}
\ No newline at end of file diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_acm.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_acm.py new file mode 100644 index 00000000..830e5b72 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_acm.py @@ -0,0 +1,122 @@ +# (c) 2019 Telstra Corporation Limited +# +# 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 <http://www.gnu.org/licenses/>. + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type +from ansible_collections.community.aws.plugins.modules.aws_acm import pem_chain_split, chain_compare +from ansible.module_utils._text import to_bytes, to_text +from pprint import pprint + + +def test_chain_compare(): + + # The functions we're testing take module as an argument + # Just so they can call module.fail_json + # Let's just use None for the unit tests, + # Because they shouldn't fail + # And if they do, fail_json is not applicable + module = None + + fixture_suffix = 'tests/unit/modules/fixtures/certs' + + # Test chain split function on super simple (invalid) certs + expected = ['aaa', 'bbb', 'ccc'] + + for fname in ['simple-chain-a.cert', 'simple-chain-b.cert']: + path = fixture_suffix + '/' + fname + with open(path, 'r') as f: + pem = to_text(f.read()) + actual = pem_chain_split(module, pem) + actual = [a.strip() for a in actual] + if actual != expected: + print("Expected:") + pprint(expected) + print("Actual:") + pprint(actual) + raise AssertionError("Failed to properly split %s" % fname) + + # Now test real chains + # chains with same same_as should be considered equal + test_chains = [ + { # Original Cert chain + 'path': fixture_suffix + '/chain-1.0.cert', + 'same_as': 1, + 'length': 3 + }, + { # Same as 1.0, but longer PEM lines + 'path': fixture_suffix + '/chain-1.1.cert', + 'same_as': 1, + 'length': 3 + }, + { # Same as 1.0, but without the stuff before each -------- + 'path': fixture_suffix + '/chain-1.2.cert', + 'same_as': 1, + 'length': 3 + }, + { # Same as 1.0, but in a different order, so should be considered different + 'path': fixture_suffix + '/chain-1.3.cert', + 'same_as': 2, + 'length': 3 + }, + { # Same as 1.0, but with last link missing + 'path': fixture_suffix + '/chain-1.4.cert', + 'same_as': 3, + 'length': 2 + }, + { # Completely different cert chain to all the others + 'path': fixture_suffix + '/chain-4.cert', + 'same_as': 4, + 'length': 3 + }, + { # Single cert + 'path': fixture_suffix + '/a.pem', + 'same_as': 5, + 'length': 1 + }, + { # a different, single cert + 'path': fixture_suffix + '/b.pem', + 'same_as': 6, + 'length': 1 + } + ] + + for chain in test_chains: + with open(chain['path'], 'r') as f: + chain['pem_text'] = to_text(f.read()) + + # Test to make sure our regex isn't too greedy + chain['split'] = pem_chain_split(module, chain['pem_text']) + if len(chain['split']) != chain['length']: + print("Cert before split") + print(chain['pem_text']) + print("Cert after split") + pprint(chain['split']) + print("path: %s" % chain['path']) + print("Expected chain length: %d" % chain['length']) + print("Actual chain length: %d" % len(chain['split'])) + raise AssertionError("Chain %s was not split properly" % chain['path']) + + for chain_a in test_chains: + for chain_b in test_chains: + expected = (chain_a['same_as'] == chain_b['same_as']) + + # Now test the comparison function + actual = chain_compare(module, chain_a['pem_text'], chain_b['pem_text']) + if expected != actual: + print("Error, unexpected comparison result between \n%s\nand\n%s" % (chain_a['path'], chain_b['path'])) + print("Expected %s got %s" % (str(expected), str(actual))) + assert(expected == actual) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_api_gateway.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_api_gateway.py new file mode 100644 index 00000000..ae6c2681 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_api_gateway.py @@ -0,0 +1,69 @@ +# +# (c) 2016 Michael De La Rue +# +# This file is part of Ansible +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import sys + +import pytest + +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import HAS_BOTO3 +from ansible_collections.community.aws.tests.unit.modules.utils import set_module_args + +if not HAS_BOTO3: + pytestmark = pytest.mark.skip("test_api_gateway.py requires the `boto3` and `botocore` modules") + +import ansible_collections.community.aws.plugins.modules.aws_api_gateway as agw +from ansible_collections.amazon.aws.plugins.module_utils import core + + +exit_return_dict = {} + + +def fake_exit_json(self, **kwargs): + """ store the kwargs given to exit_json rather than putting them out to stdout""" + global exit_return_dict + exit_return_dict = kwargs + sys.exit(0) + + +def test_upload_api(monkeypatch): + class FakeConnection: + + def put_rest_api(self, *args, **kwargs): + assert kwargs["body"] == "the-swagger-text-is-fake" + return {"msg": "success!"} + + def return_fake_connection(*args, **kwargs): + return FakeConnection() + + monkeypatch.setattr(core, "boto3_conn", return_fake_connection) + monkeypatch.setattr(core.AnsibleAWSModule, "exit_json", fake_exit_json) + + set_module_args({ + "api_id": "fred", + "state": "present", + "swagger_text": "the-swagger-text-is-fake", + "region": 'mars-north-1', + "_ansible_tmpdir": "/tmp/ansibl-abcdef", + }) + with pytest.raises(SystemExit): + agw.main() + assert exit_return_dict["changed"] + + +def test_warn_if_region_not_specified(): + + set_module_args({ + "name": "aws_api_gateway", + "state": "present", + "runtime": 'python2.7', + "role": 'arn:aws:iam::987654321012:role/lambda_basic_execution', + "handler": 'lambda_python.my_handler'}) + with pytest.raises(SystemExit): + print(agw.main()) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_confirm_connection.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_confirm_connection.py new file mode 100644 index 00000000..2187d8a2 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_confirm_connection.py @@ -0,0 +1,156 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible_collections.community.aws.tests.unit.compat.mock import MagicMock, patch, call +from ansible_collections.community.aws.tests.unit.modules.utils import (AnsibleExitJson, + AnsibleFailJson, + ModuleTestCase, + set_module_args) +from ansible_collections.community.aws.plugins.modules import aws_direct_connect_confirm_connection +try: + from botocore.exceptions import ClientError +except ImportError: + pass + + +@patch('ansible_collections.amazon.aws.plugins.module_utils.core.HAS_BOTO3', new=True) +@patch.object(aws_direct_connect_confirm_connection.AnsibleAWSModule, "client") +class TestAWSDirectConnectConfirmConnection(ModuleTestCase): + def test_missing_required_parameters(self, *args): + set_module_args({}) + with self.assertRaises(AnsibleFailJson) as exec_info: + aws_direct_connect_confirm_connection.main() + + result = exec_info.exception.args[0] + assert result["failed"] is True + assert "name" in result["msg"] + assert "connection_id" in result["msg"] + + def test_get_by_connection_id(self, mock_client): + mock_client.return_value.describe_connections.return_value = { + "connections": [ + { + "connectionState": "requested", + "connectionId": "dxcon-fgq9rgot", + "location": "EqSe2", + "connectionName": "ansible-test-connection", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } + ] + } + set_module_args({ + "connection_id": "dxcon-fgq9rgot" + }) + with self.assertRaises(AnsibleExitJson) as exec_info: + aws_direct_connect_confirm_connection.main() + + result = exec_info.exception.args[0] + assert result["changed"] is False + assert result["connection_state"] == "requested" + mock_client.return_value.describe_connections.assert_has_calls([ + call(connectionId="dxcon-fgq9rgot") + ]) + mock_client.return_value.confirm_connection.assert_not_called() + + def test_get_by_name(self, mock_client): + mock_client.return_value.describe_connections.return_value = { + "connections": [ + { + "connectionState": "requested", + "connectionId": "dxcon-fgq9rgot", + "location": "EqSe2", + "connectionName": "ansible-test-connection", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } + ] + } + set_module_args({ + "name": "ansible-test-connection" + }) + with self.assertRaises(AnsibleExitJson) as exec_info: + aws_direct_connect_confirm_connection.main() + + result = exec_info.exception.args[0] + assert result["changed"] is False + assert result["connection_state"] == "requested" + mock_client.return_value.describe_connections.assert_has_calls([ + call(), + call(connectionId="dxcon-fgq9rgot") + ]) + mock_client.return_value.confirm_connection.assert_not_called() + + def test_missing_connection_id(self, mock_client): + mock_client.return_value.describe_connections.side_effect = ClientError( + {'Error': {'Code': 'ResourceNotFoundException'}}, 'DescribeConnection') + set_module_args({ + "connection_id": "dxcon-aaaabbbb" + }) + with self.assertRaises(AnsibleFailJson) as exec_info: + aws_direct_connect_confirm_connection.main() + + result = exec_info.exception.args[0] + assert result["failed"] is True + mock_client.return_value.describe_connections.assert_has_calls([ + call(connectionId="dxcon-aaaabbbb") + ]) + + def test_missing_name(self, mock_client): + mock_client.return_value.describe_connections.return_value = { + "connections": [ + { + "connectionState": "requested", + "connectionId": "dxcon-fgq9rgot", + "location": "EqSe2", + "connectionName": "ansible-test-connection", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } + ] + } + set_module_args({ + "name": "foobar" + }) + with self.assertRaises(AnsibleFailJson) as exec_info: + aws_direct_connect_confirm_connection.main() + + result = exec_info.exception.args[0] + assert result["failed"] is True + mock_client.return_value.describe_connections.assert_has_calls([ + call() + ]) + + def test_confirm(self, mock_client): + mock_client.return_value.describe_connections.return_value = { + "connections": [ + { + "connectionState": "ordering", + "connectionId": "dxcon-fgq9rgot", + "location": "EqSe2", + "connectionName": "ansible-test-connection", + "bandwidth": "1Gbps", + "ownerAccount": "448830907657", + "region": "us-west-2" + } + ] + } + mock_client.return_value.confirm_connection.return_value = [{}] + set_module_args({ + "connection_id": "dxcon-fgq9rgot" + }) + with self.assertRaises(AnsibleExitJson) as exec_info: + aws_direct_connect_confirm_connection.main() + + result = exec_info.exception.args[0] + assert result["changed"] is True + mock_client.return_value.describe_connections.assert_has_calls([ + call(connectionId="dxcon-fgq9rgot"), + call(connectionId="dxcon-fgq9rgot"), + call(connectionId="dxcon-fgq9rgot") + ]) + mock_client.return_value.confirm_connection.assert_called_once_with(connectionId="dxcon-fgq9rgot") diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_connection.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_connection.py new file mode 100644 index 00000000..5b94572c --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_connection.py @@ -0,0 +1,92 @@ +# (c) 2017 Red Hat Inc. +# +# This file is part of Ansible +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify, maybe_sleep +from ansible_collections.community.aws.plugins.modules import aws_direct_connect_connection + + +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 + + +# When rerecording these tests, create a stand alone connection with default values in us-west-2 +# with the name ansible-test-connection and set connection_id to the appropriate value +connection_id = "dxcon-fgq9rgot" +connection_name = 'ansible-test-connection' + + +def test_connection_status(placeboify, maybe_sleep): + client = placeboify.client('directconnect') + status = aws_direct_connect_connection.connection_status(client, connection_id)['connection'] + assert status['connectionName'] == connection_name + assert status['connectionId'] == connection_id + + +def test_connection_exists_by_id(placeboify, maybe_sleep): + client = placeboify.client('directconnect') + exists = aws_direct_connect_connection.connection_exists(client, connection_id) + assert exists == connection_id + + +def test_connection_exists_by_name(placeboify, maybe_sleep): + client = placeboify.client('directconnect') + exists = aws_direct_connect_connection.connection_exists(client, None, connection_name) + assert exists == connection_id + + +def test_connection_does_not_exist(placeboify, maybe_sleep): + client = placeboify.client('directconnect') + exists = aws_direct_connect_connection.connection_exists(client, 'dxcon-notthere') + assert exists is False + + +def test_changed_properties(placeboify, maybe_sleep): + client = placeboify.client('directconnect') + status = aws_direct_connect_connection.connection_status(client, connection_id)['connection'] + location = "differentlocation" + bandwidth = status['bandwidth'] + assert aws_direct_connect_connection.changed_properties(status, location, bandwidth) is True + + +def test_associations_are_not_updated(placeboify, maybe_sleep): + client = placeboify.client('directconnect') + status = aws_direct_connect_connection.connection_status(client, connection_id)['connection'] + lag_id = status.get('lagId') + assert aws_direct_connect_connection.update_associations(client, status, connection_id, lag_id) is False + + +def test_create_and_delete(placeboify, maybe_sleep): + client = placeboify.client('directconnect') + created_conn = verify_create_works(placeboify, maybe_sleep, client) + deleted_conn = verify_delete_works(placeboify, maybe_sleep, client, created_conn) + + +def verify_create_works(placeboify, maybe_sleep, client): + created = aws_direct_connect_connection.create_connection(client=client, + location="EqSE2", + bandwidth="1Gbps", + name="ansible-test-2", + lag_id=None) + assert created.startswith('dxcon') + return created + + +def verify_delete_works(placeboify, maybe_sleep, client, conn_id): + changed = aws_direct_connect_connection.ensure_absent(client, conn_id) + assert changed is True diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_link_aggregation_group.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_link_aggregation_group.py new file mode 100644 index 00000000..8c4406c7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_link_aggregation_group.py @@ -0,0 +1,168 @@ +# (c) 2017 Red Hat Inc. +# +# This file is part of Ansible +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest +import os +import collections +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify, maybe_sleep +from ansible_collections.community.aws.plugins.modules import aws_direct_connect_link_aggregation_group as lag_module +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info, boto3_conn + + +@pytest.fixture(scope="module") +def dependencies(): + + # each LAG dict will contain the keys: module, connections, virtual_interfaces + Dependencies = collections.namedtuple("Dependencies", ["lag_1", "lag_2"]) + lag_1 = dict() + lag_2 = dict() + + vanilla_params = {"name": "ansible_lag_1", + "location": "EqSe2", + "num_connections": 1, + "min_links": 0, + "bandwidth": "1Gbps"} + + for lag in ("ansible_lag_1", "ansible_lag_2"): + params = dict(vanilla_params) + params["name"] = lag + if lag == "ansible_lag_1": + lag_1["module"] = FakeModule(**params) + else: + lag_2["module"] = FakeModule(**params) + + if os.getenv("PLACEBO_RECORD"): + region, ec2_url, aws_connect_kwargs = get_aws_connection_info(lag_1["module"], boto3=True) + client = boto3_conn(lag_1["module"], conn_type="client", resource="directconnect", region=region, endpoint=ec2_url, **aws_connect_kwargs) + # See if link aggregation groups exist + for name in ("ansible_lag_1", "ansible_lag_2"): + lag_id = lag_module.create_lag(client, num_connections=1, location="EqSe2", bandwidth="1Gbps", name=name, connection_id=None) + if name == "ansible_lag_1": + lag_1["lag_id"] = lag_id + lag_1["name"] = name + else: + lag_2["lag_id"] = lag_id + lag_2["name"] = name + yield Dependencies(lag_1=lag_1, lag_2=lag_2) + else: + lag_1.update(lag_id="dxlag-fgkk4dja", name="ansible_lag_1") + lag_2.update(lag_id="dxlag-fgytkicv", name="ansible_lag_2") + yield Dependencies(lag_1=lag_1, lag_2=lag_2) + + if os.getenv("PLACEBO_RECORD"): + # clean up + lag_module.ensure_absent(client, lag_1["lag_id"], lag_1["name"], True, True, True, 120) + lag_module.ensure_absent(client, lag_2["lag_id"], lag_2["name"], True, True, True, 120) + + +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 test_nonexistent_lag_status(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + exists = lag_module.lag_exists(client=client, + lag_id="doesntexist", + lag_name="doesntexist", + verify=True) + assert not exists + + +def test_lag_status(placeboify, maybe_sleep, dependencies): + client = placeboify.client("directconnect") + status = lag_module.lag_status(client, lag_id=dependencies.lag_1.get("lag_id")) + assert status.get("lagId") == dependencies.lag_1.get("lag_id") + assert status.get("lagName") == "ansible_lag_1" + + +def test_lag_exists(placeboify, maybe_sleep, dependencies): + client = placeboify.client("directconnect") + exists = lag_module.lag_exists(client=client, + lag_id=dependencies.lag_1.get("lag_id"), + lag_name=None, + verify=True) + assert exists + + +def test_lag_exists_using_name(placeboify, maybe_sleep, dependencies): + client = placeboify.client("directconnect") + exists = lag_module.lag_exists(client=client, + lag_id=None, + lag_name=dependencies.lag_1.get("name"), + verify=True) + assert exists + + +def test_nonexistent_lag_does_not_exist(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + exists = lag_module.lag_exists(client=client, + lag_id="dxlag-XXXXXXXX", + lag_name="doesntexist", + verify=True) + assert not exists + + +def test_lag_changed_true(placeboify, maybe_sleep, dependencies): + client = placeboify.client("directconnect") + status = lag_module.lag_status(client=client, lag_id=dependencies.lag_1.get("lag_id")) + assert lag_module.lag_changed(status, "new_name", 1) + + +def test_lag_changed_true_no(placeboify, maybe_sleep, dependencies): + client = placeboify.client("directconnect") + status = lag_module.lag_status(client=client, lag_id=dependencies.lag_1.get("lag_id")) + assert not lag_module.lag_changed(status, "ansible_lag_1", 0) + + +def test_update_lag(placeboify, maybe_sleep, dependencies): + client = placeboify.client("directconnect") + status_before = lag_module.lag_status(client=client, lag_id=dependencies.lag_2.get("lag_id")) + lag_module.update_lag(client, + lag_id=dependencies.lag_2.get("lag_id"), + lag_name="ansible_lag_2_update", + min_links=0, + wait=False, + wait_timeout=0, + num_connections=1) + status_after = lag_module.lag_status(client=client, lag_id=dependencies.lag_2.get("lag_id")) + assert status_before != status_after + + # remove the lag name from the statuses and verify it was the only thing changed + del status_before['lagName'] + del status_after['lagName'] + assert status_before == status_after + + +def test_delete_nonexistent_lag(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + changed = lag_module.ensure_absent(client, "dxlag-XXXXXXXX", "doesntexist", True, True, True, 120) + assert not changed + + +def test_delete_lag_with_connections_without_force_delete(placeboify, maybe_sleep, dependencies): + client = placeboify.client("directconnect") + with pytest.raises(Exception) as error_message: + lag_module.ensure_absent(client, dependencies.lag_1.get("lag_id"), "ansible_lag_1", False, True, True, 120) + assert "To force deletion of the LAG use delete_force: True" in error_message + + +def test_delete_lag_with_connections(placeboify, maybe_sleep, dependencies): + client = placeboify.client("directconnect") + changed = lag_module.ensure_absent(client, dependencies.lag_1.get("lag_id"), "ansible_lag_1", True, True, True, 120) + assert changed diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_virtual_interface.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_virtual_interface.py new file mode 100644 index 00000000..ce2630fc --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_aws_direct_connect_virtual_interface.py @@ -0,0 +1,222 @@ +# (c) 2017 Red Hat Inc. +# +# This file is part of Ansible +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify, maybe_sleep +from ansible_collections.community.aws.plugins.modules import aws_direct_connect_virtual_interface + + +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 test_find_unique_vi_by_connection_id(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + vi_id = aws_direct_connect_virtual_interface.find_unique_vi(client, "dxcon-aaaaaaaa", None, None) + assert vi_id == "dxvif-aaaaaaaa" + + +def test_find_unique_vi_by_vi_id(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + vi_id = aws_direct_connect_virtual_interface.find_unique_vi(client, + None, + "dxvif-aaaaaaaaa", + None) + assert vi_id == "dxvif-aaaaaaaa" + + +def test_find_unique_vi_by_name(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + vi_id = aws_direct_connect_virtual_interface.find_unique_vi(client, None, None, "aaaaaaaa") + assert vi_id == "dxvif-aaaaaaaa" + + +def test_find_unique_vi_returns_multiple(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + module = FakeModule(state="present", + id_to_associate="dxcon-aaaaaaaa", + public=False, + name=None) + try: + aws_direct_connect_virtual_interface.ensure_state( + client, + module + ) + except Exception: + assert "Multiple virtual interfaces were found" in module.exit_kwargs["msg"] + + +def test_find_unique_vi_returns_missing_for_vi_id(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + module = FakeModule(state="present", + id_to_associate=None, + public=False, + name=None, + virtual_interface_id="dxvif-aaaaaaaa") + try: + aws_direct_connect_virtual_interface.ensure_state( + client, + module + ) + except Exception: + assert "The virtual interface dxvif-aaaaaaaa does not exist" in module.exit_kwargs["msg"] + + +def test_construct_public_vi(): + module = FakeModule(state="present", + id_to_associate=None, + public=True, + name="aaaaaaaa", + vlan=1, + bgp_asn=123, + authentication_key="aaaa", + customer_address="169.254.0.1/30", + amazon_address="169.254.0.2/30", + address_type="ipv4", + cidr=["10.88.0.0/30"], + virtual_gateway_id="xxxx", + direct_connect_gateway_id="yyyy") + vi = aws_direct_connect_virtual_interface.assemble_params_for_creating_vi(module.params) + assert vi == { + "virtualInterfaceName": "aaaaaaaa", + "vlan": 1, + "asn": 123, + "authKey": "aaaa", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "routeFilterPrefixes": [{"cidr": "10.88.0.0/30"}] + } + + +def test_construct_private_vi_with_virtual_gateway_id(): + module = FakeModule(state="present", + id_to_associate=None, + public=False, + name="aaaaaaaa", + vlan=1, + bgp_asn=123, + authentication_key="aaaa", + customer_address="169.254.0.1/30", + amazon_address="169.254.0.2/30", + address_type="ipv4", + cidr=["10.88.0.0/30"], + virtual_gateway_id="xxxx", + direct_connect_gateway_id="yyyy") + vi = aws_direct_connect_virtual_interface.assemble_params_for_creating_vi(module.params) + assert vi == { + "virtualInterfaceName": "aaaaaaaa", + "vlan": 1, + "asn": 123, + "authKey": "aaaa", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "virtualGatewayId": "xxxx" + } + + +def test_construct_private_vi_with_direct_connect_gateway_id(): + module = FakeModule(state="present", + id_to_associate=None, + public=False, + name="aaaaaaaa", + vlan=1, + bgp_asn=123, + authentication_key="aaaa", + customer_address="169.254.0.1/30", + amazon_address="169.254.0.2/30", + address_type="ipv4", + cidr=["10.88.0.0/30"], + virtual_gateway_id=None, + direct_connect_gateway_id="yyyy") + vi = aws_direct_connect_virtual_interface.assemble_params_for_creating_vi(module.params) + print(vi) + assert vi == { + "virtualInterfaceName": "aaaaaaaa", + "vlan": 1, + "asn": 123, + "authKey": "aaaa", + "amazonAddress": "169.254.0.2/30", + "customerAddress": "169.254.0.1/30", + "addressFamily": "ipv4", + "directConnectGatewayId": "yyyy" + } + + +def test_create_public_vi(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + module = FakeModule(state="present", + id_to_associate='dxcon-aaaaaaaa', + virtual_interface_id=None, + public=True, + name="aaaaaaaa", + vlan=1, + bgp_asn=123, + authentication_key="aaaa", + customer_address="169.254.0.1/30", + amazon_address="169.254.0.2/30", + address_type="ipv4", + cidr=["10.88.0.0/30"], + virtual_gateway_id="xxxx", + direct_connect_gateway_id="yyyy") + changed, latest_state = aws_direct_connect_virtual_interface.ensure_state(client, module) + assert changed is True + assert latest_state is not None + + +def test_create_private_vi(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + module = FakeModule(state="present", + id_to_associate='dxcon-aaaaaaaa', + virtual_interface_id=None, + public=False, + name="aaaaaaaa", + vlan=1, + bgp_asn=123, + authentication_key="aaaa", + customer_address="169.254.0.1/30", + amazon_address="169.254.0.2/30", + address_type="ipv4", + cidr=["10.88.0.0/30"], + virtual_gateway_id="xxxx", + direct_connect_gateway_id="yyyy") + changed, latest_state = aws_direct_connect_virtual_interface.ensure_state(client, module) + assert changed is True + assert latest_state is not None + + +def test_delete_vi(placeboify, maybe_sleep): + client = placeboify.client("directconnect") + module = FakeModule(state="absent", + id_to_associate='dxcon-aaaaaaaa', + virtual_interface_id='dxvif-aaaaaaaa', + public=False, + name="aaaaaaaa", + vlan=1, + bgp_asn=123, + authentication_key="aaaa", + customer_address="169.254.0.1/30", + amazon_address="169.254.0.2/30", + address_type="ipv4", + cidr=["10.88.0.0/30"], + virtual_gateway_id=None, + direct_connect_gateway_id="yyyy") + changed, latest_state = aws_direct_connect_virtual_interface.ensure_state(client, module) + assert changed is True + assert latest_state == {} diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_data_pipeline.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_data_pipeline.py new file mode 100644 index 00000000..8c136bbe --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_data_pipeline.py @@ -0,0 +1,250 @@ +# (c) 2017 Red Hat Inc. +# +# This file is part of Ansible +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import json +import collections + +import pytest +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify, maybe_sleep + +from ansible_collections.community.aws.plugins.modules import data_pipeline +from ansible.module_utils._text import to_text + +# test_api_gateway.py requires the `boto3` and `botocore` modules +boto3 = pytest.importorskip('boto3') + + +@pytest.fixture(scope='module') +def dp_setup(): + """ + Yield a FakeModule object, data pipeline id of a vanilla data pipeline, and data pipeline objects + + This fixture is module-scoped, since this can be reused for multiple tests. + """ + Dependencies = collections.namedtuple("Dependencies", ["module", "data_pipeline_id", "objects"]) + + # get objects to use to test populating and activating the data pipeline + if not os.getenv('PLACEBO_RECORD'): + objects = [{"name": "Every 1 day", + "id": "DefaultSchedule", + "fields": []}, + {"name": "Default", + "id": "Default", + "fields": []}] + else: + s3 = boto3.client('s3') + data = s3.get_object(Bucket="ansible-test-datapipeline", Key="pipeline-object/new.json") + objects = json.loads(to_text(data['Body'].read())) + + # create a module with vanilla data pipeline parameters + params = {'name': 'ansible-test-create-pipeline', + 'description': 'ansible-datapipeline-unit-test', + 'state': 'present', + 'timeout': 300, + 'objects': [], + 'tags': {}, + 'parameters': [], + 'values': []} + module = FakeModule(**params) + + # yield a module, the data pipeline id, and the data pipeline objects (that are not yet defining the vanilla data pipeline) + if not os.getenv('PLACEBO_RECORD'): + yield Dependencies(module=module, data_pipeline_id='df-0590406117G8DPQZY2HA', objects=objects) + else: + connection = boto3.client('datapipeline') + changed, result = data_pipeline.create_pipeline(connection, module) + data_pipeline_id = result['data_pipeline']['pipeline_id'] + yield Dependencies(module=module, data_pipeline_id=data_pipeline_id, objects=objects) + + # remove data pipeline + if os.getenv('PLACEBO_RECORD'): + module.params.update(state='absent') + data_pipeline.delete_pipeline(connection, module) + + +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 test_create_pipeline_already_exists(placeboify, maybe_sleep, dp_setup): + connection = placeboify.client('datapipeline') + changed, result = data_pipeline.create_pipeline(connection, dp_setup.module) + assert changed is False + assert "Data Pipeline ansible-test-create-pipeline is present" in result['msg'] + + +def test_pipeline_field(placeboify, maybe_sleep, dp_setup): + connection = placeboify.client('datapipeline') + pipeline_field_info = data_pipeline.pipeline_field(connection, dp_setup.data_pipeline_id, "@pipelineState") + assert pipeline_field_info == "PENDING" + + +def test_define_pipeline(placeboify, maybe_sleep, dp_setup): + connection = placeboify.client('datapipeline') + changed, result = data_pipeline.define_pipeline(connection, dp_setup.module, dp_setup.objects, dp_setup.data_pipeline_id) + assert 'has been updated' in result + + +def test_deactivate_pipeline(placeboify, maybe_sleep, dp_setup): + connection = placeboify.client('datapipeline') + changed, result = data_pipeline.deactivate_pipeline(connection, dp_setup.module) + assert "Data Pipeline ansible-test-create-pipeline deactivated" in result['msg'] + + +def test_activate_without_population(placeboify, maybe_sleep, dp_setup): + connection = placeboify.client('datapipeline') + with pytest.raises(Exception) as error_message: + changed, result = data_pipeline.activate_pipeline(connection, dp_setup.module) + assert error_message == "You need to populate your pipeline before activation." + + +def test_create_pipeline(placeboify, maybe_sleep): + connection = placeboify.client('datapipeline') + params = {'name': 'ansible-unittest-create-pipeline', + 'description': 'ansible-datapipeline-unit-test', + 'state': 'present', + 'timeout': 300, + 'tags': {}} + m = FakeModule(**params) + changed, result = data_pipeline.create_pipeline(connection, m) + assert changed is True + assert result['msg'] == "Data Pipeline ansible-unittest-create-pipeline created." + + data_pipeline.delete_pipeline(connection, m) + + +def test_create_pipeline_with_tags(placeboify, maybe_sleep): + connection = placeboify.client('datapipeline') + params = {'name': 'ansible-unittest-create-pipeline_tags', + 'description': 'ansible-datapipeline-unit-test', + 'state': 'present', + 'tags': {'ansible': 'test'}, + 'timeout': 300} + m = FakeModule(**params) + changed, result = data_pipeline.create_pipeline(connection, m) + assert changed is True + assert result['msg'] == "Data Pipeline ansible-unittest-create-pipeline_tags created." + + data_pipeline.delete_pipeline(connection, m) + + +def test_delete_nonexistent_pipeline(placeboify, maybe_sleep): + connection = placeboify.client('datapipeline') + params = {'name': 'ansible-test-nonexistent', + 'description': 'ansible-test-nonexistent', + 'state': 'absent', + 'objects': [], + 'tags': {'ansible': 'test'}, + 'timeout': 300} + m = FakeModule(**params) + changed, result = data_pipeline.delete_pipeline(connection, m) + assert changed is False + + +def test_delete_pipeline(placeboify, maybe_sleep): + connection = placeboify.client('datapipeline') + params = {'name': 'ansible-test-nonexistent', + 'description': 'ansible-test-nonexistent', + 'state': 'absent', + 'objects': [], + 'tags': {'ansible': 'test'}, + 'timeout': 300} + m = FakeModule(**params) + data_pipeline.create_pipeline(connection, m) + changed, result = data_pipeline.delete_pipeline(connection, m) + assert changed is True + + +def test_build_unique_id_different(): + m = FakeModule(**{'name': 'ansible-unittest-1', 'description': 'test-unique-id'}) + m2 = FakeModule(**{'name': 'ansible-unittest-1', 'description': 'test-unique-id-different'}) + assert data_pipeline.build_unique_id(m) != data_pipeline.build_unique_id(m2) + + +def test_build_unique_id_same(): + m = FakeModule(**{'name': 'ansible-unittest-1', 'description': 'test-unique-id', 'tags': {'ansible': 'test'}}) + m2 = FakeModule(**{'name': 'ansible-unittest-1', 'description': 'test-unique-id', 'tags': {'ansible': 'test'}}) + assert data_pipeline.build_unique_id(m) == data_pipeline.build_unique_id(m2) + + +def test_build_unique_id_obj(): + # check that the object can be different and the unique id should be the same; should be able to modify objects + m = FakeModule(**{'name': 'ansible-unittest-1', 'objects': [{'first': 'object'}]}) + m2 = FakeModule(**{'name': 'ansible-unittest-1', 'objects': [{'second': 'object'}]}) + assert data_pipeline.build_unique_id(m) == data_pipeline.build_unique_id(m2) + + +def test_format_tags(): + unformatted_tags = {'key1': 'val1', 'key2': 'val2', 'key3': 'val3'} + formatted_tags = data_pipeline.format_tags(unformatted_tags) + for tag_set in formatted_tags: + assert unformatted_tags[tag_set['key']] == tag_set['value'] + + +def test_format_empty_tags(): + unformatted_tags = {} + formatted_tags = data_pipeline.format_tags(unformatted_tags) + assert formatted_tags == [] + + +def test_pipeline_description(placeboify, maybe_sleep, dp_setup): + connection = placeboify.client('datapipeline') + dp_id = dp_setup.data_pipeline_id + pipelines = data_pipeline.pipeline_description(connection, dp_id) + assert dp_id == pipelines['pipelineDescriptionList'][0]['pipelineId'] + + +def test_pipeline_description_nonexistent(placeboify, maybe_sleep): + hypothetical_pipeline_id = "df-015440025PF7YGLDK47C" + connection = placeboify.client('datapipeline') + with pytest.raises(Exception) as error: + data_pipeline.pipeline_description(connection, hypothetical_pipeline_id) + assert error == data_pipeline.DataPipelineNotFound + + +def test_check_dp_exists_true(placeboify, maybe_sleep, dp_setup): + connection = placeboify.client('datapipeline') + exists = data_pipeline.check_dp_exists(connection, dp_setup.data_pipeline_id) + assert exists is True + + +def test_check_dp_exists_false(placeboify, maybe_sleep): + hypothetical_pipeline_id = "df-015440025PF7YGLDK47C" + connection = placeboify.client('datapipeline') + exists = data_pipeline.check_dp_exists(connection, hypothetical_pipeline_id) + assert exists is False + + +def test_check_dp_status(placeboify, maybe_sleep, dp_setup): + inactive_states = ['INACTIVE', 'PENDING', 'FINISHED', 'DELETING'] + connection = placeboify.client('datapipeline') + state = data_pipeline.check_dp_status(connection, dp_setup.data_pipeline_id, inactive_states) + assert state is True + + +def test_activate_pipeline(placeboify, maybe_sleep, dp_setup): + # use objects to define pipeline before activating + connection = placeboify.client('datapipeline') + data_pipeline.define_pipeline(connection, + module=dp_setup.module, + objects=dp_setup.objects, + dp_id=dp_setup.data_pipeline_id) + changed, result = data_pipeline.activate_pipeline(connection, dp_setup.module) + assert changed is True diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_ec2_vpc_nat_gateway.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_ec2_vpc_nat_gateway.py new file mode 100644 index 00000000..88d5032b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_ec2_vpc_nat_gateway.py @@ -0,0 +1,207 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest +import unittest + +from mock import patch + +import ansible_collections.community.aws.plugins.modules.ec2_vpc_nat_gateway as ng + + +boto3 = pytest.importorskip("boto3") +botocore = pytest.importorskip("botocore") + +aws_region = 'us-west-2' + + +class AnsibleEc2VpcNatGatewayFunctions(unittest.TestCase): + + def test_get_nat_gateways(self): + client = boto3.client('ec2', region_name=aws_region) + success, err_msg, stream = ( + ng.get_nat_gateways(client, 'subnet-123456789', check_mode=True) + ) + should_return = ng.DRY_RUN_GATEWAYS + self.assertTrue(success) + self.assertEqual(stream, should_return) + + def test_get_nat_gateways_no_gateways_found(self): + client = boto3.client('ec2', region_name=aws_region) + success, err_msg, stream = ( + ng.get_nat_gateways(client, 'subnet-1234567', check_mode=True) + ) + self.assertTrue(success) + self.assertEqual(stream, []) + + def test_wait_for_status(self): + client = boto3.client('ec2', region_name=aws_region) + success, err_msg, gws = ( + ng.wait_for_status( + client, 5, 'nat-123456789', 'available', check_mode=True + ) + ) + should_return = ng.DRY_RUN_GATEWAYS[0] + self.assertTrue(success) + self.assertEqual(gws, should_return) + + @patch('time.sleep') + def test_wait_for_status_to_timeout(self, mock_sleep): + client = boto3.client('ec2', region_name=aws_region) + success, err_msg, gws = ( + ng.wait_for_status( + client, 2, 'nat-12345678', 'available', check_mode=True + ) + ) + self.assertFalse(success) + self.assertEqual(gws, {}) + + def test_gateway_in_subnet_exists_with_allocation_id(self): + client = boto3.client('ec2', region_name=aws_region) + gws, err_msg = ( + ng.gateway_in_subnet_exists( + client, 'subnet-123456789', 'eipalloc-1234567', check_mode=True + ) + ) + should_return = ng.DRY_RUN_GATEWAYS + self.assertEqual(gws, should_return) + + def test_gateway_in_subnet_exists_with_allocation_id_does_not_exist(self): + client = boto3.client('ec2', region_name=aws_region) + gws, err_msg = ( + ng.gateway_in_subnet_exists( + client, 'subnet-123456789', 'eipalloc-123', check_mode=True + ) + ) + should_return = list() + self.assertEqual(gws, should_return) + + def test_gateway_in_subnet_exists_without_allocation_id(self): + client = boto3.client('ec2', region_name=aws_region) + gws, err_msg = ( + ng.gateway_in_subnet_exists( + client, 'subnet-123456789', check_mode=True + ) + ) + should_return = ng.DRY_RUN_GATEWAYS + self.assertEqual(gws, should_return) + + def test_get_eip_allocation_id_by_address(self): + client = boto3.client('ec2', region_name=aws_region) + allocation_id, error_msg = ( + ng.get_eip_allocation_id_by_address( + client, '55.55.55.55', check_mode=True + ) + ) + should_return = 'eipalloc-1234567' + self.assertEqual(allocation_id, should_return) + + def test_get_eip_allocation_id_by_address_does_not_exist(self): + client = boto3.client('ec2', region_name=aws_region) + allocation_id, err_msg = ( + ng.get_eip_allocation_id_by_address( + client, '52.52.52.52', check_mode=True + ) + ) + self.assertEqual(err_msg, 'EIP 52.52.52.52 does not exist') + self.assertTrue(allocation_id is None) + + def test_allocate_eip_address(self): + client = boto3.client('ec2', region_name=aws_region) + success, err_msg, eip_id = ( + ng.allocate_eip_address( + client, check_mode=True + ) + ) + self.assertTrue(success) + + def test_release_address(self): + client = boto3.client('ec2', region_name=aws_region) + success, err_msg = ( + ng.release_address( + client, 'eipalloc-1234567', check_mode=True + ) + ) + self.assertTrue(success) + + def test_create(self): + client = boto3.client('ec2', region_name=aws_region) + success, changed, err_msg, results = ( + ng.create( + client, 'subnet-123456', 'eipalloc-1234567', check_mode=True + ) + ) + self.assertTrue(success) + self.assertTrue(changed) + + def test_pre_create(self): + client = boto3.client('ec2', region_name=aws_region) + success, changed, err_msg, results = ( + ng.pre_create( + client, 'subnet-123456', check_mode=True + ) + ) + self.assertTrue(success) + self.assertTrue(changed) + + def test_pre_create_idemptotent_with_allocation_id(self): + client = boto3.client('ec2', region_name=aws_region) + success, changed, err_msg, results = ( + ng.pre_create( + client, 'subnet-123456789', allocation_id='eipalloc-1234567', check_mode=True + ) + ) + self.assertTrue(success) + self.assertFalse(changed) + + def test_pre_create_idemptotent_with_eip_address(self): + client = boto3.client('ec2', region_name=aws_region) + success, changed, err_msg, results = ( + ng.pre_create( + client, 'subnet-123456789', eip_address='55.55.55.55', check_mode=True + ) + ) + self.assertTrue(success) + self.assertFalse(changed) + + def test_pre_create_idemptotent_if_exist_do_not_create(self): + client = boto3.client('ec2', region_name=aws_region) + success, changed, err_msg, results = ( + ng.pre_create( + client, 'subnet-123456789', if_exist_do_not_create=True, check_mode=True + ) + ) + self.assertTrue(success) + self.assertFalse(changed) + + def test_delete(self): + client = boto3.client('ec2', region_name=aws_region) + success, changed, err_msg, results = ( + ng.remove( + client, 'nat-123456789', check_mode=True + ) + ) + self.assertTrue(success) + self.assertTrue(changed) + + def test_delete_and_release_ip(self): + client = boto3.client('ec2', region_name=aws_region) + success, changed, err_msg, results = ( + ng.remove( + client, 'nat-123456789', release_eip=True, check_mode=True + ) + ) + self.assertTrue(success) + self.assertTrue(changed) + + def test_delete_if_does_not_exist(self): + client = boto3.client('ec2', region_name=aws_region) + success, changed, err_msg, results = ( + ng.remove( + client, 'nat-12345', check_mode=True + ) + ) + self.assertFalse(success) + self.assertFalse(changed) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_ec2_vpc_vpn.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_ec2_vpc_vpn.py new file mode 100644 index 00000000..1e50d429 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_ec2_vpc_vpn.py @@ -0,0 +1,352 @@ +# (c) 2017 Red Hat Inc. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest +import os +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify, maybe_sleep +from ansible_collections.community.aws.plugins.modules import ec2_vpc_vpn +from ansible_collections.amazon.aws.plugins.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=None, filters=None, routes=None): + tags = {} if tags is None else tags + filters = {} if filters is None else filters + routes = [] if routes is None else routes + + return {'customer_gateway_id': cgw, + 'static_only': True, + 'vpn_gateway_id': vgw, + 'connection_type': 'ipsec.1', + 'purge_tags': True, + 'tags': tags, + 'filters': filters, + 'routes': routes, + 'delay': 15, + 'wait_timeout': 600} + + +def make_conn(placeboify, module, connection): + customer_gateway_id = module.params['customer_gateway_id'] + static_only = module.params['static_only'] + vpn_gateway_id = module.params['vpn_gateway_id'] + connection_type = module.params['connection_type'] + 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, delay=15, max_attempts=40) + + +def test_find_connection_vpc_conn_id(placeboify, maybe_sleep): + # setup dependencies for 2 vpn connections + dependencies = setup_req(placeboify, 2) + dep1, dep2 = dependencies[0], dependencies[1] + params1, vpn1, m1, conn1 = dep1['params'], dep1['vpn'], dep1['module'], dep1['connection'] + params2, vpn2, m2, conn2 = dep2['params'], dep2['vpn'], dep2['module'], dep2['connection'] + + # find the connection with a vpn_connection_id and assert it is the expected one + assert vpn1['VpnConnectionId'] == ec2_vpc_vpn.find_connection(conn1, params1, vpn1['VpnConnectionId'])['VpnConnectionId'] + + tear_down_conn(placeboify, conn1, vpn1['VpnConnectionId']) + tear_down_conn(placeboify, conn2, vpn2['VpnConnectionId']) + + +def test_find_connection_filters(placeboify, maybe_sleep): + # setup dependencies for 2 vpn connections + dependencies = setup_req(placeboify, 2) + dep1, dep2 = dependencies[0], dependencies[1] + params1, vpn1, m1, conn1 = dep1['params'], dep1['vpn'], dep1['module'], dep1['connection'] + params2, vpn2, m2, conn2 = dep2['params'], dep2['vpn'], dep2['module'], dep2['connection'] + + # update to different tags + params1.update(tags={'Wrong': 'Tag'}) + params2.update(tags={'Correct': 'Tag'}) + ec2_vpc_vpn.ensure_present(conn1, params1) + ec2_vpc_vpn.ensure_present(conn2, params2) + + # create some new parameters for a filter + params = {'filters': {'tags': {'Correct': 'Tag'}}} + + # find the connection that has the parameters above + found = ec2_vpc_vpn.find_connection(conn1, params) + + # assert the correct connection was found + assert found['VpnConnectionId'] == vpn2['VpnConnectionId'] + + # delete the connections + tear_down_conn(placeboify, conn1, vpn1['VpnConnectionId']) + tear_down_conn(placeboify, conn2, vpn2['VpnConnectionId']) + + +def test_find_connection_insufficient_filters(placeboify, maybe_sleep): + # get list of customer gateways and virtual private gateways + cgw, vgw = get_dependencies() + + # create two connections with the same tags + params = make_params(cgw[0], vgw[0], tags={'Correct': 'Tag'}) + params2 = make_params(cgw[1], vgw[1], tags={'Correct': 'Tag'}) + m, conn = setup_mod_conn(placeboify, params) + m2, conn2 = setup_mod_conn(placeboify, params2) + vpn1 = ec2_vpc_vpn.ensure_present(conn, m.params)[1] + vpn2 = ec2_vpc_vpn.ensure_present(conn2, m2.params)[1] + + # reset the parameters so only filtering by tags will occur + m.params = {'filters': {'tags': {'Correct': 'Tag'}}} + + # 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'}}, 'delay': 15, 'wait_timeout': 600} + m, conn = setup_mod_conn(placeboify, params) + changed, vpn = ec2_vpc_vpn.ensure_absent(conn, m.params) + + assert changed is False + assert vpn == {} + + +def test_check_for_update_tags(placeboify, maybe_sleep): + # setup dependencies for 1 vpn connection + dependencies = setup_req(placeboify, 1) + params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + + # add and remove a number of tags + m.params['tags'] = {'One': 'one', 'Two': 'two'} + ec2_vpc_vpn.ensure_present(conn, m.params) + m.params['tags'] = {'Two': 'two', 'Three': 'three', 'Four': 'four'} + changes = ec2_vpc_vpn.check_for_update(conn, m.params, vpn['VpnConnectionId']) + + flat_dict_changes = boto3_tag_list_to_ansible_dict(changes['tags_to_add']) + correct_changes = boto3_tag_list_to_ansible_dict([{'Key': 'Three', 'Value': 'three'}, {'Key': 'Four', 'Value': 'four'}]) + assert flat_dict_changes == correct_changes + assert changes['tags_to_remove'] == ['One'] + + # delete connection + tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + + +def test_check_for_update_nonmodifiable_attr(placeboify, maybe_sleep): + # setup dependencies for 1 vpn connection + dependencies = setup_req(placeboify, 1) + params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + current_vgw = params['vpn_gateway_id'] + + # update a parameter that isn't modifiable + m.params.update(vpn_gateway_id="invalidchange") + + 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)[1] + + results.append({'module': m, 'connection': conn, 'vpn': vpn, 'params': params}) + if number_of_results == 1: + return results[0] + else: + return results[0], results[1] diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_ec2_win_password.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_ec2_win_password.py new file mode 100644 index 00000000..cf0d3ff7 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_ec2_win_password.py @@ -0,0 +1,50 @@ +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +''' +Commands to encrypt a message that can be decrypted: +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives.serialization import load_pem_private_key +from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v15 +import base64 + +path = '/path/to/rsa_public_key.pem' +with open(path, 'r') as f: + rsa_public_key_pem = to_text(f.read()) +load_pem_public_key(rsa_public_key_pem = , default_backend()) +base64_cipher = public_key.encrypt('Ansible_AWS_EC2_Win_Password', PKCS1v15()) +string_cipher = base64.b64encode(base64_cipher) +''' + +from ansible.module_utils._text import to_bytes, to_text +from ansible_collections.community.aws.plugins.modules.ec2_win_password import setup_module_object, ec2_win_password +from ansible_collections.community.aws.tests.unit.compat.mock import patch +from ansible_collections.community.aws.tests.unit.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args + +fixture_prefix = 'tests/unit/modules/fixtures/certs' + + +class TestEc2WinPasswordModule(ModuleTestCase): + @patch('ansible_collections.community.aws.plugins.modules.ec2_win_password.ec2_connect') + def test_decryption(self, mock_connect): + + path = fixture_prefix + '/ec2_win_password.pem' + with open(path, 'r') as f: + pem = to_text(f.read()) + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({'instance_id': 'i-12345', + 'key_data': pem + }) + module = setup_module_object() + mock_connect().get_password_data.return_value = 'L2k1iFiu/TRrjGr6Rwco/T3C7xkWxUw4+YPYpGGOmP3KDdy3hT1' \ + '8RvdDJ2i0e+y7wUcH43DwbRYSlkSyALY/nzjSV9R5NChUyVs3W5' \ + '5oiVuyTKsk0lor8dFJ9z9unq14tScZHvyQ3Nx1ggOtS18S9Pk55q' \ + 'IaCXfx26ucH76VRho=' + ec2_win_password(module) + + self.assertEqual( + exec_info.exception.args[0]['win_password'], + to_bytes('Ansible_AWS_EC2_Win_Password'), + ) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_iam_password_policy.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_iam_password_policy.py new file mode 100644 index 00000000..c52d174a --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_iam_password_policy.py @@ -0,0 +1,30 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest + +from ansible_collections.community.aws.tests.unit.modules.utils import set_module_args +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import HAS_BOTO3 + +if not HAS_BOTO3: + pytestmark = pytest.mark.skip("iam_password_policy.py requires the `boto3` and `botocore` modules") +else: + import boto3 + from ansible_collections.community.aws.plugins.modules import iam_password_policy + + +def test_warn_if_state_not_specified(): + set_module_args({ + "min_pw_length": "8", + "require_symbols": "false", + "require_numbers": "true", + "require_uppercase": "true", + "require_lowercase": "true", + "allow_pw_change": "true", + "pw_max_age": "60", + "pw_reuse_prevent": "5", + "pw_expire": "false" + }) + with pytest.raises(SystemExit): + print(iam_password_policy.main()) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_kinesis_stream.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_kinesis_stream.py new file mode 100644 index 00000000..88bff768 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_kinesis_stream.py @@ -0,0 +1,330 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest +import unittest + +boto3 = pytest.importorskip("boto3") +botocore = pytest.importorskip("botocore") + +from ansible_collections.community.aws.plugins.modules import kinesis_stream + +aws_region = 'us-west-2' + + +class AnsibleKinesisStreamFunctions(unittest.TestCase): + + def test_convert_to_lower(self): + example = { + 'HasMoreShards': True, + 'RetentionPeriodHours': 24, + 'StreamName': 'test', + 'StreamARN': 'arn:aws:kinesis:east-side:123456789:stream/test', + 'StreamStatus': 'ACTIVE' + } + converted_example = kinesis_stream.convert_to_lower(example) + keys = list(converted_example.keys()) + keys.sort() + for i in range(len(keys)): + if i == 0: + self.assertEqual(keys[i], 'has_more_shards') + if i == 1: + self.assertEqual(keys[i], 'retention_period_hours') + if i == 2: + self.assertEqual(keys[i], 'stream_arn') + if i == 3: + self.assertEqual(keys[i], 'stream_name') + if i == 4: + self.assertEqual(keys[i], 'stream_status') + + def test_make_tags_in_aws_format(self): + example = { + 'env': 'development' + } + should_return = [ + { + 'Key': 'env', + 'Value': 'development' + } + ] + aws_tags = kinesis_stream.make_tags_in_aws_format(example) + self.assertEqual(aws_tags, should_return) + + def test_make_tags_in_proper_format(self): + example = [ + { + 'Key': 'env', + 'Value': 'development' + }, + { + 'Key': 'service', + 'Value': 'web' + } + ] + should_return = { + 'env': 'development', + 'service': 'web' + } + proper_tags = kinesis_stream.make_tags_in_proper_format(example) + self.assertEqual(proper_tags, should_return) + + def test_recreate_tags_from_list(self): + example = [('environment', 'development'), ('service', 'web')] + should_return = [ + { + 'Key': 'environment', + 'Value': 'development' + }, + { + 'Key': 'service', + 'Value': 'web' + } + ] + aws_tags = kinesis_stream.recreate_tags_from_list(example) + self.assertEqual(aws_tags, should_return) + + def test_get_tags(self): + client = boto3.client('kinesis', region_name=aws_region) + success, err_msg, tags = kinesis_stream.get_tags(client, 'test', check_mode=True) + self.assertTrue(success) + should_return = [ + { + 'Key': 'DryRunMode', + 'Value': 'true' + } + ] + self.assertEqual(tags, should_return) + + def test_find_stream(self): + client = boto3.client('kinesis', region_name=aws_region) + success, err_msg, stream = ( + kinesis_stream.find_stream(client, 'test', check_mode=True) + ) + should_return = { + 'OpenShardsCount': 5, + 'ClosedShardsCount': 0, + 'ShardsCount': 5, + 'HasMoreShards': True, + 'RetentionPeriodHours': 24, + 'StreamName': 'test', + 'StreamARN': 'arn:aws:kinesis:east-side:123456789:stream/test', + 'StreamStatus': 'ACTIVE', + 'EncryptionType': 'NONE' + } + self.assertTrue(success) + self.assertEqual(stream, should_return) + + def test_wait_for_status(self): + client = boto3.client('kinesis', region_name=aws_region) + success, err_msg, stream = ( + kinesis_stream.wait_for_status( + client, 'test', 'ACTIVE', check_mode=True + ) + ) + should_return = { + 'OpenShardsCount': 5, + 'ClosedShardsCount': 0, + 'ShardsCount': 5, + 'HasMoreShards': True, + 'RetentionPeriodHours': 24, + 'StreamName': 'test', + 'StreamARN': 'arn:aws:kinesis:east-side:123456789:stream/test', + 'StreamStatus': 'ACTIVE', + 'EncryptionType': 'NONE' + } + self.assertTrue(success) + self.assertEqual(stream, should_return) + + def test_tags_action_create(self): + client = boto3.client('kinesis', region_name=aws_region) + tags = { + 'env': 'development', + 'service': 'web' + } + success, err_msg = ( + kinesis_stream.tags_action( + client, 'test', tags, 'create', check_mode=True + ) + ) + self.assertTrue(success) + + def test_tags_action_delete(self): + client = boto3.client('kinesis', region_name=aws_region) + tags = { + 'env': 'development', + 'service': 'web' + } + success, err_msg = ( + kinesis_stream.tags_action( + client, 'test', tags, 'delete', check_mode=True + ) + ) + self.assertTrue(success) + + def test_tags_action_invalid(self): + client = boto3.client('kinesis', region_name=aws_region) + tags = { + 'env': 'development', + 'service': 'web' + } + success, err_msg = ( + kinesis_stream.tags_action( + client, 'test', tags, 'append', check_mode=True + ) + ) + self.assertFalse(success) + + def test_update_tags(self): + client = boto3.client('kinesis', region_name=aws_region) + tags = { + 'env': 'development', + 'service': 'web' + } + success, changed, err_msg = ( + kinesis_stream.update_tags( + client, 'test', tags, check_mode=True + ) + ) + self.assertTrue(success) + + def test_stream_action_create(self): + client = boto3.client('kinesis', region_name=aws_region) + success, err_msg = ( + kinesis_stream.stream_action( + client, 'test', 10, 'create', check_mode=True + ) + ) + self.assertTrue(success) + + def test_stream_action_delete(self): + client = boto3.client('kinesis', region_name=aws_region) + success, err_msg = ( + kinesis_stream.stream_action( + client, 'test', 10, 'delete', check_mode=True + ) + ) + self.assertTrue(success) + + def test_stream_action_invalid(self): + client = boto3.client('kinesis', region_name=aws_region) + success, err_msg = ( + kinesis_stream.stream_action( + client, 'test', 10, 'append', check_mode=True + ) + ) + self.assertFalse(success) + + def test_retention_action_increase(self): + client = boto3.client('kinesis', region_name=aws_region) + success, err_msg = ( + kinesis_stream.retention_action( + client, 'test', 48, 'increase', check_mode=True + ) + ) + self.assertTrue(success) + + def test_retention_action_decrease(self): + client = boto3.client('kinesis', region_name=aws_region) + success, err_msg = ( + kinesis_stream.retention_action( + client, 'test', 24, 'decrease', check_mode=True + ) + ) + self.assertTrue(success) + + def test_retention_action_invalid(self): + client = boto3.client('kinesis', region_name=aws_region) + success, err_msg = ( + kinesis_stream.retention_action( + client, 'test', 24, 'create', check_mode=True + ) + ) + self.assertFalse(success) + + def test_update_shard_count(self): + client = boto3.client('kinesis', region_name=aws_region) + success, err_msg = ( + kinesis_stream.update_shard_count( + client, 'test', 5, check_mode=True + ) + ) + self.assertTrue(success) + + def test_update(self): + client = boto3.client('kinesis', region_name=aws_region) + current_stream = { + 'OpenShardsCount': 5, + 'ClosedShardsCount': 0, + 'ShardsCount': 1, + 'HasMoreShards': True, + 'RetentionPeriodHours': 24, + 'StreamName': 'test', + 'StreamARN': 'arn:aws:kinesis:east-side:123456789:stream/test', + 'StreamStatus': 'ACTIVE', + 'EncryptionType': 'NONE' + } + tags = { + 'env': 'development', + 'service': 'web' + } + success, changed, err_msg = ( + kinesis_stream.update( + client, current_stream, 'test', number_of_shards=2, retention_period=48, + tags=tags, check_mode=True + ) + ) + self.assertTrue(success) + self.assertTrue(changed) + self.assertEqual(err_msg, 'Kinesis Stream test updated successfully.') + + def test_create_stream(self): + client = boto3.client('kinesis', region_name=aws_region) + tags = { + 'env': 'development', + 'service': 'web' + } + success, changed, err_msg, results = ( + kinesis_stream.create_stream( + client, 'test', number_of_shards=10, retention_period=48, + tags=tags, check_mode=True + ) + ) + should_return = { + 'open_shards_count': 5, + 'closed_shards_count': 0, + 'shards_count': 5, + 'has_more_shards': True, + 'retention_period_hours': 24, + 'stream_name': 'test', + 'stream_arn': 'arn:aws:kinesis:east-side:123456789:stream/test', + 'stream_status': 'ACTIVE', + 'encryption_type': 'NONE', + 'tags': tags, + } + self.assertTrue(success) + self.assertTrue(changed) + self.assertEqual(results, should_return) + self.assertEqual(err_msg, 'Kinesis Stream test updated successfully.') + + def test_enable_stream_encription(self): + client = boto3.client('kinesis', region_name=aws_region) + success, changed, err_msg, results = ( + kinesis_stream.start_stream_encryption( + client, 'test', encryption_type='KMS', key_id='', wait=True, wait_timeout=60, check_mode=True + ) + ) + self.assertTrue(success) + self.assertTrue(changed) + self.assertEqual(err_msg, 'Kinesis Stream test encryption started successfully.') + + def test_dsbale_stream_encryption(self): + client = boto3.client('kinesis', region_name=aws_region) + success, changed, err_msg, results = ( + kinesis_stream.stop_stream_encryption( + client, 'test', encryption_type='KMS', key_id='', wait=True, wait_timeout=60, check_mode=True + ) + ) + self.assertTrue(success) + self.assertTrue(changed) + self.assertEqual(err_msg, 'Kinesis Stream test encryption stopped successfully.') diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_lambda.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_lambda.py new file mode 100644 index 00000000..95db5a55 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_lambda.py @@ -0,0 +1,186 @@ +# +# (c) 2017 Michael De La Rue +# +# This file is part of Ansible +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import copy +import pytest + +from ansible_collections.community.aws.tests.unit.compat.mock import MagicMock, Mock, patch +from ansible.module_utils import basic +from ansible_collections.community.aws.tests.unit.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args + +boto3 = pytest.importorskip("boto3") + +# lambda is a keyword so we have to hack this. +_temp = __import__('ansible_collections.community.aws.plugins.modules.lambda') +lda = getattr(_temp.community.aws.plugins.modules, "lambda") + + +base_lambda_config = { + 'FunctionName': 'lambda_name', + 'Role': 'arn:aws:iam::987654321012:role/lambda_basic_execution', + 'Handler': 'lambda_python.my_handler', + 'Description': 'this that the other', + 'Timeout': 3, + 'MemorySize': 128, + 'Runtime': 'python2.7', + 'CodeSha256': 'AqMZ+xptM7aC9VXu+5jyp1sqO+Nj4WFMNzQxtPMP2n8=', + 'Version': 1, +} + +one_change_lambda_config = copy.copy(base_lambda_config) +one_change_lambda_config['Timeout'] = 4 +two_change_lambda_config = copy.copy(one_change_lambda_config) +two_change_lambda_config['Role'] = 'arn:aws:iam::987654321012:role/lambda_advanced_execution' +code_change_lambda_config = copy.copy(base_lambda_config) +code_change_lambda_config['CodeSha256'] = 'P+Zy8U4T4RiiHWElhL10VBKj9jw4rSJ5bm/TiW+4Rts=' +code_change_lambda_config['Version'] = 2 + +base_module_args = { + "region": "us-west-1", + "name": "lambda_name", + "state": "present", + "zip_file": "tests/unit/modules/fixtures/thezip.zip", + "runtime": 'python2.7', + "role": 'arn:aws:iam::987654321012:role/lambda_basic_execution', + "memory_size": 128, + "timeout": 3, + "handler": 'lambda_python.my_handler' +} +one_change_module_args = copy.copy(base_module_args) +one_change_module_args['timeout'] = 4 +two_change_module_args = copy.copy(one_change_module_args) +two_change_module_args['role'] = 'arn:aws:iam::987654321012:role/lambda_advanced_execution' +module_args_with_environment = dict(base_module_args, environment_variables={ + "variable_name": "variable_value" +}) +delete_module_args = { + "region": "us-west-1", + "name": "lambda_name", + "state": "absent", + +} + + +@patch('ansible_collections.amazon.aws.plugins.module_utils.core.HAS_BOTO3', new=True) +@patch.object(lda.AnsibleAWSModule, 'client') +class TestLambdaModule(ModuleTestCase): + # TODO: def test_handle_different_types_in_config_params(): + + def test_create_lambda_if_not_exist(self, client_mock): + client_mock.return_value.create_function.return_value = base_lambda_config + get_function_after_create = {'FunctionName': 'lambda_name', 'Version': '1', 'aws_retry': True} + client_mock.return_value.get_function.side_effect = [None, get_function_after_create] + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args(base_module_args) + lda.main() + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + client_mock.return_value.get_function.assert_called() + + client_mock.return_value.update_function_configuration.assert_not_called() + client_mock.return_value.create_function.assert_called() + + (create_args, create_kwargs) = client_mock.return_value.create_function.call_args + client_mock.return_value.create_function.assert_called_once_with(**create_kwargs) + + @patch.object(lda, 'sha256sum') + def test_update_lambda_if_code_changed(self, mock_sha256sum, client_mock): + client_mock.return_value.get_function.side_effect = [{'Configuration': base_lambda_config}, code_change_lambda_config] + mock_sha256sum.return_value = code_change_lambda_config['CodeSha256'] + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args(base_module_args) + lda.main() + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + client_mock.return_value.get_function.assert_called() + client_mock.return_value.update_function_code.assert_called() + client_mock.return_value.create_function.assert_not_called() + + (update_args, update_kwargs) = client_mock.return_value.update_function_code.call_args + client_mock.return_value.update_function_code.assert_called_once_with(**update_kwargs) + + def test_update_lambda_if_config_changed(self, client_mock): + client_mock.return_value.get_function.side_effect = [{'Configuration': base_lambda_config}, two_change_lambda_config] + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args(two_change_module_args) + lda.main() + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + client_mock.return_value.get_function.assert_called() + client_mock.return_value.update_function_configuration.assert_called() + client_mock.return_value.create_function.assert_not_called() + + (update_args, update_kwargs) = client_mock.return_value.update_function_configuration.call_args + client_mock.return_value.update_function_configuration.assert_called_once_with(**update_kwargs) + + def test_update_lambda_if_only_one_config_item_changed(self, client_mock): + client_mock.return_value.get_function.side_effect = [{'Configuration': base_lambda_config}, one_change_lambda_config] + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args(one_change_module_args) + lda.main() + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + client_mock.return_value.get_function.assert_called() + client_mock.return_value.update_function_configuration.assert_called() + client_mock.return_value.create_function.assert_not_called() + + (update_args, update_kwargs) = client_mock.return_value.update_function_configuration.call_args + client_mock.return_value.update_function_configuration.assert_called_once_with(**update_kwargs) + + def test_update_lambda_if_added_environment_variable(self, client_mock): + client_mock.return_value.get_function.side_effect = [{'Configuration': base_lambda_config}, base_lambda_config] + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args(module_args_with_environment) + lda.main() + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + client_mock.return_value.get_function.assert_called() + client_mock.return_value.update_function_configuration.assert_called() + client_mock.return_value.create_function.assert_not_called() + + (update_args, update_kwargs) = client_mock.return_value.update_function_configuration.call_args + client_mock.return_value.update_function_configuration.assert_called_once_with(**update_kwargs) + + self.assertEqual(update_kwargs['Environment']['Variables'], module_args_with_environment['environment_variables']) + + def test_dont_update_lambda_if_nothing_changed(self, client_mock): + client_mock.return_value.get_function.side_effect = [{'Configuration': base_lambda_config}, base_lambda_config] + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args(base_module_args) + lda.main() + + self.assertEqual(exec_info.exception.args[0]['changed'], False) + client_mock.return_value.get_function.assert_called() + client_mock.return_value.update_function_configuration.assert_not_called() + client_mock.return_value.create_function.assert_not_called() + + def test_delete_lambda_that_exists(self, client_mock): + client_mock.return_value.create_function.return_value = base_lambda_config + client_mock.return_value.get_function.side_effect = [base_lambda_config, None] + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args(delete_module_args) + lda.main() + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + client_mock.return_value.get_function.assert_called() + + client_mock.return_value.delete_function.assert_called() + client_mock.return_value.update_function_configuration.assert_not_called() + client_mock.return_value.create_function.assert_not_called() + + (delete_args, delete_kwargs) = client_mock.return_value.delete_function.call_args + client_mock.return_value.delete_function.assert_called_once_with(**delete_kwargs) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_lambda_policy.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_lambda_policy.py new file mode 100644 index 00000000..25ad47c1 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_lambda_policy.py @@ -0,0 +1,155 @@ +# +# (c) 2017 Michael De La Rue +# +# This file is part of Ansible +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import copy + +import pytest + +from ansible_collections.amazon.aws.plugins.module_utils.core import HAS_BOTO3 +from ansible_collections.community.aws.tests.unit.compat.mock import MagicMock +from ansible_collections.community.aws.tests.unit.modules.utils import set_module_args + +if not HAS_BOTO3: + pytestmark = pytest.mark.skip("test_api_gateway.py requires the `boto3` and `botocore` modules") + +# these are here cause ... boto! +from ansible_collections.community.aws.plugins.modules import lambda_policy +from ansible_collections.community.aws.plugins.modules.lambda_policy import setup_module_object +try: + from botocore.exceptions import ClientError +except ImportError: + pass + + +base_module_args = { + "region": "us-west-1", + "function_name": "this_is_a_test_function", + "state": "present", + "statement_id": "test-allow-lambda", + "principal": 123456, + "action": "lambda:*" +} + + +def test_module_is_created_sensibly(): + set_module_args(base_module_args) + module = setup_module_object() + assert module.params['function_name'] == 'this_is_a_test_function' + + +module_double = MagicMock() +module_double.fail_json_aws.side_effect = Exception("unexpected call to fail_json_aws") +module_double.check_mode = False + +fake_module_params_present = { + "state": "present", + "statement_id": "test-allow-lambda", + "principal": "apigateway.amazonaws.com", + "action": "lambda:InvokeFunction", + "source_arn": u'arn:aws:execute-api:us-east-1:123456789:efghijklmn/authorizers/*', + "version": 0, + "alias": None +} +fake_module_params_different = copy.deepcopy(fake_module_params_present) +fake_module_params_different["action"] = "lambda:api-gateway" +fake_module_params_absent = copy.deepcopy(fake_module_params_present) +fake_module_params_absent["state"] = "absent" + +fake_policy_return = { + u'Policy': ( + u'{"Version":"2012-10-17","Id":"default","Statement":[{"Sid":"1234567890abcdef1234567890abcdef",' + u'"Effect":"Allow","Principal":{"Service":"apigateway.amazonaws.com"},"Action":"lambda:InvokeFunction",' + u'"Resource":"arn:aws:lambda:us-east-1:123456789:function:test_authorizer",' + u'"Condition":{"ArnLike":{"AWS:SourceArn":"arn:aws:execute-api:us-east-1:123456789:abcdefghij/authorizers/1a2b3c"}}},' + u'{"Sid":"2234567890abcdef1234567890abcdef","Effect":"Allow","Principal":{"Service":"apigateway.amazonaws.com"},' + u'"Action":"lambda:InvokeFunction","Resource":"arn:aws:lambda:us-east-1:123456789:function:test_authorizer",' + u'"Condition":{"ArnLike":{"AWS:SourceArn":"arn:aws:execute-api:us-east-1:123456789:klmnopqrst/authorizers/4d5f6g"}}},' + u'{"Sid":"1234567890abcdef1234567890abcdef","Effect":"Allow","Principal":{"Service":"apigateway.amazonaws.com"},' + u'"Action":"lambda:InvokeFunction","Resource":"arn:aws:lambda:us-east-1:123456789:function:test_authorizer",' + u'"Condition":{"ArnLike":{"AWS:SourceArn":"arn:aws:execute-api:eu-west-1:123456789:uvwxyzabcd/authorizers/7h8i9j"}}},' + u'{"Sid":"test-allow-lambda","Effect":"Allow","Principal":{"Service":"apigateway.amazonaws.com"},' + u'"Action":"lambda:InvokeFunction","Resource":"arn:aws:lambda:us-east-1:123456789:function:test_authorizer",' + u'"Condition":{"ArnLike":{"AWS:SourceArn":"arn:aws:execute-api:us-east-1:123456789:efghijklmn/authorizers/*"}}},' + u'{"Sid":"1234567890abcdef1234567890abcdef","Effect":"Allow","Principal":{"Service":"apigateway.amazonaws.com"},' + u'"Action":"lambda:InvokeFunction","Resource":"arn:aws:lambda:us-east-1:123456789:function:test_authorizer",' + u'"Condition":{"ArnLike":{"AWS:SourceArn":"arn:aws:execute-api:us-east-1:123456789:opqrstuvwx/authorizers/0k1l2m"}}}]}'), + 'ResponseMetadata': { + 'RetryAttempts': 0, + 'HTTPStatusCode': 200, + 'RequestId': 'abcdefgi-1234-a567-b890-123456789abc', + 'HTTPHeaders': { + 'date': 'Sun, 13 Aug 2017 10:54:17 GMT', + 'x-amzn-requestid': 'abcdefgi-1234-a567-b890-123456789abc', + 'content-length': '1878', + 'content-type': 'application/json', + 'connection': 'keep-alive'}}} + +error_response = {'Error': {'Code': 'ResourceNotFoundException', 'Message': 'Fake Testing Error'}} +operation_name = 'FakeOperation' + + +def test_manage_state_adds_missing_permissions(): + lambda_client_double = MagicMock() + # Policy actually: not present Requested State: present Should: create + lambda_client_double.get_policy.side_effect = ClientError(error_response, operation_name) + fake_module_params = copy.deepcopy(fake_module_params_present) + module_double.params = fake_module_params + lambda_policy.manage_state(module_double, lambda_client_double) + assert lambda_client_double.get_policy.call_count > 0 + assert lambda_client_double.add_permission.call_count > 0 + lambda_client_double.remove_permission.assert_not_called() + + +def test_manage_state_leaves_existing_permissions(): + lambda_client_double = MagicMock() + # Policy actually: present Requested State: present Should: do nothing + lambda_client_double.get_policy.return_value = fake_policy_return + fake_module_params = copy.deepcopy(fake_module_params_present) + module_double.params = fake_module_params + lambda_policy.manage_state(module_double, lambda_client_double) + assert lambda_client_double.get_policy.call_count > 0 + lambda_client_double.add_permission.assert_not_called() + lambda_client_double.remove_permission.assert_not_called() + + +def test_manage_state_updates_nonmatching_permissions(): + lambda_client_double = MagicMock() + # Policy actually: present Requested State: present Should: do nothing + lambda_client_double.get_policy.return_value = fake_policy_return + fake_module_params = copy.deepcopy(fake_module_params_different) + module_double.params = fake_module_params + lambda_policy.manage_state(module_double, lambda_client_double) + assert lambda_client_double.get_policy.call_count > 0 + assert lambda_client_double.add_permission.call_count > 0 + assert lambda_client_double.remove_permission.call_count > 0 + + +def test_manage_state_removes_unwanted_permissions(): + lambda_client_double = MagicMock() + # Policy actually: present Requested State: not present Should: remove + lambda_client_double.get_policy.return_value = fake_policy_return + fake_module_params = copy.deepcopy(fake_module_params_absent) + module_double.params = fake_module_params + lambda_policy.manage_state(module_double, lambda_client_double) + assert lambda_client_double.get_policy.call_count > 0 + lambda_client_double.add_permission.assert_not_called() + assert lambda_client_double.remove_permission.call_count > 0 + + +def test_manage_state_leaves_already_removed_permissions(): + lambda_client_double = MagicMock() + # Policy actually: absent Requested State: absent Should: do nothing + lambda_client_double.get_policy.side_effect = ClientError(error_response, operation_name) + fake_module_params = copy.deepcopy(fake_module_params_absent) + module_double.params = fake_module_params + lambda_policy.manage_state(module_double, lambda_client_double) + assert lambda_client_double.get_policy.call_count > 0 + lambda_client_double.add_permission.assert_not_called() + lambda_client_double.remove_permission.assert_not_called() diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_redshift_cross_region_snapshots.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_redshift_cross_region_snapshots.py new file mode 100644 index 00000000..7b22d5b0 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_redshift_cross_region_snapshots.py @@ -0,0 +1,52 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible_collections.community.aws.plugins.modules import redshift_cross_region_snapshots as rcrs + +mock_status_enabled = { + 'SnapshotCopyGrantName': 'snapshot-us-east-1-to-us-west-2', + 'DestinationRegion': 'us-west-2', + 'RetentionPeriod': 1, +} + +mock_status_disabled = {} + +mock_request_illegal = { + 'snapshot_copy_grant': 'changed', + 'destination_region': 'us-west-2', + 'snapshot_retention_period': 1 +} + +mock_request_update = { + 'snapshot_copy_grant': 'snapshot-us-east-1-to-us-west-2', + 'destination_region': 'us-west-2', + 'snapshot_retention_period': 3 +} + +mock_request_no_update = { + 'snapshot_copy_grant': 'snapshot-us-east-1-to-us-west-2', + 'destination_region': 'us-west-2', + 'snapshot_retention_period': 1 +} + + +def test_fail_at_unsupported_operations(): + response = rcrs.requesting_unsupported_modifications( + mock_status_enabled, mock_request_illegal + ) + assert response is True + + +def test_needs_update_true(): + response = rcrs.needs_update(mock_status_enabled, mock_request_update) + assert response is True + + +def test_no_change(): + response = rcrs.requesting_unsupported_modifications( + mock_status_enabled, mock_request_no_update + ) + needs_update_response = rcrs.needs_update(mock_status_enabled, mock_request_no_update) + assert response is False + assert needs_update_response is False diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_route53_zone.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_route53_zone.py new file mode 100644 index 00000000..c8fe719d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_route53_zone.py @@ -0,0 +1,610 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import functools + +from ansible_collections.community.aws.plugins.modules import route53_zone +from ansible_collections.community.aws.tests.unit.compat import unittest +from ansible_collections.community.aws.tests.unit.compat.mock import patch, call +from ansible_collections.community.aws.tests.unit.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args + + +def parameterized(params_list): + def decorator(func): + @functools.wraps(func) + def wrapper(*args, **kwargs): + for params_map in params_list: + params_map.update(kwargs) + func(*args, **params_map) + return wrapper + return decorator + + +# Inline and replace with subdict.items() <= superdict.items(), when Python 2.6 compat can be dropped +def is_subdict(subdict, superdict): + return all(superdict[k] == v for k, v in subdict.items()) + + +@patch('ansible_collections.amazon.aws.plugins.module_utils.core.HAS_BOTO3', new=True) +@patch.object(route53_zone.AnsibleAWSModule, 'client') +@patch.object(route53_zone.time, 'time', return_value=1) +class TestRoute53Module(ModuleTestCase): + def test_mutually_exclusive(self, *args): + with self.assertRaises(AnsibleFailJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'vpc_id': 'vpc-94ccc2ff', + 'vpc_region': 'eu-central-1', + 'comment': 'foobar', + 'delegation_set_id': 'A1BCDEF2GHIJKL', + 'state': 'present', + }) + route53_zone.main() + + self.assertEqual( + exec_info.exception.args[0]['msg'], + 'parameters are mutually exclusive: delegation_set_id|vpc_id, delegation_set_id|vpc_region', + ) + + @parameterized([ + { + 'check_mode': False, + 'response': { + 'private_zone': False, + 'vpc_id': None, + 'vpc_region': None, + 'comment': 'foobar', + 'name': 'example.com.', + 'delegation_set_id': '', + 'zone_id': 'ZONE_ID', + }, + }, + { + 'check_mode': True, + 'response': { + 'private_zone': False, + 'vpc_id': None, + 'vpc_region': None, + 'comment': 'foobar', + 'name': 'example.com.', + 'delegation_set_id': None, + 'zone_id': None, + }, + } + ]) + @patch.object(route53_zone, 'find_zones', return_value=[]) + def test_create_public_zone(self, find_zones_mock, time_mock, client_mock, check_mode, response): + client_mock.return_value.create_hosted_zone.return_value = { + 'HostedZone': { + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': { + 'Comment': 'foobar', + 'PrivateZone': False, + }, + }, + } + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'comment': 'foobar', + 'state': 'present', + '_ansible_check_mode': check_mode, + }) + route53_zone.main() + + if check_mode: + client_mock.return_value.create_hosted_zone.assert_not_called() + else: + client_mock.return_value.create_hosted_zone.assert_called_once_with(**{ + 'HostedZoneConfig': { + 'Comment': 'foobar', + 'PrivateZone': False, + }, + 'Name': 'example.com.', + 'CallerReference': 'example.com.-1', + }) + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + self.assertTrue(is_subdict(response, exec_info.exception.args[0])) + + @parameterized([ + { + 'check_mode': False, + 'response': { + 'private_zone': True, + 'vpc_id': 'vpc-1', + 'vpc_region': 'eu-central-1', + 'comment': 'foobar', + 'name': 'example.com.', + 'delegation_set_id': None, + 'zone_id': 'ZONE_ID', + }, + }, + { + 'check_mode': True, + 'response': { + 'private_zone': True, + 'vpc_id': 'vpc-1', + 'vpc_region': 'eu-central-1', + 'comment': 'foobar', + 'name': 'example.com.', + 'delegation_set_id': None, + 'zone_id': None, + }, + } + ]) + @patch.object(route53_zone, 'find_zones', return_value=[]) + def test_create_private_zone(self, find_zones_mock, time_mock, client_mock, check_mode, response): + client_mock.return_value.create_hosted_zone.return_value = { + 'HostedZone': { + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': { + 'Comment': 'foobar', + 'PrivateZone': True + }, + }, + } + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'comment': 'foobar', + 'vpc_id': 'vpc-1', + 'vpc_region': 'eu-central-1', + 'state': 'present', + '_ansible_check_mode': check_mode, + }) + route53_zone.main() + + if check_mode: + client_mock.return_value.create_hosted_zone.assert_not_called() + else: + client_mock.return_value.create_hosted_zone.assert_called_once_with(**{ + 'HostedZoneConfig': { + 'Comment': 'foobar', + 'PrivateZone': True, + }, + 'Name': 'example.com.', + 'CallerReference': 'example.com.-1', + 'VPC': { + 'VPCRegion': 'eu-central-1', + 'VPCId': 'vpc-1', + }, + }) + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + self.assertTrue(is_subdict(response, exec_info.exception.args[0])) + + @parameterized([ + { + 'check_mode': False, + 'response': { + 'private_zone': False, + 'vpc_id': None, + 'vpc_region': None, + 'comment': 'new', + 'name': 'example.com.', + 'delegation_set_id': '', + 'zone_id': 'ZONE_ID', + }, + }, + { + 'check_mode': True, + 'response': { + 'private_zone': False, + 'vpc_id': None, + 'vpc_region': None, + 'comment': 'new', + 'name': 'example.com.', + 'delegation_set_id': None, + 'zone_id': 'ZONE_ID', + }, + } + ]) + @patch.object(route53_zone, 'find_zones', return_value=[{ + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': '', 'PrivateZone': False}, + }]) + def test_update_comment_public_zone(self, find_zones_mock, time_mock, client_mock, check_mode, response): + client_mock.return_value.get_hosted_zone.return_value = { + 'HostedZone': { + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': '', 'PrivateZone': False}, + }, + } + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'comment': 'new', + 'state': 'present', + '_ansible_check_mode': check_mode, + }) + route53_zone.main() + + if check_mode: + client_mock.return_value.update_hosted_zone_comment.assert_not_called() + else: + client_mock.return_value.update_hosted_zone_comment.assert_called_once_with(**{ + 'Id': '/hostedzone/ZONE_ID', + 'Comment': 'new', + }) + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + self.assertTrue(is_subdict(response, exec_info.exception.args[0])) + + @patch.object(route53_zone, 'find_zones', return_value=[{ + 'Id': '/hostedzone/Z22OU4IUOVYM30', + 'Name': 'example.com.', + 'Config': {'Comment': '', 'PrivateZone': False}, + }]) + def test_update_public_zone_no_changes(self, find_zones_mock, time_mock, client_mock): + client_mock.return_value.get_hosted_zone.return_value = { + 'HostedZone': { + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': '', 'PrivateZone': False}, + }, + } + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'comment': '', + 'state': 'present', + }) + route53_zone.main() + + client_mock.return_value.update_hosted_zone_comment.assert_not_called() + self.assertEqual(exec_info.exception.args[0]['changed'], False) + + @parameterized([ + { + 'check_mode': False, + 'response': { + 'private_zone': True, + 'vpc_id': 'vpc-1', + 'vpc_region': 'eu-central-1', + 'comment': 'new', + 'name': 'example.com.', + 'delegation_set_id': None, + 'zone_id': 'ZONE_ID', + }, + }, + { + 'check_mode': True, + 'response': { + 'private_zone': True, + 'vpc_id': 'vpc-1', + 'vpc_region': 'eu-central-1', + 'comment': 'new', + 'name': 'example.com.', + 'delegation_set_id': None, + 'zone_id': 'ZONE_ID', + }, + } + ]) + @patch.object(route53_zone, 'find_zones', return_value=[{ + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': 'foobar', 'PrivateZone': True}, + }]) + def test_update_comment_private_zone(self, find_zones_mock, time_mock, client_mock, check_mode, response): + client_mock.return_value.get_hosted_zone.return_value = { + 'HostedZone': { + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': 'foobar', 'PrivateZone': True}, + }, + 'VPCs': [{'VPCRegion': 'eu-central-1', 'VPCId': 'vpc-1'}], + } + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'comment': 'new', + 'vpc_id': 'vpc-1', + 'vpc_region': 'eu-central-1', + 'state': 'present', + '_ansible_check_mode': check_mode, + }) + route53_zone.main() + + if check_mode: + client_mock.return_value.update_hosted_zone_comment.assert_not_called() + else: + client_mock.return_value.update_hosted_zone_comment.assert_called_once_with(**{ + 'Id': '/hostedzone/ZONE_ID', + 'Comment': 'new', + }) + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + self.assertTrue(is_subdict(response, exec_info.exception.args[0])) + + @parameterized([ + { + 'check_mode': False, + 'response': { + 'private_zone': True, + 'vpc_id': 'vpc-2', + 'vpc_region': 'us-east-2', + 'comment': 'foobar', + 'name': 'example.com.', + 'delegation_set_id': None, + 'zone_id': 'ZONE_ID_2', + }, + }, + { + 'check_mode': True, + 'response': { + 'private_zone': True, + 'vpc_id': 'vpc-2', + 'vpc_region': 'us-east-2', + 'comment': 'foobar', + 'name': 'example.com.', + 'delegation_set_id': None, + 'zone_id': None, + }, + } + ]) + @patch.object(route53_zone, 'find_zones', return_value=[{ + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': 'foobar', 'PrivateZone': True}, + }]) + def test_update_vpc_private_zone(self, find_zones_mock, time_mock, client_mock, check_mode, response): + client_mock.return_value.get_hosted_zone.return_value = { + 'HostedZone': { + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': 'foobar', 'PrivateZone': True}, + }, + 'VPCs': [{'VPCRegion': 'eu-central-1', 'VPCId': 'vpc-1'}], + } + client_mock.return_value.create_hosted_zone.return_value = { + 'HostedZone': { + 'Id': '/hostedzone/ZONE_ID_2', + 'Name': 'example.com.', + 'Config': { + 'Comment': 'foobar', + 'PrivateZone': True + }, + }, + } + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'us-east-2', + 'zone': 'example.com', + 'comment': 'foobar', + 'vpc_id': 'vpc-2', + 'vpc_region': 'us-east-2', + 'state': 'present', + '_ansible_check_mode': check_mode, + }) + route53_zone.main() + + if check_mode: + client_mock.return_value.create_hosted_zone.assert_not_called() + else: + client_mock.return_value.create_hosted_zone.assert_called_once_with(**{ + 'HostedZoneConfig': { + 'Comment': 'foobar', + 'PrivateZone': True, + }, + 'Name': 'example.com.', + 'CallerReference': 'example.com.-1', + 'VPC': { + 'VPCRegion': 'us-east-2', + 'VPCId': 'vpc-2', + }, + }) + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + self.assertTrue(is_subdict(response, exec_info.exception.args[0])) + + @patch.object(route53_zone, 'find_zones', return_value=[{ + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': 'foobar', 'PrivateZone': True}, + }]) + def test_update_private_zone_no_changes(self, find_zones_mock, time_mock, client_mock): + client_mock.return_value.get_hosted_zone.return_value = { + 'HostedZone': { + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': 'foobar', 'PrivateZone': True}, + }, + 'VPCs': [{'VPCRegion': 'eu-central-1', 'VPCId': 'vpc-1'}], + } + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'comment': 'foobar', + 'vpc_id': 'vpc-1', + 'vpc_region': 'eu-central-1', + 'state': 'present', + }) + route53_zone.main() + + client_mock.return_value.update_hosted_zone_comment.assert_not_called() + self.assertEqual(exec_info.exception.args[0]['changed'], False) + + response = { + 'private_zone': True, + 'vpc_id': 'vpc-1', + 'vpc_region': 'eu-central-1', + 'comment': 'foobar', + 'name': 'example.com.', + 'delegation_set_id': None, + 'zone_id': 'ZONE_ID', + } + self.assertTrue(is_subdict(response, exec_info.exception.args[0])) + + @parameterized([ + {'check_mode': False}, + {'check_mode': True} + ]) + @patch.object(route53_zone, 'find_zones', return_value=[{ + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': '', 'PrivateZone': False}, + }]) + def test_delete_public_zone(self, find_zones_mock, time_mock, client_mock, check_mode): + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'state': 'absent', + '_ansible_check_mode': check_mode, + }) + route53_zone.main() + + if check_mode: + client_mock.return_value.delete_hosted_zone.assert_not_called() + else: + client_mock.return_value.delete_hosted_zone.assert_called_once_with(**{ + 'Id': '/hostedzone/ZONE_ID', + }) + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + + @parameterized([ + {'check_mode': False}, + {'check_mode': True} + ]) + @patch.object(route53_zone, 'find_zones', return_value=[{ + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': 'foobar', 'PrivateZone': True}, + }]) + def test_delete_private_zone(self, find_zones_mock, time_mock, client_mock, check_mode): + client_mock.return_value.get_hosted_zone.return_value = { + 'HostedZone': { + 'Id': '/hostedzone/ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': 'foobar', 'PrivateZone': True}, + }, + 'VPCs': [{'VPCRegion': 'eu-central-1', 'VPCId': 'vpc-1'}], + } + + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'vpc_id': 'vpc-1', + 'vpc_region': 'eu-central-1', + 'state': 'absent', + '_ansible_check_mode': check_mode, + }) + route53_zone.main() + + if check_mode: + client_mock.return_value.delete_hosted_zone.assert_not_called() + else: + client_mock.return_value.delete_hosted_zone.assert_called_once_with(**{ + 'Id': '/hostedzone/ZONE_ID', + }) + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + + @parameterized([ + {'check_mode': False}, + {'check_mode': True} + ]) + @parameterized([ + { + 'hosted_zone_id': 'PRIVATE_ZONE_ID', + 'call_params': [call(**{ + 'Id': 'PRIVATE_ZONE_ID', + })], + }, { + 'hosted_zone_id': 'all', + 'call_params': [call(**{ + 'Id': '/hostedzone/PUBLIC_ZONE_ID', + }), call(**{ + 'Id': '/hostedzone/PRIVATE_ZONE_ID', + })], + } + ]) + @patch.object(route53_zone, 'find_zones', return_value=[{ + 'Id': '/hostedzone/PUBLIC_ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': '', 'PrivateZone': False}, + }, { + 'Id': '/hostedzone/PRIVATE_ZONE_ID', + 'Name': 'example.com.', + 'Config': {'Comment': 'foobar', 'PrivateZone': True}, + }]) + def test_delete_by_zone_id(self, find_zones_mock, time_mock, client_mock, hosted_zone_id, call_params, check_mode): + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'hosted_zone_id': hosted_zone_id, + 'state': 'absent', + '_ansible_check_mode': check_mode, + }) + route53_zone.main() + + if check_mode: + client_mock.return_value.delete_hosted_zone.assert_not_called() + else: + client_mock.return_value.delete_hosted_zone.assert_has_calls(call_params) + + self.assertEqual(exec_info.exception.args[0]['changed'], True) + + @patch.object(route53_zone, 'find_zones', return_value=[]) + def test_delete_absent_zone(self, find_zones_mock, time_mock, client_mock): + with self.assertRaises(AnsibleExitJson) as exec_info: + set_module_args({ + 'secret_key': 'SECRET_KEY', + 'access_key': 'ACCESS_KEY', + 'region': 'eu-central-1', + 'zone': 'example.com', + 'state': 'absent', + }) + route53_zone.main() + + client_mock.return_value.delete_hosted_zone.assert_not_called() + self.assertEqual(exec_info.exception.args[0]['changed'], False) + + +if __name__ == '__main__': + unittest.main() diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_s3_bucket_notification.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_s3_bucket_notification.py new file mode 100644 index 00000000..2a90cf2d --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/test_s3_bucket_notification.py @@ -0,0 +1,262 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest + +from ansible_collections.community.aws.tests.unit.compat.mock import MagicMock, patch +from ansible_collections.community.aws.tests.unit.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args + +from ansible_collections.community.aws.plugins.modules.s3_bucket_notification import AmazonBucket, Config +from ansible_collections.community.aws.plugins.modules import s3_bucket_notification +try: + from botocore.exceptions import ClientError +except ImportError: + pass + + +class TestAmazonBucketOperations: + def test_current_config(self): + api_config = { + 'Id': 'test-id', + 'LambdaFunctionArn': 'test-arn', + 'Events': [], + 'Filter': { + 'Key': { + 'FilterRules': [{ + 'Name': 'Prefix', + 'Value': '' + }, { + 'Name': 'Suffix', + 'Value': '' + }] + } + } + } + client = MagicMock() + client.get_bucket_notification_configuration.return_value = { + 'LambdaFunctionConfigurations': [api_config] + } + bucket = AmazonBucket(client, 'test-bucket') + current = bucket.current_config('test-id') + assert current.raw == api_config + assert client.get_bucket_notification_configuration.call_count == 1 + + def test_current_config_empty(self): + client = MagicMock() + client.get_bucket_notification_configuration.return_value = { + 'LambdaFunctionConfigurations': [] + } + bucket = AmazonBucket(client, 'test-bucket') + current = bucket.current_config('test-id') + assert current is None + assert client.get_bucket_notification_configuration.call_count == 1 + + def test_apply_invalid_config(self): + client = MagicMock() + client.get_bucket_notification_configuration.return_value = { + 'LambdaFunctionConfigurations': [] + } + client.put_bucket_notification_configuration.side_effect = ClientError({}, '') + bucket = AmazonBucket(client, 'test-bucket') + config = Config.from_params(**{ + 'event_name': 'test_event', + 'lambda_function_arn': 'lambda_arn', + 'lambda_version': 1, + 'events': ['s3:ObjectRemoved:*', 's3:ObjectCreated:*'], + 'prefix': '', + 'suffix': '' + }) + with pytest.raises(ClientError): + bucket.apply_config(config) + + def test_apply_config(self): + client = MagicMock() + client.get_bucket_notification_configuration.return_value = { + 'LambdaFunctionConfigurations': [] + } + + bucket = AmazonBucket(client, 'test-bucket') + config = Config.from_params(**{ + 'event_name': 'test_event', + 'lambda_function_arn': 'lambda_arn', + 'lambda_version': 1, + 'events': ['s3:ObjectRemoved:*', 's3:ObjectCreated:*'], + 'prefix': '', + 'suffix': '' + }) + bucket.apply_config(config) + assert client.get_bucket_notification_configuration.call_count == 1 + assert client.put_bucket_notification_configuration.call_count == 1 + + def test_apply_config_add_event(self): + api_config = { + 'Id': 'test-id', + 'LambdaFunctionArn': 'test-arn', + 'Events': ['s3:ObjectRemoved:*'], + 'Filter': { + 'Key': { + 'FilterRules': [{ + 'Name': 'Prefix', + 'Value': '' + }, { + 'Name': 'Suffix', + 'Value': '' + }] + } + } + } + client = MagicMock() + client.get_bucket_notification_configuration.return_value = { + 'LambdaFunctionConfigurations': [api_config] + } + + bucket = AmazonBucket(client, 'test-bucket') + config = Config.from_params(**{ + 'event_name': 'test-id', + 'lambda_function_arn': 'test-arn', + 'lambda_version': 1, + 'events': ['s3:ObjectRemoved:*', 's3:ObjectCreated:*'], + 'prefix': '', + 'suffix': '' + }) + bucket.apply_config(config) + assert client.get_bucket_notification_configuration.call_count == 1 + assert client.put_bucket_notification_configuration.call_count == 1 + client.put_bucket_notification_configuration.assert_called_with( + Bucket='test-bucket', + NotificationConfiguration={ + 'LambdaFunctionConfigurations': [{ + 'Id': 'test-id', + 'LambdaFunctionArn': 'test-arn:1', + 'Events': ['s3:ObjectCreated:*', 's3:ObjectRemoved:*'], + 'Filter': { + 'Key': { + 'FilterRules': [{ + 'Name': 'Prefix', + 'Value': '' + }, { + 'Name': 'Suffix', + 'Value': '' + }] + } + } + }] + } + ) + + def test_delete_config(self): + api_config = { + 'Id': 'test-id', + 'LambdaFunctionArn': 'test-arn', + 'Events': [], + 'Filter': { + 'Key': { + 'FilterRules': [{ + 'Name': 'Prefix', + 'Value': '' + }, { + 'Name': 'Suffix', + 'Value': '' + }] + } + } + } + client = MagicMock() + client.get_bucket_notification_configuration.return_value = { + 'LambdaFunctionConfigurations': [api_config] + } + bucket = AmazonBucket(client, 'test-bucket') + config = Config.from_params(**{ + 'event_name': 'test-id', + 'lambda_function_arn': 'lambda_arn', + 'lambda_version': 1, + 'events': [], + 'prefix': '', + 'suffix': '' + }) + bucket.delete_config(config) + assert client.get_bucket_notification_configuration.call_count == 1 + assert client.put_bucket_notification_configuration.call_count == 1 + client.put_bucket_notification_configuration.assert_called_with( + Bucket='test-bucket', + NotificationConfiguration={'LambdaFunctionConfigurations': []} + ) + + +class TestConfig: + def test_config_from_params(self): + config = Config({ + 'Id': 'test-id', + 'LambdaFunctionArn': 'test-arn:10', + 'Events': [], + 'Filter': { + 'Key': { + 'FilterRules': [{ + 'Name': 'Prefix', + 'Value': '' + }, { + 'Name': 'Suffix', + 'Value': '' + }] + } + } + }) + config_from_params = Config.from_params(**{ + 'event_name': 'test-id', + 'lambda_function_arn': 'test-arn', + 'lambda_version': 10, + 'events': [], + 'prefix': '', + 'suffix': '' + }) + assert config.raw == config_from_params.raw + assert config == config_from_params + + +class TestModule(ModuleTestCase): + def test_module_fail_when_required_args_missing(self): + with pytest.raises(AnsibleFailJson): + set_module_args({}) + s3_bucket_notification.main() + + @patch('ansible_collections.community.aws.plugins.modules.s3_bucket_notification.AnsibleAWSModule.client') + def test_add_s3_bucket_notification(self, aws_client): + aws_client.return_value.get_bucket_notification_configuration.return_value = { + 'LambdaFunctionConfigurations': [] + } + set_module_args({ + 'region': 'us-east-2', + 'lambda_function_arn': 'test-lambda-arn', + 'bucket_name': 'test-lambda', + 'event_name': 'test-id', + 'events': ['s3:ObjectCreated:*', 's3:ObjectRemoved:*'], + 'state': 'present', + 'prefix': '/images', + 'suffix': '.jpg' + }) + with pytest.raises(AnsibleExitJson) as context: + s3_bucket_notification.main() + result = context.value.args[0] + assert result['changed'] is True + assert aws_client.return_value.get_bucket_notification_configuration.call_count == 1 + aws_client.return_value.put_bucket_notification_configuration.assert_called_with( + Bucket='test-lambda', + NotificationConfiguration={ + 'LambdaFunctionConfigurations': [{ + 'Id': 'test-id', + 'LambdaFunctionArn': 'test-lambda-arn', + 'Events': ['s3:ObjectCreated:*', 's3:ObjectRemoved:*'], + 'Filter': { + 'Key': { + 'FilterRules': [{ + 'Name': 'Prefix', + 'Value': '/images' + }, { + 'Name': 'Suffix', + 'Value': '.jpg' + }] + } + } + }] + }) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/utils.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/utils.py new file mode 100644 index 00000000..026bf254 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/modules/utils.py @@ -0,0 +1,52 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + +from ansible_collections.community.aws.tests.unit.compat import unittest +from ansible_collections.community.aws.tests.unit.compat.mock import patch +from ansible.module_utils import basic +from ansible.module_utils._text import to_bytes + + +def set_module_args(args): + if '_ansible_remote_tmp' not in args: + args['_ansible_remote_tmp'] = '/tmp' + if '_ansible_keep_remote_files' not in args: + args['_ansible_keep_remote_files'] = False + + args = json.dumps({'ANSIBLE_MODULE_ARGS': args}) + basic._ANSIBLE_ARGS = to_bytes(args) + + +class AnsibleExitJson(Exception): + pass + + +class AnsibleFailJson(Exception): + pass + + +def exit_json(*args, **kwargs): + if 'changed' not in kwargs: + kwargs['changed'] = False + raise AnsibleExitJson(kwargs) + + +def fail_json(*args, **kwargs): + kwargs['failed'] = True + raise AnsibleFailJson(kwargs) + + +class ModuleTestCase(unittest.TestCase): + + def setUp(self): + self.mock_module = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) + self.mock_module.start() + self.mock_sleep = patch('time.sleep') + self.mock_sleep.start() + set_module_args({}) + self.addCleanup(self.mock_module.stop) + self.addCleanup(self.mock_sleep.stop) diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/plugins/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/plugins/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/plugins/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/plugins/connection/__init__.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/plugins/connection/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/plugins/connection/__init__.py diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/plugins/connection/test_aws_ssm.py b/collections-debian-merged/ansible_collections/community/aws/tests/unit/plugins/connection/test_aws_ssm.py new file mode 100644 index 00000000..27c4ddbe --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/plugins/connection/test_aws_ssm.py @@ -0,0 +1,194 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from io import StringIO +import pytest +import sys +from ansible import constants as C +from ansible.compat.selectors import SelectorKey, EVENT_READ +from ansible_collections.community.aws.tests.unit.compat import unittest +from ansible_collections.community.aws.tests.unit.compat.mock import patch, MagicMock, PropertyMock +from ansible.errors import AnsibleError, AnsibleConnectionFailure, AnsibleFileNotFound +from ansible.module_utils.six.moves import shlex_quote +from ansible.module_utils._text import to_bytes +from ansible.playbook.play_context import PlayContext +from ansible_collections.community.aws.plugins.connection import aws_ssm +from ansible.plugins.loader import connection_loader + + +@pytest.mark.skipif(sys.version_info < (2, 7), reason="requires Python 2.7 or higher") +class TestConnectionBaseClass(unittest.TestCase): + + @patch('os.path.exists') + @patch('subprocess.Popen') + @patch('select.poll') + @patch('boto3.client') + def test_plugins_connection_aws_ssm_start_session(self, boto_client, s_poll, s_popen, mock_ospe): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + conn.get_option = MagicMock() + conn.get_option.side_effect = ['i1234', 'executable', 'abcd', 'i1234'] + conn.host = 'abc' + mock_ospe.return_value = True + boto3 = MagicMock() + boto3.client('ssm').return_value = MagicMock() + conn.start_session = MagicMock() + conn._session_id = MagicMock() + conn._session_id.return_value = 's1' + s_popen.return_value.stdin.write = MagicMock() + s_poll.return_value = MagicMock() + s_poll.return_value.register = MagicMock() + s_popen.return_value.poll = MagicMock() + s_popen.return_value.poll.return_value = None + conn._stdin_readline = MagicMock() + conn._stdin_readline.return_value = 'abc123' + conn.SESSION_START = 'abc' + conn.start_session() + + @patch('random.choice') + def test_plugins_connection_aws_ssm_exec_command(self, r_choice): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + r_choice.side_effect = ['a', 'a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'b'] + conn.MARK_LENGTH = 5 + conn._session = MagicMock() + conn._session.stdin.write = MagicMock() + conn._wrap_command = MagicMock() + conn._wrap_command.return_value = 'cmd1' + conn._flush_stderr = MagicMock() + conn._windows = MagicMock() + conn._windows.return_value = True + sudoable = True + conn._session.poll = MagicMock() + conn._session.poll.return_value = None + remaining = 0 + conn._timeout = MagicMock() + conn._poll_stdout = MagicMock() + conn._poll_stdout.poll = MagicMock() + conn._poll_stdout.poll.return_value = True + conn._session.stdout = MagicMock() + conn._session.stdout.readline = MagicMock() + begin = True + mark_end = 'a' + line = ['a', 'b'] + conn._post_process = MagicMock() + conn._post_process.return_value = 'test' + conn._session.stdout.readline.side_effect = iter(['aaaaa\n', 'Hi\n', '0\n', 'bbbbb\n']) + conn.get_option = MagicMock() + conn.get_option.return_value = 1 + cmd = MagicMock() + returncode = 'a' + stdout = 'b' + return (returncode, stdout, conn._flush_stderr) + + def test_plugins_connection_aws_ssm_prepare_terminal(self): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + conn.is_windows = MagicMock() + conn.is_windows.return_value = True + + def test_plugins_connection_aws_ssm_wrap_command(self): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + conn.is_windows = MagicMock() + conn.is_windows.return_value = True + return('windows1') + + def test_plugins_connection_aws_ssm_post_process(self): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + conn.is_windows = MagicMock() + conn.is_windows.return_value = True + success = 3 + fail = 2 + conn.stdout = MagicMock() + returncode = 0 + return(returncode, conn.stdout) + + @patch('subprocess.Popen') + def test_plugins_connection_aws_ssm_flush_stderr(self, s_popen): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + conn.poll_stderr = MagicMock() + conn.poll_stderr.register = MagicMock() + conn.stderr = None + s_popen.poll().return_value = 123 + return(conn.stderr) + + @patch('boto3.client') + def test_plugins_connection_aws_ssm_get_url(self, boto): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + boto3 = MagicMock() + boto3.client('s3').return_value = MagicMock() + boto3.generate_presigned_url.return_value = MagicMock() + return (boto3.generate_presigned_url.return_value) + + @patch('os.path.exists') + def test_plugins_connection_aws_ssm_put_file(self, mock_ospe): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + conn._connect = MagicMock() + conn._file_transport_command = MagicMock() + conn._file_transport_command.return_value = (0, 'stdout', 'stderr') + res, stdout, stderr = conn.put_file('/in/file', '/out/file') + + def test_plugins_connection_aws_ssm_fetch_file(self): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + conn._connect = MagicMock() + conn._file_transport_command = MagicMock() + conn._file_transport_command.return_value = (0, 'stdout', 'stderr') + res, stdout, stderr = conn.fetch_file('/in/file', '/out/file') + + @patch('subprocess.check_output') + @patch('boto3.client') + def test_plugins_connection_file_transport_command(self, boto_client, s_check_output): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + conn.get_option = MagicMock() + conn.get_option.side_effect = ['1', '2', '3', '4', '5'] + conn._get_url = MagicMock() + conn._get_url.side_effect = ['url1', 'url2'] + boto3 = MagicMock() + boto3.client('s3').return_value = MagicMock() + conn.get_option.return_value = 1 + ssm_action = 'get' + get_command = MagicMock() + put_command = MagicMock() + conn.exec_command = MagicMock() + conn.exec_command.return_value = (put_command, None, False) + conn.download_fileobj = MagicMock() + (returncode, stdout, stderr) = conn.exec_command(put_command, in_data=None, sudoable=False) + returncode = 0 + (returncode, stdout, stderr) = conn.exec_command(get_command, in_data=None, sudoable=False) + + @patch('subprocess.check_output') + def test_plugins_connection_aws_ssm_close(self, s_check_output): + pc = PlayContext() + new_stdin = StringIO() + conn = connection_loader.get('community.aws.aws_ssm', pc, new_stdin) + conn.instance_id = "i-12345" + conn._session_id = True + conn.get_option = MagicMock() + conn.get_option.side_effect = ["/abc", "pqr"] + conn._session = MagicMock() + conn._session.terminate = MagicMock() + conn._session.communicate = MagicMock() + conn._terminate_session = MagicMock() + conn._terminate_session.return_value = '' + conn._session_id = MagicMock() + conn._session_id.return_value = 'a' + conn._client = MagicMock() + conn.close() diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/unit/requirements.txt b/collections-debian-merged/ansible_collections/community/aws/tests/unit/requirements.txt new file mode 100644 index 00000000..917ee278 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/unit/requirements.txt @@ -0,0 +1,2 @@ +boto3 +placebo diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/aws.sh b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/aws.sh new file mode 100755 index 00000000..d76c3228 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/aws.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -o pipefail -eux + +declare -a args +IFS='/:' read -ra args <<< "$1" + +cloud="${args[0]}" +python="${args[1]}" +group="${args[2]}" + +target="shippable/${cloud}/group${group}/" + +stage="${S:-prod}" + +# shellcheck disable=SC2086 +ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \ + --remote-terminate always --remote-stage "${stage}" \ + --docker --python "${python}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/check_matrix.py b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/check_matrix.py new file mode 100755 index 00000000..2a9aa674 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/check_matrix.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python +"""Verify the currently executing Shippable test matrix matches the one defined in the "shippable.yml" file.""" +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import datetime +import json +import os +import re +import sys +import time + +try: + from typing import NoReturn +except ImportError: + NoReturn = None + +try: + # noinspection PyCompatibility + from urllib2 import urlopen # pylint: disable=ansible-bad-import-from +except ImportError: + # noinspection PyCompatibility + from urllib.request import urlopen + + +def main(): # type: () -> None + """Main entry point.""" + repo_full_name = os.environ['REPO_FULL_NAME'] + required_repo_full_name = 'ansible-collections/community.aws' + + if repo_full_name != required_repo_full_name: + sys.stderr.write('Skipping matrix check on repo "%s" which is not "%s".\n' % (repo_full_name, required_repo_full_name)) + return + + with open('shippable.yml', 'rb') as yaml_file: + yaml = yaml_file.read().decode('utf-8').splitlines() + + defined_matrix = [match.group(1) for match in [re.search(r'^ *- env: T=(.*)$', line) for line in yaml] if match and match.group(1) != 'none'] + + if not defined_matrix: + fail('No matrix entries found in the "shippable.yml" file.', + 'Did you modify the "shippable.yml" file?') + + run_id = os.environ['SHIPPABLE_BUILD_ID'] + sleep = 1 + jobs = [] + + for attempts_remaining in range(4, -1, -1): + try: + jobs = json.loads(urlopen('https://api.shippable.com/jobs?runIds=%s' % run_id).read()) + + if not isinstance(jobs, list): + raise Exception('Shippable run %s data is not a list.' % run_id) + + break + except Exception as ex: + if not attempts_remaining: + fail('Unable to retrieve Shippable run %s matrix.' % run_id, + str(ex)) + + sys.stderr.write('Unable to retrieve Shippable run %s matrix: %s\n' % (run_id, ex)) + sys.stderr.write('Trying again in %d seconds...\n' % sleep) + time.sleep(sleep) + sleep *= 2 + + if len(jobs) != len(defined_matrix): + if len(jobs) == 1: + hint = '\n\nMake sure you do not use the "Rebuild with SSH" option.' + else: + hint = '' + + fail('Shippable run %s has %d jobs instead of the expected %d jobs.' % (run_id, len(jobs), len(defined_matrix)), + 'Try re-running the entire matrix.%s' % hint) + + actual_matrix = dict((job.get('jobNumber'), dict(tuple(line.split('=', 1)) for line in job.get('env', [])).get('T', '')) for job in jobs) + errors = [(job_number, test, actual_matrix.get(job_number)) for job_number, test in enumerate(defined_matrix, 1) if actual_matrix.get(job_number) != test] + + if len(errors): + error_summary = '\n'.join('Job %s expected "%s" but found "%s" instead.' % (job_number, expected, actual) for job_number, expected, actual in errors) + + fail('Shippable run %s has a job matrix mismatch.' % run_id, + 'Try re-running the entire matrix.\n\n%s' % error_summary) + + +def fail(message, output): # type: (str, str) -> NoReturn + # Include a leading newline to improve readability on Shippable "Tests" tab. + # Without this, the first line becomes indented. + output = '\n' + output.strip() + + timestamp = datetime.datetime.utcnow().replace(microsecond=0).isoformat() + + # hack to avoid requiring junit-xml, which isn't pre-installed on Shippable outside our test containers + xml = ''' +<?xml version="1.0" encoding="utf-8"?> +<testsuites disabled="0" errors="1" failures="0" tests="1" time="0.0"> +\t<testsuite disabled="0" errors="1" failures="0" file="None" log="None" name="ansible-test" skipped="0" tests="1" time="0" timestamp="%s" url="None"> +\t\t<testcase classname="timeout" name="timeout"> +\t\t\t<error message="%s" type="error">%s</error> +\t\t</testcase> +\t</testsuite> +</testsuites> +''' % (timestamp, message, output) + + path = 'shippable/testresults/check-matrix.xml' + dir_path = os.path.dirname(path) + + if not os.path.exists(dir_path): + os.makedirs(dir_path) + + with open(path, 'w') as junit_fd: + junit_fd.write(xml.lstrip()) + + sys.stderr.write(message + '\n') + sys.stderr.write(output + '\n') + + sys.exit(1) + + +if __name__ == '__main__': + main() diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/sanity.sh b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/sanity.sh new file mode 100755 index 00000000..dd1e68b9 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/sanity.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -o pipefail -eux + +if [ "${BASE_BRANCH:-}" ]; then + base_branch="origin/${BASE_BRANCH}" +else + base_branch="" +fi + +# shellcheck disable=SC2086 +ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \ + --docker --base-branch "${base_branch}" \ + --allow-disabled diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/shippable.sh b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/shippable.sh new file mode 100755 index 00000000..cdee6ed3 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/shippable.sh @@ -0,0 +1,175 @@ +#!/usr/bin/env bash + +set -o pipefail -eux + +declare -a args +IFS='/:' read -ra args <<< "$1" + +script="${args[0]}" + +test="$1" + +docker images ansible/ansible +docker images quay.io/ansible/* +docker ps + +for container in $(docker ps --format '{{.Image}} {{.ID}}' | grep -v '^drydock/' | sed 's/^.* //'); do + docker rm -f "${container}" || true # ignore errors +done + +docker ps + +if [ -d /home/shippable/cache/ ]; then + ls -la /home/shippable/cache/ +fi + +command -v python +python -V + +command -v pip +pip --version +pip list --disable-pip-version-check + +export PATH="${PWD}/bin:${PATH}" +export PYTHONIOENCODING='utf-8' + +if [ "${JOB_TRIGGERED_BY_NAME:-}" == "nightly-trigger" ]; then + COVERAGE=yes + COMPLETE=yes +fi + +if [ -n "${COVERAGE:-}" ]; then + # on-demand coverage reporting triggered by setting the COVERAGE environment variable to a non-empty value + export COVERAGE="--coverage" +elif [[ "${COMMIT_MESSAGE}" =~ ci_coverage ]]; then + # on-demand coverage reporting triggered by having 'ci_coverage' in the latest commit message + export COVERAGE="--coverage" +else + # on-demand coverage reporting disabled (default behavior, always-on coverage reporting remains enabled) + export COVERAGE="--coverage-check" +fi + +if [ -n "${COMPLETE:-}" ]; then + # disable change detection triggered by setting the COMPLETE environment variable to a non-empty value + export CHANGED="" +elif [[ "${COMMIT_MESSAGE}" =~ ci_complete ]]; then + # disable change detection triggered by having 'ci_complete' in the latest commit message + export CHANGED="" +else + # enable change detection (default behavior) + export CHANGED="--changed" +fi + +if [ "${IS_PULL_REQUEST:-}" == "true" ]; then + # run unstable tests which are targeted by focused changes on PRs + export UNSTABLE="--allow-unstable-changed" +else + # do not run unstable tests outside PRs + export UNSTABLE="" +fi + +virtualenv --python /usr/bin/python3.7 ~/ansible-venv +set +ux +. ~/ansible-venv/bin/activate +set -ux + +pip install setuptools==44.1.0 + +pip install https://github.com/ansible/ansible/archive/"${A_REV:-devel}".tar.gz --disable-pip-version-check + +#ansible-galaxy collection install community.general +mkdir -p "${HOME}/.ansible/collections/ansible_collections/community" +mkdir -p "${HOME}/.ansible/collections/ansible_collections/google" +mkdir -p "${HOME}/.ansible/collections/ansible_collections/openstack" +cwd=$(pwd) +cd "${HOME}/.ansible/collections/ansible_collections/" +git clone https://github.com/ansible-collections/community.general community/general +# community.general requires a lot of things we need to manual pull in +# once community.general is published this will be handled by galaxy cli +git clone https://github.com/ansible-collections/ansible_collections_google google/cloud +git clone https://opendev.org/openstack/ansible-collections-openstack openstack/cloud +git clone https://github.com/ansible-collections/amazon.aws amazon/aws +ansible-galaxy collection install ansible.netcommon +ansible-galaxy collection install community.crypto +cd "${cwd}" + +export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible/" +SHIPPABLE_RESULT_DIR="$(pwd)/shippable" +TEST_DIR="${HOME}/.ansible/collections/ansible_collections/community/aws/" +mkdir -p "${TEST_DIR}" +cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}" +cd "${TEST_DIR}" + +function cleanup +{ + if [ -d tests/output/coverage/ ]; then + if find tests/output/coverage/ -mindepth 1 -name '.*' -prune -o -print -quit | grep -q .; then + # for complete on-demand coverage generate a report for all files with no coverage on the "other" job so we only have one copy + if [ "${COVERAGE}" == "--coverage" ] && [ "${CHANGED}" == "" ] && [ "${test}" == "sanity/1" ]; then + stub="--stub" + else + stub="" + fi + + # shellcheck disable=SC2086 + ansible-test coverage xml --color --requirements --group-by command --group-by version ${stub:+"$stub"} + cp -a tests/output/reports/coverage=*.xml "$SHIPPABLE_RESULT_DIR/codecoverage/" + + # analyze and capture code coverage aggregated by integration test target if not on 2.9, defaults to devel if unset + if [ -z "${A_REV:-}" ] || [ "${A_REV:-}" != "stable-2.9" ]; then + ansible-test coverage analyze targets generate -v "$SHIPPABLE_RESULT_DIR/testresults/coverage-analyze-targets.json" + fi + + + # upload coverage report to codecov.io only when using complete on-demand coverage + if [ "${COVERAGE}" == "--coverage" ] && [ "${CHANGED}" == "" ]; then + for file in tests/output/reports/coverage=*.xml; do + flags="${file##*/coverage=}" + flags="${flags%-powershell.xml}" + flags="${flags%.xml}" + # remove numbered component from stub files when converting to tags + flags="${flags//stub-[0-9]*/stub}" + flags="${flags//=/,}" + flags="${flags//[^a-zA-Z0-9_,]/_}" + + bash <(curl -s https://codecov.io/bash) \ + -f "${file}" \ + -F "${flags}" \ + -n "${test}" \ + -t 8a86e979-f37b-4d5d-95a4-960c280d5eaa \ + -X coveragepy \ + -X gcov \ + -X fix \ + -X search \ + -X xcode \ + || echo "Failed to upload code coverage report to codecov.io: ${file}" + done + fi + fi + fi + + if [ -d tests/output/junit/ ]; then + cp -aT tests/output/junit/ "$SHIPPABLE_RESULT_DIR/testresults/" + fi + + if [ -d tests/output/data/ ]; then + cp -a tests/output/data/ "$SHIPPABLE_RESULT_DIR/testresults/" + fi + + if [ -d tests/output/bot/ ]; then + cp -aT tests/output/bot/ "$SHIPPABLE_RESULT_DIR/testresults/" + fi +} + +trap cleanup EXIT + +if [[ "${COVERAGE:-}" == "--coverage" ]]; then + timeout=60 +else + timeout=45 +fi + +ansible-test env --dump --show --timeout "${timeout}" --color -v + +"tests/utils/shippable/check_matrix.py" +"tests/utils/shippable/${script}.sh" "${test}" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/timing.py b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/timing.py new file mode 100755 index 00000000..fb538271 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/timing.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3.7 +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import sys +import time + +start = time.time() + +sys.stdin.reconfigure(errors='surrogateescape') +sys.stdout.reconfigure(errors='surrogateescape') + +for line in sys.stdin: + seconds = time.time() - start + sys.stdout.write('%02d:%02d %s' % (seconds // 60, seconds % 60, line)) + sys.stdout.flush() diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/timing.sh b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/timing.sh new file mode 100755 index 00000000..77e25783 --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/timing.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -o pipefail -eu + +"$@" 2>&1 | "$(dirname "$0")/timing.py" diff --git a/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/units.sh b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/units.sh new file mode 100755 index 00000000..dc115dec --- /dev/null +++ b/collections-debian-merged/ansible_collections/community/aws/tests/utils/shippable/units.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -o pipefail -eux + +declare -a args +IFS='/:' read -ra args <<< "$1" + +version="${args[1]}" + +# shellcheck disable=SC2086 +ansible-test units --color -v --docker default --python "${version}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \ |