1. Packages
  2. Google Cloud Native
  3. API Docs
  4. compute
  5. compute/beta
  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/beta.TargetInstance

Explore with Pulumi AI

google-native logo

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/beta: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 google_nativeTargetInstanceResource = new GoogleNative.Compute.Beta.TargetInstance("google-nativeTargetInstanceResource", new()
    {
        Description = "string",
        Instance = "string",
        Name = "string",
        NatPolicy = GoogleNative.Compute.Beta.TargetInstanceNatPolicy.NoNat,
        Network = "string",
        Project = "string",
        RequestId = "string",
        Zone = "string",
    });
    
    example, err := computebeta.NewTargetInstance(ctx, "google-nativeTargetInstanceResource", &computebeta.TargetInstanceArgs{
    Description: pulumi.String("string"),
    Instance: pulumi.String("string"),
    Name: pulumi.String("string"),
    NatPolicy: computebeta.TargetInstanceNatPolicyNoNat,
    Network: pulumi.String("string"),
    Project: pulumi.String("string"),
    RequestId: pulumi.String("string"),
    Zone: pulumi.String("string"),
    })
    
    var google_nativeTargetInstanceResource = new TargetInstance("google-nativeTargetInstanceResource", TargetInstanceArgs.builder()
        .description("string")
        .instance("string")
        .name("string")
        .natPolicy("NO_NAT")
        .network("string")
        .project("string")
        .requestId("string")
        .zone("string")
        .build());
    
    google_native_target_instance_resource = google_native.compute.beta.TargetInstance("google-nativeTargetInstanceResource",
        description="string",
        instance="string",
        name="string",
        nat_policy=google_native.compute.beta.TargetInstanceNatPolicy.NO_NAT,
        network="string",
        project="string",
        request_id="string",
        zone="string")
    
    const google_nativeTargetInstanceResource = new google_native.compute.beta.TargetInstance("google-nativeTargetInstanceResource", {
        description: "string",
        instance: "string",
        name: "string",
        natPolicy: google_native.compute.beta.TargetInstanceNatPolicy.NoNat,
        network: "string",
        project: "string",
        requestId: "string",
        zone: "string",
    });
    
    type: google-native:compute/beta: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.
    NatPolicy Pulumi.GoogleNative.Compute.Beta.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 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 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 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 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 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 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 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 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 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.
    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 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 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-native logo

    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