InstanceFromMachineImageArgs

data class InstanceFromMachineImageArgs(val advancedMachineFeatures: Output<InstanceFromMachineImageAdvancedMachineFeaturesArgs>? = null, val allowStoppingForUpdate: Output<Boolean>? = null, val canIpForward: Output<Boolean>? = null, val confidentialInstanceConfig: Output<InstanceFromMachineImageConfidentialInstanceConfigArgs>? = null, val deletionProtection: Output<Boolean>? = null, val description: Output<String>? = null, val desiredStatus: Output<String>? = null, val enableDisplay: Output<Boolean>? = null, val guestAccelerators: Output<List<InstanceFromMachineImageGuestAcceleratorArgs>>? = null, val hostname: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val machineType: Output<String>? = null, val metadata: Output<Map<String, String>>? = null, val metadataStartupScript: Output<String>? = null, val minCpuPlatform: Output<String>? = null, val name: Output<String>? = null, val networkInterfaces: Output<List<InstanceFromMachineImageNetworkInterfaceArgs>>? = null, val networkPerformanceConfig: Output<InstanceFromMachineImageNetworkPerformanceConfigArgs>? = null, val params: Output<InstanceFromMachineImageParamsArgs>? = null, val project: Output<String>? = null, val reservationAffinity: Output<InstanceFromMachineImageReservationAffinityArgs>? = null, val resourcePolicies: Output<String>? = null, val scheduling: Output<InstanceFromMachineImageSchedulingArgs>? = null, val serviceAccount: Output<InstanceFromMachineImageServiceAccountArgs>? = null, val shieldedInstanceConfig: Output<InstanceFromMachineImageShieldedInstanceConfigArgs>? = null, val sourceMachineImage: Output<String>? = null, val tags: Output<List<String>>? = null, val zone: Output<String>? = null) : ConvertibleToJava<InstanceFromMachineImageArgs>

Manages a VM instance resource within GCE. For more information see the official documentation and API. This resource is specifically to create a compute instance from a given source_machine_image. To create an instance without a machine image, use the gcp.compute.Instance resource.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.InstanceFromMachineImage;
import com.pulumi.gcp.compute.InstanceFromMachineImageArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tpl = new InstanceFromMachineImage("tpl", InstanceFromMachineImageArgs.builder()
.zone("us-central1-a")
.sourceMachineImage("projects/PROJECT-ID/global/machineImages/NAME")
.canIpForward(false)
.labels(Map.of("my_key", "my_value"))
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
}
}

Constructors

Link copied to clipboard
constructor(advancedMachineFeatures: Output<InstanceFromMachineImageAdvancedMachineFeaturesArgs>? = null, allowStoppingForUpdate: Output<Boolean>? = null, canIpForward: Output<Boolean>? = null, confidentialInstanceConfig: Output<InstanceFromMachineImageConfidentialInstanceConfigArgs>? = null, deletionProtection: Output<Boolean>? = null, description: Output<String>? = null, desiredStatus: Output<String>? = null, enableDisplay: Output<Boolean>? = null, guestAccelerators: Output<List<InstanceFromMachineImageGuestAcceleratorArgs>>? = null, hostname: Output<String>? = null, labels: Output<Map<String, String>>? = null, machineType: Output<String>? = null, metadata: Output<Map<String, String>>? = null, metadataStartupScript: Output<String>? = null, minCpuPlatform: Output<String>? = null, name: Output<String>? = null, networkInterfaces: Output<List<InstanceFromMachineImageNetworkInterfaceArgs>>? = null, networkPerformanceConfig: Output<InstanceFromMachineImageNetworkPerformanceConfigArgs>? = null, params: Output<InstanceFromMachineImageParamsArgs>? = null, project: Output<String>? = null, reservationAffinity: Output<InstanceFromMachineImageReservationAffinityArgs>? = null, resourcePolicies: Output<String>? = null, scheduling: Output<InstanceFromMachineImageSchedulingArgs>? = null, serviceAccount: Output<InstanceFromMachineImageServiceAccountArgs>? = null, shieldedInstanceConfig: Output<InstanceFromMachineImageShieldedInstanceConfigArgs>? = null, sourceMachineImage: Output<String>? = null, tags: Output<List<String>>? = null, zone: Output<String>? = null)

Properties

Link copied to clipboard

Controls for advanced machine-related behavior features.

Link copied to clipboard
val allowStoppingForUpdate: Output<Boolean>? = null

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

Link copied to clipboard
val canIpForward: Output<Boolean>? = null

Whether sending and receiving of packets with non-matching source or destination IPs is allowed.

Link copied to clipboard

The Confidential VM config being used by the instance. on_host_maintenance has to be set to TERMINATE or this will fail to create.

Link copied to clipboard
val deletionProtection: Output<Boolean>? = null

Whether deletion protection is enabled on this instance.

Link copied to clipboard
val description: Output<String>? = null

A brief description of the resource.

Link copied to clipboard
val desiredStatus: Output<String>? = null

Desired status of the instance. Either "RUNNING" or "TERMINATED".

Link copied to clipboard
val enableDisplay: Output<Boolean>? = null

Whether the instance has virtual displays enabled.

Link copied to clipboard

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

Link copied to clipboard
val hostname: Output<String>? = null

A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression -a-z0-9]*[a-z0-9, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

A set of key/value label pairs assigned to the instance.

Link copied to clipboard
val machineType: Output<String>? = null

The machine type to create.

Link copied to clipboard
val metadata: Output<Map<String, String>>? = null

Metadata key/value pairs made available within the instance.

Link copied to clipboard
val metadataStartupScript: Output<String>? = null

Metadata startup scripts made available within the instance.

Link copied to clipboard
val minCpuPlatform: Output<String>? = null

The minimum CPU platform specified for the VM instance.

Link copied to clipboard
val name: Output<String>? = null

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

Link copied to clipboard

The networks attached to the instance.

Link copied to clipboard

Configures network performance settings for the instance. If not specified, the instance will be created with its default network performance configuration.

Link copied to clipboard

Stores additional params passed with the request, but not persisted as part of resource payload.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

Link copied to clipboard

Specifies the reservations that this instance can consume from.

Link copied to clipboard
val resourcePolicies: Output<String>? = null

A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.

Link copied to clipboard

The scheduling strategy being used by the instance.

Link copied to clipboard

The service account to attach to the instance.

Link copied to clipboard

The shielded vm config being used by the instance.

Link copied to clipboard
val sourceMachineImage: Output<String>? = null

Name or self link of a machine image to create the instance based on.

Link copied to clipboard
val tags: Output<List<String>>? = null

The list of tags attached to the instance.

Link copied to clipboard
val zone: Output<String>? = null

The zone that the machine should be created in. If not set, the provider zone is used. In addition to these, most* arguments from gcp.compute.Instance are supported as a way to override the properties in the machine image. All exported attributes from gcp.compute.Instance are likewise exported here.

Functions

Link copied to clipboard
open override fun toJava(): InstanceFromMachineImageArgs