0
0
GCPcloud~30 mins

Instance templates in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Create a Google Cloud Instance Template
📖 Scenario: You are setting up a Google Cloud environment to launch virtual machines with consistent settings. To do this efficiently, you will create an instance template that defines the machine type, disk, and network settings. This template will help you launch multiple identical instances easily.
🎯 Goal: Build a Google Cloud instance template JSON configuration that specifies a machine type, boot disk image, and network interface.
📋 What You'll Learn
Create a JSON object named instanceTemplate with the required fields.
Specify the machine type as n1-standard-1.
Use the boot disk image projects/debian-cloud/global/images/family/debian-11.
Configure the network interface to use the default network.
Include a name field with the value my-instance-template.
💡 Why This Matters
🌍 Real World
Instance templates are used in Google Cloud to create VM instances with consistent settings quickly and reliably.
💼 Career
Understanding instance templates is essential for cloud engineers and architects managing scalable and repeatable infrastructure deployments.
Progress0 / 4 steps
1
Create the base instance template object
Create a JSON object called instanceTemplate with a name field set to "my-instance-template".
GCP
Need a hint?

Start by defining the name property inside the JSON object.

2
Add the machine type configuration
Add a properties object inside instanceTemplate with a machineType field set to "n1-standard-1".
GCP
Need a hint?

Inside properties, set the machineType to "n1-standard-1".

3
Add boot disk configuration
Inside properties, add a disks array with one object. This object must have boot set to true, autoDelete set to true, and a initializeParams object with sourceImage set to "projects/debian-cloud/global/images/family/debian-11".
GCP
Need a hint?

Define the boot disk inside the disks array with the required fields.

4
Add network interface configuration
Inside properties, add a networkInterfaces array with one object that has a network field set to "global/networks/default".
GCP
Need a hint?

Add the network interface configuration inside properties to connect to the default network.