Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.compute/v1.TargetInstance
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
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 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 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 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 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 String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
type: google-native:compute/v1:TargetInstance
properties:
description: string
instance: string
name: string
natPolicy: NO_NAT
network: string
project: string
requestId: string
zone: string
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
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. - Nat
Policy Pulumi.Google Native. Compute. V1. Target Instance Nat Policy - 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 string
- Request
Id 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 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. - Nat
Policy TargetInstance Nat Policy - 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 string
- Request
Id 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 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. - nat
Policy TargetInstance Nat Policy - 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 String
- request
Id 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 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. - nat
Policy TargetInstance Nat Policy - 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 string
- request
Id 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 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 TargetInstance Nat Policy - 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 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 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. - nat
Policy "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 String
- request
Id 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 String
Outputs
All input properties are implicitly available as output properties. Additionally, the TargetInstance resource produces the following output properties:
- Creation
Timestamp 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.
- Security
Policy string - The resource URL for the security policy associated with this target instance.
- Self
Link string - Server-defined URL for the resource.
- Creation
Timestamp 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.
- Security
Policy string - The resource URL for the security policy associated with this target instance.
- Self
Link string - Server-defined URL for the resource.
- creation
Timestamp 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.
- security
Policy String - The resource URL for the security policy associated with this target instance.
- self
Link String - Server-defined URL for the resource.
- creation
Timestamp 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.
- security
Policy string - The resource URL for the security policy associated with this target instance.
- self
Link 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.
- creation
Timestamp 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.
- security
Policy String - The resource URL for the security policy associated with this target instance.
- self
Link String - Server-defined URL for the resource.
Supporting Types
TargetInstanceNatPolicy, TargetInstanceNatPolicyArgs
- No
Nat - NO_NATNo NAT performed.
- Target
Instance Nat Policy No Nat - NO_NATNo NAT performed.
- No
Nat - NO_NATNo NAT performed.
- No
Nat - 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.