Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_ssm: ability to customize s3 endpoint for vpc interface endpoint #1619

Conversation

lubbyhst
Copy link
Contributor

@lubbyhst lubbyhst commented Dec 13, 2022

Depends-On: ansible/ansible-zuul-jobs#1743

SUMMARY

Add a new variable for setting the s3 endpoint url

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

connection aws_ssm.py

ADDITIONAL INFORMATION

If you try to running SSM commands on EC2 instances in private networks only with vpc interface endpoints. You are not able to access S3 service because the generated URL is wrong. For now this plugin only works for s3 vpc gateway endpoints. Not for s3 vpc interface endpoints.

To simply fix this. We need the possibility to set the interface endpoint url. So I added a new parameter to the connection plugin.

How to test
- name: test ssm on an EC2 instance
  hosts: router
  vars:
    ansible_python_interpreter: /usr/bin/python3
    ansible_connection: aws_ssm
    ansible_aws_ssm_region: 'eu-west-1'
    ansible_aws_ssm_bucket_name: testbucket
    ansible_aws_ssm_bucket_endpoint_url: "https://vpce-00000000000000-10ygvtbr.s3.eu-west-1.vpce.amazonaws.com"
  tasks:
    - name: list files in opt folder
      shell: echo "running on $(curl -s http://169.254.169.254/latest/meta-data/instance-id)"
Output before change
XEC curl 'https://testbucket.s3.amazonaws.com/i-0b5e11951ab6b12cd//home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAZEY6F5MCGGCDZQGI%2F20210109%2F**eu-central-1**%2Fs3%2Faws4_request&X-Amz-Date=20210109T102300Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEKr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJIMEYCIQDRoCbT6dS9geijC00Xhr4nKdDrfKSE0ULsEXNgjM3vUwIhAMoAiDJJSGehMKvcmUlZDHc17WcV3Wnw4lsCED4MH%2BkMKroDCHMQABoMNjI4NzM5MTQwMzU2IgylHaq9VXBqdPex8fsqlwMzbTC5nczwsbUzXkpdw1MWndywQnjxp%2BnZoYcHMba6TGM57osVwt6hQoYxKA04co63FOr%2FtvhmmLGdphxeEGBPRjyTCNB%2Bdtr%2BwfKmjyls7WmBQF4jRMm2xPMUSd3EBnitCOpRvHPtp4xsuIX59QKCZmUNKBYIn2USx18mcSrWpI1emQGkmgewn9EOxUT168X9unNnvmUerokKgD5f1dZvpnIEmUyPYhYFCkJAdmLa5E5CIWe4UFfULLwDwTqYe6akqSAhBUeMrzWvebp7oXkER%2BymsmdGdAl4nFKNDtJ5suSkcGooliKsFhrHKEb1gN4UH%2FldPSFZqCEOayiWByk6SK7yEkhqI7wbc5Ufwv68AimpRddA5dU95kXUL3tgBYq5QcSeXStdd%2B6nQ3vRDBJx%2BETvR2dGOeZv%2Bu6p1iLaT5wnMgMcSnPQWCTja%2Bnf7Lp%2Bkmd4pR9yfTYaPa%2FVdblsVAXtfDURQ7wHwV6DJJavt26oUXNOOjEXg4FDraLzGSNWGFjMkbxLSBFNEyKBB9g3Hk8hV4YOwjC4%2BeX%2FBTrqAfEXoF92NloBKePOvKXzFcp8YT8yC0p35rXYqa0GA5d9ZNaGewFw6ks9VMUTSht3SZ2ns2qCYF6p73ISe88pgrUWGwFaxZnbNxP1dvfpNH3X9zQ9oVyjKfD9dwPfnOYpx6j48dZZhdgZ6n2H13h3Ckf7hmebHo7po%2BWrXkc8K1Bo07YSFyFMffieXBk0NvrBPGNGtKTEJ3m%2FfF4vkM4lnEN2xWaS0umgwMQrCqfhKD3Gpf%2BdglVJ2oBRHb3ho7dfie48ohpAd%2B6j752PjR2SuaA3Gokns8scHLBB7dvkGlmqb3vrX8TYsc7CZg%3D%3D&X-Amz-Signature=a992947e6682f66239d42c08a6b8ba2da136a572bc15a2184763846fd5a39504' -o '/home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py'
Output after change
XEC curl 'https://testbucket.vpce-00000000000000-10ygvtbr.s3.eu-west-1.vpce.amazonaws.com/i-0b5e11951ab6b12cd//home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAZEY6F5MCGGCDZQGI%2F20210109%2F**eu-central-1**%2Fs3%2Faws4_request&X-Amz-Date=20210109T102300Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEKr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJIMEYCIQDRoCbT6dS9geijC00Xhr4nKdDrfKSE0ULsEXNgjM3vUwIhAMoAiDJJSGehMKvcmUlZDHc17WcV3Wnw4lsCED4MH%2BkMKroDCHMQABoMNjI4NzM5MTQwMzU2IgylHaq9VXBqdPex8fsqlwMzbTC5nczwsbUzXkpdw1MWndywQnjxp%2BnZoYcHMba6TGM57osVwt6hQoYxKA04co63FOr%2FtvhmmLGdphxeEGBPRjyTCNB%2Bdtr%2BwfKmjyls7WmBQF4jRMm2xPMUSd3EBnitCOpRvHPtp4xsuIX59QKCZmUNKBYIn2USx18mcSrWpI1emQGkmgewn9EOxUT168X9unNnvmUerokKgD5f1dZvpnIEmUyPYhYFCkJAdmLa5E5CIWe4UFfULLwDwTqYe6akqSAhBUeMrzWvebp7oXkER%2BymsmdGdAl4nFKNDtJ5suSkcGooliKsFhrHKEb1gN4UH%2FldPSFZqCEOayiWByk6SK7yEkhqI7wbc5Ufwv68AimpRddA5dU95kXUL3tgBYq5QcSeXStdd%2B6nQ3vRDBJx%2BETvR2dGOeZv%2Bu6p1iLaT5wnMgMcSnPQWCTja%2Bnf7Lp%2Bkmd4pR9yfTYaPa%2FVdblsVAXtfDURQ7wHwV6DJJavt26oUXNOOjEXg4FDraLzGSNWGFjMkbxLSBFNEyKBB9g3Hk8hV4YOwjC4%2BeX%2FBTrqAfEXoF92NloBKePOvKXzFcp8YT8yC0p35rXYqa0GA5d9ZNaGewFw6ks9VMUTSht3SZ2ns2qCYF6p73ISe88pgrUWGwFaxZnbNxP1dvfpNH3X9zQ9oVyjKfD9dwPfnOYpx6j48dZZhdgZ6n2H13h3Ckf7hmebHo7po%2BWrXkc8K1Bo07YSFyFMffieXBk0NvrBPGNGtKTEJ3m%2FfF4vkM4lnEN2xWaS0umgwMQrCqfhKD3Gpf%2BdglVJ2oBRHb3ho7dfie48ohpAd%2B6j752PjR2SuaA3Gokns8scHLBB7dvkGlmqb3vrX8TYsc7CZg%3D%3D&X-Amz-Signature=a992947e6682f66239d42c08a6b8ba2da136a572bc15a2184763846fd5a39504' -o '/home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py'

@github-actions
Copy link

github-actions bot commented Dec 13, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@ansibullbot ansibullbot added community_review connection connection plugin feature This issue/PR relates to a feature request needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) python3 labels Dec 13, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ ansible-galaxy-importer SUCCESS in 4m 35s
✔️ build-ansible-collection SUCCESS in 5m 36s
ansible-test-sanity-docker-devel FAILURE in 17m 38s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 11m 28s (non-voting)
ansible-test-sanity-docker-stable-2.12 FAILURE in 9m 26s
ansible-test-sanity-docker-stable-2.13 FAILURE in 9m 34s
ansible-test-sanity-docker-stable-2.14 FAILURE in 10m 04s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 10s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 06s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 48s
ansible-test-changelog FAILURE in 2m 11s
✔️ ansible-test-splitter SUCCESS in 2m 53s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 29s
✔️ build-ansible-collection SUCCESS in 5m 04s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 41s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 9m 15s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 13m 38s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 00s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 19s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 51s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 58s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 17s
✔️ ansible-test-changelog SUCCESS in 2m 37s
✔️ ansible-test-splitter SUCCESS in 2m 49s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@markuman markuman added the backport-5 PR should be backported to the stable-5 branch label Dec 13, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 3m 51s
✔️ build-ansible-collection SUCCESS in 5m 34s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 36s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 8m 46s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 48s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 10s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 57s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 42s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 32s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 50s
✔️ ansible-test-changelog SUCCESS in 2m 17s
✔️ ansible-test-splitter SUCCESS in 2m 47s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@lubbyhst
Copy link
Contributor Author

