From 2c0d2e875ac9444926eb2a9db8d3ab00aeea08ac Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Thu, 8 Aug 2024 18:42:54 +0000 Subject: [PATCH 1/2] make tfgen --- .pulumi-java-gen.version | 2 +- examples/go.mod | 4 ++-- examples/go.sum | 8 ++++---- provider/cmd/pulumi-resource-kong/schema.json | 4 ++-- provider/go.mod | 7 ++++--- provider/go.sum | 14 ++++++++------ sdk/go.mod | 2 +- sdk/go.sum | 4 ++-- 8 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.pulumi-java-gen.version b/.pulumi-java-gen.version index d33c3a21..0548fb4e 100644 --- a/.pulumi-java-gen.version +++ b/.pulumi-java-gen.version @@ -1 +1 @@ -0.12.0 \ No newline at end of file +0.14.0 \ No newline at end of file diff --git a/examples/go.mod b/examples/go.mod index f39b20fc..2ae9eaf9 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module github.com/pulumi/pulumi-kong/examples/v4 go 1.21 -require github.com/pulumi/pulumi/pkg/v3 v3.126.0 +require github.com/pulumi/pulumi/pkg/v3 v3.128.0 require ( cloud.google.com/go v0.112.1 // indirect @@ -123,7 +123,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.9.1 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.126.0 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.128.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect diff --git a/examples/go.sum b/examples/go.sum index 8ef90117..01fb8a55 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -342,10 +342,10 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/pkg/v3 v3.126.0 h1:XaZU1ehjHN2I5ihkfwxK/UFMDiCDM9FSt2TBnbldAx4= -github.com/pulumi/pulumi/pkg/v3 v3.126.0/go.mod h1:1P4/oK9zceOJUm48QQl/TqjDN68lfsdnTR1FITTFddw= -github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= -github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/pkg/v3 v3.128.0 h1:K3qtJYjHg4DkA7LxknY/MoQZ+QHdHQDh/k2njjmjHXM= +github.com/pulumi/pulumi/pkg/v3 v3.128.0/go.mod h1:/spoJXy/mqQ8fBLgXBEbUrAnL7pHdfXOviIo5fZROEY= +github.com/pulumi/pulumi/sdk/v3 v3.128.0 h1:5VPFfygxt6rva0bEYVQZXxsGAo2/D1wsb9erGOtXxzk= +github.com/pulumi/pulumi/sdk/v3 v3.128.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/provider/cmd/pulumi-resource-kong/schema.json b/provider/cmd/pulumi-resource-kong/schema.json index 5fe8b8a7..fe838917 100644 --- a/provider/cmd/pulumi-resource-kong/schema.json +++ b/provider/cmd/pulumi-resource-kong/schema.json @@ -1132,7 +1132,7 @@ } }, "kong:index/route:Route": { - "description": "## # kong.Route\n\nThe route resource maps directly onto the json for the route endpoint in Kong. For more information on the parameters [see the Kong Route create documentation](https://docs.konghq.com/gateway-oss/2.5.x/admin-api/#route-object).\n\nTo create a tcp/tls route you set `sources` and `destinations` by repeating the corresponding element (`source` or `destination`) for each source or destination you want.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as kong from \"@pulumi/kong\";\n\nconst route = new kong.Route(\"route\", {\n name: \"MyRoute\",\n protocols: [\n \"http\",\n \"https\",\n ],\n methods: [\n \"GET\",\n \"POST\",\n ],\n hosts: [\"example2.com\"],\n paths: [\"/test\"],\n stripPath: false,\n preserveHost: true,\n regexPriority: 1,\n serviceId: service.id,\n headers: [{\n name: \"x-test-1\",\n values: [\n \"a\",\n \"b\",\n ],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_kong as kong\n\nroute = kong.Route(\"route\",\n name=\"MyRoute\",\n protocols=[\n \"http\",\n \"https\",\n ],\n methods=[\n \"GET\",\n \"POST\",\n ],\n hosts=[\"example2.com\"],\n paths=[\"/test\"],\n strip_path=False,\n preserve_host=True,\n regex_priority=1,\n service_id=service[\"id\"],\n headers=[kong.RouteHeaderArgs(\n name=\"x-test-1\",\n values=[\n \"a\",\n \"b\",\n ],\n )])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Kong = Pulumi.Kong;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var route = new Kong.Route(\"route\", new()\n {\n Name = \"MyRoute\",\n Protocols = new[]\n {\n \"http\",\n \"https\",\n },\n Methods = new[]\n {\n \"GET\",\n \"POST\",\n },\n Hosts = new[]\n {\n \"example2.com\",\n },\n Paths = new[]\n {\n \"/test\",\n },\n StripPath = false,\n PreserveHost = true,\n RegexPriority = 1,\n ServiceId = service.Id,\n Headers = new[]\n {\n new Kong.Inputs.RouteHeaderArgs\n {\n Name = \"x-test-1\",\n Values = new[]\n {\n \"a\",\n \"b\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-kong/sdk/v4/go/kong\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kong.NewRoute(ctx, \"route\", \u0026kong.RouteArgs{\n\t\t\tName: pulumi.String(\"MyRoute\"),\n\t\t\tProtocols: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"http\"),\n\t\t\t\tpulumi.String(\"https\"),\n\t\t\t},\n\t\t\tMethods: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"GET\"),\n\t\t\t\tpulumi.String(\"POST\"),\n\t\t\t},\n\t\t\tHosts: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"example2.com\"),\n\t\t\t},\n\t\t\tPaths: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"/test\"),\n\t\t\t},\n\t\t\tStripPath: pulumi.Bool(false),\n\t\t\tPreserveHost: pulumi.Bool(true),\n\t\t\tRegexPriority: pulumi.Int(1),\n\t\t\tServiceId: pulumi.Any(service.Id),\n\t\t\tHeaders: kong.RouteHeaderArray{\n\t\t\t\t\u0026kong.RouteHeaderArgs{\n\t\t\t\t\tName: pulumi.String(\"x-test-1\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"a\"),\n\t\t\t\t\t\tpulumi.String(\"b\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.kong.Route;\nimport com.pulumi.kong.RouteArgs;\nimport com.pulumi.kong.inputs.RouteHeaderArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var route = new Route(\"route\", RouteArgs.builder()\n .name(\"MyRoute\")\n .protocols( \n \"http\",\n \"https\")\n .methods( \n \"GET\",\n \"POST\")\n .hosts(\"example2.com\")\n .paths(\"/test\")\n .stripPath(false)\n .preserveHost(true)\n .regexPriority(1)\n .serviceId(service.id())\n .headers(RouteHeaderArgs.builder()\n .name(\"x-test-1\")\n .values( \n \"a\",\n \"b\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n route:\n type: kong:Route\n properties:\n name: MyRoute\n protocols:\n - http\n - https\n methods:\n - GET\n - POST\n hosts:\n - example2.com\n paths:\n - /test\n stripPath: false\n preserveHost: true\n regexPriority: 1\n serviceId: ${service.id}\n headers:\n - name: x-test-1\n values:\n - a\n - b\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nTo create a tcp/tls route you set `sources` and `destinations` by repeating the corresponding element (`source` or `destination`) for each source or destination you want, for example:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as kong from \"@pulumi/kong\";\n\nconst route = new kong.Route(\"route\", {\n protocols: [\"tcp\"],\n stripPath: true,\n preserveHost: false,\n sources: [\n {\n ip: \"192.168.1.1\",\n port: 80,\n },\n {\n ip: \"192.168.1.2\",\n },\n ],\n destinations: [{\n ip: \"172.10.1.1\",\n port: 81,\n }],\n snis: [\"foo.com\"],\n serviceId: service.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_kong as kong\n\nroute = kong.Route(\"route\",\n protocols=[\"tcp\"],\n strip_path=True,\n preserve_host=False,\n sources=[\n kong.RouteSourceArgs(\n ip=\"192.168.1.1\",\n port=80,\n ),\n kong.RouteSourceArgs(\n ip=\"192.168.1.2\",\n ),\n ],\n destinations=[kong.RouteDestinationArgs(\n ip=\"172.10.1.1\",\n port=81,\n )],\n snis=[\"foo.com\"],\n service_id=service[\"id\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Kong = Pulumi.Kong;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var route = new Kong.Route(\"route\", new()\n {\n Protocols = new[]\n {\n \"tcp\",\n },\n StripPath = true,\n PreserveHost = false,\n Sources = new[]\n {\n new Kong.Inputs.RouteSourceArgs\n {\n Ip = \"192.168.1.1\",\n Port = 80,\n },\n new Kong.Inputs.RouteSourceArgs\n {\n Ip = \"192.168.1.2\",\n },\n },\n Destinations = new[]\n {\n new Kong.Inputs.RouteDestinationArgs\n {\n Ip = \"172.10.1.1\",\n Port = 81,\n },\n },\n Snis = new[]\n {\n \"foo.com\",\n },\n ServiceId = service.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-kong/sdk/v4/go/kong\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kong.NewRoute(ctx, \"route\", \u0026kong.RouteArgs{\n\t\t\tProtocols: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"tcp\"),\n\t\t\t},\n\t\t\tStripPath: pulumi.Bool(true),\n\t\t\tPreserveHost: pulumi.Bool(false),\n\t\t\tSources: kong.RouteSourceArray{\n\t\t\t\t\u0026kong.RouteSourceArgs{\n\t\t\t\t\tIp: pulumi.String(\"192.168.1.1\"),\n\t\t\t\t\tPort: pulumi.Int(80),\n\t\t\t\t},\n\t\t\t\t\u0026kong.RouteSourceArgs{\n\t\t\t\t\tIp: pulumi.String(\"192.168.1.2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tDestinations: kong.RouteDestinationArray{\n\t\t\t\t\u0026kong.RouteDestinationArgs{\n\t\t\t\t\tIp: pulumi.String(\"172.10.1.1\"),\n\t\t\t\t\tPort: pulumi.Int(81),\n\t\t\t\t},\n\t\t\t},\n\t\t\tSnis: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"foo.com\"),\n\t\t\t},\n\t\t\tServiceId: pulumi.Any(service.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.kong.Route;\nimport com.pulumi.kong.RouteArgs;\nimport com.pulumi.kong.inputs.RouteSourceArgs;\nimport com.pulumi.kong.inputs.RouteDestinationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var route = new Route(\"route\", RouteArgs.builder()\n .protocols(\"tcp\")\n .stripPath(true)\n .preserveHost(false)\n .sources( \n RouteSourceArgs.builder()\n .ip(\"192.168.1.1\")\n .port(80)\n .build(),\n RouteSourceArgs.builder()\n .ip(\"192.168.1.2\")\n .build())\n .destinations(RouteDestinationArgs.builder()\n .ip(\"172.10.1.1\")\n .port(81)\n .build())\n .snis(\"foo.com\")\n .serviceId(service.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n route:\n type: kong:Route\n properties:\n protocols:\n - tcp\n stripPath: true\n preserveHost: false\n sources:\n - ip: 192.168.1.1\n port: 80\n - ip: 192.168.1.2\n destinations:\n - ip: 172.10.1.1\n port: 81\n snis:\n - foo.com\n serviceId: ${service.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nTo import a route:\n\n```sh\n$ pulumi import kong:index/route:Route \u003croute_identifier\u003e \u003croute_id\u003e\n```\n\n", + "description": "## # kong.Route\n\nThe route resource maps directly onto the json for the route endpoint in Kong. For more information on the parameters [see the Kong Route create documentation](https://docs.konghq.com/gateway-oss/2.5.x/admin-api/#route-object).\n\nTo create a tcp/tls route you set `sources` and `destinations` by repeating the corresponding element (`source` or `destination`) for each source or destination you want.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as kong from \"@pulumi/kong\";\n\nconst route = new kong.Route(\"route\", {\n name: \"MyRoute\",\n protocols: [\n \"http\",\n \"https\",\n ],\n methods: [\n \"GET\",\n \"POST\",\n ],\n hosts: [\"example2.com\"],\n paths: [\"/test\"],\n stripPath: false,\n preserveHost: true,\n regexPriority: 1,\n serviceId: service.id,\n headers: [{\n name: \"x-test-1\",\n values: [\n \"a\",\n \"b\",\n ],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_kong as kong\n\nroute = kong.Route(\"route\",\n name=\"MyRoute\",\n protocols=[\n \"http\",\n \"https\",\n ],\n methods=[\n \"GET\",\n \"POST\",\n ],\n hosts=[\"example2.com\"],\n paths=[\"/test\"],\n strip_path=False,\n preserve_host=True,\n regex_priority=1,\n service_id=service[\"id\"],\n headers=[{\n \"name\": \"x-test-1\",\n \"values\": [\n \"a\",\n \"b\",\n ],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Kong = Pulumi.Kong;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var route = new Kong.Route(\"route\", new()\n {\n Name = \"MyRoute\",\n Protocols = new[]\n {\n \"http\",\n \"https\",\n },\n Methods = new[]\n {\n \"GET\",\n \"POST\",\n },\n Hosts = new[]\n {\n \"example2.com\",\n },\n Paths = new[]\n {\n \"/test\",\n },\n StripPath = false,\n PreserveHost = true,\n RegexPriority = 1,\n ServiceId = service.Id,\n Headers = new[]\n {\n new Kong.Inputs.RouteHeaderArgs\n {\n Name = \"x-test-1\",\n Values = new[]\n {\n \"a\",\n \"b\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-kong/sdk/v4/go/kong\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kong.NewRoute(ctx, \"route\", \u0026kong.RouteArgs{\n\t\t\tName: pulumi.String(\"MyRoute\"),\n\t\t\tProtocols: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"http\"),\n\t\t\t\tpulumi.String(\"https\"),\n\t\t\t},\n\t\t\tMethods: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"GET\"),\n\t\t\t\tpulumi.String(\"POST\"),\n\t\t\t},\n\t\t\tHosts: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"example2.com\"),\n\t\t\t},\n\t\t\tPaths: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"/test\"),\n\t\t\t},\n\t\t\tStripPath: pulumi.Bool(false),\n\t\t\tPreserveHost: pulumi.Bool(true),\n\t\t\tRegexPriority: pulumi.Int(1),\n\t\t\tServiceId: pulumi.Any(service.Id),\n\t\t\tHeaders: kong.RouteHeaderArray{\n\t\t\t\t\u0026kong.RouteHeaderArgs{\n\t\t\t\t\tName: pulumi.String(\"x-test-1\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"a\"),\n\t\t\t\t\t\tpulumi.String(\"b\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.kong.Route;\nimport com.pulumi.kong.RouteArgs;\nimport com.pulumi.kong.inputs.RouteHeaderArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var route = new Route(\"route\", RouteArgs.builder()\n .name(\"MyRoute\")\n .protocols( \n \"http\",\n \"https\")\n .methods( \n \"GET\",\n \"POST\")\n .hosts(\"example2.com\")\n .paths(\"/test\")\n .stripPath(false)\n .preserveHost(true)\n .regexPriority(1)\n .serviceId(service.id())\n .headers(RouteHeaderArgs.builder()\n .name(\"x-test-1\")\n .values( \n \"a\",\n \"b\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n route:\n type: kong:Route\n properties:\n name: MyRoute\n protocols:\n - http\n - https\n methods:\n - GET\n - POST\n hosts:\n - example2.com\n paths:\n - /test\n stripPath: false\n preserveHost: true\n regexPriority: 1\n serviceId: ${service.id}\n headers:\n - name: x-test-1\n values:\n - a\n - b\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nTo create a tcp/tls route you set `sources` and `destinations` by repeating the corresponding element (`source` or `destination`) for each source or destination you want, for example:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as kong from \"@pulumi/kong\";\n\nconst route = new kong.Route(\"route\", {\n protocols: [\"tcp\"],\n stripPath: true,\n preserveHost: false,\n sources: [\n {\n ip: \"192.168.1.1\",\n port: 80,\n },\n {\n ip: \"192.168.1.2\",\n },\n ],\n destinations: [{\n ip: \"172.10.1.1\",\n port: 81,\n }],\n snis: [\"foo.com\"],\n serviceId: service.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_kong as kong\n\nroute = kong.Route(\"route\",\n protocols=[\"tcp\"],\n strip_path=True,\n preserve_host=False,\n sources=[\n {\n \"ip\": \"192.168.1.1\",\n \"port\": 80,\n },\n {\n \"ip\": \"192.168.1.2\",\n },\n ],\n destinations=[{\n \"ip\": \"172.10.1.1\",\n \"port\": 81,\n }],\n snis=[\"foo.com\"],\n service_id=service[\"id\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Kong = Pulumi.Kong;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var route = new Kong.Route(\"route\", new()\n {\n Protocols = new[]\n {\n \"tcp\",\n },\n StripPath = true,\n PreserveHost = false,\n Sources = new[]\n {\n new Kong.Inputs.RouteSourceArgs\n {\n Ip = \"192.168.1.1\",\n Port = 80,\n },\n new Kong.Inputs.RouteSourceArgs\n {\n Ip = \"192.168.1.2\",\n },\n },\n Destinations = new[]\n {\n new Kong.Inputs.RouteDestinationArgs\n {\n Ip = \"172.10.1.1\",\n Port = 81,\n },\n },\n Snis = new[]\n {\n \"foo.com\",\n },\n ServiceId = service.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-kong/sdk/v4/go/kong\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kong.NewRoute(ctx, \"route\", \u0026kong.RouteArgs{\n\t\t\tProtocols: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"tcp\"),\n\t\t\t},\n\t\t\tStripPath: pulumi.Bool(true),\n\t\t\tPreserveHost: pulumi.Bool(false),\n\t\t\tSources: kong.RouteSourceArray{\n\t\t\t\t\u0026kong.RouteSourceArgs{\n\t\t\t\t\tIp: pulumi.String(\"192.168.1.1\"),\n\t\t\t\t\tPort: pulumi.Int(80),\n\t\t\t\t},\n\t\t\t\t\u0026kong.RouteSourceArgs{\n\t\t\t\t\tIp: pulumi.String(\"192.168.1.2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tDestinations: kong.RouteDestinationArray{\n\t\t\t\t\u0026kong.RouteDestinationArgs{\n\t\t\t\t\tIp: pulumi.String(\"172.10.1.1\"),\n\t\t\t\t\tPort: pulumi.Int(81),\n\t\t\t\t},\n\t\t\t},\n\t\t\tSnis: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"foo.com\"),\n\t\t\t},\n\t\t\tServiceId: pulumi.Any(service.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.kong.Route;\nimport com.pulumi.kong.RouteArgs;\nimport com.pulumi.kong.inputs.RouteSourceArgs;\nimport com.pulumi.kong.inputs.RouteDestinationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var route = new Route(\"route\", RouteArgs.builder()\n .protocols(\"tcp\")\n .stripPath(true)\n .preserveHost(false)\n .sources( \n RouteSourceArgs.builder()\n .ip(\"192.168.1.1\")\n .port(80)\n .build(),\n RouteSourceArgs.builder()\n .ip(\"192.168.1.2\")\n .build())\n .destinations(RouteDestinationArgs.builder()\n .ip(\"172.10.1.1\")\n .port(81)\n .build())\n .snis(\"foo.com\")\n .serviceId(service.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n route:\n type: kong:Route\n properties:\n protocols:\n - tcp\n stripPath: true\n preserveHost: false\n sources:\n - ip: 192.168.1.1\n port: 80\n - ip: 192.168.1.2\n destinations:\n - ip: 172.10.1.1\n port: 81\n snis:\n - foo.com\n serviceId: ${service.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nTo import a route:\n\n```sh\n$ pulumi import kong:index/route:Route \u003croute_identifier\u003e \u003croute_id\u003e\n```\n\n", "properties": { "destinations": { "type": "array", @@ -1760,7 +1760,7 @@ } }, "kong:index/upstream:Upstream": { - "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as kong from \"@pulumi/kong\";\n\nconst certificate = new kong.Certificate(\"certificate\", {\n certificate: ` -----BEGIN CERTIFICATE-----\n ......\n -----END CERTIFICATE-----\n`,\n privateKey: ` -----BEGIN PRIVATE KEY-----\n .....\n -----END PRIVATE KEY-----\n`,\n snis: [\"foo.com\"],\n});\nconst upstream = new kong.Upstream(\"upstream\", {\n name: \"sample_upstream\",\n slots: 10,\n hashOn: \"header\",\n hashFallback: \"cookie\",\n hashOnHeader: \"HeaderName\",\n hashFallbackHeader: \"FallbackHeaderName\",\n hashOnCookie: \"CookieName\",\n hashOnCookiePath: \"/path\",\n hostHeader: \"x-host\",\n tags: [\n \"a\",\n \"b\",\n ],\n clientCertificateId: certificate.id,\n healthchecks: {\n active: {\n type: \"https\",\n httpPath: \"/status\",\n timeout: 10,\n concurrency: 20,\n httpsVerifyCertificate: false,\n httpsSni: \"some.domain.com\",\n healthy: {\n successes: 1,\n interval: 5,\n httpStatuses: [\n 200,\n 201,\n ],\n },\n unhealthy: {\n timeouts: 7,\n interval: 3,\n tcpFailures: 1,\n httpFailures: 2,\n httpStatuses: [\n 500,\n 501,\n ],\n },\n },\n passive: {\n type: \"https\",\n healthy: {\n successes: 1,\n httpStatuses: [\n 200,\n 201,\n 202,\n ],\n },\n unhealthy: {\n timeouts: 3,\n tcpFailures: 5,\n httpFailures: 6,\n httpStatuses: [\n 500,\n 501,\n 502,\n ],\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_kong as kong\n\ncertificate = kong.Certificate(\"certificate\",\n certificate=\"\"\" -----BEGIN CERTIFICATE-----\n ......\n -----END CERTIFICATE-----\n\"\"\",\n private_key=\"\"\" -----BEGIN PRIVATE KEY-----\n .....\n -----END PRIVATE KEY-----\n\"\"\",\n snis=[\"foo.com\"])\nupstream = kong.Upstream(\"upstream\",\n name=\"sample_upstream\",\n slots=10,\n hash_on=\"header\",\n hash_fallback=\"cookie\",\n hash_on_header=\"HeaderName\",\n hash_fallback_header=\"FallbackHeaderName\",\n hash_on_cookie=\"CookieName\",\n hash_on_cookie_path=\"/path\",\n host_header=\"x-host\",\n tags=[\n \"a\",\n \"b\",\n ],\n client_certificate_id=certificate.id,\n healthchecks=kong.UpstreamHealthchecksArgs(\n active=kong.UpstreamHealthchecksActiveArgs(\n type=\"https\",\n http_path=\"/status\",\n timeout=10,\n concurrency=20,\n https_verify_certificate=False,\n https_sni=\"some.domain.com\",\n healthy=kong.UpstreamHealthchecksActiveHealthyArgs(\n successes=1,\n interval=5,\n http_statuses=[\n 200,\n 201,\n ],\n ),\n unhealthy=kong.UpstreamHealthchecksActiveUnhealthyArgs(\n timeouts=7,\n interval=3,\n tcp_failures=1,\n http_failures=2,\n http_statuses=[\n 500,\n 501,\n ],\n ),\n ),\n passive=kong.UpstreamHealthchecksPassiveArgs(\n type=\"https\",\n healthy=kong.UpstreamHealthchecksPassiveHealthyArgs(\n successes=1,\n http_statuses=[\n 200,\n 201,\n 202,\n ],\n ),\n unhealthy=kong.UpstreamHealthchecksPassiveUnhealthyArgs(\n timeouts=3,\n tcp_failures=5,\n http_failures=6,\n http_statuses=[\n 500,\n 501,\n 502,\n ],\n ),\n ),\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Kong = Pulumi.Kong;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var certificate = new Kong.Certificate(\"certificate\", new()\n {\n Cert = @\" -----BEGIN CERTIFICATE-----\n ......\n -----END CERTIFICATE-----\n\",\n PrivateKey = @\" -----BEGIN PRIVATE KEY-----\n .....\n -----END PRIVATE KEY-----\n\",\n Snis = new[]\n {\n \"foo.com\",\n },\n });\n\n var upstream = new Kong.Upstream(\"upstream\", new()\n {\n Name = \"sample_upstream\",\n Slots = 10,\n HashOn = \"header\",\n HashFallback = \"cookie\",\n HashOnHeader = \"HeaderName\",\n HashFallbackHeader = \"FallbackHeaderName\",\n HashOnCookie = \"CookieName\",\n HashOnCookiePath = \"/path\",\n HostHeader = \"x-host\",\n Tags = new[]\n {\n \"a\",\n \"b\",\n },\n ClientCertificateId = certificate.Id,\n Healthchecks = new Kong.Inputs.UpstreamHealthchecksArgs\n {\n Active = new Kong.Inputs.UpstreamHealthchecksActiveArgs\n {\n Type = \"https\",\n HttpPath = \"/status\",\n Timeout = 10,\n Concurrency = 20,\n HttpsVerifyCertificate = false,\n HttpsSni = \"some.domain.com\",\n Healthy = new Kong.Inputs.UpstreamHealthchecksActiveHealthyArgs\n {\n Successes = 1,\n Interval = 5,\n HttpStatuses = new[]\n {\n 200,\n 201,\n },\n },\n Unhealthy = new Kong.Inputs.UpstreamHealthchecksActiveUnhealthyArgs\n {\n Timeouts = 7,\n Interval = 3,\n TcpFailures = 1,\n HttpFailures = 2,\n HttpStatuses = new[]\n {\n 500,\n 501,\n },\n },\n },\n Passive = new Kong.Inputs.UpstreamHealthchecksPassiveArgs\n {\n Type = \"https\",\n Healthy = new Kong.Inputs.UpstreamHealthchecksPassiveHealthyArgs\n {\n Successes = 1,\n HttpStatuses = new[]\n {\n 200,\n 201,\n 202,\n },\n },\n Unhealthy = new Kong.Inputs.UpstreamHealthchecksPassiveUnhealthyArgs\n {\n Timeouts = 3,\n TcpFailures = 5,\n HttpFailures = 6,\n HttpStatuses = new[]\n {\n 500,\n 501,\n 502,\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-kong/sdk/v4/go/kong\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcertificate, err := kong.NewCertificate(ctx, \"certificate\", \u0026kong.CertificateArgs{\n\t\t\tCertificate: pulumi.String(\" -----BEGIN CERTIFICATE-----\\n ......\\n -----END CERTIFICATE-----\\n\"),\n\t\t\tPrivateKey: pulumi.String(\" -----BEGIN PRIVATE KEY-----\\n .....\\n -----END PRIVATE KEY-----\\n\"),\n\t\t\tSnis: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"foo.com\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kong.NewUpstream(ctx, \"upstream\", \u0026kong.UpstreamArgs{\n\t\t\tName: pulumi.String(\"sample_upstream\"),\n\t\t\tSlots: pulumi.Int(10),\n\t\t\tHashOn: pulumi.String(\"header\"),\n\t\t\tHashFallback: pulumi.String(\"cookie\"),\n\t\t\tHashOnHeader: pulumi.String(\"HeaderName\"),\n\t\t\tHashFallbackHeader: pulumi.String(\"FallbackHeaderName\"),\n\t\t\tHashOnCookie: pulumi.String(\"CookieName\"),\n\t\t\tHashOnCookiePath: pulumi.String(\"/path\"),\n\t\t\tHostHeader: pulumi.String(\"x-host\"),\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"a\"),\n\t\t\t\tpulumi.String(\"b\"),\n\t\t\t},\n\t\t\tClientCertificateId: certificate.ID(),\n\t\t\tHealthchecks: \u0026kong.UpstreamHealthchecksArgs{\n\t\t\t\tActive: \u0026kong.UpstreamHealthchecksActiveArgs{\n\t\t\t\t\tType: pulumi.String(\"https\"),\n\t\t\t\t\tHttpPath: pulumi.String(\"/status\"),\n\t\t\t\t\tTimeout: pulumi.Int(10),\n\t\t\t\t\tConcurrency: pulumi.Int(20),\n\t\t\t\t\tHttpsVerifyCertificate: pulumi.Bool(false),\n\t\t\t\t\tHttpsSni: pulumi.String(\"some.domain.com\"),\n\t\t\t\t\tHealthy: \u0026kong.UpstreamHealthchecksActiveHealthyArgs{\n\t\t\t\t\t\tSuccesses: pulumi.Int(1),\n\t\t\t\t\t\tInterval: pulumi.Int(5),\n\t\t\t\t\t\tHttpStatuses: pulumi.IntArray{\n\t\t\t\t\t\t\tpulumi.Int(200),\n\t\t\t\t\t\t\tpulumi.Int(201),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tUnhealthy: \u0026kong.UpstreamHealthchecksActiveUnhealthyArgs{\n\t\t\t\t\t\tTimeouts: pulumi.Int(7),\n\t\t\t\t\t\tInterval: pulumi.Int(3),\n\t\t\t\t\t\tTcpFailures: pulumi.Int(1),\n\t\t\t\t\t\tHttpFailures: pulumi.Int(2),\n\t\t\t\t\t\tHttpStatuses: pulumi.IntArray{\n\t\t\t\t\t\t\tpulumi.Int(500),\n\t\t\t\t\t\t\tpulumi.Int(501),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tPassive: \u0026kong.UpstreamHealthchecksPassiveArgs{\n\t\t\t\t\tType: pulumi.String(\"https\"),\n\t\t\t\t\tHealthy: \u0026kong.UpstreamHealthchecksPassiveHealthyArgs{\n\t\t\t\t\t\tSuccesses: pulumi.Int(1),\n\t\t\t\t\t\tHttpStatuses: pulumi.IntArray{\n\t\t\t\t\t\t\tpulumi.Int(200),\n\t\t\t\t\t\t\tpulumi.Int(201),\n\t\t\t\t\t\t\tpulumi.Int(202),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tUnhealthy: \u0026kong.UpstreamHealthchecksPassiveUnhealthyArgs{\n\t\t\t\t\t\tTimeouts: pulumi.Int(3),\n\t\t\t\t\t\tTcpFailures: pulumi.Int(5),\n\t\t\t\t\t\tHttpFailures: pulumi.Int(6),\n\t\t\t\t\t\tHttpStatuses: pulumi.IntArray{\n\t\t\t\t\t\t\tpulumi.Int(500),\n\t\t\t\t\t\t\tpulumi.Int(501),\n\t\t\t\t\t\t\tpulumi.Int(502),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.kong.Certificate;\nimport com.pulumi.kong.CertificateArgs;\nimport com.pulumi.kong.Upstream;\nimport com.pulumi.kong.UpstreamArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksActiveArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksActiveHealthyArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksActiveUnhealthyArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksPassiveArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksPassiveHealthyArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksPassiveUnhealthyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var certificate = new Certificate(\"certificate\", CertificateArgs.builder()\n .certificate(\"\"\"\n -----BEGIN CERTIFICATE-----\n ......\n -----END CERTIFICATE-----\n \"\"\")\n .privateKey(\"\"\"\n -----BEGIN PRIVATE KEY-----\n .....\n -----END PRIVATE KEY-----\n \"\"\")\n .snis(\"foo.com\")\n .build());\n\n var upstream = new Upstream(\"upstream\", UpstreamArgs.builder()\n .name(\"sample_upstream\")\n .slots(10)\n .hashOn(\"header\")\n .hashFallback(\"cookie\")\n .hashOnHeader(\"HeaderName\")\n .hashFallbackHeader(\"FallbackHeaderName\")\n .hashOnCookie(\"CookieName\")\n .hashOnCookiePath(\"/path\")\n .hostHeader(\"x-host\")\n .tags( \n \"a\",\n \"b\")\n .clientCertificateId(certificate.id())\n .healthchecks(UpstreamHealthchecksArgs.builder()\n .active(UpstreamHealthchecksActiveArgs.builder()\n .type(\"https\")\n .httpPath(\"/status\")\n .timeout(10)\n .concurrency(20)\n .httpsVerifyCertificate(false)\n .httpsSni(\"some.domain.com\")\n .healthy(UpstreamHealthchecksActiveHealthyArgs.builder()\n .successes(1)\n .interval(5)\n .httpStatuses( \n 200,\n 201)\n .build())\n .unhealthy(UpstreamHealthchecksActiveUnhealthyArgs.builder()\n .timeouts(7)\n .interval(3)\n .tcpFailures(1)\n .httpFailures(2)\n .httpStatuses( \n 500,\n 501)\n .build())\n .build())\n .passive(UpstreamHealthchecksPassiveArgs.builder()\n .type(\"https\")\n .healthy(UpstreamHealthchecksPassiveHealthyArgs.builder()\n .successes(1)\n .httpStatuses( \n 200,\n 201,\n 202)\n .build())\n .unhealthy(UpstreamHealthchecksPassiveUnhealthyArgs.builder()\n .timeouts(3)\n .tcpFailures(5)\n .httpFailures(6)\n .httpStatuses( \n 500,\n 501,\n 502)\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n certificate:\n type: kong:Certificate\n properties:\n certificate: |2\n -----BEGIN CERTIFICATE-----\n ......\n -----END CERTIFICATE-----\n privateKey: |2\n -----BEGIN PRIVATE KEY-----\n .....\n -----END PRIVATE KEY-----\n snis:\n - foo.com\n upstream:\n type: kong:Upstream\n properties:\n name: sample_upstream\n slots: 10\n hashOn: header\n hashFallback: cookie\n hashOnHeader: HeaderName\n hashFallbackHeader: FallbackHeaderName\n hashOnCookie: CookieName\n hashOnCookiePath: /path\n hostHeader: x-host\n tags:\n - a\n - b\n clientCertificateId: ${certificate.id}\n healthchecks:\n active:\n type: https\n httpPath: /status\n timeout: 10\n concurrency: 20\n httpsVerifyCertificate: false\n httpsSni: some.domain.com\n healthy:\n successes: 1\n interval: 5\n httpStatuses:\n - 200\n - 201\n unhealthy:\n timeouts: 7\n interval: 3\n tcpFailures: 1\n httpFailures: 2\n httpStatuses:\n - 500\n - 501\n passive:\n type: https\n healthy:\n successes: 1\n httpStatuses:\n - 200\n - 201\n - 202\n unhealthy:\n timeouts: 3\n tcpFailures: 5\n httpFailures: 6\n httpStatuses:\n - 500\n - 501\n - 502\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nTo import an upstream:\n\n```sh\n$ pulumi import kong:index/upstream:Upstream \u003cupstream_identifier\u003e \u003cupstream_id\u003e\n```\n\n", + "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as kong from \"@pulumi/kong\";\n\nconst certificate = new kong.Certificate(\"certificate\", {\n certificate: ` -----BEGIN CERTIFICATE-----\n ......\n -----END CERTIFICATE-----\n`,\n privateKey: ` -----BEGIN PRIVATE KEY-----\n .....\n -----END PRIVATE KEY-----\n`,\n snis: [\"foo.com\"],\n});\nconst upstream = new kong.Upstream(\"upstream\", {\n name: \"sample_upstream\",\n slots: 10,\n hashOn: \"header\",\n hashFallback: \"cookie\",\n hashOnHeader: \"HeaderName\",\n hashFallbackHeader: \"FallbackHeaderName\",\n hashOnCookie: \"CookieName\",\n hashOnCookiePath: \"/path\",\n hostHeader: \"x-host\",\n tags: [\n \"a\",\n \"b\",\n ],\n clientCertificateId: certificate.id,\n healthchecks: {\n active: {\n type: \"https\",\n httpPath: \"/status\",\n timeout: 10,\n concurrency: 20,\n httpsVerifyCertificate: false,\n httpsSni: \"some.domain.com\",\n healthy: {\n successes: 1,\n interval: 5,\n httpStatuses: [\n 200,\n 201,\n ],\n },\n unhealthy: {\n timeouts: 7,\n interval: 3,\n tcpFailures: 1,\n httpFailures: 2,\n httpStatuses: [\n 500,\n 501,\n ],\n },\n },\n passive: {\n type: \"https\",\n healthy: {\n successes: 1,\n httpStatuses: [\n 200,\n 201,\n 202,\n ],\n },\n unhealthy: {\n timeouts: 3,\n tcpFailures: 5,\n httpFailures: 6,\n httpStatuses: [\n 500,\n 501,\n 502,\n ],\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_kong as kong\n\ncertificate = kong.Certificate(\"certificate\",\n certificate=\"\"\" -----BEGIN CERTIFICATE-----\n ......\n -----END CERTIFICATE-----\n\"\"\",\n private_key=\"\"\" -----BEGIN PRIVATE KEY-----\n .....\n -----END PRIVATE KEY-----\n\"\"\",\n snis=[\"foo.com\"])\nupstream = kong.Upstream(\"upstream\",\n name=\"sample_upstream\",\n slots=10,\n hash_on=\"header\",\n hash_fallback=\"cookie\",\n hash_on_header=\"HeaderName\",\n hash_fallback_header=\"FallbackHeaderName\",\n hash_on_cookie=\"CookieName\",\n hash_on_cookie_path=\"/path\",\n host_header=\"x-host\",\n tags=[\n \"a\",\n \"b\",\n ],\n client_certificate_id=certificate.id,\n healthchecks={\n \"active\": {\n \"type\": \"https\",\n \"http_path\": \"/status\",\n \"timeout\": 10,\n \"concurrency\": 20,\n \"https_verify_certificate\": False,\n \"https_sni\": \"some.domain.com\",\n \"healthy\": {\n \"successes\": 1,\n \"interval\": 5,\n \"http_statuses\": [\n 200,\n 201,\n ],\n },\n \"unhealthy\": {\n \"timeouts\": 7,\n \"interval\": 3,\n \"tcp_failures\": 1,\n \"http_failures\": 2,\n \"http_statuses\": [\n 500,\n 501,\n ],\n },\n },\n \"passive\": {\n \"type\": \"https\",\n \"healthy\": {\n \"successes\": 1,\n \"http_statuses\": [\n 200,\n 201,\n 202,\n ],\n },\n \"unhealthy\": {\n \"timeouts\": 3,\n \"tcp_failures\": 5,\n \"http_failures\": 6,\n \"http_statuses\": [\n 500,\n 501,\n 502,\n ],\n },\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Kong = Pulumi.Kong;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var certificate = new Kong.Certificate(\"certificate\", new()\n {\n Cert = @\" -----BEGIN CERTIFICATE-----\n ......\n -----END CERTIFICATE-----\n\",\n PrivateKey = @\" -----BEGIN PRIVATE KEY-----\n .....\n -----END PRIVATE KEY-----\n\",\n Snis = new[]\n {\n \"foo.com\",\n },\n });\n\n var upstream = new Kong.Upstream(\"upstream\", new()\n {\n Name = \"sample_upstream\",\n Slots = 10,\n HashOn = \"header\",\n HashFallback = \"cookie\",\n HashOnHeader = \"HeaderName\",\n HashFallbackHeader = \"FallbackHeaderName\",\n HashOnCookie = \"CookieName\",\n HashOnCookiePath = \"/path\",\n HostHeader = \"x-host\",\n Tags = new[]\n {\n \"a\",\n \"b\",\n },\n ClientCertificateId = certificate.Id,\n Healthchecks = new Kong.Inputs.UpstreamHealthchecksArgs\n {\n Active = new Kong.Inputs.UpstreamHealthchecksActiveArgs\n {\n Type = \"https\",\n HttpPath = \"/status\",\n Timeout = 10,\n Concurrency = 20,\n HttpsVerifyCertificate = false,\n HttpsSni = \"some.domain.com\",\n Healthy = new Kong.Inputs.UpstreamHealthchecksActiveHealthyArgs\n {\n Successes = 1,\n Interval = 5,\n HttpStatuses = new[]\n {\n 200,\n 201,\n },\n },\n Unhealthy = new Kong.Inputs.UpstreamHealthchecksActiveUnhealthyArgs\n {\n Timeouts = 7,\n Interval = 3,\n TcpFailures = 1,\n HttpFailures = 2,\n HttpStatuses = new[]\n {\n 500,\n 501,\n },\n },\n },\n Passive = new Kong.Inputs.UpstreamHealthchecksPassiveArgs\n {\n Type = \"https\",\n Healthy = new Kong.Inputs.UpstreamHealthchecksPassiveHealthyArgs\n {\n Successes = 1,\n HttpStatuses = new[]\n {\n 200,\n 201,\n 202,\n },\n },\n Unhealthy = new Kong.Inputs.UpstreamHealthchecksPassiveUnhealthyArgs\n {\n Timeouts = 3,\n TcpFailures = 5,\n HttpFailures = 6,\n HttpStatuses = new[]\n {\n 500,\n 501,\n 502,\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-kong/sdk/v4/go/kong\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcertificate, err := kong.NewCertificate(ctx, \"certificate\", \u0026kong.CertificateArgs{\n\t\t\tCertificate: pulumi.String(\" -----BEGIN CERTIFICATE-----\\n ......\\n -----END CERTIFICATE-----\\n\"),\n\t\t\tPrivateKey: pulumi.String(\" -----BEGIN PRIVATE KEY-----\\n .....\\n -----END PRIVATE KEY-----\\n\"),\n\t\t\tSnis: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"foo.com\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kong.NewUpstream(ctx, \"upstream\", \u0026kong.UpstreamArgs{\n\t\t\tName: pulumi.String(\"sample_upstream\"),\n\t\t\tSlots: pulumi.Int(10),\n\t\t\tHashOn: pulumi.String(\"header\"),\n\t\t\tHashFallback: pulumi.String(\"cookie\"),\n\t\t\tHashOnHeader: pulumi.String(\"HeaderName\"),\n\t\t\tHashFallbackHeader: pulumi.String(\"FallbackHeaderName\"),\n\t\t\tHashOnCookie: pulumi.String(\"CookieName\"),\n\t\t\tHashOnCookiePath: pulumi.String(\"/path\"),\n\t\t\tHostHeader: pulumi.String(\"x-host\"),\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"a\"),\n\t\t\t\tpulumi.String(\"b\"),\n\t\t\t},\n\t\t\tClientCertificateId: certificate.ID(),\n\t\t\tHealthchecks: \u0026kong.UpstreamHealthchecksArgs{\n\t\t\t\tActive: \u0026kong.UpstreamHealthchecksActiveArgs{\n\t\t\t\t\tType: pulumi.String(\"https\"),\n\t\t\t\t\tHttpPath: pulumi.String(\"/status\"),\n\t\t\t\t\tTimeout: pulumi.Int(10),\n\t\t\t\t\tConcurrency: pulumi.Int(20),\n\t\t\t\t\tHttpsVerifyCertificate: pulumi.Bool(false),\n\t\t\t\t\tHttpsSni: pulumi.String(\"some.domain.com\"),\n\t\t\t\t\tHealthy: \u0026kong.UpstreamHealthchecksActiveHealthyArgs{\n\t\t\t\t\t\tSuccesses: pulumi.Int(1),\n\t\t\t\t\t\tInterval: pulumi.Int(5),\n\t\t\t\t\t\tHttpStatuses: pulumi.IntArray{\n\t\t\t\t\t\t\tpulumi.Int(200),\n\t\t\t\t\t\t\tpulumi.Int(201),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tUnhealthy: \u0026kong.UpstreamHealthchecksActiveUnhealthyArgs{\n\t\t\t\t\t\tTimeouts: pulumi.Int(7),\n\t\t\t\t\t\tInterval: pulumi.Int(3),\n\t\t\t\t\t\tTcpFailures: pulumi.Int(1),\n\t\t\t\t\t\tHttpFailures: pulumi.Int(2),\n\t\t\t\t\t\tHttpStatuses: pulumi.IntArray{\n\t\t\t\t\t\t\tpulumi.Int(500),\n\t\t\t\t\t\t\tpulumi.Int(501),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tPassive: \u0026kong.UpstreamHealthchecksPassiveArgs{\n\t\t\t\t\tType: pulumi.String(\"https\"),\n\t\t\t\t\tHealthy: \u0026kong.UpstreamHealthchecksPassiveHealthyArgs{\n\t\t\t\t\t\tSuccesses: pulumi.Int(1),\n\t\t\t\t\t\tHttpStatuses: pulumi.IntArray{\n\t\t\t\t\t\t\tpulumi.Int(200),\n\t\t\t\t\t\t\tpulumi.Int(201),\n\t\t\t\t\t\t\tpulumi.Int(202),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tUnhealthy: \u0026kong.UpstreamHealthchecksPassiveUnhealthyArgs{\n\t\t\t\t\t\tTimeouts: pulumi.Int(3),\n\t\t\t\t\t\tTcpFailures: pulumi.Int(5),\n\t\t\t\t\t\tHttpFailures: pulumi.Int(6),\n\t\t\t\t\t\tHttpStatuses: pulumi.IntArray{\n\t\t\t\t\t\t\tpulumi.Int(500),\n\t\t\t\t\t\t\tpulumi.Int(501),\n\t\t\t\t\t\t\tpulumi.Int(502),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.kong.Certificate;\nimport com.pulumi.kong.CertificateArgs;\nimport com.pulumi.kong.Upstream;\nimport com.pulumi.kong.UpstreamArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksActiveArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksActiveHealthyArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksActiveUnhealthyArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksPassiveArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksPassiveHealthyArgs;\nimport com.pulumi.kong.inputs.UpstreamHealthchecksPassiveUnhealthyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var certificate = new Certificate(\"certificate\", CertificateArgs.builder()\n .certificate(\"\"\"\n -----BEGIN CERTIFICATE-----\n ......\n -----END CERTIFICATE-----\n \"\"\")\n .privateKey(\"\"\"\n -----BEGIN PRIVATE KEY-----\n .....\n -----END PRIVATE KEY-----\n \"\"\")\n .snis(\"foo.com\")\n .build());\n\n var upstream = new Upstream(\"upstream\", UpstreamArgs.builder()\n .name(\"sample_upstream\")\n .slots(10)\n .hashOn(\"header\")\n .hashFallback(\"cookie\")\n .hashOnHeader(\"HeaderName\")\n .hashFallbackHeader(\"FallbackHeaderName\")\n .hashOnCookie(\"CookieName\")\n .hashOnCookiePath(\"/path\")\n .hostHeader(\"x-host\")\n .tags( \n \"a\",\n \"b\")\n .clientCertificateId(certificate.id())\n .healthchecks(UpstreamHealthchecksArgs.builder()\n .active(UpstreamHealthchecksActiveArgs.builder()\n .type(\"https\")\n .httpPath(\"/status\")\n .timeout(10)\n .concurrency(20)\n .httpsVerifyCertificate(false)\n .httpsSni(\"some.domain.com\")\n .healthy(UpstreamHealthchecksActiveHealthyArgs.builder()\n .successes(1)\n .interval(5)\n .httpStatuses( \n 200,\n 201)\n .build())\n .unhealthy(UpstreamHealthchecksActiveUnhealthyArgs.builder()\n .timeouts(7)\n .interval(3)\n .tcpFailures(1)\n .httpFailures(2)\n .httpStatuses( \n 500,\n 501)\n .build())\n .build())\n .passive(UpstreamHealthchecksPassiveArgs.builder()\n .type(\"https\")\n .healthy(UpstreamHealthchecksPassiveHealthyArgs.builder()\n .successes(1)\n .httpStatuses( \n 200,\n 201,\n 202)\n .build())\n .unhealthy(UpstreamHealthchecksPassiveUnhealthyArgs.builder()\n .timeouts(3)\n .tcpFailures(5)\n .httpFailures(6)\n .httpStatuses( \n 500,\n 501,\n 502)\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n certificate:\n type: kong:Certificate\n properties:\n certificate: |2\n -----BEGIN CERTIFICATE-----\n ......\n -----END CERTIFICATE-----\n privateKey: |2\n -----BEGIN PRIVATE KEY-----\n .....\n -----END PRIVATE KEY-----\n snis:\n - foo.com\n upstream:\n type: kong:Upstream\n properties:\n name: sample_upstream\n slots: 10\n hashOn: header\n hashFallback: cookie\n hashOnHeader: HeaderName\n hashFallbackHeader: FallbackHeaderName\n hashOnCookie: CookieName\n hashOnCookiePath: /path\n hostHeader: x-host\n tags:\n - a\n - b\n clientCertificateId: ${certificate.id}\n healthchecks:\n active:\n type: https\n httpPath: /status\n timeout: 10\n concurrency: 20\n httpsVerifyCertificate: false\n httpsSni: some.domain.com\n healthy:\n successes: 1\n interval: 5\n httpStatuses:\n - 200\n - 201\n unhealthy:\n timeouts: 7\n interval: 3\n tcpFailures: 1\n httpFailures: 2\n httpStatuses:\n - 500\n - 501\n passive:\n type: https\n healthy:\n successes: 1\n httpStatuses:\n - 200\n - 201\n - 202\n unhealthy:\n timeouts: 3\n tcpFailures: 5\n httpFailures: 6\n httpStatuses:\n - 500\n - 501\n - 502\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nTo import an upstream:\n\n```sh\n$ pulumi import kong:index/upstream:Upstream \u003cupstream_identifier\u003e \u003cupstream_id\u003e\n```\n\n", "properties": { "clientCertificateId": { "type": "string", diff --git a/provider/go.mod b/provider/go.mod index 87b95051..b3ceb59f 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -4,7 +4,7 @@ go 1.21.12 require ( github.com/kevholditch/terraform-provider-kong v1.9.2-0.20240411073741-c76ec533a0e5 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.1-0.20240808181221-46d7e984a474 ) require ( @@ -165,8 +165,8 @@ require ( github.com/pulumi/pulumi-java/pkg v0.11.0 // indirect github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect github.com/pulumi/pulumi-yaml v1.9.1 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.126.0 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.126.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.128.0 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.128.0 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect @@ -200,6 +200,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect + github.com/yuin/goldmark v1.7.4 // indirect github.com/zclconf/go-cty v1.14.2 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect diff --git a/provider/go.sum b/provider/go.sum index 4fdcad19..e97b7ea7 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -2046,16 +2046,16 @@ github.com/pulumi/providertest v0.0.14 h1:5QlAPAAs82jkQraHsJvq1xgVfC7xtW8sFJwv2p github.com/pulumi/providertest v0.0.14/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= github.com/pulumi/pulumi-java/pkg v0.11.0 h1:Jw9gBvyfmfOMq/EkYDm9+zGPxsDAA8jfeMpHmtZ+1oA= github.com/pulumi/pulumi-java/pkg v0.11.0/go.mod h1:sXAk25P47AQVQL6ilAbFmRNgZykC7og/+87ihnqzFTc= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0 h1:0W2Y3Fk7VAWHpjD3FwzVnqWo7g1hD+96C0YDobMnvDU= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0/go.mod h1:QSDiqiCMMbfzrsp3oyRPWgSVE/dkVH5ujxoFappqjdo= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.1-0.20240808181221-46d7e984a474 h1:zLS2tKHR4+LyNg3wj+7CclK1yCujCcfqaZsZxVMkTRg= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.1-0.20240808181221-46d7e984a474/go.mod h1:EWGqRo+ogMPty23b6rVUajgJXUDSNXU+WqcZTPlzyEI= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY= github.com/pulumi/pulumi-yaml v1.9.1 h1:JPeI80M23SPactxgnCFS1casZlSr7ZhAXwSx4H55QQ4= github.com/pulumi/pulumi-yaml v1.9.1/go.mod h1:OH0R34yJxA5u6zjYBN4JXcWoEvfkRoOVWi6viu8buoA= -github.com/pulumi/pulumi/pkg/v3 v3.126.0 h1:XaZU1ehjHN2I5ihkfwxK/UFMDiCDM9FSt2TBnbldAx4= -github.com/pulumi/pulumi/pkg/v3 v3.126.0/go.mod h1:1P4/oK9zceOJUm48QQl/TqjDN68lfsdnTR1FITTFddw= -github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= -github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/pkg/v3 v3.128.0 h1:K3qtJYjHg4DkA7LxknY/MoQZ+QHdHQDh/k2njjmjHXM= +github.com/pulumi/pulumi/pkg/v3 v3.128.0/go.mod h1:/spoJXy/mqQ8fBLgXBEbUrAnL7pHdfXOviIo5fZROEY= +github.com/pulumi/pulumi/sdk/v3 v3.128.0 h1:5VPFfygxt6rva0bEYVQZXxsGAo2/D1wsb9erGOtXxzk= +github.com/pulumi/pulumi/sdk/v3 v3.128.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= @@ -2209,6 +2209,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg= +github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= diff --git a/sdk/go.mod b/sdk/go.mod index 65edd7a3..2fb26745 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.126.0 + github.com/pulumi/pulumi/sdk/v3 v3.128.0 ) require ( diff --git a/sdk/go.sum b/sdk/go.sum index c4e7aede..2543199c 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -150,8 +150,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= -github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/sdk/v3 v3.128.0 h1:5VPFfygxt6rva0bEYVQZXxsGAo2/D1wsb9erGOtXxzk= +github.com/pulumi/pulumi/sdk/v3 v3.128.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= From 8261a043a8205ad021a4890d427294186489a878 Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Thu, 8 Aug 2024 18:44:18 +0000 Subject: [PATCH 2/2] make build_sdks --- sdk/java/build.gradle | 4 +- .../java/com/pulumi/kong/Certificate.java | 23 ++- .../main/java/com/pulumi/kong/Consumer.java | 23 ++- .../java/com/pulumi/kong/ConsumerAcl.java | 23 ++- .../com/pulumi/kong/ConsumerBasicAuth.java | 23 ++- .../java/com/pulumi/kong/ConsumerJwtAuth.java | 23 ++- .../java/com/pulumi/kong/ConsumerKeyAuth.java | 23 ++- .../java/com/pulumi/kong/ConsumerOauth2.java | 23 ++- .../src/main/java/com/pulumi/kong/Plugin.java | 23 ++- .../main/java/com/pulumi/kong/Provider.java | 17 +- .../src/main/java/com/pulumi/kong/Route.java | 23 ++- .../main/java/com/pulumi/kong/Service.java | 23 ++- .../src/main/java/com/pulumi/kong/Target.java | 23 ++- .../main/java/com/pulumi/kong/Upstream.java | 23 ++- .../main/java/com/pulumi/kong/Utilities.java | 14 +- sdk/python/pulumi_kong/route.py | 90 +++++------ sdk/python/pulumi_kong/upstream.py | 146 +++++++++--------- 17 files changed, 319 insertions(+), 228 deletions(-) diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index e93e508b..5dec4ef8 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.12.0") + implementation("com.pulumi:pulumi:0.14.0") } task sourcesJar(type: Jar) { @@ -150,4 +150,4 @@ if (signingKey) { useInMemoryPgpKeys(signingKey, signingPassword) sign publishing.publications.mainPublication } -} \ No newline at end of file +} diff --git a/sdk/java/src/main/java/com/pulumi/kong/Certificate.java b/sdk/java/src/main/java/com/pulumi/kong/Certificate.java index 43edffce..f19ff704 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/Certificate.java +++ b/sdk/java/src/main/java/com/pulumi/kong/Certificate.java @@ -124,7 +124,7 @@ public Output>> tags() { * * @param name The _unique_ name of the resulting resource. */ - public Certificate(String name) { + public Certificate(java.lang.String name) { this(name, CertificateArgs.Empty); } /** @@ -132,7 +132,7 @@ public Certificate(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Certificate(String name, CertificateArgs args) { + public Certificate(java.lang.String name, CertificateArgs args) { this(name, args, null); } /** @@ -141,15 +141,22 @@ public Certificate(String name, CertificateArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Certificate(String name, CertificateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/certificate:Certificate", name, args == null ? CertificateArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Certificate(java.lang.String name, CertificateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/certificate:Certificate", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Certificate(String name, Output id, @Nullable CertificateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/certificate:Certificate", name, state, makeResourceOptions(options, id)); + private Certificate(java.lang.String name, Output id, @Nullable CertificateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/certificate:Certificate", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static CertificateArgs makeArgs(CertificateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? CertificateArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .additionalSecretOutputs(List.of( @@ -168,7 +175,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Certificate get(String name, Output id, @Nullable CertificateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Certificate get(java.lang.String name, Output id, @Nullable CertificateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Certificate(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/Consumer.java b/sdk/java/src/main/java/com/pulumi/kong/Consumer.java index cc4e72d0..c05bbdb1 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/Consumer.java +++ b/sdk/java/src/main/java/com/pulumi/kong/Consumer.java @@ -115,7 +115,7 @@ public Output> username() { * * @param name The _unique_ name of the resulting resource. */ - public Consumer(String name) { + public Consumer(java.lang.String name) { this(name, ConsumerArgs.Empty); } /** @@ -123,7 +123,7 @@ public Consumer(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Consumer(String name, @Nullable ConsumerArgs args) { + public Consumer(java.lang.String name, @Nullable ConsumerArgs args) { this(name, args, null); } /** @@ -132,15 +132,22 @@ public Consumer(String name, @Nullable ConsumerArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Consumer(String name, @Nullable ConsumerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumer:Consumer", name, args == null ? ConsumerArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Consumer(java.lang.String name, @Nullable ConsumerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumer:Consumer", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Consumer(String name, Output id, @Nullable ConsumerState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumer:Consumer", name, state, makeResourceOptions(options, id)); + private Consumer(java.lang.String name, Output id, @Nullable ConsumerState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumer:Consumer", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ConsumerArgs makeArgs(@Nullable ConsumerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ConsumerArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -156,7 +163,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Consumer get(String name, Output id, @Nullable ConsumerState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Consumer get(java.lang.String name, Output id, @Nullable ConsumerState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Consumer(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/ConsumerAcl.java b/sdk/java/src/main/java/com/pulumi/kong/ConsumerAcl.java index 63b4cb22..2923a157 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/ConsumerAcl.java +++ b/sdk/java/src/main/java/com/pulumi/kong/ConsumerAcl.java @@ -127,7 +127,7 @@ public Output>> tags() { * * @param name The _unique_ name of the resulting resource. */ - public ConsumerAcl(String name) { + public ConsumerAcl(java.lang.String name) { this(name, ConsumerAclArgs.Empty); } /** @@ -135,7 +135,7 @@ public ConsumerAcl(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public ConsumerAcl(String name, ConsumerAclArgs args) { + public ConsumerAcl(java.lang.String name, ConsumerAclArgs args) { this(name, args, null); } /** @@ -144,15 +144,22 @@ public ConsumerAcl(String name, ConsumerAclArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public ConsumerAcl(String name, ConsumerAclArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumerAcl:ConsumerAcl", name, args == null ? ConsumerAclArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public ConsumerAcl(java.lang.String name, ConsumerAclArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumerAcl:ConsumerAcl", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private ConsumerAcl(String name, Output id, @Nullable ConsumerAclState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumerAcl:ConsumerAcl", name, state, makeResourceOptions(options, id)); + private ConsumerAcl(java.lang.String name, Output id, @Nullable ConsumerAclState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumerAcl:ConsumerAcl", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ConsumerAclArgs makeArgs(ConsumerAclArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ConsumerAclArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -168,7 +175,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static ConsumerAcl get(String name, Output id, @Nullable ConsumerAclState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static ConsumerAcl get(java.lang.String name, Output id, @Nullable ConsumerAclState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ConsumerAcl(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/ConsumerBasicAuth.java b/sdk/java/src/main/java/com/pulumi/kong/ConsumerBasicAuth.java index ce245d57..7297f6fb 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/ConsumerBasicAuth.java +++ b/sdk/java/src/main/java/com/pulumi/kong/ConsumerBasicAuth.java @@ -137,7 +137,7 @@ public Output username() { * * @param name The _unique_ name of the resulting resource. */ - public ConsumerBasicAuth(String name) { + public ConsumerBasicAuth(java.lang.String name) { this(name, ConsumerBasicAuthArgs.Empty); } /** @@ -145,7 +145,7 @@ public ConsumerBasicAuth(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public ConsumerBasicAuth(String name, ConsumerBasicAuthArgs args) { + public ConsumerBasicAuth(java.lang.String name, ConsumerBasicAuthArgs args) { this(name, args, null); } /** @@ -154,15 +154,22 @@ public ConsumerBasicAuth(String name, ConsumerBasicAuthArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public ConsumerBasicAuth(String name, ConsumerBasicAuthArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumerBasicAuth:ConsumerBasicAuth", name, args == null ? ConsumerBasicAuthArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public ConsumerBasicAuth(java.lang.String name, ConsumerBasicAuthArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumerBasicAuth:ConsumerBasicAuth", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private ConsumerBasicAuth(String name, Output id, @Nullable ConsumerBasicAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumerBasicAuth:ConsumerBasicAuth", name, state, makeResourceOptions(options, id)); + private ConsumerBasicAuth(java.lang.String name, Output id, @Nullable ConsumerBasicAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumerBasicAuth:ConsumerBasicAuth", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ConsumerBasicAuthArgs makeArgs(ConsumerBasicAuthArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ConsumerBasicAuthArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -178,7 +185,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static ConsumerBasicAuth get(String name, Output id, @Nullable ConsumerBasicAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static ConsumerBasicAuth get(java.lang.String name, Output id, @Nullable ConsumerBasicAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ConsumerBasicAuth(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/ConsumerJwtAuth.java b/sdk/java/src/main/java/com/pulumi/kong/ConsumerJwtAuth.java index 4ed2eeb9..06521126 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/ConsumerJwtAuth.java +++ b/sdk/java/src/main/java/com/pulumi/kong/ConsumerJwtAuth.java @@ -169,7 +169,7 @@ public Output>> tags() { * * @param name The _unique_ name of the resulting resource. */ - public ConsumerJwtAuth(String name) { + public ConsumerJwtAuth(java.lang.String name) { this(name, ConsumerJwtAuthArgs.Empty); } /** @@ -177,7 +177,7 @@ public ConsumerJwtAuth(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public ConsumerJwtAuth(String name, ConsumerJwtAuthArgs args) { + public ConsumerJwtAuth(java.lang.String name, ConsumerJwtAuthArgs args) { this(name, args, null); } /** @@ -186,15 +186,22 @@ public ConsumerJwtAuth(String name, ConsumerJwtAuthArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public ConsumerJwtAuth(String name, ConsumerJwtAuthArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumerJwtAuth:ConsumerJwtAuth", name, args == null ? ConsumerJwtAuthArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public ConsumerJwtAuth(java.lang.String name, ConsumerJwtAuthArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumerJwtAuth:ConsumerJwtAuth", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private ConsumerJwtAuth(String name, Output id, @Nullable ConsumerJwtAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumerJwtAuth:ConsumerJwtAuth", name, state, makeResourceOptions(options, id)); + private ConsumerJwtAuth(java.lang.String name, Output id, @Nullable ConsumerJwtAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumerJwtAuth:ConsumerJwtAuth", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ConsumerJwtAuthArgs makeArgs(ConsumerJwtAuthArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ConsumerJwtAuthArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -210,7 +217,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static ConsumerJwtAuth get(String name, Output id, @Nullable ConsumerJwtAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static ConsumerJwtAuth get(java.lang.String name, Output id, @Nullable ConsumerJwtAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ConsumerJwtAuth(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/ConsumerKeyAuth.java b/sdk/java/src/main/java/com/pulumi/kong/ConsumerKeyAuth.java index 2fa1c7aa..2099f637 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/ConsumerKeyAuth.java +++ b/sdk/java/src/main/java/com/pulumi/kong/ConsumerKeyAuth.java @@ -122,7 +122,7 @@ public Output>> tags() { * * @param name The _unique_ name of the resulting resource. */ - public ConsumerKeyAuth(String name) { + public ConsumerKeyAuth(java.lang.String name) { this(name, ConsumerKeyAuthArgs.Empty); } /** @@ -130,7 +130,7 @@ public ConsumerKeyAuth(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public ConsumerKeyAuth(String name, ConsumerKeyAuthArgs args) { + public ConsumerKeyAuth(java.lang.String name, ConsumerKeyAuthArgs args) { this(name, args, null); } /** @@ -139,15 +139,22 @@ public ConsumerKeyAuth(String name, ConsumerKeyAuthArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public ConsumerKeyAuth(String name, ConsumerKeyAuthArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumerKeyAuth:ConsumerKeyAuth", name, args == null ? ConsumerKeyAuthArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public ConsumerKeyAuth(java.lang.String name, ConsumerKeyAuthArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumerKeyAuth:ConsumerKeyAuth", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private ConsumerKeyAuth(String name, Output id, @Nullable ConsumerKeyAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumerKeyAuth:ConsumerKeyAuth", name, state, makeResourceOptions(options, id)); + private ConsumerKeyAuth(java.lang.String name, Output id, @Nullable ConsumerKeyAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumerKeyAuth:ConsumerKeyAuth", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ConsumerKeyAuthArgs makeArgs(ConsumerKeyAuthArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ConsumerKeyAuthArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .additionalSecretOutputs(List.of( @@ -166,7 +173,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static ConsumerKeyAuth get(String name, Output id, @Nullable ConsumerKeyAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static ConsumerKeyAuth get(java.lang.String name, Output id, @Nullable ConsumerKeyAuthState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ConsumerKeyAuth(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/ConsumerOauth2.java b/sdk/java/src/main/java/com/pulumi/kong/ConsumerOauth2.java index b4cb28c7..b310081d 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/ConsumerOauth2.java +++ b/sdk/java/src/main/java/com/pulumi/kong/ConsumerOauth2.java @@ -191,7 +191,7 @@ public Output>> tags() { * * @param name The _unique_ name of the resulting resource. */ - public ConsumerOauth2(String name) { + public ConsumerOauth2(java.lang.String name) { this(name, ConsumerOauth2Args.Empty); } /** @@ -199,7 +199,7 @@ public ConsumerOauth2(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public ConsumerOauth2(String name, ConsumerOauth2Args args) { + public ConsumerOauth2(java.lang.String name, ConsumerOauth2Args args) { this(name, args, null); } /** @@ -208,15 +208,22 @@ public ConsumerOauth2(String name, ConsumerOauth2Args args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public ConsumerOauth2(String name, ConsumerOauth2Args args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumerOauth2:ConsumerOauth2", name, args == null ? ConsumerOauth2Args.Empty : args, makeResourceOptions(options, Codegen.empty())); + public ConsumerOauth2(java.lang.String name, ConsumerOauth2Args args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumerOauth2:ConsumerOauth2", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private ConsumerOauth2(String name, Output id, @Nullable ConsumerOauth2State state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/consumerOauth2:ConsumerOauth2", name, state, makeResourceOptions(options, id)); + private ConsumerOauth2(java.lang.String name, Output id, @Nullable ConsumerOauth2State state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/consumerOauth2:ConsumerOauth2", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ConsumerOauth2Args makeArgs(ConsumerOauth2Args args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ConsumerOauth2Args.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -232,7 +239,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static ConsumerOauth2 get(String name, Output id, @Nullable ConsumerOauth2State state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static ConsumerOauth2 get(java.lang.String name, Output id, @Nullable ConsumerOauth2State state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ConsumerOauth2(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/Plugin.java b/sdk/java/src/main/java/com/pulumi/kong/Plugin.java index 655ddd2f..9c13b926 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/Plugin.java +++ b/sdk/java/src/main/java/com/pulumi/kong/Plugin.java @@ -332,7 +332,7 @@ public Output>> tags() { * * @param name The _unique_ name of the resulting resource. */ - public Plugin(String name) { + public Plugin(java.lang.String name) { this(name, PluginArgs.Empty); } /** @@ -340,7 +340,7 @@ public Plugin(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Plugin(String name, @Nullable PluginArgs args) { + public Plugin(java.lang.String name, @Nullable PluginArgs args) { this(name, args, null); } /** @@ -349,15 +349,22 @@ public Plugin(String name, @Nullable PluginArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Plugin(String name, @Nullable PluginArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/plugin:Plugin", name, args == null ? PluginArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Plugin(java.lang.String name, @Nullable PluginArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/plugin:Plugin", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Plugin(String name, Output id, @Nullable PluginState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/plugin:Plugin", name, state, makeResourceOptions(options, id)); + private Plugin(java.lang.String name, Output id, @Nullable PluginState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/plugin:Plugin", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static PluginArgs makeArgs(@Nullable PluginArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? PluginArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -373,7 +380,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Plugin get(String name, Output id, @Nullable PluginState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Plugin get(java.lang.String name, Output id, @Nullable PluginState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Plugin(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/Provider.java b/sdk/java/src/main/java/com/pulumi/kong/Provider.java index a27c1bac..6925c4ca 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/Provider.java +++ b/sdk/java/src/main/java/com/pulumi/kong/Provider.java @@ -111,7 +111,7 @@ public Output> kongWorkspace() { * * @param name The _unique_ name of the resulting resource. */ - public Provider(String name) { + public Provider(java.lang.String name) { this(name, ProviderArgs.Empty); } /** @@ -119,7 +119,7 @@ public Provider(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Provider(String name, ProviderArgs args) { + public Provider(java.lang.String name, ProviderArgs args) { this(name, args, null); } /** @@ -128,11 +128,18 @@ public Provider(String name, ProviderArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Provider(String name, ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Provider(java.lang.String name, ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ProviderArgs makeArgs(ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ProviderArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/kong/Route.java b/sdk/java/src/main/java/com/pulumi/kong/Route.java index 246122be..0da5ce65 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/Route.java +++ b/sdk/java/src/main/java/com/pulumi/kong/Route.java @@ -402,7 +402,7 @@ public Output>> tags() { * * @param name The _unique_ name of the resulting resource. */ - public Route(String name) { + public Route(java.lang.String name) { this(name, RouteArgs.Empty); } /** @@ -410,7 +410,7 @@ public Route(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Route(String name, RouteArgs args) { + public Route(java.lang.String name, RouteArgs args) { this(name, args, null); } /** @@ -419,15 +419,22 @@ public Route(String name, RouteArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Route(String name, RouteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/route:Route", name, args == null ? RouteArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Route(java.lang.String name, RouteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/route:Route", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Route(String name, Output id, @Nullable RouteState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/route:Route", name, state, makeResourceOptions(options, id)); + private Route(java.lang.String name, Output id, @Nullable RouteState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/route:Route", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static RouteArgs makeArgs(RouteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? RouteArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -443,7 +450,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Route get(String name, Output id, @Nullable RouteState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Route get(java.lang.String name, Output id, @Nullable RouteState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Route(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/Service.java b/sdk/java/src/main/java/com/pulumi/kong/Service.java index 3c1d4387..09b78e3e 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/Service.java +++ b/sdk/java/src/main/java/com/pulumi/kong/Service.java @@ -348,7 +348,7 @@ public Output> writeTimeout() { * * @param name The _unique_ name of the resulting resource. */ - public Service(String name) { + public Service(java.lang.String name) { this(name, ServiceArgs.Empty); } /** @@ -356,7 +356,7 @@ public Service(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Service(String name, ServiceArgs args) { + public Service(java.lang.String name, ServiceArgs args) { this(name, args, null); } /** @@ -365,15 +365,22 @@ public Service(String name, ServiceArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Service(String name, ServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/service:Service", name, args == null ? ServiceArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Service(java.lang.String name, ServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/service:Service", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Service(String name, Output id, @Nullable ServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/service:Service", name, state, makeResourceOptions(options, id)); + private Service(java.lang.String name, Output id, @Nullable ServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/service:Service", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ServiceArgs makeArgs(ServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ServiceArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -389,7 +396,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Service get(String name, Output id, @Nullable ServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Service get(java.lang.String name, Output id, @Nullable ServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Service(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/Target.java b/sdk/java/src/main/java/com/pulumi/kong/Target.java index beebc817..ee02baa4 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/Target.java +++ b/sdk/java/src/main/java/com/pulumi/kong/Target.java @@ -126,7 +126,7 @@ public Output weight() { * * @param name The _unique_ name of the resulting resource. */ - public Target(String name) { + public Target(java.lang.String name) { this(name, TargetArgs.Empty); } /** @@ -134,7 +134,7 @@ public Target(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Target(String name, TargetArgs args) { + public Target(java.lang.String name, TargetArgs args) { this(name, args, null); } /** @@ -143,15 +143,22 @@ public Target(String name, TargetArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Target(String name, TargetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/target:Target", name, args == null ? TargetArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Target(java.lang.String name, TargetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/target:Target", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Target(String name, Output id, @Nullable TargetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/target:Target", name, state, makeResourceOptions(options, id)); + private Target(java.lang.String name, Output id, @Nullable TargetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/target:Target", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static TargetArgs makeArgs(TargetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? TargetArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -167,7 +174,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Target get(String name, Output id, @Nullable TargetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Target get(java.lang.String name, Output id, @Nullable TargetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Target(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/Upstream.java b/sdk/java/src/main/java/com/pulumi/kong/Upstream.java index 73cc1200..b6778648 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/Upstream.java +++ b/sdk/java/src/main/java/com/pulumi/kong/Upstream.java @@ -351,7 +351,7 @@ public Output>> tags() { * * @param name The _unique_ name of the resulting resource. */ - public Upstream(String name) { + public Upstream(java.lang.String name) { this(name, UpstreamArgs.Empty); } /** @@ -359,7 +359,7 @@ public Upstream(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Upstream(String name, @Nullable UpstreamArgs args) { + public Upstream(java.lang.String name, @Nullable UpstreamArgs args) { this(name, args, null); } /** @@ -368,15 +368,22 @@ public Upstream(String name, @Nullable UpstreamArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Upstream(String name, @Nullable UpstreamArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/upstream:Upstream", name, args == null ? UpstreamArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Upstream(java.lang.String name, @Nullable UpstreamArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/upstream:Upstream", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Upstream(String name, Output id, @Nullable UpstreamState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("kong:index/upstream:Upstream", name, state, makeResourceOptions(options, id)); + private Upstream(java.lang.String name, Output id, @Nullable UpstreamState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("kong:index/upstream:Upstream", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static UpstreamArgs makeArgs(@Nullable UpstreamArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? UpstreamArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -392,7 +399,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Upstream get(String name, Output id, @Nullable UpstreamState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Upstream get(java.lang.String name, Output id, @Nullable UpstreamState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Upstream(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/kong/Utilities.java b/sdk/java/src/main/java/com/pulumi/kong/Utilities.java index d72164e6..002ed687 100644 --- a/sdk/java/src/main/java/com/pulumi/kong/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/kong/Utilities.java @@ -17,7 +17,7 @@ public class Utilities { - public static Optional getEnv(String... names) { + public static Optional getEnv(java.lang.String... names) { for (var n : names) { var value = Environment.getEnvironmentVariable(n); if (value.isValue()) { @@ -27,7 +27,7 @@ public static Optional getEnv(String... names) { return Optional.empty(); } - public static Optional getEnvBoolean(String... names) { + public static Optional getEnvBoolean(java.lang.String... names) { for (var n : names) { var value = Environment.getBooleanEnvironmentVariable(n); if (value.isValue()) { @@ -37,7 +37,7 @@ public static Optional getEnvBoolean(String... names) { return Optional.empty(); } - public static Optional getEnvInteger(String... names) { + public static Optional getEnvInteger(java.lang.String... names) { for (var n : names) { var value = Environment.getIntegerEnvironmentVariable(n); if (value.isValue()) { @@ -47,7 +47,7 @@ public static Optional getEnvInteger(String... names) { return Optional.empty(); } - public static Optional getEnvDouble(String... names) { + public static Optional getEnvDouble(java.lang.String... names) { for (var n : names) { var value = Environment.getDoubleEnvironmentVariable(n); if (value.isValue()) { @@ -68,8 +68,8 @@ public static InvokeOptions withVersion(@Nullable InvokeOptions options) { ); } - private static final String version; - public static String getVersion() { + private static final java.lang.String version; + public static java.lang.String getVersion() { return version; } @@ -78,7 +78,7 @@ public static String getVersion() { var versionFile = Utilities.class.getClassLoader().getResourceAsStream(resourceName); if (versionFile == null) { throw new IllegalStateException( - String.format("expected resource '%s' on Classpath, not found", resourceName) + java.lang.String.format("expected resource '%s' on Classpath, not found", resourceName) ); } version = new BufferedReader(new InputStreamReader(versionFile)) diff --git a/sdk/python/pulumi_kong/route.py b/sdk/python/pulumi_kong/route.py index 1c5b67aa..96e45e0a 100644 --- a/sdk/python/pulumi_kong/route.py +++ b/sdk/python/pulumi_kong/route.py @@ -608,8 +608,8 @@ class Route(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - destinations: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteDestinationArgs']]]]] = None, - headers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteHeaderArgs']]]]] = None, + destinations: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RouteDestinationArgs', 'RouteDestinationArgsDict']]]]] = None, + headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RouteHeaderArgs', 'RouteHeaderArgsDict']]]]] = None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, https_redirect_status_code: Optional[pulumi.Input[int]] = None, methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, @@ -623,7 +623,7 @@ def __init__(__self__, response_buffering: Optional[pulumi.Input[bool]] = None, service_id: Optional[pulumi.Input[str]] = None, snis: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - sources: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteSourceArgs']]]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RouteSourceArgs', 'RouteSourceArgsDict']]]]] = None, strip_path: Optional[pulumi.Input[bool]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, __props__=None): @@ -656,13 +656,13 @@ def __init__(__self__, preserve_host=True, regex_priority=1, service_id=service["id"], - headers=[kong.RouteHeaderArgs( - name="x-test-1", - values=[ + headers=[{ + "name": "x-test-1", + "values": [ "a", "b", ], - )]) + }]) ``` To create a tcp/tls route you set `sources` and `destinations` by repeating the corresponding element (`source` or `destination`) for each source or destination you want, for example: @@ -676,18 +676,18 @@ def __init__(__self__, strip_path=True, preserve_host=False, sources=[ - kong.RouteSourceArgs( - ip="192.168.1.1", - port=80, - ), - kong.RouteSourceArgs( - ip="192.168.1.2", - ), + { + "ip": "192.168.1.1", + "port": 80, + }, + { + "ip": "192.168.1.2", + }, ], - destinations=[kong.RouteDestinationArgs( - ip="172.10.1.1", - port=81, - )], + destinations=[{ + "ip": "172.10.1.1", + "port": 81, + }], snis=["foo.com"], service_id=service["id"]) ``` @@ -702,8 +702,8 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteDestinationArgs']]]] destinations: A list of destination `ip` and `port` - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteHeaderArgs']]]] headers: One or more blocks of `name` to set name of header and `values` which is a list of `string` for the header values to match on. See above example of how to set. These headers will cause this Route to match if present in the request. The Host header cannot be used with this attribute: hosts should be specified using the hosts attribute. + :param pulumi.Input[Sequence[pulumi.Input[Union['RouteDestinationArgs', 'RouteDestinationArgsDict']]]] destinations: A list of destination `ip` and `port` + :param pulumi.Input[Sequence[pulumi.Input[Union['RouteHeaderArgs', 'RouteHeaderArgsDict']]]] headers: One or more blocks of `name` to set name of header and `values` which is a list of `string` for the header values to match on. See above example of how to set. These headers will cause this Route to match if present in the request. The Host header cannot be used with this attribute: hosts should be specified using the hosts attribute. :param pulumi.Input[Sequence[pulumi.Input[str]]] hosts: A list of domain names that match this Route :param pulumi.Input[int] https_redirect_status_code: The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is HTTP instead of HTTPS. Location header is injected by Kong if the field is set to `301`, `302`, `307` or `308`. Accepted values are: `426`, `301`, `302`, `307`, `308`. Default: `426`. :param pulumi.Input[Sequence[pulumi.Input[str]]] methods: A list of HTTP methods that match this Route @@ -717,7 +717,7 @@ def __init__(__self__, :param pulumi.Input[bool] response_buffering: Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding. Default: true. :param pulumi.Input[str] service_id: Service ID to map to :param pulumi.Input[Sequence[pulumi.Input[str]]] snis: A list of SNIs that match this Route when using stream routing. - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteSourceArgs']]]] sources: A list of source `ip` and `port` + :param pulumi.Input[Sequence[pulumi.Input[Union['RouteSourceArgs', 'RouteSourceArgsDict']]]] sources: A list of source `ip` and `port` :param pulumi.Input[bool] strip_path: When matching a Route via one of the paths, strip the matching prefix from the upstream request URL. Default: true. :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A list of strings associated with the Route for grouping and filtering. """ @@ -756,13 +756,13 @@ def __init__(__self__, preserve_host=True, regex_priority=1, service_id=service["id"], - headers=[kong.RouteHeaderArgs( - name="x-test-1", - values=[ + headers=[{ + "name": "x-test-1", + "values": [ "a", "b", ], - )]) + }]) ``` To create a tcp/tls route you set `sources` and `destinations` by repeating the corresponding element (`source` or `destination`) for each source or destination you want, for example: @@ -776,18 +776,18 @@ def __init__(__self__, strip_path=True, preserve_host=False, sources=[ - kong.RouteSourceArgs( - ip="192.168.1.1", - port=80, - ), - kong.RouteSourceArgs( - ip="192.168.1.2", - ), + { + "ip": "192.168.1.1", + "port": 80, + }, + { + "ip": "192.168.1.2", + }, ], - destinations=[kong.RouteDestinationArgs( - ip="172.10.1.1", - port=81, - )], + destinations=[{ + "ip": "172.10.1.1", + "port": 81, + }], snis=["foo.com"], service_id=service["id"]) ``` @@ -815,8 +815,8 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - destinations: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteDestinationArgs']]]]] = None, - headers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteHeaderArgs']]]]] = None, + destinations: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RouteDestinationArgs', 'RouteDestinationArgsDict']]]]] = None, + headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RouteHeaderArgs', 'RouteHeaderArgsDict']]]]] = None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, https_redirect_status_code: Optional[pulumi.Input[int]] = None, methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, @@ -830,7 +830,7 @@ def _internal_init(__self__, response_buffering: Optional[pulumi.Input[bool]] = None, service_id: Optional[pulumi.Input[str]] = None, snis: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - sources: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteSourceArgs']]]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RouteSourceArgs', 'RouteSourceArgsDict']]]]] = None, strip_path: Optional[pulumi.Input[bool]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, __props__=None): @@ -874,8 +874,8 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, - destinations: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteDestinationArgs']]]]] = None, - headers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteHeaderArgs']]]]] = None, + destinations: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RouteDestinationArgs', 'RouteDestinationArgsDict']]]]] = None, + headers: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RouteHeaderArgs', 'RouteHeaderArgsDict']]]]] = None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, https_redirect_status_code: Optional[pulumi.Input[int]] = None, methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, @@ -889,7 +889,7 @@ def get(resource_name: str, response_buffering: Optional[pulumi.Input[bool]] = None, service_id: Optional[pulumi.Input[str]] = None, snis: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - sources: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteSourceArgs']]]]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RouteSourceArgs', 'RouteSourceArgsDict']]]]] = None, strip_path: Optional[pulumi.Input[bool]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'Route': """ @@ -899,8 +899,8 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteDestinationArgs']]]] destinations: A list of destination `ip` and `port` - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteHeaderArgs']]]] headers: One or more blocks of `name` to set name of header and `values` which is a list of `string` for the header values to match on. See above example of how to set. These headers will cause this Route to match if present in the request. The Host header cannot be used with this attribute: hosts should be specified using the hosts attribute. + :param pulumi.Input[Sequence[pulumi.Input[Union['RouteDestinationArgs', 'RouteDestinationArgsDict']]]] destinations: A list of destination `ip` and `port` + :param pulumi.Input[Sequence[pulumi.Input[Union['RouteHeaderArgs', 'RouteHeaderArgsDict']]]] headers: One or more blocks of `name` to set name of header and `values` which is a list of `string` for the header values to match on. See above example of how to set. These headers will cause this Route to match if present in the request. The Host header cannot be used with this attribute: hosts should be specified using the hosts attribute. :param pulumi.Input[Sequence[pulumi.Input[str]]] hosts: A list of domain names that match this Route :param pulumi.Input[int] https_redirect_status_code: The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is HTTP instead of HTTPS. Location header is injected by Kong if the field is set to `301`, `302`, `307` or `308`. Accepted values are: `426`, `301`, `302`, `307`, `308`. Default: `426`. :param pulumi.Input[Sequence[pulumi.Input[str]]] methods: A list of HTTP methods that match this Route @@ -914,7 +914,7 @@ def get(resource_name: str, :param pulumi.Input[bool] response_buffering: Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding. Default: true. :param pulumi.Input[str] service_id: Service ID to map to :param pulumi.Input[Sequence[pulumi.Input[str]]] snis: A list of SNIs that match this Route when using stream routing. - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RouteSourceArgs']]]] sources: A list of source `ip` and `port` + :param pulumi.Input[Sequence[pulumi.Input[Union['RouteSourceArgs', 'RouteSourceArgsDict']]]] sources: A list of source `ip` and `port` :param pulumi.Input[bool] strip_path: When matching a Route via one of the paths, strip the matching prefix from the upstream request URL. Default: true. :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A list of strings associated with the Route for grouping and filtering. """ diff --git a/sdk/python/pulumi_kong/upstream.py b/sdk/python/pulumi_kong/upstream.py index 1e912f04..745d2ff7 100644 --- a/sdk/python/pulumi_kong/upstream.py +++ b/sdk/python/pulumi_kong/upstream.py @@ -501,7 +501,7 @@ def __init__(__self__, hash_on_cookie: Optional[pulumi.Input[str]] = None, hash_on_cookie_path: Optional[pulumi.Input[str]] = None, hash_on_header: Optional[pulumi.Input[str]] = None, - healthchecks: Optional[pulumi.Input[pulumi.InputType['UpstreamHealthchecksArgs']]] = None, + healthchecks: Optional[pulumi.Input[Union['UpstreamHealthchecksArgs', 'UpstreamHealthchecksArgsDict']]] = None, host_header: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, slots: Optional[pulumi.Input[int]] = None, @@ -539,55 +539,55 @@ def __init__(__self__, "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=[ + healthchecks={ + "active": { + "type": "https", + "http_path": "/status", + "timeout": 10, + "concurrency": 20, + "https_verify_certificate": False, + "https_sni": "some.domain.com", + "healthy": { + "successes": 1, + "interval": 5, + "http_statuses": [ 200, 201, ], - ), - unhealthy=kong.UpstreamHealthchecksActiveUnhealthyArgs( - timeouts=7, - interval=3, - tcp_failures=1, - http_failures=2, - http_statuses=[ + }, + "unhealthy": { + "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=[ + }, + }, + "passive": { + "type": "https", + "healthy": { + "successes": 1, + "http_statuses": [ 200, 201, 202, ], - ), - unhealthy=kong.UpstreamHealthchecksPassiveUnhealthyArgs( - timeouts=3, - tcp_failures=5, - http_failures=6, - http_statuses=[ + }, + "unhealthy": { + "timeouts": 3, + "tcp_failures": 5, + "http_failures": 6, + "http_statuses": [ 500, 501, 502, ], - ), - ), - )) + }, + }, + }) ``` ## Import @@ -671,55 +671,55 @@ def __init__(__self__, "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=[ + healthchecks={ + "active": { + "type": "https", + "http_path": "/status", + "timeout": 10, + "concurrency": 20, + "https_verify_certificate": False, + "https_sni": "some.domain.com", + "healthy": { + "successes": 1, + "interval": 5, + "http_statuses": [ 200, 201, ], - ), - unhealthy=kong.UpstreamHealthchecksActiveUnhealthyArgs( - timeouts=7, - interval=3, - tcp_failures=1, - http_failures=2, - http_statuses=[ + }, + "unhealthy": { + "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=[ + }, + }, + "passive": { + "type": "https", + "healthy": { + "successes": 1, + "http_statuses": [ 200, 201, 202, ], - ), - unhealthy=kong.UpstreamHealthchecksPassiveUnhealthyArgs( - timeouts=3, - tcp_failures=5, - http_failures=6, - http_statuses=[ + }, + "unhealthy": { + "timeouts": 3, + "tcp_failures": 5, + "http_failures": 6, + "http_statuses": [ 500, 501, 502, ], - ), - ), - )) + }, + }, + }) ``` ## Import @@ -752,7 +752,7 @@ def _internal_init(__self__, hash_on_cookie: Optional[pulumi.Input[str]] = None, hash_on_cookie_path: Optional[pulumi.Input[str]] = None, hash_on_header: Optional[pulumi.Input[str]] = None, - healthchecks: Optional[pulumi.Input[pulumi.InputType['UpstreamHealthchecksArgs']]] = None, + healthchecks: Optional[pulumi.Input[Union['UpstreamHealthchecksArgs', 'UpstreamHealthchecksArgsDict']]] = None, host_header: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, slots: Optional[pulumi.Input[int]] = None, @@ -795,7 +795,7 @@ def get(resource_name: str, hash_on_cookie: Optional[pulumi.Input[str]] = None, hash_on_cookie_path: Optional[pulumi.Input[str]] = None, hash_on_header: Optional[pulumi.Input[str]] = None, - healthchecks: Optional[pulumi.Input[pulumi.InputType['UpstreamHealthchecksArgs']]] = None, + healthchecks: Optional[pulumi.Input[Union['UpstreamHealthchecksArgs', 'UpstreamHealthchecksArgsDict']]] = None, host_header: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, slots: Optional[pulumi.Input[int]] = None,