This sub-folder contains a bare bones example of how to provision infrastructure on Google Cloud using Pulumi. In this project we used the Go programming language to write our infrastructure as code.
We build out an object-store bucket, a compute instance and a new VPC network (this one not really used though).
Following the prerequisites installation, you need to ensure your environment is configured properly to use your Google Cloud project.
- Change into the
pulumi-gcp
directory. - Run
pulumi stack init
to initialize a new stack.- I created an account on Pulumi.com and logged in to take advantage of the free state storage.
- Run
pulumi config set gcp:project <your-project-id>
to set the GCP project ID. - Find the
Config.toml
file and adjust your configuration (pull-requests are welcome here) - Run
pulumi up
to preview and deploy the changes. - Run
pulumi destroy
to tear down the resources.
Keep in mind this is a bare bones example and you will need to adjust the configuration to suit your needs. As we get more familiar with Pulumi, we can add more and more examples! Overall the Pulumi tool rocks!