pub struct InstanceArgs {Show 32 fields
pub advanced_machine_features: Output<Option<InstanceAdvancedMachineFeatures>>,
pub allow_stopping_for_update: Output<Option<bool>>,
pub attached_disks: Output<Option<Vec<InstanceAttachedDisk>>>,
pub boot_disk: Output<InstanceBootDisk>,
pub can_ip_forward: Output<Option<bool>>,
pub confidential_instance_config: Output<Option<InstanceConfidentialInstanceConfig>>,
pub deletion_protection: Output<Option<bool>>,
pub description: Output<Option<String>>,
pub desired_status: Output<Option<String>>,
pub enable_display: Output<Option<bool>>,
pub guest_accelerators: Output<Option<Vec<InstanceGuestAccelerator>>>,
pub hostname: Output<Option<String>>,
pub key_revocation_action_type: Output<Option<String>>,
pub labels: Output<Option<HashMap<String, String>>>,
pub machine_type: Output<String>,
pub metadata: Output<Option<HashMap<String, String>>>,
pub metadata_startup_script: Output<Option<String>>,
pub min_cpu_platform: Output<Option<String>>,
pub name: Output<Option<String>>,
pub network_interfaces: Output<Vec<InstanceNetworkInterface>>,
pub network_performance_config: Output<Option<InstanceNetworkPerformanceConfig>>,
pub params: Output<Option<InstanceParams>>,
pub partner_metadata: Output<Option<HashMap<String, String>>>,
pub project: Output<Option<String>>,
pub reservation_affinity: Output<Option<InstanceReservationAffinity>>,
pub resource_policies: Output<Option<String>>,
pub scheduling: Output<Option<InstanceScheduling>>,
pub scratch_disks: Output<Option<Vec<InstanceScratchDisk>>>,
pub service_account: Output<Option<InstanceServiceAccount>>,
pub shielded_instance_config: Output<Option<InstanceShieldedInstanceConfig>>,
pub tags: Output<Option<Vec<String>>>,
pub zone: Output<Option<String>>,
}
Fields§
§advanced_machine_features: Output<Option<InstanceAdvancedMachineFeatures>>
Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below
allow_stopping_for_update: Output<Option<bool>>
If true, allows this prvider 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.
attached_disks: Output<Option<Vec<InstanceAttachedDisk>>>
Additional disks to attach to the instance. Can be repeated multiple times for multiple disks. Structure is documented below.
boot_disk: Output<InstanceBootDisk>
The boot disk for the instance. Structure is documented below.
can_ip_forward: Output<Option<bool>>
Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.
confidential_instance_config: Output<Option<InstanceConfidentialInstanceConfig>>
Enable Confidential Mode on this VM. Structure is documented below
deletion_protection: Output<Option<bool>>
Enable deletion protection on this instance. Defaults to false.
Note: you must disable deletion protection before removing the resource (e.g., via pulumi destroy
), or the instance cannot be deleted and the provider run will not complete successfully.
description: Output<Option<String>>
A brief description of this resource.
desired_status: Output<Option<String>>
Desired status of the instance. Either
"RUNNING"
, "SUSPENDED"
or "TERMINATED"
.
enable_display: Output<Option<bool>>
Enable Virtual Displays on this instance.
Note: allow_stopping_for_update
must be set to true or your instance must have a desired_status
of TERMINATED
in order to update this field.
guest_accelerators: Output<Option<Vec<InstanceGuestAccelerator>>>
List of the type and count of accelerator cards attached to the instance. Structure documented below.
Note: GPU accelerators can only be used with on_host_maintenance
option set to TERMINATE.
hostname: Output<Option<String>>
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-z
, concatenated with periods.
The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.
key_revocation_action_type: Output<Option<String>>
Action to be taken when a customer’s encryption key is revoked. Supports STOP
and NONE
, with NONE
being the default.
labels: Output<Option<HashMap<String, String>>>
A map of key/value label pairs to assign to the instance. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field ‘effective_labels’ for all of the labels present on the resource.
machine_type: Output<String>
The machine type to create.
Note: If you want to update this value (resize the VM) after initial creation, you must set allow_stopping_for_update
to true
.
Custom machine types can be formatted as custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY_MB
, e.g. custom-6-20480
for 6 vCPU and 20GB of RAM.
Because of current API limitations some custom machine types may get converted to different machine types (such as an equivalent standard type) and cause non-empty plans in your configuration. Use
lifecycle.ignore_changes
on machine_type
in these cases.
There is a limit of 6.5 GB per CPU unless you add extended memory. You must do this explicitly by adding the suffix -ext
, e.g. custom-2-15360-ext
for 2 vCPU and 15 GB of memory.
metadata: Output<Option<HashMap<String, String>>>
Metadata key/value pairs to make available from within the instance. Ssh keys attached in the Cloud Console will be removed. Add them to your config in order to keep them attached to your instance. A list of predefined metadata keys (e.g. ssh-keys) can be found here
Depending on the OS you choose for your instance, some metadata keys have special functionality. Most linux-based images will run the content of
metadata.startup-script
in a shell on every boot. At a minimum, Debian, CentOS, RHEL, SLES, Container-Optimized OS, and Ubuntu images support this key. Windows instances require other keys depending on the format of the script and the time you would like it to run - see this table. For the convenience of the users ofmetadata.startup-script
, we provide a special attribute,metadata_startup_script
, which is documented below.
metadata_startup_script: Output<Option<String>>
An alternative to using the
startup-script metadata key, except this one forces the instance to be recreated
(thus re-running the script) if it is changed. This replaces the startup-script
metadata key on the created instance and thus the two mechanisms are not
allowed to be used simultaneously. Users are free to use either mechanism - the
only distinction is that this separate attribute will cause a recreate on
modification. On import, metadata_startup_script
will not be set - if you
choose to specify it you will see a diff immediately after import causing a
destroy/recreate operation. If importing an instance and specifying this value
is desired, you will need to modify your state file.
min_cpu_platform: Output<Option<String>>
Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as
Intel Haswell
or Intel Skylake
. See the complete list here.
Note: allow_stopping_for_update
must be set to true or your instance must have a desired_status
of TERMINATED
in order to update this field.
name: Output<Option<String>>
A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
network_interfaces: Output<Vec<InstanceNetworkInterface>>
Networks to attach to the instance. This can be specified multiple times. Structure is documented below.
network_performance_config: Output<Option<InstanceNetworkPerformanceConfig>>
(Optional, Beta
Configures network performance settings for the instance. Structure is
documented below. Note: machine_type
must be a supported type,
the image
used must include the GVNIC
in guest-os-features
, and network_interface.0.nic-type
must be GVNIC
in order for this setting to take effect.
params: Output<Option<InstanceParams>>
Additional instance parameters. .
partner_metadata: Output<Option<HashMap<String, String>>>
Beta key/value pair represents partner metadata assigned to instance where key represent a defined namespace and value is a json string represent the entries associted with the namespace.
project: Output<Option<String>>
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
reservation_affinity: Output<Option<InstanceReservationAffinity>>
Specifies the reservations that this instance can consume from. Structure is documented below.
resource_policies: Output<Option<String>>
- A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
scheduling: Output<Option<InstanceScheduling>>
The scheduling strategy to use. More details about this configuration option are detailed below.
scratch_disks: Output<Option<Vec<InstanceScratchDisk>>>
Scratch disks to attach to the instance. This can be specified multiple times for multiple scratch disks. Structure is documented below.
service_account: Output<Option<InstanceServiceAccount>>
Service account to attach to the instance.
Structure is documented below.
Note: allow_stopping_for_update
must be set to true or your instance must have a desired_status
of TERMINATED
in order to update this field.
shielded_instance_config: Output<Option<InstanceShieldedInstanceConfig>>
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.
Note: allow_stopping_for_update
must be set to true or your instance must have a desired_status
of TERMINATED
in order to update this field.
A list of network tags to attach to the instance.
zone: Output<Option<String>>
The zone that the machine should be created in. If it is not provided, the provider zone is used.
Implementations§
source§impl InstanceArgs
impl InstanceArgs
sourcepub fn builder() -> InstanceArgsBuilder
pub fn builder() -> InstanceArgsBuilder
Create an instance of InstanceArgs
using the builder syntax
Trait Implementations§
source§impl Clone for InstanceArgs
impl Clone for InstanceArgs
source§fn clone(&self) -> InstanceArgs
fn clone(&self) -> InstanceArgs
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for InstanceArgs
impl RefUnwindSafe for InstanceArgs
impl Send for InstanceArgs
impl Sync for InstanceArgs
impl Unpin for InstanceArgs
impl UnwindSafe for InstanceArgs
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)