1. Packages
  2. Konnect Provider
  3. API Docs
  4. GatewayTarget
konnect 2.6.0 published on Tuesday, Apr 22, 2025 by kong

konnect.GatewayTarget

Explore with Pulumi AI

GatewayTarget Resource

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as konnect from "@pulumi/konnect";

const myGatewaytarget = new konnect.GatewayTarget("myGatewaytarget", {
    controlPlaneId: "9524ec7d-36d9-465d-a8c5-83a3c9390458",
    createdAt: 2.48,
    gatewayTargetId: "...my_id...",
    tags: ["..."],
    target: "...my_target...",
    updatedAt: 6.8,
    upstream: {
        id: "...my_id...",
    },
    upstreamId: "5a078780-5d4c-4aae-984a-bdc6f52113d8",
    weight: 5,
});
Copy
import pulumi
import pulumi_konnect as konnect

my_gatewaytarget = konnect.GatewayTarget("myGatewaytarget",
    control_plane_id="9524ec7d-36d9-465d-a8c5-83a3c9390458",
    created_at=2.48,
    gateway_target_id="...my_id...",
    tags=["..."],
    target="...my_target...",
    updated_at=6.8,
    upstream={
        "id": "...my_id...",
    },
    upstream_id="5a078780-5d4c-4aae-984a-bdc6f52113d8",
    weight=5)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/konnect/v2/konnect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := konnect.NewGatewayTarget(ctx, "myGatewaytarget", &konnect.GatewayTargetArgs{
			ControlPlaneId:  pulumi.String("9524ec7d-36d9-465d-a8c5-83a3c9390458"),
			CreatedAt:       pulumi.Float64(2.48),
			GatewayTargetId: pulumi.String("...my_id..."),
			Tags: pulumi.StringArray{
				pulumi.String("..."),
			},
			Target:    pulumi.String("...my_target..."),
			UpdatedAt: pulumi.Float64(6.8),
			Upstream: &konnect.GatewayTargetUpstreamArgs{
				Id: pulumi.String("...my_id..."),
			},
			UpstreamId: pulumi.String("5a078780-5d4c-4aae-984a-bdc6f52113d8"),
			Weight:     pulumi.Float64(5),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Konnect = Pulumi.Konnect;

return await Deployment.RunAsync(() => 
{
    var myGatewaytarget = new Konnect.GatewayTarget("myGatewaytarget", new()
    {
        ControlPlaneId = "9524ec7d-36d9-465d-a8c5-83a3c9390458",
        CreatedAt = 2.48,
        GatewayTargetId = "...my_id...",
        Tags = new[]
        {
            "...",
        },
        Target = "...my_target...",
        UpdatedAt = 6.8,
        Upstream = new Konnect.Inputs.GatewayTargetUpstreamArgs
        {
            Id = "...my_id...",
        },
        UpstreamId = "5a078780-5d4c-4aae-984a-bdc6f52113d8",
        Weight = 5,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.konnect.GatewayTarget;
import com.pulumi.konnect.GatewayTargetArgs;
import com.pulumi.konnect.inputs.GatewayTargetUpstreamArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var myGatewaytarget = new GatewayTarget("myGatewaytarget", GatewayTargetArgs.builder()
            .controlPlaneId("9524ec7d-36d9-465d-a8c5-83a3c9390458")
            .createdAt(2.48)
            .gatewayTargetId("...my_id...")
            .tags("...")
            .target("...my_target...")
            .updatedAt(6.8)
            .upstream(GatewayTargetUpstreamArgs.builder()
                .id("...my_id...")
                .build())
            .upstreamId("5a078780-5d4c-4aae-984a-bdc6f52113d8")
            .weight(5)
            .build());

    }
}
Copy
resources:
  myGatewaytarget:
    type: konnect:GatewayTarget
    properties:
      controlPlaneId: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      createdAt: 2.48
      gatewayTargetId: '...my_id...'
      tags:
        - '...'
      target: '...my_target...'
      updatedAt: 6.8
      upstream:
        id: '...my_id...'
      upstreamId: 5a078780-5d4c-4aae-984a-bdc6f52113d8
      weight: 5
Copy

Create GatewayTarget Resource

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

Constructor syntax

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

@overload
def GatewayTarget(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  control_plane_id: Optional[str] = None,
                  upstream_id: Optional[str] = None,
                  created_at: Optional[float] = None,
                  gateway_target_id: Optional[str] = None,
                  tags: Optional[Sequence[str]] = None,
                  target: Optional[str] = None,
                  updated_at: Optional[float] = None,
                  upstream: Optional[GatewayTargetUpstreamArgs] = None,
                  weight: Optional[float] = None)
func NewGatewayTarget(ctx *Context, name string, args GatewayTargetArgs, opts ...ResourceOption) (*GatewayTarget, error)
public GatewayTarget(string name, GatewayTargetArgs args, CustomResourceOptions? opts = null)
public GatewayTarget(String name, GatewayTargetArgs args)
public GatewayTarget(String name, GatewayTargetArgs args, CustomResourceOptions options)
type: konnect:GatewayTarget
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 This property is required. GatewayTargetArgs
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 This property is required. GatewayTargetArgs
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 This property is required. GatewayTargetArgs
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 This property is required. GatewayTargetArgs
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. GatewayTargetArgs
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 gatewayTargetResource = new Konnect.GatewayTarget("gatewayTargetResource", new()
{
    ControlPlaneId = "string",
    UpstreamId = "string",
    CreatedAt = 0,
    GatewayTargetId = "string",
    Tags = new[]
    {
        "string",
    },
    Target = "string",
    UpdatedAt = 0,
    Upstream = new Konnect.Inputs.GatewayTargetUpstreamArgs
    {
        Id = "string",
    },
    Weight = 0,
});
Copy
example, err := konnect.NewGatewayTarget(ctx, "gatewayTargetResource", &konnect.GatewayTargetArgs{
	ControlPlaneId:  pulumi.String("string"),
	UpstreamId:      pulumi.String("string"),
	CreatedAt:       pulumi.Float64(0),
	GatewayTargetId: pulumi.String("string"),
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
	Target:    pulumi.String("string"),
	UpdatedAt: pulumi.Float64(0),
	Upstream: &konnect.GatewayTargetUpstreamArgs{
		Id: pulumi.String("string"),
	},
	Weight: pulumi.Float64(0),
})
Copy
var gatewayTargetResource = new GatewayTarget("gatewayTargetResource", GatewayTargetArgs.builder()
    .controlPlaneId("string")
    .upstreamId("string")
    .createdAt(0)
    .gatewayTargetId("string")
    .tags("string")
    .target("string")
    .updatedAt(0)
    .upstream(GatewayTargetUpstreamArgs.builder()
        .id("string")
        .build())
    .weight(0)
    .build());
Copy
gateway_target_resource = konnect.GatewayTarget("gatewayTargetResource",
    control_plane_id="string",
    upstream_id="string",
    created_at=0,
    gateway_target_id="string",
    tags=["string"],
    target="string",
    updated_at=0,
    upstream={
        "id": "string",
    },
    weight=0)
Copy
const gatewayTargetResource = new konnect.GatewayTarget("gatewayTargetResource", {
    controlPlaneId: "string",
    upstreamId: "string",
    createdAt: 0,
    gatewayTargetId: "string",
    tags: ["string"],
    target: "string",
    updatedAt: 0,
    upstream: {
        id: "string",
    },
    weight: 0,
});
Copy
type: konnect:GatewayTarget
properties:
    controlPlaneId: string
    createdAt: 0
    gatewayTargetId: string
    tags:
        - string
    target: string
    updatedAt: 0
    upstream:
        id: string
    upstreamId: string
    weight: 0
Copy

GatewayTarget 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 GatewayTarget resource accepts the following input properties:

ControlPlaneId This property is required. string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
UpstreamId This property is required. string
ID or target of the Target to lookup. Requires replacement if changed.
CreatedAt double
Unix epoch when the resource was created. Requires replacement if changed.
GatewayTargetId string
Requires replacement if changed.
Tags List<string>
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
Target string
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
UpdatedAt double
Unix epoch when the resource was last updated. Requires replacement if changed.
Upstream GatewayTargetUpstream
Requires replacement if changed.
Weight double
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.
ControlPlaneId This property is required. string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
UpstreamId This property is required. string
ID or target of the Target to lookup. Requires replacement if changed.
CreatedAt float64
Unix epoch when the resource was created. Requires replacement if changed.
GatewayTargetId string
Requires replacement if changed.
Tags []string
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
Target string
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
UpdatedAt float64
Unix epoch when the resource was last updated. Requires replacement if changed.
Upstream GatewayTargetUpstreamArgs
Requires replacement if changed.
Weight float64
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.
controlPlaneId This property is required. String
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
upstreamId This property is required. String
ID or target of the Target to lookup. Requires replacement if changed.
createdAt Double
Unix epoch when the resource was created. Requires replacement if changed.
gatewayTargetId String
Requires replacement if changed.
tags List<String>
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
target String
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
updatedAt Double
Unix epoch when the resource was last updated. Requires replacement if changed.
upstream GatewayTargetUpstream
Requires replacement if changed.
weight Double
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.
controlPlaneId This property is required. string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
upstreamId This property is required. string
ID or target of the Target to lookup. Requires replacement if changed.
createdAt number
Unix epoch when the resource was created. Requires replacement if changed.
gatewayTargetId string
Requires replacement if changed.
tags string[]
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
target string
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
updatedAt number
Unix epoch when the resource was last updated. Requires replacement if changed.
upstream GatewayTargetUpstream
Requires replacement if changed.
weight number
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.
control_plane_id This property is required. str
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
upstream_id This property is required. str
ID or target of the Target to lookup. Requires replacement if changed.
created_at float
Unix epoch when the resource was created. Requires replacement if changed.
gateway_target_id str
Requires replacement if changed.
tags Sequence[str]
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
target str
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
updated_at float
Unix epoch when the resource was last updated. Requires replacement if changed.
upstream GatewayTargetUpstreamArgs
Requires replacement if changed.
weight float
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.
controlPlaneId This property is required. String
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
upstreamId This property is required. String
ID or target of the Target to lookup. Requires replacement if changed.
createdAt Number
Unix epoch when the resource was created. Requires replacement if changed.
gatewayTargetId String
Requires replacement if changed.
tags List<String>
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
target String
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
updatedAt Number
Unix epoch when the resource was last updated. Requires replacement if changed.
upstream Property Map
Requires replacement if changed.
weight Number
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing GatewayTarget Resource

Get an existing GatewayTarget 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?: GatewayTargetState, opts?: CustomResourceOptions): GatewayTarget
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        control_plane_id: Optional[str] = None,
        created_at: Optional[float] = None,
        gateway_target_id: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        target: Optional[str] = None,
        updated_at: Optional[float] = None,
        upstream: Optional[GatewayTargetUpstreamArgs] = None,
        upstream_id: Optional[str] = None,
        weight: Optional[float] = None) -> GatewayTarget
func GetGatewayTarget(ctx *Context, name string, id IDInput, state *GatewayTargetState, opts ...ResourceOption) (*GatewayTarget, error)
public static GatewayTarget Get(string name, Input<string> id, GatewayTargetState? state, CustomResourceOptions? opts = null)
public static GatewayTarget get(String name, Output<String> id, GatewayTargetState state, CustomResourceOptions options)
resources:  _:    type: konnect:GatewayTarget    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ControlPlaneId string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
CreatedAt double
Unix epoch when the resource was created. Requires replacement if changed.
GatewayTargetId string
Requires replacement if changed.
Tags List<string>
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
Target string
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
UpdatedAt double
Unix epoch when the resource was last updated. Requires replacement if changed.
Upstream GatewayTargetUpstream
Requires replacement if changed.
UpstreamId string
ID or target of the Target to lookup. Requires replacement if changed.
Weight double
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.
ControlPlaneId string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
CreatedAt float64
Unix epoch when the resource was created. Requires replacement if changed.
GatewayTargetId string
Requires replacement if changed.
Tags []string
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
Target string
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
UpdatedAt float64
Unix epoch when the resource was last updated. Requires replacement if changed.
Upstream GatewayTargetUpstreamArgs
Requires replacement if changed.
UpstreamId string
ID or target of the Target to lookup. Requires replacement if changed.
Weight float64
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.
controlPlaneId String
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
createdAt Double
Unix epoch when the resource was created. Requires replacement if changed.
gatewayTargetId String
Requires replacement if changed.
tags List<String>
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
target String
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
updatedAt Double
Unix epoch when the resource was last updated. Requires replacement if changed.
upstream GatewayTargetUpstream
Requires replacement if changed.
upstreamId String
ID or target of the Target to lookup. Requires replacement if changed.
weight Double
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.
controlPlaneId string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
createdAt number
Unix epoch when the resource was created. Requires replacement if changed.
gatewayTargetId string
Requires replacement if changed.
tags string[]
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
target string
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
updatedAt number
Unix epoch when the resource was last updated. Requires replacement if changed.
upstream GatewayTargetUpstream
Requires replacement if changed.
upstreamId string
ID or target of the Target to lookup. Requires replacement if changed.
weight number
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.
control_plane_id str
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
created_at float
Unix epoch when the resource was created. Requires replacement if changed.
gateway_target_id str
Requires replacement if changed.
tags Sequence[str]
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
target str
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
updated_at float
Unix epoch when the resource was last updated. Requires replacement if changed.
upstream GatewayTargetUpstreamArgs
Requires replacement if changed.
upstream_id str
ID or target of the Target to lookup. Requires replacement if changed.
weight float
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.
controlPlaneId String
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
createdAt Number
Unix epoch when the resource was created. Requires replacement if changed.
gatewayTargetId String
Requires replacement if changed.
tags List<String>
An optional set of strings associated with the Target for grouping and filtering. Requires replacement if changed.
target String
The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record. Requires replacement if changed.
updatedAt Number
Unix epoch when the resource was last updated. Requires replacement if changed.
upstream Property Map
Requires replacement if changed.
upstreamId String
ID or target of the Target to lookup. Requires replacement if changed.
weight Number
The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record. Requires replacement if changed.

Supporting Types

GatewayTargetUpstream
, GatewayTargetUpstreamArgs

Id string
Requires replacement if changed.
Id string
Requires replacement if changed.
id String
Requires replacement if changed.
id string
Requires replacement if changed.
id str
Requires replacement if changed.
id String
Requires replacement if changed.

Import

$ pulumi import konnect:index/gatewayTarget:GatewayTarget my_konnect_gateway_target "{ \"control_plane_id\": \"9524ec7d-36d9-465d-a8c5-83a3c9390458\", \"id\": \"5a078780-5d4c-4aae-984a-bdc6f52113d8\", \"upstream_id\": \"5a078780-5d4c-4aae-984a-bdc6f52113d8\"}"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
konnect kong/terraform-provider-konnect
License
Notes
This Pulumi package is based on the konnect Terraform Provider.