Is it possible to create a project and VPC in Google cloud through Ansible?

51 views
Skip to first unread message

somali...@devfactory.com

unread,
Oct 30, 2018, 7:17:09 AM10/30/18
to Ansible Project
I am new to Ansible. I have come across various articles showing how to provision resources like GCE in the Google cloud. But I want to automate the entire end to end flow and thus would start with automating the creation of Project and VPC in Google Cloud.

Can someone help me identify module(s) using which this can be achieved?

Thanks,
Somali

Stephen Granger

unread,
Oct 30, 2018, 12:43:18 PM10/30/18
to ansible...@googlegroups.com
Looking at another Infrastructure as code example


There seems to be some manual steps via the gcloud sdk to initially get a service role to then provision resources within a project.

This is not a perfect response to your question, just a quick reply to perhaps put you on the right path.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e93b2e00-b4e8-4079-bdd9-e4a4da5fe9c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Steve

Somali Batra

unread,
Oct 30, 2018, 1:38:56 PM10/30/18
to ansible...@googlegroups.com
Thank Steve.

I understand a service account is required to provision resources on Google cloud. So now the question is, can that be automated as well?

Meaning is it possible to do the following through Ansible on Google Cloud
1) create a project
2) create a service account
3) create a VPC
4) create a GCE VM instance (this definitely is possible using the gce module, can I also create a project, service account and vpc using any of the ansible modules?)




For more options, visit https://groups.google.com/d/optout.


--
Regards,
Somali

Jonathan Lozada De La Matta

unread,
Oct 30, 2018, 1:40:51 PM10/30/18
to ansible...@googlegroups.com
not at the moment as far as I know.


For more options, visit https://groups.google.com/d/optout.


--

Jonathan lozada de la matta

AUTOMATION PRACTICE



 

Somali Batra

unread,
Oct 30, 2018, 1:43:26 PM10/30/18
to ansible...@googlegroups.com
You mean none of this can be achieved through Ansible - project, vpc, service account?


For more options, visit https://groups.google.com/d/optout.


--
Regards,
Somali

Jonathan Lozada De La Matta

unread,
Oct 30, 2018, 1:46:09 PM10/30/18
to ansible...@googlegroups.com

Somali Batra

unread,
Oct 30, 2018, 10:36:59 PM10/30/18
to ansible...@googlegroups.com
Hi Jonathan,

I could not identify a module to create VPC as well in this link https://docs.ansible.com/ansible/latest/modules/list_of_cloud_modules.html#google. Am I missing something?


For more options, visit https://groups.google.com/d/optout.


--
Regards,
Somali

Somali Batra

unread,
Oct 30, 2018, 10:51:11 PM10/30/18
to ansible...@googlegroups.com
Ok, I think I found it. Thank you!
--
Regards,
Somali
Reply all
Reply to author
Forward
0 new messages