PerInstanceConfig
A config defined for a single managed instance that belongs to an instance group manager. It preserves the instance name across instance group manager operations and can define stateful disks or metadata that are unique to the instance.
To get more information about PerInstanceConfig, see:
- API documentation
- How-to Guides
Create a PerInstanceConfig Resource
new PerInstanceConfig(name: string, args: PerInstanceConfigArgs, opts?: CustomResourceOptions);def PerInstanceConfig(resource_name, opts=None, instance_group_manager=None, minimal_action=None, most_disruptive_allowed_action=None, name=None, preserved_state=None, project=None, remove_instance_state_on_destroy=None, zone=None, __props__=None);func NewPerInstanceConfig(ctx *Context, name string, args PerInstanceConfigArgs, opts ...ResourceOption) (*PerInstanceConfig, error)public PerInstanceConfig(string name, PerInstanceConfigArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args PerInstanceConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PerInstanceConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PerInstanceConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
PerInstanceConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The PerInstanceConfig resource accepts the following input properties:
- Instance
Group stringManager The instance group manager this instance config is part of.
- Zone string
Zone where the containing instance group manager is located
- Minimal
Action string The minimal action to perform on the instance during an update. Default is
NONE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- Most
Disruptive stringAllowed Action The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- Name string
The name for this per-instance config and its corresponding instance.
- Preserved
State PerInstance Config Preserved State Args The preserved state for this instance. Structure is documented below.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Remove
Instance boolState On Destroy When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
- Instance
Group stringManager The instance group manager this instance config is part of.
- Zone string
Zone where the containing instance group manager is located
- Minimal
Action string The minimal action to perform on the instance during an update. Default is
NONE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- Most
Disruptive stringAllowed Action The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- Name string
The name for this per-instance config and its corresponding instance.
- Preserved
State PerInstance Config Preserved State The preserved state for this instance. Structure is documented below.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Remove
Instance boolState On Destroy When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
- instance
Group stringManager The instance group manager this instance config is part of.
- zone string
Zone where the containing instance group manager is located
- minimal
Action string The minimal action to perform on the instance during an update. Default is
NONE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- most
Disruptive stringAllowed Action The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- name string
The name for this per-instance config and its corresponding instance.
- preserved
State PerInstance Config Preserved State The preserved state for this instance. Structure is documented below.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- remove
Instance booleanState On Destroy When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
- instance_
group_ strmanager The instance group manager this instance config is part of.
- zone str
Zone where the containing instance group manager is located
- minimal_
action str The minimal action to perform on the instance during an update. Default is
NONE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- most_
disruptive_ strallowed_ action The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- name str
The name for this per-instance config and its corresponding instance.
- preserved_
state Dict[PerInstance Config Preserved State] The preserved state for this instance. Structure is documented below.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- remove_
instance_ boolstate_ on_ destroy When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
Outputs
All input properties are implicitly available as output properties. Additionally, the PerInstanceConfig resource produces the following output properties:
Look up an Existing PerInstanceConfig Resource
Get an existing PerInstanceConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PerInstanceConfigState, opts?: CustomResourceOptions): PerInstanceConfigstatic get(resource_name, id, opts=None, instance_group_manager=None, minimal_action=None, most_disruptive_allowed_action=None, name=None, preserved_state=None, project=None, remove_instance_state_on_destroy=None, zone=None, __props__=None);func GetPerInstanceConfig(ctx *Context, name string, id IDInput, state *PerInstanceConfigState, opts ...ResourceOption) (*PerInstanceConfig, error)public static PerInstanceConfig Get(string name, Input<string> id, PerInstanceConfigState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Instance
Group stringManager The instance group manager this instance config is part of.
- Minimal
Action string The minimal action to perform on the instance during an update. Default is
NONE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- Most
Disruptive stringAllowed Action The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- Name string
The name for this per-instance config and its corresponding instance.
- Preserved
State PerInstance Config Preserved State Args The preserved state for this instance. Structure is documented below.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Remove
Instance boolState On Destroy When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
- Zone string
Zone where the containing instance group manager is located
- Instance
Group stringManager The instance group manager this instance config is part of.
- Minimal
Action string The minimal action to perform on the instance during an update. Default is
NONE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- Most
Disruptive stringAllowed Action The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- Name string
The name for this per-instance config and its corresponding instance.
- Preserved
State PerInstance Config Preserved State The preserved state for this instance. Structure is documented below.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Remove
Instance boolState On Destroy When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
- Zone string
Zone where the containing instance group manager is located
- instance
Group stringManager The instance group manager this instance config is part of.
- minimal
Action string The minimal action to perform on the instance during an update. Default is
NONE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- most
Disruptive stringAllowed Action The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- name string
The name for this per-instance config and its corresponding instance.
- preserved
State PerInstance Config Preserved State The preserved state for this instance. Structure is documented below.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- remove
Instance booleanState On Destroy When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
- zone string
Zone where the containing instance group manager is located
- instance_
group_ strmanager The instance group manager this instance config is part of.
- minimal_
action str The minimal action to perform on the instance during an update. Default is
NONE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- most_
disruptive_ strallowed_ action The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are: * REPLACE * RESTART * REFRESH * NONE- name str
The name for this per-instance config and its corresponding instance.
- preserved_
state Dict[PerInstance Config Preserved State] The preserved state for this instance. Structure is documented below.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- remove_
instance_ boolstate_ on_ destroy When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
- zone str
Zone where the containing instance group manager is located
Supporting Types
PerInstanceConfigPreservedState
- Disks
List<Per
Instance Config Preserved State Disk Args> Stateful disks for the instance. Structure is documented below.
- Metadata Dictionary<string, string>
Preserved metadata defined for this instance. This is a list of key->value pairs.
- Disks
[]Per
Instance Config Preserved State Disk Stateful disks for the instance. Structure is documented below.
- Metadata map[string]string
Preserved metadata defined for this instance. This is a list of key->value pairs.
- disks
Per
Instance Config Preserved State Disk[] Stateful disks for the instance. Structure is documented below.
- metadata {[key: string]: string}
Preserved metadata defined for this instance. This is a list of key->value pairs.
- disks
List[Per
Instance Config Preserved State Disk] Stateful disks for the instance. Structure is documented below.
- metadata Dict[str, str]
Preserved metadata defined for this instance. This is a list of key->value pairs.
PerInstanceConfigPreservedStateDisk
- Device
Name string A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.
- Source string
The URI of an existing persistent disk to attach under the specified device-name in the format
projects/project-id/zones/zone/disks/disk-name.- Delete
Rule string A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options are
NEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group.- Mode string
The mode of the disk.
- Device
Name string A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.
- Source string
The URI of an existing persistent disk to attach under the specified device-name in the format
projects/project-id/zones/zone/disks/disk-name.- Delete
Rule string A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options are
NEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group.- Mode string
The mode of the disk.
- device
Name string A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.
- source string
The URI of an existing persistent disk to attach under the specified device-name in the format
projects/project-id/zones/zone/disks/disk-name.- delete
Rule string A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options are
NEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group.- mode string
The mode of the disk.
- device_
name str A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.
- source str
The URI of an existing persistent disk to attach under the specified device-name in the format
projects/project-id/zones/zone/disks/disk-name.- delete
Rule str A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options are
NEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group.- mode str
The mode of the disk.
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.