Upstream

Import

To import an upstream

 $ pulumi import kong:index/upstream:Upstream <upstream_identifier> <upstream_id>

Example Usage

using Pulumi;
using Kong = Pulumi.Kong;

class MyStack : Stack
{
    public MyStack()
    {
        var certificate = new Kong.Certificate("certificate", new Kong.CertificateArgs
        {
            Certificate = @"    -----BEGIN CERTIFICATE-----
    ......
    -----END CERTIFICATE-----
",
            PrivateKey = @"    -----BEGIN PRIVATE KEY-----
    .....
    -----END PRIVATE KEY-----
",
            Snis = 
            {
                "foo.com",
            },
        });
        var upstream = new Kong.Upstream("upstream", new Kong.UpstreamArgs
        {
            Slots = 10,
            HashOn = "header",
            HashFallback = "cookie",
            HashOnHeader = "HeaderName",
            HashFallbackHeader = "FallbackHeaderName",
            HashOnCookie = "CookieName",
            HashOnCookiePath = "/path",
            HostHeader = "x-host",
            Tags = 
            {
                "a",
                "b",
            },
            ClientCertificateId = certificate.Id,
            Healthchecks = new Kong.Inputs.UpstreamHealthchecksArgs
            {
                Active = new Kong.Inputs.UpstreamHealthchecksActiveArgs
                {
                    Type = "https",
                    HttpPath = "/status",
                    Timeout = 10,
                    Concurrency = 20,
                    HttpsVerifyCertificate = false,
                    HttpsSni = "some.domain.com",
                    Healthy = new Kong.Inputs.UpstreamHealthchecksActiveHealthyArgs
                    {
                        Successes = 1,
                        Interval = 5,
                        HttpStatuses = 
                        {
                            200,
                            201,
                        },
                    },
                    Unhealthy = new Kong.Inputs.UpstreamHealthchecksActiveUnhealthyArgs
                    {
                        Timeouts = 7,
                        Interval = 3,
                        TcpFailures = 1,
                        HttpFailures = 2,
                        HttpStatuses = 
                        {
                            500,
                            501,
                        },
                    },
                },
                Passive = new Kong.Inputs.UpstreamHealthchecksPassiveArgs
                {
                    Type = "https",
                    Healthy = new Kong.Inputs.UpstreamHealthchecksPassiveHealthyArgs
                    {
                        Successes = 1,
                        HttpStatuses = 
                        {
                            200,
                            201,
                            202,
                        },
                    },
                    Unhealthy = new Kong.Inputs.UpstreamHealthchecksPassiveUnhealthyArgs
                    {
                        Timeouts = 3,
                        TcpFailures = 5,
                        HttpFailures = 6,
                        HttpStatuses = 
                        {
                            500,
                            501,
                            502,
                        },
                    },
                },
            },
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-kong/sdk/v4/go/kong"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		certificate, err := kong.NewCertificate(ctx, "certificate", &kong.CertificateArgs{
			Certificate: pulumi.String(fmt.Sprintf("%v%v%v", "    -----BEGIN CERTIFICATE-----\n", "    ......\n", "    -----END CERTIFICATE-----\n")),
			PrivateKey:  pulumi.String(fmt.Sprintf("%v%v%v", "    -----BEGIN PRIVATE KEY-----\n", "    .....\n", "    -----END PRIVATE KEY-----\n")),
			Snis: pulumi.StringArray{
				pulumi.String("foo.com"),
			},
		})
		if err != nil {
			return err
		}
		_, err = kong.NewUpstream(ctx, "upstream", &kong.UpstreamArgs{
			Slots:              pulumi.Int(10),
			HashOn:             pulumi.String("header"),
			HashFallback:       pulumi.String("cookie"),
			HashOnHeader:       pulumi.String("HeaderName"),
			HashFallbackHeader: pulumi.String("FallbackHeaderName"),
			HashOnCookie:       pulumi.String("CookieName"),
			HashOnCookiePath:   pulumi.String("/path"),
			HostHeader:         pulumi.String("x-host"),
			Tags: pulumi.StringArray{
				pulumi.String("a"),
				pulumi.String("b"),
			},
			ClientCertificateId: certificate.ID(),
			Healthchecks: &UpstreamHealthchecksArgs{
				Active: &UpstreamHealthchecksActiveArgs{
					Type:                   pulumi.String("https"),
					HttpPath:               pulumi.String("/status"),
					Timeout:                pulumi.Int(10),
					Concurrency:            pulumi.Int(20),
					HttpsVerifyCertificate: pulumi.Bool(false),
					HttpsSni:               pulumi.String("some.domain.com"),
					Healthy: &UpstreamHealthchecksActiveHealthyArgs{
						Successes: pulumi.Int(1),
						Interval:  pulumi.Int(5),
						HttpStatuses: pulumi.IntArray{
							pulumi.Int(200),
							pulumi.Int(201),
						},
					},
					Unhealthy: &UpstreamHealthchecksActiveUnhealthyArgs{
						Timeouts:     pulumi.Int(7),
						Interval:     pulumi.Int(3),
						TcpFailures:  pulumi.Int(1),
						HttpFailures: pulumi.Int(2),
						HttpStatuses: pulumi.IntArray{
							pulumi.Int(500),
							pulumi.Int(501),
						},
					},
				},
				Passive: &UpstreamHealthchecksPassiveArgs{
					Type: pulumi.String("https"),
					Healthy: &UpstreamHealthchecksPassiveHealthyArgs{
						Successes: pulumi.Int(1),
						HttpStatuses: pulumi.IntArray{
							pulumi.Int(200),
							pulumi.Int(201),
							pulumi.Int(202),
						},
					},
					Unhealthy: &UpstreamHealthchecksPassiveUnhealthyArgs{
						Timeouts:     pulumi.Int(3),
						TcpFailures:  pulumi.Int(5),
						HttpFailures: pulumi.Int(6),
						HttpStatuses: pulumi.IntArray{
							pulumi.Int(500),
							pulumi.Int(501),
							pulumi.Int(502),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_kong as kong

certificate = kong.Certificate("certificate",
    certificate="""    -----BEGIN CERTIFICATE-----
    ......
    -----END CERTIFICATE-----
""",
    private_key="""    -----BEGIN PRIVATE KEY-----
    .....
    -----END PRIVATE KEY-----
""",
    snis=["foo.com"])
upstream = kong.Upstream("upstream",
    slots=10,
    hash_on="header",
    hash_fallback="cookie",
    hash_on_header="HeaderName",
    hash_fallback_header="FallbackHeaderName",
    hash_on_cookie="CookieName",
    hash_on_cookie_path="/path",
    host_header="x-host",
    tags=[
        "a",
        "b",
    ],
    client_certificate_id=certificate.id,
    healthchecks=kong.UpstreamHealthchecksArgs(
        active=kong.UpstreamHealthchecksActiveArgs(
            type="https",
            http_path="/status",
            timeout=10,
            concurrency=20,
            https_verify_certificate=False,
            https_sni="some.domain.com",
            healthy=kong.UpstreamHealthchecksActiveHealthyArgs(
                successes=1,
                interval=5,
                http_statuses=[
                    200,
                    201,
                ],
            ),
            unhealthy=kong.UpstreamHealthchecksActiveUnhealthyArgs(
                timeouts=7,
                interval=3,
                tcp_failures=1,
                http_failures=2,
                http_statuses=[
                    500,
                    501,
                ],
            ),
        ),
        passive=kong.UpstreamHealthchecksPassiveArgs(
            type="https",
            healthy=kong.UpstreamHealthchecksPassiveHealthyArgs(
                successes=1,
                http_statuses=[
                    200,
                    201,
                    202,
                ],
            ),
            unhealthy=kong.UpstreamHealthchecksPassiveUnhealthyArgs(
                timeouts=3,
                tcp_failures=5,
                http_failures=6,
                http_statuses=[
                    500,
                    501,
                    502,
                ],
            ),
        ),
    ))
import * as pulumi from "@pulumi/pulumi";
import * as kong from "@pulumi/kong";

const certificate = new kong.Certificate("certificate", {
    certificate: `    -----BEGIN CERTIFICATE-----
    ......
    -----END CERTIFICATE-----
`,
    privateKey: `    -----BEGIN PRIVATE KEY-----
    .....
    -----END PRIVATE KEY-----
`,
    snis: ["foo.com"],
});
const upstream = new kong.Upstream("upstream", {
    slots: 10,
    hashOn: "header",
    hashFallback: "cookie",
    hashOnHeader: "HeaderName",
    hashFallbackHeader: "FallbackHeaderName",
    hashOnCookie: "CookieName",
    hashOnCookiePath: "/path",
    hostHeader: "x-host",
    tags: [
        "a",
        "b",
    ],
    clientCertificateId: certificate.id,
    healthchecks: {
        active: {
            type: "https",
            httpPath: "/status",
            timeout: 10,
            concurrency: 20,
            httpsVerifyCertificate: false,
            httpsSni: "some.domain.com",
            healthy: {
                successes: 1,
                interval: 5,
                httpStatuses: [
                    200,
                    201,
                ],
            },
            unhealthy: {
                timeouts: 7,
                interval: 3,
                tcpFailures: 1,
                httpFailures: 2,
                httpStatuses: [
                    500,
                    501,
                ],
            },
        },
        passive: {
            type: "https",
            healthy: {
                successes: 1,
                httpStatuses: [
                    200,
                    201,
                    202,
                ],
            },
            unhealthy: {
                timeouts: 3,
                tcpFailures: 5,
                httpFailures: 6,
                httpStatuses: [
                    500,
                    501,
                    502,
                ],
            },
        },
    },
});

Create a Upstream Resource

new Upstream(name: string, args?: UpstreamArgs, opts?: CustomResourceOptions);
@overload
def Upstream(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             client_certificate_id: Optional[str] = None,
             hash_fallback: Optional[str] = None,
             hash_fallback_header: Optional[str] = None,
             hash_on: Optional[str] = None,
             hash_on_cookie: Optional[str] = None,
             hash_on_cookie_path: Optional[str] = None,
             hash_on_header: Optional[str] = None,
             healthchecks: Optional[UpstreamHealthchecksArgs] = None,
             host_header: Optional[str] = None,
             name: Optional[str] = None,
             slots: Optional[int] = None,
             tags: Optional[Sequence[str]] = None)
@overload
def Upstream(resource_name: str,
             args: Optional[UpstreamArgs] = None,
             opts: Optional[ResourceOptions] = None)
func NewUpstream(ctx *Context, name string, args *UpstreamArgs, opts ...ResourceOption) (*Upstream, error)
public Upstream(string name, UpstreamArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args UpstreamArgs
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 UpstreamArgs
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 UpstreamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args UpstreamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

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

ClientCertificateId string
The ID of the client certificate to use (from certificate resource) while TLS handshaking to the upstream server.
HashFallback string
is a hashing input type if the primary hash_on does not return a hash (eg. header is missing, or no consumer identified). One of: none, consumer, ip, header, or cookie. Not available if hash_on is set to cookie. Defaults to none.
HashFallbackHeader string
is a header name to take the value from as hash input. Only required when hash_fallback is set to header. Default nil.
HashOn string
is a hashing input type: none (resulting in a weightedroundrobin scheme with no hashing), consumer, ip, header, or cookie. Defaults to none.
HashOnCookie string
is a cookie name to take the value from as hash input. Only required when hash_on or hash_fallback is set to cookie. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response. Default nil.
HashOnCookiePath string

is a cookie path to set in the response headers. Only required when hash_on or hash_fallback is set to cookie. Defaults to /.

  • healthchecks.active.type - (Optional) is a active health check type. HTTP or HTTPS, or just attempt a TCP connection. Possible values are tcp, http or https. Defaults to http.
  • healthchecks.active.timeout - (Optional) is a socket timeout for active health checks (in seconds). Defaults to 1.
  • healthchecks.active.concurrency - (Optional) is a number of targets to check concurrently in active health checks. Defaults to 10.
  • healthchecks.active.http_path - (Optional) is a path to use in GET HTTP request to run as a probe on active health checks. Defaults to /.
  • healthchecks.active.https_verify_certificate - (Optional) check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. Defaults to true.
  • healthchecks.active.https_sni - (Optional) is the hostname to use as an SNI (Server Name Identification) when performing active health checks using HTTPS. This is particularly useful when Targets are configured using IPs, so that the target host’s certificate can be verified with the proper SNI. Default nil.
  • healthchecks.active.healthy.interval - (Optional) is an interval between active health checks for healthy targets (in seconds). A value of zero indicates that active probes for healthy targets should not be performed. Defaults to 0.
  • healthchecks.active.healthy.successes - (Optional) is a number of successes in active probes (as defined by healthchecks.active.healthy.http_statuses) to consider a target healthy. Defaults to 0.
  • healthchecks.active.healthy.http_statuses - (Optional) is an array of HTTP statuses to consider a success, indicating healthiness, when returned by a probe in active health checks. Defaults to [200, 302].
  • healthchecks.active.unhealthy.interval - (Optional) is an interval between active health checks for unhealthy targets (in seconds). A value of zero indicates that active probes for unhealthy targets should not be performed. Defaults to 0.
  • healthchecks.active.unhealthy.tcp_failures - (Optional) is a number of TCP failures in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_failures - (Optional) is a number of HTTP failures in active probes (as defined by healthchecks.active.unhealthy.http_statuses) to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.timeouts - (Optional) is a number of timeouts in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_statuses - (Optional) is an array of HTTP statuses to consider a failure, indicating unhealthiness, when returned by a probe in active health checks. Defaults to [429, 404, 500, 501, 502, 503, 504, 505].
  • healthchecks.passive.type - (Optional) is a passive health check type. Interpreting HTTP/HTTPS statuses, or just check for TCP connection success. Possible values are tcp, http or https (in passive checks, http and https options are equivalent.). Defaults to http.
  • healthchecks.passive.healthy.successes - (Optional) is a Number of successes in proxied traffic (as defined by healthchecks.passive.healthy.http_statuses) to consider a target healthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.healthy.http_statuses - (Optional) is an array of HTTP statuses which represent healthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308].
  • healthchecks.passive.unhealthy.tcp_failures - (Optional) is a number of TCP failures in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_failures - (Optional) is a number of HTTP failures in proxied traffic (as defined by healthchecks.passive.unhealthy.http_statuses) to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.timeouts - (Optional) is a number of timeouts in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_statuses - (Optional) is an array of HTTP statuses which represent unhealthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [429, 500, 503].
HashOnHeader string
is a header name to take the value from as hash input. Only required when hash_on is set to header. Default nil.
Healthchecks UpstreamHealthchecksArgs
HostHeader string
The hostname to be used as Host header when proxying requests through Kong.
Name string
is a hostname, which must be equal to the host of a Service.
Slots int
is the number of slots in the load balancer algorithm (10*65536, defaults to 10000).
Tags List<string>
A list of strings associated with the Upstream for grouping and filtering.
ClientCertificateId string
The ID of the client certificate to use (from certificate resource) while TLS handshaking to the upstream server.
HashFallback string
is a hashing input type if the primary hash_on does not return a hash (eg. header is missing, or no consumer identified). One of: none, consumer, ip, header, or cookie. Not available if hash_on is set to cookie. Defaults to none.
HashFallbackHeader string
is a header name to take the value from as hash input. Only required when hash_fallback is set to header. Default nil.
HashOn string
is a hashing input type: none (resulting in a weightedroundrobin scheme with no hashing), consumer, ip, header, or cookie. Defaults to none.
HashOnCookie string
is a cookie name to take the value from as hash input. Only required when hash_on or hash_fallback is set to cookie. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response. Default nil.
HashOnCookiePath string

is a cookie path to set in the response headers. Only required when hash_on or hash_fallback is set to cookie. Defaults to /.

  • healthchecks.active.type - (Optional) is a active health check type. HTTP or HTTPS, or just attempt a TCP connection. Possible values are tcp, http or https. Defaults to http.
  • healthchecks.active.timeout - (Optional) is a socket timeout for active health checks (in seconds). Defaults to 1.
  • healthchecks.active.concurrency - (Optional) is a number of targets to check concurrently in active health checks. Defaults to 10.
  • healthchecks.active.http_path - (Optional) is a path to use in GET HTTP request to run as a probe on active health checks. Defaults to /.
  • healthchecks.active.https_verify_certificate - (Optional) check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. Defaults to true.
  • healthchecks.active.https_sni - (Optional) is the hostname to use as an SNI (Server Name Identification) when performing active health checks using HTTPS. This is particularly useful when Targets are configured using IPs, so that the target host’s certificate can be verified with the proper SNI. Default nil.
  • healthchecks.active.healthy.interval - (Optional) is an interval between active health checks for healthy targets (in seconds). A value of zero indicates that active probes for healthy targets should not be performed. Defaults to 0.
  • healthchecks.active.healthy.successes - (Optional) is a number of successes in active probes (as defined by healthchecks.active.healthy.http_statuses) to consider a target healthy. Defaults to 0.
  • healthchecks.active.healthy.http_statuses - (Optional) is an array of HTTP statuses to consider a success, indicating healthiness, when returned by a probe in active health checks. Defaults to [200, 302].
  • healthchecks.active.unhealthy.interval - (Optional) is an interval between active health checks for unhealthy targets (in seconds). A value of zero indicates that active probes for unhealthy targets should not be performed. Defaults to 0.
  • healthchecks.active.unhealthy.tcp_failures - (Optional) is a number of TCP failures in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_failures - (Optional) is a number of HTTP failures in active probes (as defined by healthchecks.active.unhealthy.http_statuses) to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.timeouts - (Optional) is a number of timeouts in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_statuses - (Optional) is an array of HTTP statuses to consider a failure, indicating unhealthiness, when returned by a probe in active health checks. Defaults to [429, 404, 500, 501, 502, 503, 504, 505].
  • healthchecks.passive.type - (Optional) is a passive health check type. Interpreting HTTP/HTTPS statuses, or just check for TCP connection success. Possible values are tcp, http or https (in passive checks, http and https options are equivalent.). Defaults to http.
  • healthchecks.passive.healthy.successes - (Optional) is a Number of successes in proxied traffic (as defined by healthchecks.passive.healthy.http_statuses) to consider a target healthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.healthy.http_statuses - (Optional) is an array of HTTP statuses which represent healthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308].
  • healthchecks.passive.unhealthy.tcp_failures - (Optional) is a number of TCP failures in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_failures - (Optional) is a number of HTTP failures in proxied traffic (as defined by healthchecks.passive.unhealthy.http_statuses) to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.timeouts - (Optional) is a number of timeouts in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_statuses - (Optional) is an array of HTTP statuses which represent unhealthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [429, 500, 503].
HashOnHeader string
is a header name to take the value from as hash input. Only required when hash_on is set to header. Default nil.
Healthchecks UpstreamHealthchecksArgs
HostHeader string
The hostname to be used as Host header when proxying requests through Kong.
Name string
is a hostname, which must be equal to the host of a Service.
Slots int
is the number of slots in the load balancer algorithm (10*65536, defaults to 10000).
Tags []string
A list of strings associated with the Upstream for grouping and filtering.
clientCertificateId string
The ID of the client certificate to use (from certificate resource) while TLS handshaking to the upstream server.
hashFallback string
is a hashing input type if the primary hash_on does not return a hash (eg. header is missing, or no consumer identified). One of: none, consumer, ip, header, or cookie. Not available if hash_on is set to cookie. Defaults to none.
hashFallbackHeader string
is a header name to take the value from as hash input. Only required when hash_fallback is set to header. Default nil.
hashOn string
is a hashing input type: none (resulting in a weightedroundrobin scheme with no hashing), consumer, ip, header, or cookie. Defaults to none.
hashOnCookie string
is a cookie name to take the value from as hash input. Only required when hash_on or hash_fallback is set to cookie. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response. Default nil.
hashOnCookiePath string

is a cookie path to set in the response headers. Only required when hash_on or hash_fallback is set to cookie. Defaults to /.

  • healthchecks.active.type - (Optional) is a active health check type. HTTP or HTTPS, or just attempt a TCP connection. Possible values are tcp, http or https. Defaults to http.
  • healthchecks.active.timeout - (Optional) is a socket timeout for active health checks (in seconds). Defaults to 1.
  • healthchecks.active.concurrency - (Optional) is a number of targets to check concurrently in active health checks. Defaults to 10.
  • healthchecks.active.http_path - (Optional) is a path to use in GET HTTP request to run as a probe on active health checks. Defaults to /.
  • healthchecks.active.https_verify_certificate - (Optional) check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. Defaults to true.
  • healthchecks.active.https_sni - (Optional) is the hostname to use as an SNI (Server Name Identification) when performing active health checks using HTTPS. This is particularly useful when Targets are configured using IPs, so that the target host’s certificate can be verified with the proper SNI. Default nil.
  • healthchecks.active.healthy.interval - (Optional) is an interval between active health checks for healthy targets (in seconds). A value of zero indicates that active probes for healthy targets should not be performed. Defaults to 0.
  • healthchecks.active.healthy.successes - (Optional) is a number of successes in active probes (as defined by healthchecks.active.healthy.http_statuses) to consider a target healthy. Defaults to 0.
  • healthchecks.active.healthy.http_statuses - (Optional) is an array of HTTP statuses to consider a success, indicating healthiness, when returned by a probe in active health checks. Defaults to [200, 302].
  • healthchecks.active.unhealthy.interval - (Optional) is an interval between active health checks for unhealthy targets (in seconds). A value of zero indicates that active probes for unhealthy targets should not be performed. Defaults to 0.
  • healthchecks.active.unhealthy.tcp_failures - (Optional) is a number of TCP failures in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_failures - (Optional) is a number of HTTP failures in active probes (as defined by healthchecks.active.unhealthy.http_statuses) to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.timeouts - (Optional) is a number of timeouts in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_statuses - (Optional) is an array of HTTP statuses to consider a failure, indicating unhealthiness, when returned by a probe in active health checks. Defaults to [429, 404, 500, 501, 502, 503, 504, 505].
  • healthchecks.passive.type - (Optional) is a passive health check type. Interpreting HTTP/HTTPS statuses, or just check for TCP connection success. Possible values are tcp, http or https (in passive checks, http and https options are equivalent.). Defaults to http.
  • healthchecks.passive.healthy.successes - (Optional) is a Number of successes in proxied traffic (as defined by healthchecks.passive.healthy.http_statuses) to consider a target healthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.healthy.http_statuses - (Optional) is an array of HTTP statuses which represent healthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308].
  • healthchecks.passive.unhealthy.tcp_failures - (Optional) is a number of TCP failures in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_failures - (Optional) is a number of HTTP failures in proxied traffic (as defined by healthchecks.passive.unhealthy.http_statuses) to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.timeouts - (Optional) is a number of timeouts in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_statuses - (Optional) is an array of HTTP statuses which represent unhealthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [429, 500, 503].
hashOnHeader string
is a header name to take the value from as hash input. Only required when hash_on is set to header. Default nil.
healthchecks UpstreamHealthchecksArgs
hostHeader string
The hostname to be used as Host header when proxying requests through Kong.
name string
is a hostname, which must be equal to the host of a Service.
slots number
is the number of slots in the load balancer algorithm (10*65536, defaults to 10000).
tags string[]
A list of strings associated with the Upstream for grouping and filtering.
client_certificate_id str
The ID of the client certificate to use (from certificate resource) while TLS handshaking to the upstream server.
hash_fallback str
is a hashing input type if the primary hash_on does not return a hash (eg. header is missing, or no consumer identified). One of: none, consumer, ip, header, or cookie. Not available if hash_on is set to cookie. Defaults to none.
hash_fallback_header str
is a header name to take the value from as hash input. Only required when hash_fallback is set to header. Default nil.
hash_on str
is a hashing input type: none (resulting in a weightedroundrobin scheme with no hashing), consumer, ip, header, or cookie. Defaults to none.
hash_on_cookie str
is a cookie name to take the value from as hash input. Only required when hash_on or hash_fallback is set to cookie. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response. Default nil.
hash_on_cookie_path str

is a cookie path to set in the response headers. Only required when hash_on or hash_fallback is set to cookie. Defaults to /.

  • healthchecks.active.type - (Optional) is a active health check type. HTTP or HTTPS, or just attempt a TCP connection. Possible values are tcp, http or https. Defaults to http.
  • healthchecks.active.timeout - (Optional) is a socket timeout for active health checks (in seconds). Defaults to 1.
  • healthchecks.active.concurrency - (Optional) is a number of targets to check concurrently in active health checks. Defaults to 10.
  • healthchecks.active.http_path - (Optional) is a path to use in GET HTTP request to run as a probe on active health checks. Defaults to /.
  • healthchecks.active.https_verify_certificate - (Optional) check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. Defaults to true.
  • healthchecks.active.https_sni - (Optional) is the hostname to use as an SNI (Server Name Identification) when performing active health checks using HTTPS. This is particularly useful when Targets are configured using IPs, so that the target host’s certificate can be verified with the proper SNI. Default nil.
  • healthchecks.active.healthy.interval - (Optional) is an interval between active health checks for healthy targets (in seconds). A value of zero indicates that active probes for healthy targets should not be performed. Defaults to 0.
  • healthchecks.active.healthy.successes - (Optional) is a number of successes in active probes (as defined by healthchecks.active.healthy.http_statuses) to consider a target healthy. Defaults to 0.
  • healthchecks.active.healthy.http_statuses - (Optional) is an array of HTTP statuses to consider a success, indicating healthiness, when returned by a probe in active health checks. Defaults to [200, 302].
  • healthchecks.active.unhealthy.interval - (Optional) is an interval between active health checks for unhealthy targets (in seconds). A value of zero indicates that active probes for unhealthy targets should not be performed. Defaults to 0.
  • healthchecks.active.unhealthy.tcp_failures - (Optional) is a number of TCP failures in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_failures - (Optional) is a number of HTTP failures in active probes (as defined by healthchecks.active.unhealthy.http_statuses) to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.timeouts - (Optional) is a number of timeouts in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_statuses - (Optional) is an array of HTTP statuses to consider a failure, indicating unhealthiness, when returned by a probe in active health checks. Defaults to [429, 404, 500, 501, 502, 503, 504, 505].
  • healthchecks.passive.type - (Optional) is a passive health check type. Interpreting HTTP/HTTPS statuses, or just check for TCP connection success. Possible values are tcp, http or https (in passive checks, http and https options are equivalent.). Defaults to http.
  • healthchecks.passive.healthy.successes - (Optional) is a Number of successes in proxied traffic (as defined by healthchecks.passive.healthy.http_statuses) to consider a target healthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.healthy.http_statuses - (Optional) is an array of HTTP statuses which represent healthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308].
  • healthchecks.passive.unhealthy.tcp_failures - (Optional) is a number of TCP failures in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_failures - (Optional) is a number of HTTP failures in proxied traffic (as defined by healthchecks.passive.unhealthy.http_statuses) to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.timeouts - (Optional) is a number of timeouts in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_statuses - (Optional) is an array of HTTP statuses which represent unhealthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [429, 500, 503].
hash_on_header str
is a header name to take the value from as hash input. Only required when hash_on is set to header. Default nil.
healthchecks UpstreamHealthchecksArgs
host_header str
The hostname to be used as Host header when proxying requests through Kong.
name str
is a hostname, which must be equal to the host of a Service.
slots int
is the number of slots in the load balancer algorithm (10*65536, defaults to 10000).
tags Sequence[str]
A list of strings associated with the Upstream for grouping and filtering.

Outputs

All input properties are implicitly available as output properties. Additionally, the Upstream 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing Upstream Resource

Get an existing Upstream 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?: UpstreamState, opts?: CustomResourceOptions): Upstream
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        client_certificate_id: Optional[str] = None,
        hash_fallback: Optional[str] = None,
        hash_fallback_header: Optional[str] = None,
        hash_on: Optional[str] = None,
        hash_on_cookie: Optional[str] = None,
        hash_on_cookie_path: Optional[str] = None,
        hash_on_header: Optional[str] = None,
        healthchecks: Optional[UpstreamHealthchecksArgs] = None,
        host_header: Optional[str] = None,
        name: Optional[str] = None,
        slots: Optional[int] = None,
        tags: Optional[Sequence[str]] = None) -> Upstream
func GetUpstream(ctx *Context, name string, id IDInput, state *UpstreamState, opts ...ResourceOption) (*Upstream, error)
public static Upstream Get(string name, Input<string> id, UpstreamState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ClientCertificateId string
The ID of the client certificate to use (from certificate resource) while TLS handshaking to the upstream server.
HashFallback string
is a hashing input type if the primary hash_on does not return a hash (eg. header is missing, or no consumer identified). One of: none, consumer, ip, header, or cookie. Not available if hash_on is set to cookie. Defaults to none.
HashFallbackHeader string
is a header name to take the value from as hash input. Only required when hash_fallback is set to header. Default nil.
HashOn string
is a hashing input type: none (resulting in a weightedroundrobin scheme with no hashing), consumer, ip, header, or cookie. Defaults to none.
HashOnCookie string
is a cookie name to take the value from as hash input. Only required when hash_on or hash_fallback is set to cookie. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response. Default nil.
HashOnCookiePath string

is a cookie path to set in the response headers. Only required when hash_on or hash_fallback is set to cookie. Defaults to /.

  • healthchecks.active.type - (Optional) is a active health check type. HTTP or HTTPS, or just attempt a TCP connection. Possible values are tcp, http or https. Defaults to http.
  • healthchecks.active.timeout - (Optional) is a socket timeout for active health checks (in seconds). Defaults to 1.
  • healthchecks.active.concurrency - (Optional) is a number of targets to check concurrently in active health checks. Defaults to 10.
  • healthchecks.active.http_path - (Optional) is a path to use in GET HTTP request to run as a probe on active health checks. Defaults to /.
  • healthchecks.active.https_verify_certificate - (Optional) check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. Defaults to true.
  • healthchecks.active.https_sni - (Optional) is the hostname to use as an SNI (Server Name Identification) when performing active health checks using HTTPS. This is particularly useful when Targets are configured using IPs, so that the target host’s certificate can be verified with the proper SNI. Default nil.
  • healthchecks.active.healthy.interval - (Optional) is an interval between active health checks for healthy targets (in seconds). A value of zero indicates that active probes for healthy targets should not be performed. Defaults to 0.
  • healthchecks.active.healthy.successes - (Optional) is a number of successes in active probes (as defined by healthchecks.active.healthy.http_statuses) to consider a target healthy. Defaults to 0.
  • healthchecks.active.healthy.http_statuses - (Optional) is an array of HTTP statuses to consider a success, indicating healthiness, when returned by a probe in active health checks. Defaults to [200, 302].
  • healthchecks.active.unhealthy.interval - (Optional) is an interval between active health checks for unhealthy targets (in seconds). A value of zero indicates that active probes for unhealthy targets should not be performed. Defaults to 0.
  • healthchecks.active.unhealthy.tcp_failures - (Optional) is a number of TCP failures in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_failures - (Optional) is a number of HTTP failures in active probes (as defined by healthchecks.active.unhealthy.http_statuses) to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.timeouts - (Optional) is a number of timeouts in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_statuses - (Optional) is an array of HTTP statuses to consider a failure, indicating unhealthiness, when returned by a probe in active health checks. Defaults to [429, 404, 500, 501, 502, 503, 504, 505].
  • healthchecks.passive.type - (Optional) is a passive health check type. Interpreting HTTP/HTTPS statuses, or just check for TCP connection success. Possible values are tcp, http or https (in passive checks, http and https options are equivalent.). Defaults to http.
  • healthchecks.passive.healthy.successes - (Optional) is a Number of successes in proxied traffic (as defined by healthchecks.passive.healthy.http_statuses) to consider a target healthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.healthy.http_statuses - (Optional) is an array of HTTP statuses which represent healthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308].
  • healthchecks.passive.unhealthy.tcp_failures - (Optional) is a number of TCP failures in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_failures - (Optional) is a number of HTTP failures in proxied traffic (as defined by healthchecks.passive.unhealthy.http_statuses) to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.timeouts - (Optional) is a number of timeouts in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_statuses - (Optional) is an array of HTTP statuses which represent unhealthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [429, 500, 503].
HashOnHeader string
is a header name to take the value from as hash input. Only required when hash_on is set to header. Default nil.
Healthchecks UpstreamHealthchecksArgs
HostHeader string
The hostname to be used as Host header when proxying requests through Kong.
Name string
is a hostname, which must be equal to the host of a Service.
Slots int
is the number of slots in the load balancer algorithm (10*65536, defaults to 10000).
Tags List<string>
A list of strings associated with the Upstream for grouping and filtering.
ClientCertificateId string
The ID of the client certificate to use (from certificate resource) while TLS handshaking to the upstream server.
HashFallback string
is a hashing input type if the primary hash_on does not return a hash (eg. header is missing, or no consumer identified). One of: none, consumer, ip, header, or cookie. Not available if hash_on is set to cookie. Defaults to none.
HashFallbackHeader string
is a header name to take the value from as hash input. Only required when hash_fallback is set to header. Default nil.
HashOn string
is a hashing input type: none (resulting in a weightedroundrobin scheme with no hashing), consumer, ip, header, or cookie. Defaults to none.
HashOnCookie string
is a cookie name to take the value from as hash input. Only required when hash_on or hash_fallback is set to cookie. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response. Default nil.
HashOnCookiePath string

is a cookie path to set in the response headers. Only required when hash_on or hash_fallback is set to cookie. Defaults to /.

  • healthchecks.active.type - (Optional) is a active health check type. HTTP or HTTPS, or just attempt a TCP connection. Possible values are tcp, http or https. Defaults to http.
  • healthchecks.active.timeout - (Optional) is a socket timeout for active health checks (in seconds). Defaults to 1.
  • healthchecks.active.concurrency - (Optional) is a number of targets to check concurrently in active health checks. Defaults to 10.
  • healthchecks.active.http_path - (Optional) is a path to use in GET HTTP request to run as a probe on active health checks. Defaults to /.
  • healthchecks.active.https_verify_certificate - (Optional) check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. Defaults to true.
  • healthchecks.active.https_sni - (Optional) is the hostname to use as an SNI (Server Name Identification) when performing active health checks using HTTPS. This is particularly useful when Targets are configured using IPs, so that the target host’s certificate can be verified with the proper SNI. Default nil.
  • healthchecks.active.healthy.interval - (Optional) is an interval between active health checks for healthy targets (in seconds). A value of zero indicates that active probes for healthy targets should not be performed. Defaults to 0.
  • healthchecks.active.healthy.successes - (Optional) is a number of successes in active probes (as defined by healthchecks.active.healthy.http_statuses) to consider a target healthy. Defaults to 0.
  • healthchecks.active.healthy.http_statuses - (Optional) is an array of HTTP statuses to consider a success, indicating healthiness, when returned by a probe in active health checks. Defaults to [200, 302].
  • healthchecks.active.unhealthy.interval - (Optional) is an interval between active health checks for unhealthy targets (in seconds). A value of zero indicates that active probes for unhealthy targets should not be performed. Defaults to 0.
  • healthchecks.active.unhealthy.tcp_failures - (Optional) is a number of TCP failures in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_failures - (Optional) is a number of HTTP failures in active probes (as defined by healthchecks.active.unhealthy.http_statuses) to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.timeouts - (Optional) is a number of timeouts in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_statuses - (Optional) is an array of HTTP statuses to consider a failure, indicating unhealthiness, when returned by a probe in active health checks. Defaults to [429, 404, 500, 501, 502, 503, 504, 505].
  • healthchecks.passive.type - (Optional) is a passive health check type. Interpreting HTTP/HTTPS statuses, or just check for TCP connection success. Possible values are tcp, http or https (in passive checks, http and https options are equivalent.). Defaults to http.
  • healthchecks.passive.healthy.successes - (Optional) is a Number of successes in proxied traffic (as defined by healthchecks.passive.healthy.http_statuses) to consider a target healthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.healthy.http_statuses - (Optional) is an array of HTTP statuses which represent healthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308].
  • healthchecks.passive.unhealthy.tcp_failures - (Optional) is a number of TCP failures in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_failures - (Optional) is a number of HTTP failures in proxied traffic (as defined by healthchecks.passive.unhealthy.http_statuses) to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.timeouts - (Optional) is a number of timeouts in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_statuses - (Optional) is an array of HTTP statuses which represent unhealthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [429, 500, 503].
HashOnHeader string
is a header name to take the value from as hash input. Only required when hash_on is set to header. Default nil.
Healthchecks UpstreamHealthchecksArgs
HostHeader string
The hostname to be used as Host header when proxying requests through Kong.
Name string
is a hostname, which must be equal to the host of a Service.
Slots int
is the number of slots in the load balancer algorithm (10*65536, defaults to 10000).
Tags []string
A list of strings associated with the Upstream for grouping and filtering.
clientCertificateId string
The ID of the client certificate to use (from certificate resource) while TLS handshaking to the upstream server.
hashFallback string
is a hashing input type if the primary hash_on does not return a hash (eg. header is missing, or no consumer identified). One of: none, consumer, ip, header, or cookie. Not available if hash_on is set to cookie. Defaults to none.
hashFallbackHeader string
is a header name to take the value from as hash input. Only required when hash_fallback is set to header. Default nil.
hashOn string
is a hashing input type: none (resulting in a weightedroundrobin scheme with no hashing), consumer, ip, header, or cookie. Defaults to none.
hashOnCookie string
is a cookie name to take the value from as hash input. Only required when hash_on or hash_fallback is set to cookie. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response. Default nil.
hashOnCookiePath string

is a cookie path to set in the response headers. Only required when hash_on or hash_fallback is set to cookie. Defaults to /.

  • healthchecks.active.type - (Optional) is a active health check type. HTTP or HTTPS, or just attempt a TCP connection. Possible values are tcp, http or https. Defaults to http.
  • healthchecks.active.timeout - (Optional) is a socket timeout for active health checks (in seconds). Defaults to 1.
  • healthchecks.active.concurrency - (Optional) is a number of targets to check concurrently in active health checks. Defaults to 10.
  • healthchecks.active.http_path - (Optional) is a path to use in GET HTTP request to run as a probe on active health checks. Defaults to /.
  • healthchecks.active.https_verify_certificate - (Optional) check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. Defaults to true.
  • healthchecks.active.https_sni - (Optional) is the hostname to use as an SNI (Server Name Identification) when performing active health checks using HTTPS. This is particularly useful when Targets are configured using IPs, so that the target host’s certificate can be verified with the proper SNI. Default nil.
  • healthchecks.active.healthy.interval - (Optional) is an interval between active health checks for healthy targets (in seconds). A value of zero indicates that active probes for healthy targets should not be performed. Defaults to 0.
  • healthchecks.active.healthy.successes - (Optional) is a number of successes in active probes (as defined by healthchecks.active.healthy.http_statuses) to consider a target healthy. Defaults to 0.
  • healthchecks.active.healthy.http_statuses - (Optional) is an array of HTTP statuses to consider a success, indicating healthiness, when returned by a probe in active health checks. Defaults to [200, 302].
  • healthchecks.active.unhealthy.interval - (Optional) is an interval between active health checks for unhealthy targets (in seconds). A value of zero indicates that active probes for unhealthy targets should not be performed. Defaults to 0.
  • healthchecks.active.unhealthy.tcp_failures - (Optional) is a number of TCP failures in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_failures - (Optional) is a number of HTTP failures in active probes (as defined by healthchecks.active.unhealthy.http_statuses) to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.timeouts - (Optional) is a number of timeouts in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_statuses - (Optional) is an array of HTTP statuses to consider a failure, indicating unhealthiness, when returned by a probe in active health checks. Defaults to [429, 404, 500, 501, 502, 503, 504, 505].
  • healthchecks.passive.type - (Optional) is a passive health check type. Interpreting HTTP/HTTPS statuses, or just check for TCP connection success. Possible values are tcp, http or https (in passive checks, http and https options are equivalent.). Defaults to http.
  • healthchecks.passive.healthy.successes - (Optional) is a Number of successes in proxied traffic (as defined by healthchecks.passive.healthy.http_statuses) to consider a target healthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.healthy.http_statuses - (Optional) is an array of HTTP statuses which represent healthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308].
  • healthchecks.passive.unhealthy.tcp_failures - (Optional) is a number of TCP failures in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_failures - (Optional) is a number of HTTP failures in proxied traffic (as defined by healthchecks.passive.unhealthy.http_statuses) to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.timeouts - (Optional) is a number of timeouts in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_statuses - (Optional) is an array of HTTP statuses which represent unhealthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [429, 500, 503].
hashOnHeader string
is a header name to take the value from as hash input. Only required when hash_on is set to header. Default nil.
healthchecks UpstreamHealthchecksArgs
hostHeader string
The hostname to be used as Host header when proxying requests through Kong.
name string
is a hostname, which must be equal to the host of a Service.
slots number
is the number of slots in the load balancer algorithm (10*65536, defaults to 10000).
tags string[]
A list of strings associated with the Upstream for grouping and filtering.
client_certificate_id str
The ID of the client certificate to use (from certificate resource) while TLS handshaking to the upstream server.
hash_fallback str
is a hashing input type if the primary hash_on does not return a hash (eg. header is missing, or no consumer identified). One of: none, consumer, ip, header, or cookie. Not available if hash_on is set to cookie. Defaults to none.
hash_fallback_header str
is a header name to take the value from as hash input. Only required when hash_fallback is set to header. Default nil.
hash_on str
is a hashing input type: none (resulting in a weightedroundrobin scheme with no hashing), consumer, ip, header, or cookie. Defaults to none.
hash_on_cookie str
is a cookie name to take the value from as hash input. Only required when hash_on or hash_fallback is set to cookie. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response. Default nil.
hash_on_cookie_path str

is a cookie path to set in the response headers. Only required when hash_on or hash_fallback is set to cookie. Defaults to /.

  • healthchecks.active.type - (Optional) is a active health check type. HTTP or HTTPS, or just attempt a TCP connection. Possible values are tcp, http or https. Defaults to http.
  • healthchecks.active.timeout - (Optional) is a socket timeout for active health checks (in seconds). Defaults to 1.
  • healthchecks.active.concurrency - (Optional) is a number of targets to check concurrently in active health checks. Defaults to 10.
  • healthchecks.active.http_path - (Optional) is a path to use in GET HTTP request to run as a probe on active health checks. Defaults to /.
  • healthchecks.active.https_verify_certificate - (Optional) check the validity of the SSL certificate of the remote host when performing active health checks using HTTPS. Defaults to true.
  • healthchecks.active.https_sni - (Optional) is the hostname to use as an SNI (Server Name Identification) when performing active health checks using HTTPS. This is particularly useful when Targets are configured using IPs, so that the target host’s certificate can be verified with the proper SNI. Default nil.
  • healthchecks.active.healthy.interval - (Optional) is an interval between active health checks for healthy targets (in seconds). A value of zero indicates that active probes for healthy targets should not be performed. Defaults to 0.
  • healthchecks.active.healthy.successes - (Optional) is a number of successes in active probes (as defined by healthchecks.active.healthy.http_statuses) to consider a target healthy. Defaults to 0.
  • healthchecks.active.healthy.http_statuses - (Optional) is an array of HTTP statuses to consider a success, indicating healthiness, when returned by a probe in active health checks. Defaults to [200, 302].
  • healthchecks.active.unhealthy.interval - (Optional) is an interval between active health checks for unhealthy targets (in seconds). A value of zero indicates that active probes for unhealthy targets should not be performed. Defaults to 0.
  • healthchecks.active.unhealthy.tcp_failures - (Optional) is a number of TCP failures in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_failures - (Optional) is a number of HTTP failures in active probes (as defined by healthchecks.active.unhealthy.http_statuses) to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.timeouts - (Optional) is a number of timeouts in active probes to consider a target unhealthy. Defaults to 0.
  • healthchecks.active.unhealthy.http_statuses - (Optional) is an array of HTTP statuses to consider a failure, indicating unhealthiness, when returned by a probe in active health checks. Defaults to [429, 404, 500, 501, 502, 503, 504, 505].
  • healthchecks.passive.type - (Optional) is a passive health check type. Interpreting HTTP/HTTPS statuses, or just check for TCP connection success. Possible values are tcp, http or https (in passive checks, http and https options are equivalent.). Defaults to http.
  • healthchecks.passive.healthy.successes - (Optional) is a Number of successes in proxied traffic (as defined by healthchecks.passive.healthy.http_statuses) to consider a target healthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.healthy.http_statuses - (Optional) is an array of HTTP statuses which represent healthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308].
  • healthchecks.passive.unhealthy.tcp_failures - (Optional) is a number of TCP failures in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_failures - (Optional) is a number of HTTP failures in proxied traffic (as defined by healthchecks.passive.unhealthy.http_statuses) to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.timeouts - (Optional) is a number of timeouts in proxied traffic to consider a target unhealthy, as observed by passive health checks. Defaults to 0.
  • healthchecks.passive.unhealthy.http_statuses - (Optional) is an array of HTTP statuses which represent unhealthiness when produced by proxied traffic, as observed by passive health checks. Defaults to [429, 500, 503].
