Show / Hide Table of Contents

Class InstanceTemplate

Manages a VM instance template resource within GCE. For more information see the official documentation and API.

Inheritance
System.Object
Resource
CustomResource
InstanceTemplate
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Compute
Assembly: Pulumi.Gcp.dll
Syntax
public class InstanceTemplate : CustomResource

Constructors

View Source

InstanceTemplate(String, InstanceTemplateArgs, CustomResourceOptions)

Create a InstanceTemplate resource with the given unique name, arguments, and options.

Declaration
public InstanceTemplate(string name, InstanceTemplateArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

InstanceTemplateArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

CanIpForward

Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

Declaration
public Output<bool?> CanIpForward { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Description

A brief description of this resource.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

Disks

Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

Declaration
public Output<ImmutableArray<InstanceTemplateDisk>> Disks { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<InstanceTemplateDisk>>
View Source

EnableDisplay

Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

Declaration
public Output<bool?> EnableDisplay { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

GuestAccelerators

List of the type and count of accelerator cards attached to the instance. Structure documented below.

Declaration
public Output<ImmutableArray<InstanceTemplateGuestAccelerator>> GuestAccelerators { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<InstanceTemplateGuestAccelerator>>
View Source

InstanceDescription

A brief description to use for instances created from this template.

Declaration
public Output<string> InstanceDescription { get; }
Property Value
Type Description
Output<System.String>
View Source

Labels

A set of key/value label pairs to assign to instances created from this template,

Declaration
public Output<ImmutableDictionary<string, string>> Labels { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

MachineType

The machine type to create.

Declaration
public Output<string> MachineType { get; }
Property Value
Type Description
Output<System.String>
View Source

Metadata

Metadata key/value pairs to make available from within instances created from this template.

Declaration
public Output<ImmutableDictionary<string, object>> Metadata { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

MetadataFingerprint

The unique fingerprint of the metadata.

Declaration
public Output<string> MetadataFingerprint { get; }
Property Value
Type Description
Output<System.String>
View Source

MetadataStartupScript

An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

Declaration
public Output<string> MetadataStartupScript { get; }
Property Value
Type Description
Output<System.String>
View Source

MinCpuPlatform

Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

Declaration
public Output<string> MinCpuPlatform { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

NamePrefix

Creates a unique name beginning with the specified prefix. Conflicts with name.

Declaration
public Output<string> NamePrefix { get; }
Property Value
Type Description
Output<System.String>
View Source

NetworkInterfaces

Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

Declaration
public Output<ImmutableArray<InstanceTemplateNetworkInterface>> NetworkInterfaces { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<InstanceTemplateNetworkInterface>>
View Source

Project

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Declaration
public Output<string> Project { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

Scheduling

The scheduling strategy to use. More details about this configuration option are detailed below.

Declaration
public Output<InstanceTemplateScheduling> Scheduling { get; }
Property Value
Type Description
Output<InstanceTemplateScheduling>
View Source

SelfLink

The URI of the created resource.

Declaration
public Output<string> SelfLink { get; }
Property Value
Type Description
Output<System.String>
View Source

ServiceAccount

Service account to attach to the instance. Structure is documented below.

Declaration
public Output<InstanceTemplateServiceAccount> ServiceAccount { get; }
Property Value
Type Description
Output<InstanceTemplateServiceAccount>
View Source

ShieldedInstanceConfig

Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

Declaration
public Output<InstanceTemplateShieldedInstanceConfig> ShieldedInstanceConfig { get; }
Property Value
Type Description
Output<InstanceTemplateShieldedInstanceConfig>
View Source

Tags

Tags to attach to the instance.

Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

TagsFingerprint

The unique fingerprint of the tags.

Declaration
public Output<string> TagsFingerprint { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, InstanceTemplateState, CustomResourceOptions)

Get an existing InstanceTemplate resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static InstanceTemplate Get(string name, Input<string> id, InstanceTemplateState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

InstanceTemplateState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
InstanceTemplate
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.