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

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

Looking at another Infrastructure as code example

https://cloud.google.com/community/tutorials/managing-gcp-projects-with-terraform

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.

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?)

not at the moment as far as I know.

You mean none of this can be achieved through Ansible - project, vpc, service account?

Sorry, the project and service account https://docs.ansible.com/ansible/latest/modules/list_of_cloud_modules.html#google

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?

Ok, I think I found it. Thank you!