Hi,

did I need to change something or is the PR just waiting for a re-review? :)

@markuman
Copy link
Member

recheck

@markuman markuman requested a review from tremble January 12, 2023 20:12
@markuman markuman changed the title add s3 bucket endpoint url var for private network vpc interface endp… aws_ssm: ability to customize s3 endpoint for vpc interface endpoint Jan 12, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 00s
✔️ build-ansible-collection SUCCESS in 6m 33s
✔️ ansible-test-sanity-docker-devel SUCCESS in 10m 52s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 47s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 01s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 23s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 49s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 48s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 07s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 7m 29s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 11s
✔️ ansible-test-changelog SUCCESS in 2m 31s
✔️ ansible-test-splitter SUCCESS in 2m 37s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

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

One of the big problems we've had with this plugin has been the lack of (working) integration tests. Adding more features without integration tests feels like something that's going to come back to haunt us.

@tremble
Copy link
Contributor

tremble commented Jan 13, 2023

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 42s
✔️ build-ansible-collection SUCCESS in 6m 34s
✔️ ansible-test-sanity-docker-devel SUCCESS in 12m 17s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 8m 55s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 16s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 56s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 8m 55s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 17s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 23s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 22s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 47s
✔️ ansible-test-changelog SUCCESS in 2m 42s
✔️ ansible-test-splitter SUCCESS in 3m 13s
✔️ integration-community.aws-1 SUCCESS in 12m 53s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@tremble tremble force-pushed the feature/s3_custom_endpoint_url_for_private_vpc_endpoints branch from 30ab080 to 4b9c102 Compare January 31, 2023 11:03
@tremble tremble requested a review from markuman January 31, 2023 11:03
@tremble
Copy link
Contributor

tremble commented Jan 31, 2023

@markuman I've rebased this and added some integration tests. Could you cast a quick eye over this one please.

@ansibullbot ansibullbot added integration tests/integration tests tests labels Jan 31, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 3m 38s
✔️ build-ansible-collection SUCCESS in 5m 44s
✔️ ansible-test-sanity-docker-devel SUCCESS in 8m 43s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 12m 57s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 35s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 56s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 40s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 37s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 37s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 38s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 26s
✔️ ansible-test-changelog SUCCESS in 2m 22s
✔️ ansible-test-splitter SUCCESS in 2m 28s
✔️ integration-community.aws-1 SUCCESS in 9m 16s
✔️ integration-community.aws-2 SUCCESS in 7m 30s
✔️ integration-community.aws-3 SUCCESS in 9m 28s
✔️ integration-community.aws-4 SUCCESS in 11m 37s
✔️ integration-community.aws-5 SUCCESS in 11m 53s
✔️ integration-community.aws-6 SUCCESS in 8m 10s
✔️ integration-community.aws-7 SUCCESS in 9m 44s
✔️ integration-community.aws-8 SUCCESS in 7m 33s
✔️ integration-community.aws-9 SUCCESS in 9m 02s
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Jan 31, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

✔️ ansible-galaxy-importer SUCCESS in 4m 47s
✔️ build-ansible-collection SUCCESS in 5m 52s
✔️ ansible-test-sanity-docker-devel SUCCESS in 8m 45s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 23s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 43s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 23s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 00s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 7m 03s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 50s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 39s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 5m 56s
✔️ ansible-test-changelog SUCCESS in 2m 15s
✔️ ansible-test-splitter SUCCESS in 2m 35s
✔️ integration-community.aws-1 SUCCESS in 9m 06s
✔️ integration-community.aws-2 SUCCESS in 8m 02s
✔️ integration-community.aws-3 SUCCESS in 10m 27s
✔️ integration-community.aws-4 SUCCESS in 10m 59s
✔️ integration-community.aws-5 SUCCESS in 13m 49s
✔️ integration-community.aws-6 SUCCESS in 8m 41s
✔️ integration-community.aws-7 SUCCESS in 8m 08s
integration-community.aws-8 FAILURE in 6m 33s
integration-community.aws-9 FAILURE in 7m 25s
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@tremble
Copy link
Contributor

tremble commented Jan 31, 2023