hash_on_header str
is a header name to take the value from as hash input. Only required when hash_on is set to header. Default nil.
healthchecks UpstreamHealthchecksArgs
host_header str
The hostname to be used as Host header when proxying requests through Kong.
name str
is a hostname, which must be equal to the host of a Service.
slots int
is the number of slots in the load balancer algorithm (10*65536, defaults to 10000).
tags Sequence[str]
A list of strings associated with the Upstream for grouping and filtering.

Supporting Types

UpstreamHealthchecks

UpstreamHealthchecksActive

UpstreamHealthchecksActiveHealthy

HttpStatuses List<int>
Interval int
Successes int
httpStatuses number[]
interval number
successes number
http_statuses Sequence[int]
interval int
successes int

UpstreamHealthchecksActiveUnhealthy

httpFailures number
httpStatuses number[]
interval number
tcpFailures number
timeouts number
http_failures int
http_statuses Sequence[int]
interval int
tcp_failures int
timeouts int

UpstreamHealthchecksPassive

UpstreamHealthchecksPassiveHealthy

HttpStatuses List<int>
Successes int
httpStatuses number[]
successes number
http_statuses Sequence[int]
successes int

UpstreamHealthchecksPassiveUnhealthy

httpFailures number
httpStatuses number[]
tcpFailures number
timeouts number
http_failures int
http_statuses Sequence[int]
tcp_failures int
timeouts int

Package Details

Repository
https://github.com/pulumi/pulumi-kong
License
Apache-2.0
Notes
This Pulumi package is based on the kong Terraform Provider.