Deploy a Google Cloud Marketplace VM with Terraform
Product Manager, Google Cloud
Software Engineer, Google Cloud
Try Google Cloud
Start building on Google Cloud with $300 in free credits and 20+ always free products.Free trial
Google Cloud Marketplace helps scale and simplify procurement for your organization with online discovery, flexible purchasing, and easy fulfillment of top cloud solutions. Today we are proud to announce an additional Marketplace deployment option for select VM products: Terraform. Now with just a few clicks, you can auto-generate a configuration file to use with Terraform, the popular open-source, infrastructure-as-code tool from HashiCorp. Save time and reduce errors by simply copying the code to directly run it in the terminal or use within your product build pipeline.
We are starting by enabling Terraform deployment on a limited number of frequently deployed images, e.g. Deep Learning VM, and we will be expanding support for this deployment option over time. To help you get started, let’s walk through deploying a Marketplace VM product using a Terraform configuration file.
Deploying a VM via Terraform
Let’s say you’re interested in deploying a Wordpress VM to your Google Cloud project. You navigate to the Google Cloud Marketplace product page and notice the new Deploy with CLI option in the header.
This is helpful for you because your organization uses Terraform to manage cloud infrastructure. Having the code generated for you can both save you time and reduce errors.
Upon clicking Deploy with CLI and agreeing to product terms of service if you hadn’t already, you’ll need to configure a service account. If you don’t have an existing service account for this product, you will need to establish one. You can find all of the steps for this process here.
Next click Generate code at the bottom of the window.
You’ll now be presented with the configuration file ready for Terraform. Double check the accuracy of the service account and simply copy it to use directly on the machine where you have installed Terraform or with your favorite CI/CD pipeline.
The Command Line Deployment view of the product page also makes it easy to check on the VM after deployment. Click the link to Compute Engine at the bottom of the window to view running instances of this product in your project.
It’s really that simple. And given Terraform’s popularity, we know this is a helpful new deployment option for many of our customers. Learn more about this new VM deployment option in the CLI deployment documentation. Partners interested in learning more about this option for their VM product(s) can reach out to their partner advisor or marketplace contact.