regate

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 3m 48s
✔️ build-ansible-collection SUCCESS in 5m 33s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 39s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 27s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 57s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 8m 53s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 44s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 46s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 50s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 8m 34s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 06s
✔️ ansible-test-changelog SUCCESS in 2m 20s
✔️ ansible-test-splitter SUCCESS in 2m 30s
✔️ integration-community.aws-1 SUCCESS in 8m 37s
✔️ integration-community.aws-2 SUCCESS in 7m 24s
✔️ integration-community.aws-3 SUCCESS in 9m 38s
✔️ integration-community.aws-4 SUCCESS in 7m 57s
✔️ integration-community.aws-5 SUCCESS in 9m 51s
✔️ integration-community.aws-6 SUCCESS in 8m 18s
✔️ integration-community.aws-7 SUCCESS in 8m 29s
✔️ integration-community.aws-8 SUCCESS in 7m 48s
✔️ integration-community.aws-9 SUCCESS in 9m 25s
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 433f6c5 into ansible-collections:main Jan 31, 2023
@patchback
Copy link

patchback bot commented Jan 31, 2023

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/433f6c5ee581f1cb5bdbf0fae5cb325a3c68d3a3/pr-1619

Backported as #1684

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 31, 2023
…1619)

aws_ssm: ability to customize s3 endpoint for vpc interface endpoint

Depends-On: ansible/ansible-zuul-jobs#1743
SUMMARY
Add a new variable for setting the s3 endpoint url
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
connection aws_ssm.py
ADDITIONAL INFORMATION
If you try to running SSM commands on EC2 instances in private networks only with vpc interface endpoints. You are not able to access S3 service because the generated URL is wrong. For now this plugin only works for s3 vpc gateway endpoints. Not for s3 vpc interface endpoints.
To simply fix this. We need the possibility to set the interface endpoint url. So I added a new parameter to the connection plugin.
How to test
- name: test ssm on an EC2 instance
  hosts: router
  vars:
    ansible_python_interpreter: /usr/bin/python3
    ansible_connection: aws_ssm
    ansible_aws_ssm_region: 'eu-west-1'
    ansible_aws_ssm_bucket_name: testbucket
    ansible_aws_ssm_bucket_endpoint_url: "https://vpce-00000000000000-10ygvtbr.s3.eu-west-1.vpce.amazonaws.com"
  tasks:
    - name: list files in opt folder
      shell: echo "running on $(curl -s http://169.254.169.254/latest/meta-data/instance-id)"

Output before change
XEC curl 'https://testbucket.s3.amazonaws.com/i-0b5e11951ab6b12cd//home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAZEY6F5MCGGCDZQGI%2F20210109%2F**eu-central-1**%2Fs3%2Faws4_request&X-Amz-Date=20210109T102300Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEKr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJIMEYCIQDRoCbT6dS9geijC00Xhr4nKdDrfKSE0ULsEXNgjM3vUwIhAMoAiDJJSGehMKvcmUlZDHc17WcV3Wnw4lsCED4MH%2BkMKroDCHMQABoMNjI4NzM5MTQwMzU2IgylHaq9VXBqdPex8fsqlwMzbTC5nczwsbUzXkpdw1MWndywQnjxp%2BnZoYcHMba6TGM57osVwt6hQoYxKA04co63FOr%2FtvhmmLGdphxeEGBPRjyTCNB%2Bdtr%2BwfKmjyls7WmBQF4jRMm2xPMUSd3EBnitCOpRvHPtp4xsuIX59QKCZmUNKBYIn2USx18mcSrWpI1emQGkmgewn9EOxUT168X9unNnvmUerokKgD5f1dZvpnIEmUyPYhYFCkJAdmLa5E5CIWe4UFfULLwDwTqYe6akqSAhBUeMrzWvebp7oXkER%2BymsmdGdAl4nFKNDtJ5suSkcGooliKsFhrHKEb1gN4UH%2FldPSFZqCEOayiWByk6SK7yEkhqI7wbc5Ufwv68AimpRddA5dU95kXUL3tgBYq5QcSeXStdd%2B6nQ3vRDBJx%2BETvR2dGOeZv%2Bu6p1iLaT5wnMgMcSnPQWCTja%2Bnf7Lp%2Bkmd4pR9yfTYaPa%2FVdblsVAXtfDURQ7wHwV6DJJavt26oUXNOOjEXg4FDraLzGSNWGFjMkbxLSBFNEyKBB9g3Hk8hV4YOwjC4%2BeX%2FBTrqAfEXoF92NloBKePOvKXzFcp8YT8yC0p35rXYqa0GA5d9ZNaGewFw6ks9VMUTSht3SZ2ns2qCYF6p73ISe88pgrUWGwFaxZnbNxP1dvfpNH3X9zQ9oVyjKfD9dwPfnOYpx6j48dZZhdgZ6n2H13h3Ckf7hmebHo7po%2BWrXkc8K1Bo07YSFyFMffieXBk0NvrBPGNGtKTEJ3m%2FfF4vkM4lnEN2xWaS0umgwMQrCqfhKD3Gpf%2BdglVJ2oBRHb3ho7dfie48ohpAd%2B6j752PjR2SuaA3Gokns8scHLBB7dvkGlmqb3vrX8TYsc7CZg%3D%3D&X-Amz-Signature=a992947e6682f66239d42c08a6b8ba2da136a572bc15a2184763846fd5a39504' -o '/home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py'

Output after change
XEC curl 'https://testbucket.vpce-00000000000000-10ygvtbr.s3.eu-west-1.vpce.amazonaws.com/i-0b5e11951ab6b12cd//home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAZEY6F5MCGGCDZQGI%2F20210109%2F**eu-central-1**%2Fs3%2Faws4_request&X-Amz-Date=20210109T102300Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEKr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJIMEYCIQDRoCbT6dS9geijC00Xhr4nKdDrfKSE0ULsEXNgjM3vUwIhAMoAiDJJSGehMKvcmUlZDHc17WcV3Wnw4lsCED4MH%2BkMKroDCHMQABoMNjI4NzM5MTQwMzU2IgylHaq9VXBqdPex8fsqlwMzbTC5nczwsbUzXkpdw1MWndywQnjxp%2BnZoYcHMba6TGM57osVwt6hQoYxKA04co63FOr%2FtvhmmLGdphxeEGBPRjyTCNB%2Bdtr%2BwfKmjyls7WmBQF4jRMm2xPMUSd3EBnitCOpRvHPtp4xsuIX59QKCZmUNKBYIn2USx18mcSrWpI1emQGkmgewn9EOxUT168X9unNnvmUerokKgD5f1dZvpnIEmUyPYhYFCkJAdmLa5E5CIWe4UFfULLwDwTqYe6akqSAhBUeMrzWvebp7oXkER%2BymsmdGdAl4nFKNDtJ5suSkcGooliKsFhrHKEb1gN4UH%2FldPSFZqCEOayiWByk6SK7yEkhqI7wbc5Ufwv68AimpRddA5dU95kXUL3tgBYq5QcSeXStdd%2B6nQ3vRDBJx%2BETvR2dGOeZv%2Bu6p1iLaT5wnMgMcSnPQWCTja%2Bnf7Lp%2Bkmd4pR9yfTYaPa%2FVdblsVAXtfDURQ7wHwV6DJJavt26oUXNOOjEXg4FDraLzGSNWGFjMkbxLSBFNEyKBB9g3Hk8hV4YOwjC4%2BeX%2FBTrqAfEXoF92NloBKePOvKXzFcp8YT8yC0p35rXYqa0GA5d9ZNaGewFw6ks9VMUTSht3SZ2ns2qCYF6p73ISe88pgrUWGwFaxZnbNxP1dvfpNH3X9zQ9oVyjKfD9dwPfnOYpx6j48dZZhdgZ6n2H13h3Ckf7hmebHo7po%2BWrXkc8K1Bo07YSFyFMffieXBk0NvrBPGNGtKTEJ3m%2FfF4vkM4lnEN2xWaS0umgwMQrCqfhKD3Gpf%2BdglVJ2oBRHb3ho7dfie48ohpAd%2B6j752PjR2SuaA3Gokns8scHLBB7dvkGlmqb3vrX8TYsc7CZg%3D%3D&X-Amz-Signature=a992947e6682f66239d42c08a6b8ba2da136a572bc15a2184763846fd5a39504' -o '/home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py'

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
(cherry picked from commit 433f6c5)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 31, 2023
…1619) (#1684)

[PR #1619/433f6c5e backport][stable-5] aws_ssm: ability to customize s3 endpoint for vpc interface endpoint

This is a backport of PR #1619 as merged into main (433f6c5).
Depends-On: ansible/ansible-zuul-jobs#1743
SUMMARY
Add a new variable for setting the s3 endpoint url
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
connection aws_ssm.py
ADDITIONAL INFORMATION
If you try to running SSM commands on EC2 instances in private networks only with vpc interface endpoints. You are not able to access S3 service because the generated URL is wrong. For now this plugin only works for s3 vpc gateway endpoints. Not for s3 vpc interface endpoints.
To simply fix this. We need the possibility to set the interface endpoint url. So I added a new parameter to the connection plugin.
How to test
- name: test ssm on an EC2 instance
  hosts: router
  vars:
    ansible_python_interpreter: /usr/bin/python3
    ansible_connection: aws_ssm
    ansible_aws_ssm_region: 'eu-west-1'
    ansible_aws_ssm_bucket_name: testbucket
    ansible_aws_ssm_bucket_endpoint_url: "https://vpce-00000000000000-10ygvtbr.s3.eu-west-1.vpce.amazonaws.com"
  tasks:
    - name: list files in opt folder
      shell: echo "running on $(curl -s http://169.254.169.254/latest/meta-data/instance-id)"

Output before change
XEC curl 'https://testbucket.s3.amazonaws.com/i-0b5e11951ab6b12cd//home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAZEY6F5MCGGCDZQGI%2F20210109%2F**eu-central-1**%2Fs3%2Faws4_request&X-Amz-Date=20210109T102300Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEKr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJIMEYCIQDRoCbT6dS9geijC00Xhr4nKdDrfKSE0ULsEXNgjM3vUwIhAMoAiDJJSGehMKvcmUlZDHc17WcV3Wnw4lsCED4MH%2BkMKroDCHMQABoMNjI4NzM5MTQwMzU2IgylHaq9VXBqdPex8fsqlwMzbTC5nczwsbUzXkpdw1MWndywQnjxp%2BnZoYcHMba6TGM57osVwt6hQoYxKA04co63FOr%2FtvhmmLGdphxeEGBPRjyTCNB%2Bdtr%2BwfKmjyls7WmBQF4jRMm2xPMUSd3EBnitCOpRvHPtp4xsuIX59QKCZmUNKBYIn2USx18mcSrWpI1emQGkmgewn9EOxUT168X9unNnvmUerokKgD5f1dZvpnIEmUyPYhYFCkJAdmLa5E5CIWe4UFfULLwDwTqYe6akqSAhBUeMrzWvebp7oXkER%2BymsmdGdAl4nFKNDtJ5suSkcGooliKsFhrHKEb1gN4UH%2FldPSFZqCEOayiWByk6SK7yEkhqI7wbc5Ufwv68AimpRddA5dU95kXUL3tgBYq5QcSeXStdd%2B6nQ3vRDBJx%2BETvR2dGOeZv%2Bu6p1iLaT5wnMgMcSnPQWCTja%2Bnf7Lp%2Bkmd4pR9yfTYaPa%2FVdblsVAXtfDURQ7wHwV6DJJavt26oUXNOOjEXg4FDraLzGSNWGFjMkbxLSBFNEyKBB9g3Hk8hV4YOwjC4%2BeX%2FBTrqAfEXoF92NloBKePOvKXzFcp8YT8yC0p35rXYqa0GA5d9ZNaGewFw6ks9VMUTSht3SZ2ns2qCYF6p73ISe88pgrUWGwFaxZnbNxP1dvfpNH3X9zQ9oVyjKfD9dwPfnOYpx6j48dZZhdgZ6n2H13h3Ckf7hmebHo7po%2BWrXkc8K1Bo07YSFyFMffieXBk0NvrBPGNGtKTEJ3m%2FfF4vkM4lnEN2xWaS0umgwMQrCqfhKD3Gpf%2BdglVJ2oBRHb3ho7dfie48ohpAd%2B6j752PjR2SuaA3Gokns8scHLBB7dvkGlmqb3vrX8TYsc7CZg%3D%3D&X-Amz-Signature=a992947e6682f66239d42c08a6b8ba2da136a572bc15a2184763846fd5a39504' -o '/home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py'

Output after change
XEC curl 'https://testbucket.vpce-00000000000000-10ygvtbr.s3.eu-west-1.vpce.amazonaws.com/i-0b5e11951ab6b12cd//home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAZEY6F5MCGGCDZQGI%2F20210109%2F**eu-central-1**%2Fs3%2Faws4_request&X-Amz-Date=20210109T102300Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEKr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDGV1LWNlbnRyYWwtMSJIMEYCIQDRoCbT6dS9geijC00Xhr4nKdDrfKSE0ULsEXNgjM3vUwIhAMoAiDJJSGehMKvcmUlZDHc17WcV3Wnw4lsCED4MH%2BkMKroDCHMQABoMNjI4NzM5MTQwMzU2IgylHaq9VXBqdPex8fsqlwMzbTC5nczwsbUzXkpdw1MWndywQnjxp%2BnZoYcHMba6TGM57osVwt6hQoYxKA04co63FOr%2FtvhmmLGdphxeEGBPRjyTCNB%2Bdtr%2BwfKmjyls7WmBQF4jRMm2xPMUSd3EBnitCOpRvHPtp4xsuIX59QKCZmUNKBYIn2USx18mcSrWpI1emQGkmgewn9EOxUT168X9unNnvmUerokKgD5f1dZvpnIEmUyPYhYFCkJAdmLa5E5CIWe4UFfULLwDwTqYe6akqSAhBUeMrzWvebp7oXkER%2BymsmdGdAl4nFKNDtJ5suSkcGooliKsFhrHKEb1gN4UH%2FldPSFZqCEOayiWByk6SK7yEkhqI7wbc5Ufwv68AimpRddA5dU95kXUL3tgBYq5QcSeXStdd%2B6nQ3vRDBJx%2BETvR2dGOeZv%2Bu6p1iLaT5wnMgMcSnPQWCTja%2Bnf7Lp%2Bkmd4pR9yfTYaPa%2FVdblsVAXtfDURQ7wHwV6DJJavt26oUXNOOjEXg4FDraLzGSNWGFjMkbxLSBFNEyKBB9g3Hk8hV4YOwjC4%2BeX%2FBTrqAfEXoF92NloBKePOvKXzFcp8YT8yC0p35rXYqa0GA5d9ZNaGewFw6ks9VMUTSht3SZ2ns2qCYF6p73ISe88pgrUWGwFaxZnbNxP1dvfpNH3X9zQ9oVyjKfD9dwPfnOYpx6j48dZZhdgZ6n2H13h3Ckf7hmebHo7po%2BWrXkc8K1Bo07YSFyFMffieXBk0NvrBPGNGtKTEJ3m%2FfF4vkM4lnEN2xWaS0umgwMQrCqfhKD3Gpf%2BdglVJ2oBRHb3ho7dfie48ohpAd%2B6j752PjR2SuaA3Gokns8scHLBB7dvkGlmqb3vrX8TYsc7CZg%3D%3D&X-Amz-Signature=a992947e6682f66239d42c08a6b8ba2da136a572bc15a2184763846fd5a39504' -o '/home/ssm-user/.ansible/tmp/ansible-tmp-1610187779.9946203-6452-52757228453165/AnsiballZ_setup.py'

Reviewed-by: Mark Chappell <None>
@lubbyhst
Copy link
Contributor Author

lubbyhst commented Feb 6, 2023

@markuman I've rebased this and added some integration tests. Could you cast a quick eye over this one please.

very n1. Thank you very much for the support.

@lubbyhst lubbyhst deleted the feature/s3_custom_endpoint_url_for_private_vpc_endpoints branch February 6, 2023 09:59
@tremble
Copy link
Contributor

tremble commented Feb 6, 2023

@lubbyhst, thanks for taking the time to open the PR.

Sorry it took a while, the aws_ssm connection integration tests had been broken for a while and I really didn't want to merge new features without fixing the tests.

abikouo pushed a commit to abikouo/community.aws that referenced this pull request Oct 24, 2023
Refactor ARN validation code

SUMMARY

Adds resource_id and resource_type to parse_aws_arn() return value.
Adds validate_aws_arn() to handle common pattern matching for ARNs.

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_instance
iam_user
ADDITIONAL INFORMATION
Related to ansible-collections#1846 - We've been doing things like assuming the aws partition.

Reviewed-by: Alina Buzachis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-5 PR should be backported to the stable-5 branch community_review connection connection plugin feature This issue/PR relates to a feature request integration tests/integration mergeit Merge the PR (SoftwareFactory) needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) python3 tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants