Create a Pulumi GCP instance template with specific CPU and RAMTypeScript
You can use Google Cloud Platform's
compute.InstanceTemplateresource to create an instance template with specific CPU and RAM.
The following TypeScript program creates an instance template with a
n1-standard-1machine type, which consists of 1 vCPU and 3.75 GB of memory.
regionwith your actual project id and desired region.
If you want to use a different machine type, you can replace
n1-standard-1with your desired machine type that specifies a different number of CPUs and/or amount of memory. Here is a link to the machine types available in Google Cloud.
This program also specifies that the instance should use a Disk that boots from the
debian-9image. The service account with the
"https://www.googleapis.com/auth/cloud-platform"scope is also part of the instance template configuration to allow the instance to authenticate with GCP services.
You can find more information about this resource in Pulumi's documentation for gcp.compute.InstanceTemplate.