1. Packages
  2. Google Cloud Native
  3. API Docs
  4. compute
  5. compute/v1
  6. TargetInstance

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.compute/v1.TargetInstance

Explore with Pulumi AI

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

Creates a TargetInstance resource in the specified project and zone using the data included in the request.

Create TargetInstance Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new TargetInstance(name: string, args?: TargetInstanceArgs, opts?: CustomResourceOptions);
@overload
def TargetInstance(resource_name: str,
                   args: Optional[TargetInstanceArgs] = None,
                   opts: Optional[ResourceOptions] = None)

@overload
def TargetInstance(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   description: Optional[str] = None,
                   instance: Optional[str] = None,
                   name: Optional[str] = None,
                   nat_policy: Optional[TargetInstanceNatPolicy] = None,
                   network: Optional[str] = None,
                   project: Optional[str] = None,
                   request_id: Optional[str] = None,
                   zone: Optional[str] = None)
func NewTargetInstance(ctx *Context, name string, args *TargetInstanceArgs, opts ...ResourceOption) (*TargetInstance, error)
public TargetInstance(string name, TargetInstanceArgs? args = null, CustomResourceOptions? opts = null)
public TargetInstance(String name, TargetInstanceArgs args)
public TargetInstance(String name, TargetInstanceArgs args, CustomResourceOptions options)
type: google-native:compute/v1:TargetInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args TargetInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args TargetInstanceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args TargetInstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args TargetInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TargetInstanceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var exampletargetInstanceResourceResourceFromComputev1 = new GoogleNative.Compute.V1.TargetInstance("exampletargetInstanceResourceResourceFromComputev1", new()
{
    Description = "string",
    Instance = "string",
    Name = "string",
    NatPolicy = GoogleNative.Compute.V1.TargetInstanceNatPolicy.NoNat,
    Network = "string",
    Project = "string",
    RequestId = "string",
    Zone = "string",
});
Copy
example, err := computev1.NewTargetInstance(ctx, "exampletargetInstanceResourceResourceFromComputev1", &computev1.TargetInstanceArgs{
	Description: pulumi.String("string"),
	Instance:    pulumi.String("string"),
	Name:        pulumi.String("string"),
	NatPolicy:   computev1.TargetInstanceNatPolicyNoNat,
	Network:     pulumi.String("string"),
	Project:     pulumi.String("string"),
	RequestId:   pulumi.String("string"),
	Zone:        pulumi.String("string"),
})
Copy
var exampletargetInstanceResourceResourceFromComputev1 = new TargetInstance("exampletargetInstanceResourceResourceFromComputev1", TargetInstanceArgs.builder()
    .description("string")
    .instance("string")
    .name("string")
    .natPolicy("NO_NAT")
    .network("string")
    .project("string")
    .requestId("string")
    .zone("string")
    .build());
Copy
exampletarget_instance_resource_resource_from_computev1 = google_native.compute.v1.TargetInstance("exampletargetInstanceResourceResourceFromComputev1",
    description="string",
    instance="string",
    name="string",
    nat_policy=google_native.compute.v1.TargetInstanceNatPolicy.NO_NAT,
    network="string",
    project="string",
    request_id="string",
    zone="string")
Copy
const exampletargetInstanceResourceResourceFromComputev1 = new google_native.compute.v1.TargetInstance("exampletargetInstanceResourceResourceFromComputev1", {
    description: "string",
    instance: "string",
    name: "string",
    natPolicy: google_native.compute.v1.TargetInstanceNatPolicy.NoNat,
    network: "string",
    project: "string",
    requestId: "string",
    zone: "string",
});
Copy
type: google-native:compute/v1:TargetInstance
properties:
    description: string
    instance: string
    name: string
    natPolicy: NO_NAT
    network: string
    project: string
    requestId: string
    zone: string
Copy

TargetInstance Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The TargetInstance resource accepts the following input properties:

