# AWX GCP Dynamic Inventory

**URL:** <https://forum.ansible.com/t/awx-gcp-dynamic-inventory/34397>\
**Category:** AWX Project\
**Tags:** gcp, aws, awx\
**Created:** [January 5, 2021, 9:18pm UTC](https://forum.ansible.com/t/awx-gcp-dynamic-inventory/34397 "2021-01-05T21:18:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ian\_Wolff](https://avatars.discourse-cdn.com/v4/letter/i/aca169/32.png) [@Ian\_Wolff](https://forum.ansible.com/u/Ian_Wolff)\
**Post date:** [January 5, 2021, 9:18pm UTC](https://forum.ansible.com/t/awx-gcp-dynamic-inventory/34397/1 "2021-01-05T21:18:20Z")

</div>

Has anyone figured out a way to get GCP Dynamic Inventory to use gce\_private\_ip as the “ansible\_ssh\_host”? It will default to the external IP address while pulling the inventory and set the eIP as the ansible\_ssh\_host.

This can be accomplished easily with the AWS dynamic inventory by adding destination\_variable to the “source variables” section. GCP Dynamic Inventory does not have the same feature.

---

<div class="post-metadata">

**Author:** ![Phillip\_Pratt](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@Phillip\_Pratt](https://forum.ansible.com/u/Phillip_Pratt)\
**Post date:** [March 22, 2022, 4:33pm UTC](https://forum.ansible.com/t/awx-gcp-dynamic-inventory/34397/2 "2022-03-22T16:33:31Z")

</div>

Here is what I use for my inventory, which will set it to name the inventory using the machine name, and then use the internal IP for connectivity:
