Class InstanceTemplate
Manages a VM instance template resource within GCE. For more information see the official documentation and API.
Inherited Members
Namespace: Pulumi.Gcp.Compute
Assembly: Pulumi.Gcp.dll
Syntax
public class InstanceTemplate : CustomResource
Constructors
View SourceInstanceTemplate(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 SourceCanIpForward
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>> |
Description
A brief description of this resource.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
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>> |
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>> |
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> |
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>> |
MachineType
The machine type to create.
Declaration
public Output<string> MachineType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
MetadataFingerprint
The unique fingerprint of the metadata.
Declaration
public Output<string> MetadataFingerprint { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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> |
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> |
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> |
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>> |
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> |
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> |
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> |
SelfLink
The URI of the created resource.
Declaration
public Output<string> SelfLink { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServiceAccount
Service account to attach to the instance. Structure is documented below.
Declaration
public Output<InstanceTemplateServiceAccount> ServiceAccount { get; }
Property Value
| Type | Description |
|---|---|
| Output<InstanceTemplateServiceAccount> |
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> |
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>> |
TagsFingerprint
The unique fingerprint of the tags.
Declaration
public Output<string> TagsFingerprint { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(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 |