Description string
An optional description of this resource. Provide this property when you create the resource.
Instance string
A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance
Name string
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
NatPolicy Pulumi.GoogleNative.Compute.V1.TargetInstanceNatPolicy
Must have a value of NO_NAT. Protocol forwarding delivers packets while preserving the destination IP address of the forwarding rule referencing the target instance.
Network string
The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.
Project Changes to this property will trigger replacement. string
RequestId string
An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Zone Changes to this property will trigger replacement. string
Description string
An optional description of this resource. Provide this property when you create the resource.
Instance string
A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance
Name string
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
NatPolicy TargetInstanceNatPolicy
Must have a value of NO_NAT. Protocol forwarding delivers packets while preserving the destination IP address of the forwarding rule referencing the target instance.
Network string
The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.
Project Changes to this property will trigger replacement. string
RequestId string
An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Zone Changes to this property will trigger replacement. string
description String
An optional description of this resource. Provide this property when you create the resource.
instance String
A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance
name String
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
natPolicy TargetInstanceNatPolicy
Must have a value of NO_NAT. Protocol forwarding delivers packets while preserving the destination IP address of the forwarding rule referencing the target instance.
network String
The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.
project Changes to this property will trigger replacement. String
requestId String
An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
zone Changes to this property will trigger replacement. String
description string
An optional description of this resource. Provide this property when you create the resource.
instance string
A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance
name string
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
natPolicy TargetInstanceNatPolicy
Must have a value of NO_NAT. Protocol forwarding delivers packets while preserving the destination IP address of the forwarding rule referencing the target instance.
network string
The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.
project Changes to this property will trigger replacement. string
requestId string
An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
zone Changes to this property will trigger replacement. string
description str
An optional description of this resource. Provide this property when you create the resource.
instance str
A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance
name str
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
nat_policy TargetInstanceNatPolicy
Must have a value of NO_NAT. Protocol forwarding delivers packets while preserving the destination IP address of the forwarding rule referencing the target instance.
network str
The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.
project Changes to this property will trigger replacement. str
request_id str
An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
zone Changes to this property will trigger replacement. str
description String
An optional description of this resource. Provide this property when you create the resource.
instance String
A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance
name String
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
natPolicy "NO_NAT"
Must have a value of NO_NAT. Protocol forwarding delivers packets while preserving the destination IP address of the forwarding rule referencing the target instance.
network String
The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.
project Changes to this property will trigger replacement. String
requestId String
An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
zone Changes to this property will trigger replacement. String

Outputs

All input properties are implicitly available as output properties. Additionally, the TargetInstance resource produces the following output properties:

CreationTimestamp string
Creation timestamp in RFC3339 text format.
Id string
The provider-assigned unique ID for this managed resource.
Kind string
The type of the resource. Always compute#targetInstance for target instances.
SecurityPolicy string
The resource URL for the security policy associated with this target instance.
SelfLink string
Server-defined URL for the resource.
CreationTimestamp string
Creation timestamp in RFC3339 text format.
Id string
The provider-assigned unique ID for this managed resource.
Kind string
The type of the resource. Always compute#targetInstance for target instances.
SecurityPolicy string
The resource URL for the security policy associated with this target instance.
SelfLink string
Server-defined URL for the resource.
creationTimestamp String
Creation timestamp in RFC3339 text format.
id String
The provider-assigned unique ID for this managed resource.
kind String
The type of the resource. Always compute#targetInstance for target instances.
securityPolicy String
The resource URL for the security policy associated with this target instance.
selfLink String
Server-defined URL for the resource.
creationTimestamp string
Creation timestamp in RFC3339 text format.
id string
The provider-assigned unique ID for this managed resource.
kind string
The type of the resource. Always compute#targetInstance for target instances.
securityPolicy string
The resource URL for the security policy associated with this target instance.
selfLink string
Server-defined URL for the resource.
creation_timestamp str
Creation timestamp in RFC3339 text format.
id str
The provider-assigned unique ID for this managed resource.
kind str
The type of the resource. Always compute#targetInstance for target instances.
security_policy str
The resource URL for the security policy associated with this target instance.
self_link str
Server-defined URL for the resource.
creationTimestamp String
Creation timestamp in RFC3339 text format.
id String
The provider-assigned unique ID for this managed resource.
kind String
The type of the resource. Always compute#targetInstance for target instances.
securityPolicy String
The resource URL for the security policy associated with this target instance.
selfLink String
Server-defined URL for the resource.

Supporting Types

TargetInstanceNatPolicy
, TargetInstanceNatPolicyArgs

NoNat
NO_NATNo NAT performed.
TargetInstanceNatPolicyNoNat
NO_NATNo NAT performed.
NoNat
NO_NATNo NAT performed.
NoNat
NO_NATNo NAT performed.
NO_NAT
NO_NATNo NAT performed.
"NO_NAT"
NO_NATNo NAT performed.

Package Details

Repository
Google Cloud Native pulumi/pulumi-google-native
License
Apache-2.0

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi