diff --git a/CHANGELOG.md b/CHANGELOG.md index f587079d..6ac622c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ CHANGELOG ========= ## HEAD (Unreleased) -_(none)_ +* Upgrade to v1.22.0 of the DigitalOcean Terraform Provider --- diff --git a/provider/cmd/pulumi-resource-digitalocean/schema.json b/provider/cmd/pulumi-resource-digitalocean/schema.json index 90fc9771..08d10a9d 100644 --- a/provider/cmd/pulumi-resource-digitalocean/schema.json +++ b/provider/cmd/pulumi-resource-digitalocean/schema.json @@ -7,7 +7,7 @@ ], "homepage": "https://pulumi.io", "license": "Apache-2.0", - "attribution": "This Pulumi package is based on the [`digitalocean` Terraform Provider](https://github.com/terraform-providers/terraform-provider-digitalocean).", + "attribution": "This Pulumi package is based on the [`digitalocean` Terraform Provider](https://github.com/digitalocean/terraform-provider-digitalocean).", "repository": "https://github.com/pulumi/pulumi-digitalocean", "meta": { "moduleFormat": "(.*)(?:/[^/]*)" @@ -782,7 +782,7 @@ }, "protocol": { "type": "string", - "description": "The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`.\n", + "description": "The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`.\n", "language": { "python": { "mapCase": false @@ -3745,7 +3745,7 @@ }, "name": { "type": "string", - "description": "The name of the record. Use `@` for records on domain's name itself.\n" + "description": "The hostname of the record. Use `@` for records on domain's name itself.\n" }, "port": { "type": "integer", @@ -3796,7 +3796,7 @@ }, "name": { "type": "string", - "description": "The name of the record. Use `@` for records on domain's name itself.\n" + "description": "The hostname of the record. Use `@` for records on domain's name itself.\n" }, "port": { "type": "integer", @@ -3850,7 +3850,7 @@ }, "name": { "type": "string", - "description": "The name of the record. Use `@` for records on domain's name itself.\n" + "description": "The hostname of the record. Use `@` for records on domain's name itself.\n" }, "port": { "type": "integer", @@ -4613,8 +4613,12 @@ } }, "digitalocean:index/kubernetesCluster:KubernetesCluster": { - "description": "Provides a DigitalOcean Kubernetes cluster resource. This can be used to create, delete, and modify clusters. For more information see the [official documentation](https://www.digitalocean.com/docs/kubernetes/).\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Basic Example\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst foo = new digitalocean.KubernetesCluster(\"foo\", {\n nodePool: {\n name: \"worker-pool\",\n nodeCount: 3,\n size: \"s-2vcpu-2gb\",\n },\n region: \"nyc1\",\n // Grab the latest version slug from `doctl kubernetes options versions`\n version: \"1.15.5-do.1\",\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nfoo = digitalocean.KubernetesCluster(\"foo\",\n node_pool=digitalocean.KubernetesClusterNodePoolArgs(\n name=\"worker-pool\",\n node_count=3,\n size=\"s-2vcpu-2gb\",\n ),\n region=\"nyc1\",\n version=\"1.15.5-do.1\")\n```\n```csharp\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var foo = new DigitalOcean.KubernetesCluster(\"foo\", new DigitalOcean.KubernetesClusterArgs\n {\n NodePool = new DigitalOcean.Inputs.KubernetesClusterNodePoolArgs\n {\n Name = \"worker-pool\",\n NodeCount = 3,\n Size = \"s-2vcpu-2gb\",\n },\n Region = \"nyc1\",\n Version = \"1.15.5-do.1\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v2/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v2/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := digitalocean.NewKubernetesCluster(ctx, \"foo\", \u0026digitalocean.KubernetesClusterArgs{\n\t\t\tNodePool: \u0026digitalocean.KubernetesClusterNodePoolArgs{\n\t\t\t\tName: pulumi.String(\"worker-pool\"),\n\t\t\t\tNodeCount: pulumi.Int(3),\n\t\t\t\tSize: pulumi.String(\"s-2vcpu-2gb\"),\n\t\t\t},\n\t\t\tRegion: pulumi.String(\"nyc1\"),\n\t\t\tVersion: pulumi.String(\"1.15.5-do.1\"),\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{{% /example %}}\n{{% example %}}\n### Autoscaling Example\n\nNode pools may also be configured to [autoscale](https://www.digitalocean.com/docs/kubernetes/how-to/autoscale/).\nFor example:\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst foo = new digitalocean.KubernetesCluster(\"foo\", {\n nodePool: {\n autoScale: true,\n maxNodes: 5,\n minNodes: 1,\n name: \"autoscale-worker-pool\",\n size: \"s-2vcpu-2gb\",\n },\n region: \"nyc1\",\n version: \"1.15.5-do.1\",\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nfoo = digitalocean.KubernetesCluster(\"foo\",\n node_pool=digitalocean.KubernetesClusterNodePoolArgs(\n auto_scale=True,\n max_nodes=5,\n min_nodes=1,\n name=\"autoscale-worker-pool\",\n size=\"s-2vcpu-2gb\",\n ),\n region=\"nyc1\",\n version=\"1.15.5-do.1\")\n```\n```csharp\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var foo = new DigitalOcean.KubernetesCluster(\"foo\", new DigitalOcean.KubernetesClusterArgs\n {\n NodePool = new DigitalOcean.Inputs.KubernetesClusterNodePoolArgs\n {\n AutoScale = true,\n MaxNodes = 5,\n MinNodes = 1,\n Name = \"autoscale-worker-pool\",\n Size = \"s-2vcpu-2gb\",\n },\n Region = \"nyc1\",\n Version = \"1.15.5-do.1\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v2/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v2/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := digitalocean.NewKubernetesCluster(ctx, \"foo\", \u0026digitalocean.KubernetesClusterArgs{\n\t\t\tNodePool: \u0026digitalocean.KubernetesClusterNodePoolArgs{\n\t\t\t\tAutoScale: pulumi.Bool(true),\n\t\t\t\tMaxNodes: pulumi.Int(5),\n\t\t\t\tMinNodes: pulumi.Int(1),\n\t\t\t\tName: pulumi.String(\"autoscale-worker-pool\"),\n\t\t\t\tSize: pulumi.String(\"s-2vcpu-2gb\"),\n\t\t\t},\n\t\t\tRegion: pulumi.String(\"nyc1\"),\n\t\t\tVersion: pulumi.String(\"1.15.5-do.1\"),\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\nNote that, while individual node pools may scale to 0, a cluster must always include at least one node.\n{{% /example %}}\n{{% /examples %}}", + "description": "Provides a DigitalOcean Kubernetes cluster resource. This can be used to create, delete, and modify clusters. For more information see the [official documentation](https://www.digitalocean.com/docs/kubernetes/).\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Basic Example\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst foo = new digitalocean.KubernetesCluster(\"foo\", {\n nodePool: {\n name: \"worker-pool\",\n nodeCount: 3,\n size: \"s-2vcpu-2gb\",\n },\n region: \"nyc1\",\n // Grab the latest version slug from `doctl kubernetes options versions`\n version: \"1.15.5-do.1\",\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nfoo = digitalocean.KubernetesCluster(\"foo\",\n node_pool=digitalocean.KubernetesClusterNodePoolArgs(\n name=\"worker-pool\",\n node_count=3,\n size=\"s-2vcpu-2gb\",\n ),\n region=\"nyc1\",\n version=\"1.15.5-do.1\")\n```\n```csharp\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var foo = new DigitalOcean.KubernetesCluster(\"foo\", new DigitalOcean.KubernetesClusterArgs\n {\n NodePool = new DigitalOcean.Inputs.KubernetesClusterNodePoolArgs\n {\n Name = \"worker-pool\",\n NodeCount = 3,\n Size = \"s-2vcpu-2gb\",\n },\n Region = \"nyc1\",\n Version = \"1.15.5-do.1\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v2/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v2/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := digitalocean.NewKubernetesCluster(ctx, \"foo\", \u0026digitalocean.KubernetesClusterArgs{\n\t\t\tNodePool: \u0026digitalocean.KubernetesClusterNodePoolArgs{\n\t\t\t\tName: pulumi.String(\"worker-pool\"),\n\t\t\t\tNodeCount: pulumi.Int(3),\n\t\t\t\tSize: pulumi.String(\"s-2vcpu-2gb\"),\n\t\t\t},\n\t\t\tRegion: pulumi.String(\"nyc1\"),\n\t\t\tVersion: pulumi.String(\"1.15.5-do.1\"),\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{{% /example %}}\n{{% example %}}\n### Autoscaling Example\n\nNode pools may also be configured to [autoscale](https://www.digitalocean.com/docs/kubernetes/how-to/autoscale/).\nFor example:\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst foo = new digitalocean.KubernetesCluster(\"foo\", {\n nodePool: {\n autoScale: true,\n maxNodes: 5,\n minNodes: 1,\n name: \"autoscale-worker-pool\",\n size: \"s-2vcpu-2gb\",\n },\n region: \"nyc1\",\n version: \"1.15.5-do.1\",\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nfoo = digitalocean.KubernetesCluster(\"foo\",\n node_pool=digitalocean.KubernetesClusterNodePoolArgs(\n auto_scale=True,\n max_nodes=5,\n min_nodes=1,\n name=\"autoscale-worker-pool\",\n size=\"s-2vcpu-2gb\",\n ),\n region=\"nyc1\",\n version=\"1.15.5-do.1\")\n```\n```csharp\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var foo = new DigitalOcean.KubernetesCluster(\"foo\", new DigitalOcean.KubernetesClusterArgs\n {\n NodePool = new DigitalOcean.Inputs.KubernetesClusterNodePoolArgs\n {\n AutoScale = true,\n MaxNodes = 5,\n MinNodes = 1,\n Name = \"autoscale-worker-pool\",\n Size = \"s-2vcpu-2gb\",\n },\n Region = \"nyc1\",\n Version = \"1.15.5-do.1\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v2/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v2/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := digitalocean.NewKubernetesCluster(ctx, \"foo\", \u0026digitalocean.KubernetesClusterArgs{\n\t\t\tNodePool: \u0026digitalocean.KubernetesClusterNodePoolArgs{\n\t\t\t\tAutoScale: pulumi.Bool(true),\n\t\t\t\tMaxNodes: pulumi.Int(5),\n\t\t\t\tMinNodes: pulumi.Int(1),\n\t\t\t\tName: pulumi.String(\"autoscale-worker-pool\"),\n\t\t\t\tSize: pulumi.String(\"s-2vcpu-2gb\"),\n\t\t\t},\n\t\t\tRegion: pulumi.String(\"nyc1\"),\n\t\t\tVersion: pulumi.String(\"1.15.5-do.1\"),\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\nNote that, while individual node pools may scale to 0, a cluster must always include at least one node.\n{{% /example %}}\n{{% example %}}\n### Auto Upgrade Example\n\nDigitalOcean Kubernetes clusters may also be configured to [auto upgrade](https://www.digitalocean.com/docs/kubernetes/how-to/upgrade-cluster/#automatically) patch versions.\nFor example:\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as digitalocean from \"@pulumi/digitalocean\";\n\nconst example = digitalocean.getKubernetesVersions({\n versionPrefix: \"1.18.\",\n});\nconst foo = new digitalocean.KubernetesCluster(\"foo\", {\n region: \"nyc1\",\n autoUpgrade: true,\n version: example.then(example =\u003e example.latestVersion),\n nodePool: {\n name: \"default\",\n size: \"s-1vcpu-2gb\",\n nodeCount: 3,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_digitalocean as digitalocean\n\nexample = digitalocean.get_kubernetes_versions(version_prefix=\"1.18.\")\nfoo = digitalocean.KubernetesCluster(\"foo\",\n region=\"nyc1\",\n auto_upgrade=True,\n version=example.latest_version,\n node_pool=digitalocean.KubernetesClusterNodePoolArgs(\n name=\"default\",\n size=\"s-1vcpu-2gb\",\n node_count=3,\n ))\n```\n```csharp\nusing Pulumi;\nusing DigitalOcean = Pulumi.DigitalOcean;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var example = Output.Create(DigitalOcean.GetKubernetesVersions.InvokeAsync(new DigitalOcean.GetKubernetesVersionsArgs\n {\n VersionPrefix = \"1.18.\",\n }));\n var foo = new DigitalOcean.KubernetesCluster(\"foo\", new DigitalOcean.KubernetesClusterArgs\n {\n Region = \"nyc1\",\n AutoUpgrade = true,\n Version = example.Apply(example =\u003e example.LatestVersion),\n NodePool = new DigitalOcean.Inputs.KubernetesClusterNodePoolArgs\n {\n Name = \"default\",\n Size = \"s-1vcpu-2gb\",\n NodeCount = 3,\n },\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-digitalocean/sdk/v2/go/digitalocean\"\n\t\"github.com/pulumi/pulumi/sdk/v2/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\topt0 := \"1.18.\"\n\t\texample, err := digitalocean.GetKubernetesVersions(ctx, \u0026digitalocean.GetKubernetesVersionsArgs{\n\t\t\tVersionPrefix: \u0026opt0,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = digitalocean.NewKubernetesCluster(ctx, \"foo\", \u0026digitalocean.KubernetesClusterArgs{\n\t\t\tRegion: pulumi.String(\"nyc1\"),\n\t\t\tAutoUpgrade: pulumi.Bool(true),\n\t\t\tVersion: pulumi.String(example.LatestVersion),\n\t\t\tNodePool: \u0026digitalocean.KubernetesClusterNodePoolArgs{\n\t\t\t\tName: pulumi.String(\"default\"),\n\t\t\t\tSize: pulumi.String(\"s-1vcpu-2gb\"),\n\t\t\t\tNodeCount: pulumi.Int(3),\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\nNote that a data source is used to supply the version. This is needed to prevent configuration diff whenever a cluster is upgraded.\n{{% /example %}}\n{{% /examples %}}", "properties": { + "autoUpgrade": { + "type": "boolean", + "description": "A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.\n" + }, "clusterSubnet": { "type": "string", "description": "The range of IP addresses in the overlay network of the Kubernetes cluster.\n" @@ -4658,6 +4662,10 @@ "type": "string", "description": "A string indicating the current status of the individual node.\n" }, + "surgeUpgrade": { + "type": "boolean", + "description": "Enable/disable surge upgrades for a cluster. Default: false\n" + }, "tags": { "type": "array", "items": { @@ -4694,6 +4702,10 @@ "vpcUuid" ], "inputProperties": { + "autoUpgrade": { + "type": "boolean", + "description": "A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.\n" + }, "name": { "type": "string", "description": "A name for the node pool.\n" @@ -4707,6 +4719,10 @@ "$ref": "#/types/digitalocean:index:Region", "description": "The slug identifier for the region where the Kubernetes cluster will be created.\n" }, + "surgeUpgrade": { + "type": "boolean", + "description": "Enable/disable surge upgrades for a cluster. Default: false\n" + }, "tags": { "type": "array", "items": { @@ -4731,6 +4747,10 @@ "stateInputs": { "description": "Input properties used for looking up and filtering KubernetesCluster resources.\n", "properties": { + "autoUpgrade": { + "type": "boolean", + "description": "A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.\n" + }, "clusterSubnet": { "type": "string", "description": "The range of IP addresses in the overlay network of the Kubernetes cluster.\n" @@ -4774,6 +4794,10 @@ "type": "string", "description": "A string indicating the current status of the individual node.\n" }, + "surgeUpgrade": { + "type": "boolean", + "description": "Enable/disable surge upgrades for a cluster. Default: false\n" + }, "tags": { "type": "array", "items": { @@ -7324,6 +7348,10 @@ "outputs": { "description": "A collection of values returned by getKubernetesCluster.\n", "properties": { + "autoUpgrade": { + "type": "boolean", + "description": "A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.\n* `kube_config.0` - A representation of the Kubernetes cluster's kubeconfig with the following attributes:\n" + }, "clusterSubnet": { "type": "string", "description": "The range of IP addresses in the overlay network of the Kubernetes cluster.\n" @@ -7373,6 +7401,9 @@ "type": "string", "description": "A string indicating the current status of the individual node.\n" }, + "surgeUpgrade": { + "type": "boolean" + }, "tags": { "type": "array", "items": { @@ -7395,6 +7426,7 @@ }, "type": "object", "required": [ + "autoUpgrade", "clusterSubnet", "createdAt", "endpoint", @@ -7405,6 +7437,7 @@ "region", "serviceSubnet", "status", + "surgeUpgrade", "updatedAt", "version", "vpcUuid", @@ -8689,11 +8722,11 @@ "disableUnionOutputTypes": true, "packageDescription": "A Pulumi package for creating and managing Digital Ocean cloud resources.", "packageName": "", - "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-digitalocean)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi/pulumi-digitalocean` repo](https://github.com/pulumi/pulumi-digitalocean/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-providers/terraform-provider-digitalocean` repo](https://github.com/terraform-providers/terraform-provider-digitalocean/issues).", + "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/digitalocean/terraform-provider-digitalocean)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi/pulumi-digitalocean` repo](https://github.com/pulumi/pulumi-digitalocean/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`digitalocean/terraform-provider-digitalocean` repo](https://github.com/digitalocean/terraform-provider-digitalocean/issues).", "typescriptVersion": "" }, "python": { - "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-digitalocean)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi/pulumi-digitalocean` repo](https://github.com/pulumi/pulumi-digitalocean/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-providers/terraform-provider-digitalocean` repo](https://github.com/terraform-providers/terraform-provider-digitalocean/issues).", + "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/digitalocean/terraform-provider-digitalocean)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi/pulumi-digitalocean` repo](https://github.com/pulumi/pulumi-digitalocean/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`digitalocean/terraform-provider-digitalocean` repo](https://github.com/digitalocean/terraform-provider-digitalocean/issues).", "requires": { "pulumi": "\u003e=2.9.0,\u003c3.0.0" }, diff --git a/provider/go.mod b/provider/go.mod index ad543d4b..57ceecfb 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -3,20 +3,21 @@ module github.com/pulumi/pulumi-digitalocean/provider/v2 go 1.14 require ( + github.com/digitalocean/terraform-provider-digitalocean v1.22.0 github.com/hashicorp/terraform-plugin-sdk v1.7.0 github.com/pulumi/pulumi-terraform-bridge/v2 v2.7.3 github.com/pulumi/pulumi/sdk/v2 v2.9.1-0.20200825190708-910aa96016cd - github.com/terraform-providers/terraform-provider-digitalocean v1.19.0 + github.com/digitalocean/terraform-provider-digitalocean v1.22.2 ) replace ( github.com/Azure/go-autorest => github.com/Azure/go-autorest v12.4.3+incompatible github.com/hashicorp/vault => github.com/hashicorp/vault v1.2.0 github.com/keybase/go-crypto => github.com/keybase/go-crypto v0.0.0-20190416182011-b785b22cc757 + github.com/digitalocean/terraform-provider-digitalocean => github.com/pulumi/terraform-provider-digitalocean v1.19.1-0.20200902103559-4fea41c96405 github.com/terraform-providers/terraform-provider-aws v2.32.0+incompatible => github.com/terraform-providers/terraform-provider-aws v1.60.1-0.20191010190908-1261a98537f2 - github.com/terraform-providers/terraform-provider-digitalocean => github.com/pulumi/terraform-provider-digitalocean v1.19.1-0.20200616132413-016bf6859393 github.com/terraform-providers/terraform-provider-google v2.17.0+incompatible => github.com/terraform-providers/terraform-provider-google v1.20.1-0.20191008212436-363f2d283518 - github.com/terraform-providers/terraform-provider-random v2.2.1+incompatible => github.com/terraform-providers/terraform-provider-random v1.3.2-0.20190925210718-83518d96ae4f + github.com/terraform-providers/terraform-provider-random v2.2.1+incompatible => github.com/terraform-providers/terraform-provider-random v0.0.0-20190925210718-83518d96ae4f golang.org/x/crypto => golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 k8s.io/api => k8s.io/api v0.0.0-20191121015604-11707872ac1c k8s.io/client-go => k8s.io/client-go v0.0.0-20191029021442-5f2132fc4383 diff --git a/provider/go.sum b/provider/go.sum index 30ccb0e5..b7d432ca 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -237,6 +237,11 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/godo v1.36.0 h1:eRF8wNzHZyU7/wI3De/MQgiVSWdseDaf27bXj2gnOO0= github.com/digitalocean/godo v1.36.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.41.0 h1:WYy7MIVVhTMZUNB+UA3irl2V9FyDJeDttsifYyn7jYA= +github.com/digitalocean/godo v1.41.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.42.1 h1:SJ/XMVsp5CZmyQal8gLlOl9jSl1i3FaN20LlgtK5ZMs= +github.com/digitalocean/godo v1.42.1/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/terraform-provider-digitalocean v1.22.0/go.mod h1:cVE94NTuInNscDdrSlmvoGXPocD7ZPTU3DDY7ydf6e4= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/djherbis/times v1.2.0 h1:xANXjsC/iBqbO00vkWlYwPWgBgEVU6m6AFYg0Pic+Mc= github.com/djherbis/times v1.2.0/go.mod h1:CGMZlo255K5r4Yw0b9RRfFQpM2y7uOmxg4jm9HsaVf8= @@ -859,6 +864,8 @@ github.com/pulumi/pulumi/sdk/v2 v2.9.1-0.20200825190708-910aa96016cd h1:m5jEWpbr github.com/pulumi/pulumi/sdk/v2 v2.9.1-0.20200825190708-910aa96016cd/go.mod h1:x84WPiFiuE+G4kJ5jUYkOxmnQJlWoJaHNeEYdqnCKA4= github.com/pulumi/terraform-provider-digitalocean v1.19.1-0.20200616132413-016bf6859393 h1:dOaePp2GQPxMhe+1nokbs5VDgrYPP5S2jACrD6ecXYM= github.com/pulumi/terraform-provider-digitalocean v1.19.1-0.20200616132413-016bf6859393/go.mod h1:fmkoHCZCH38dQOOHhKGDgYZBvq1NfFWKV98XAmakYIM= +github.com/pulumi/terraform-provider-digitalocean v1.19.1-0.20200902103559-4fea41c96405 h1:Uwzd/EJl3IxYrapEDpF2WdPSlnelz3G/cFYkrc3h/1U= +github.com/pulumi/terraform-provider-digitalocean v1.19.1-0.20200902103559-4fea41c96405/go.mod h1:6FJ2Yove5P+R7CzjPnxFbFxEljWNmpEOVYNBRMS3UWg= github.com/pulumi/tf2pulumi v0.8.1-0.20200519092335-cb56a4dfa88d h1:1JtzB9Gx0YX2UgKKkqJwTgBXxfg2cbLUEqTJKwKBK7s= github.com/pulumi/tf2pulumi v0.8.1-0.20200519092335-cb56a4dfa88d/go.mod h1:yv9XozKsue9ZELHQbrBGgIaFtE3OX3Q4m7koTzTqgpE= github.com/pulumi/tf2pulumi v0.8.1-0.20200528170746-c1234defe2b5 h1:h+pUwgEser1Ole6TMCc66njRPcw7SEVXpeoClG+ihEM= @@ -957,6 +964,8 @@ github.com/terraform-providers/terraform-provider-archive v1.3.0 h1:8WzDXMwTdTd4 github.com/terraform-providers/terraform-provider-archive v1.3.0/go.mod h1:7oAwNW55F65KauS++/XmAnrXhLfQRTYt549eYs4zU0w= github.com/terraform-providers/terraform-provider-aws v1.60.1-0.20191010190908-1261a98537f2 h1:FcaZW1YFs3K5PKvPY8EJvqYDHx6JojcjnEDQ+h/VK48= github.com/terraform-providers/terraform-provider-aws v1.60.1-0.20191010190908-1261a98537f2/go.mod h1:zIXqcyUvJSpWRGXf+x6knh3NIZLjVqjH954yShO3YPE= +github.com/terraform-providers/terraform-provider-digitalocean v1.20.0 h1:4RnA+73OX9xzoCKuEcahm70azbv57rvSRco6n9lAfls= +github.com/terraform-providers/terraform-provider-digitalocean v1.20.0/go.mod h1:fmkoHCZCH38dQOOHhKGDgYZBvq1NfFWKV98XAmakYIM= github.com/terraform-providers/terraform-provider-google v1.20.1-0.20191008212436-363f2d283518 h1:IGwWsLdt9TtiafPwVMv9ePxbZYdVHTBfdVtXUr8+PEU= github.com/terraform-providers/terraform-provider-google v1.20.1-0.20191008212436-363f2d283518/go.mod h1:cdfYuxcAyBAISVCiSYei5GIjhXbB3wth/feTmx8iD8A= github.com/terraform-providers/terraform-provider-http v1.2.0 h1:pOP/SNlLjB18CydtTJJwzkZGkHYX3LWzIoQpYQuBdyw= @@ -964,6 +973,7 @@ github.com/terraform-providers/terraform-provider-http v1.2.0/go.mod h1:2Iot921O github.com/terraform-providers/terraform-provider-kubernetes v1.9.1-0.20191018170806-2c80accb5635 h1:NY8xVhh8DXoU3kfgo4J9UwzRULgKP+gByCZW/T2qK+g= github.com/terraform-providers/terraform-provider-kubernetes v1.9.1-0.20191018170806-2c80accb5635/go.mod h1:lFCVWzD5Og9uVHwGwB35fHBsje+y2OJxt0G2v1Gz1Zs= github.com/terraform-providers/terraform-provider-random v0.0.0-20190925200408-30dac3233094/go.mod h1:F4KE9YftuJyMiBth4W1kCrsyOHndtTjAmZ+ZzjqWY+4= +github.com/terraform-providers/terraform-provider-random v0.0.0-20190925210718-83518d96ae4f/go.mod h1:F4KE9YftuJyMiBth4W1kCrsyOHndtTjAmZ+ZzjqWY+4= github.com/terraform-providers/terraform-provider-random v1.3.2-0.20190925210718-83518d96ae4f h1:oqZwtMD9/XcOcCzm/9cz8+pQWRTGF60N1RNcYLg+BCw= github.com/terraform-providers/terraform-provider-random v1.3.2-0.20190925210718-83518d96ae4f/go.mod h1:F4KE9YftuJyMiBth4W1kCrsyOHndtTjAmZ+ZzjqWY+4= github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6 h1:9VTskZOIRf2vKF3UL8TuWElry5pgUpV1tFSe/e/0m/E= diff --git a/provider/resources.go b/provider/resources.go index 7b49cade..a6724379 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -17,10 +17,10 @@ package digitalocean import ( "unicode" + "github.com/digitalocean/terraform-provider-digitalocean/digitalocean" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge" "github.com/pulumi/pulumi/sdk/v2/go/common/tokens" - "github.com/terraform-providers/terraform-provider-digitalocean/digitalocean" ) // all of the DigitalOcean token components used below. @@ -68,6 +68,7 @@ func Provider() tfbridge.ProviderInfo { License: "Apache-2.0", Homepage: "https://pulumi.io", Repository: "https://github.com/pulumi/pulumi-digitalocean", + GitHubOrg: "digitalocean", Config: map[string]*tfbridge.SchemaInfo{ "token": { Default: &tfbridge.DefaultInfo{ diff --git a/sdk/dotnet/DnsRecord.cs b/sdk/dotnet/DnsRecord.cs index f1d7d320..08cd4a65 100644 --- a/sdk/dotnet/DnsRecord.cs +++ b/sdk/dotnet/DnsRecord.cs @@ -73,7 +73,7 @@ public partial class DnsRecord : Pulumi.CustomResource public Output Fqdn { get; private set; } = null!; /// - /// The name of the record. Use `@` for records on domain's name itself. + /// The hostname of the record. Use `@` for records on domain's name itself. /// [Output("name")] public Output Name { get; private set; } = null!; @@ -179,7 +179,7 @@ public sealed class DnsRecordArgs : Pulumi.ResourceArgs public Input? Flags { get; set; } /// - /// The name of the record. Use `@` for records on domain's name itself. + /// The hostname of the record. Use `@` for records on domain's name itself. /// [Input("name")] public Input? Name { get; set; } @@ -252,7 +252,7 @@ public sealed class DnsRecordState : Pulumi.ResourceArgs public Input? Fqdn { get; set; } /// - /// The name of the record. Use `@` for records on domain's name itself. + /// The hostname of the record. Use `@` for records on domain's name itself. /// [Input("name")] public Input? Name { get; set; } diff --git a/sdk/dotnet/GetKubernetesCluster.cs b/sdk/dotnet/GetKubernetesCluster.cs index d3f6185a..c357ed08 100644 --- a/sdk/dotnet/GetKubernetesCluster.cs +++ b/sdk/dotnet/GetKubernetesCluster.cs @@ -48,6 +48,11 @@ public GetKubernetesClusterArgs() [OutputType] public sealed class GetKubernetesClusterResult { + /// + /// A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + /// * `kube_config.0` - A representation of the Kubernetes cluster's kubeconfig with the following attributes: + /// + public readonly bool AutoUpgrade; /// /// The range of IP addresses in the overlay network of the Kubernetes cluster. /// @@ -89,6 +94,7 @@ public sealed class GetKubernetesClusterResult /// A string indicating the current status of the individual node. /// public readonly string Status; + public readonly bool SurgeUpgrade; /// /// A list of tag names applied to the node pool. /// @@ -108,6 +114,8 @@ public sealed class GetKubernetesClusterResult [OutputConstructor] private GetKubernetesClusterResult( + bool autoUpgrade, + string clusterSubnet, string createdAt, @@ -130,6 +138,8 @@ private GetKubernetesClusterResult( string status, + bool surgeUpgrade, + ImmutableArray tags, string updatedAt, @@ -138,6 +148,7 @@ private GetKubernetesClusterResult( string vpcUuid) { + AutoUpgrade = autoUpgrade; ClusterSubnet = clusterSubnet; CreatedAt = createdAt; Endpoint = endpoint; @@ -149,6 +160,7 @@ private GetKubernetesClusterResult( Region = region; ServiceSubnet = serviceSubnet; Status = status; + SurgeUpgrade = surgeUpgrade; Tags = tags; UpdatedAt = updatedAt; Version = version; diff --git a/sdk/dotnet/Inputs/LoadBalancerHealthcheckArgs.cs b/sdk/dotnet/Inputs/LoadBalancerHealthcheckArgs.cs index 9b0674d4..13f59195 100644 --- a/sdk/dotnet/Inputs/LoadBalancerHealthcheckArgs.cs +++ b/sdk/dotnet/Inputs/LoadBalancerHealthcheckArgs.cs @@ -37,7 +37,7 @@ public sealed class LoadBalancerHealthcheckArgs : Pulumi.ResourceArgs public Input Port { get; set; } = null!; /// - /// The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + /// The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. /// [Input("protocol", required: true)] public Input Protocol { get; set; } = null!; diff --git a/sdk/dotnet/Inputs/LoadBalancerHealthcheckGetArgs.cs b/sdk/dotnet/Inputs/LoadBalancerHealthcheckGetArgs.cs index 54f08b75..f6674eef 100644 --- a/sdk/dotnet/Inputs/LoadBalancerHealthcheckGetArgs.cs +++ b/sdk/dotnet/Inputs/LoadBalancerHealthcheckGetArgs.cs @@ -37,7 +37,7 @@ public sealed class LoadBalancerHealthcheckGetArgs : Pulumi.ResourceArgs public Input Port { get; set; } = null!; /// - /// The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + /// The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. /// [Input("protocol", required: true)] public Input Protocol { get; set; } = null!; diff --git a/sdk/dotnet/KubernetesCluster.cs b/sdk/dotnet/KubernetesCluster.cs index dfc2250f..db0c1223 100644 --- a/sdk/dotnet/KubernetesCluster.cs +++ b/sdk/dotnet/KubernetesCluster.cs @@ -70,9 +70,50 @@ namespace Pulumi.DigitalOcean /// ``` /// /// Note that, while individual node pools may scale to 0, a cluster must always include at least one node. + /// ### Auto Upgrade Example + /// + /// DigitalOcean Kubernetes clusters may also be configured to [auto upgrade](https://www.digitalocean.com/docs/kubernetes/how-to/upgrade-cluster/#automatically) patch versions. + /// For example: + /// + /// ```csharp + /// using Pulumi; + /// using DigitalOcean = Pulumi.DigitalOcean; + /// + /// class MyStack : Stack + /// { + /// public MyStack() + /// { + /// var example = Output.Create(DigitalOcean.GetKubernetesVersions.InvokeAsync(new DigitalOcean.GetKubernetesVersionsArgs + /// { + /// VersionPrefix = "1.18.", + /// })); + /// var foo = new DigitalOcean.KubernetesCluster("foo", new DigitalOcean.KubernetesClusterArgs + /// { + /// Region = "nyc1", + /// AutoUpgrade = true, + /// Version = example.Apply(example => example.LatestVersion), + /// NodePool = new DigitalOcean.Inputs.KubernetesClusterNodePoolArgs + /// { + /// Name = "default", + /// Size = "s-1vcpu-2gb", + /// NodeCount = 3, + /// }, + /// }); + /// } + /// + /// } + /// ``` + /// + /// Note that a data source is used to supply the version. This is needed to prevent configuration diff whenever a cluster is upgraded. /// public partial class KubernetesCluster : Pulumi.CustomResource { + /// + /// A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + /// + [Output("autoUpgrade")] + public Output AutoUpgrade { get; private set; } = null!; + /// /// The range of IP addresses in the overlay network of the Kubernetes cluster. /// @@ -130,6 +171,12 @@ public partial class KubernetesCluster : Pulumi.CustomResource [Output("status")] public Output Status { get; private set; } = null!; + /// + /// Enable/disable surge upgrades for a cluster. Default: false + /// + [Output("surgeUpgrade")] + public Output SurgeUpgrade { get; private set; } = null!; + /// /// A list of tag names to be applied to the Kubernetes cluster. /// @@ -200,6 +247,12 @@ public static KubernetesCluster Get(string name, Input id, KubernetesClu public sealed class KubernetesClusterArgs : Pulumi.ResourceArgs { + /// + /// A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + /// + [Input("autoUpgrade")] + public Input? AutoUpgrade { get; set; } + /// /// A name for the node pool. /// @@ -218,6 +271,12 @@ public sealed class KubernetesClusterArgs : Pulumi.ResourceArgs [Input("region", required: true)] public Input Region { get; set; } = null!; + /// + /// Enable/disable surge upgrades for a cluster. Default: false + /// + [Input("surgeUpgrade")] + public Input? SurgeUpgrade { get; set; } + [Input("tags")] private InputList? _tags; @@ -249,6 +308,12 @@ public KubernetesClusterArgs() public sealed class KubernetesClusterState : Pulumi.ResourceArgs { + /// + /// A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + /// + [Input("autoUpgrade")] + public Input? AutoUpgrade { get; set; } + /// /// The range of IP addresses in the overlay network of the Kubernetes cluster. /// @@ -311,6 +376,12 @@ public InputList KubeConfigs [Input("status")] public Input? Status { get; set; } + /// + /// Enable/disable surge upgrades for a cluster. Default: false + /// + [Input("surgeUpgrade")] + public Input? SurgeUpgrade { get; set; } + [Input("tags")] private InputList? _tags; diff --git a/sdk/dotnet/Outputs/LoadBalancerHealthcheck.cs b/sdk/dotnet/Outputs/LoadBalancerHealthcheck.cs index ec74f9b9..7ea5428e 100644 --- a/sdk/dotnet/Outputs/LoadBalancerHealthcheck.cs +++ b/sdk/dotnet/Outputs/LoadBalancerHealthcheck.cs @@ -30,7 +30,7 @@ public sealed class LoadBalancerHealthcheck /// public readonly int Port; /// - /// The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + /// The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. /// public readonly string Protocol; /// diff --git a/sdk/go/digitalocean/dnsRecord.go b/sdk/go/digitalocean/dnsRecord.go index 6f75b89b..de602338 100644 --- a/sdk/go/digitalocean/dnsRecord.go +++ b/sdk/go/digitalocean/dnsRecord.go @@ -62,7 +62,7 @@ type DnsRecord struct { Flags pulumi.IntPtrOutput `pulumi:"flags"` // The FQDN of the record Fqdn pulumi.StringOutput `pulumi:"fqdn"` - // The name of the record. Use `@` for records on domain's name itself. + // The hostname of the record. Use `@` for records on domain's name itself. Name pulumi.StringOutput `pulumi:"name"` // The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535. Port pulumi.IntPtrOutput `pulumi:"port"` @@ -123,7 +123,7 @@ type dnsRecordState struct { Flags *int `pulumi:"flags"` // The FQDN of the record Fqdn *string `pulumi:"fqdn"` - // The name of the record. Use `@` for records on domain's name itself. + // The hostname of the record. Use `@` for records on domain's name itself. Name *string `pulumi:"name"` // The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535. Port *int `pulumi:"port"` @@ -148,7 +148,7 @@ type DnsRecordState struct { Flags pulumi.IntPtrInput // The FQDN of the record Fqdn pulumi.StringPtrInput - // The name of the record. Use `@` for records on domain's name itself. + // The hostname of the record. Use `@` for records on domain's name itself. Name pulumi.StringPtrInput // The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535. Port pulumi.IntPtrInput @@ -175,7 +175,7 @@ type dnsRecordArgs struct { Domain string `pulumi:"domain"` // The flags of the record. Only valid when type is `CAA`. Must be between 0 and 255. Flags *int `pulumi:"flags"` - // The name of the record. Use `@` for records on domain's name itself. + // The hostname of the record. Use `@` for records on domain's name itself. Name *string `pulumi:"name"` // The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535. Port *int `pulumi:"port"` @@ -199,7 +199,7 @@ type DnsRecordArgs struct { Domain pulumi.StringInput // The flags of the record. Only valid when type is `CAA`. Must be between 0 and 255. Flags pulumi.IntPtrInput - // The name of the record. Use `@` for records on domain's name itself. + // The hostname of the record. Use `@` for records on domain's name itself. Name pulumi.StringPtrInput // The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535. Port pulumi.IntPtrInput diff --git a/sdk/go/digitalocean/getKubernetesCluster.go b/sdk/go/digitalocean/getKubernetesCluster.go index 9ecf6aa6..0d65d596 100644 --- a/sdk/go/digitalocean/getKubernetesCluster.go +++ b/sdk/go/digitalocean/getKubernetesCluster.go @@ -27,6 +27,9 @@ type LookupKubernetesClusterArgs struct { // A collection of values returned by getKubernetesCluster. type LookupKubernetesClusterResult struct { + // A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + // * `kube_config.0` - A representation of the Kubernetes cluster's kubeconfig with the following attributes: + AutoUpgrade bool `pulumi:"autoUpgrade"` // The range of IP addresses in the overlay network of the Kubernetes cluster. ClusterSubnet string `pulumi:"clusterSubnet"` // The date and time when the node was created. @@ -47,7 +50,8 @@ type LookupKubernetesClusterResult struct { // The range of assignable IP addresses for services running in the Kubernetes cluster. ServiceSubnet string `pulumi:"serviceSubnet"` // A string indicating the current status of the individual node. - Status string `pulumi:"status"` + Status string `pulumi:"status"` + SurgeUpgrade bool `pulumi:"surgeUpgrade"` // A list of tag names applied to the node pool. Tags []string `pulumi:"tags"` // The date and time when the node was last updated. diff --git a/sdk/go/digitalocean/kubernetesCluster.go b/sdk/go/digitalocean/kubernetesCluster.go index 3ec7da6d..d62d5e8c 100644 --- a/sdk/go/digitalocean/kubernetesCluster.go +++ b/sdk/go/digitalocean/kubernetesCluster.go @@ -76,9 +76,52 @@ import ( // ``` // // Note that, while individual node pools may scale to 0, a cluster must always include at least one node. +// ### Auto Upgrade Example +// +// DigitalOcean Kubernetes clusters may also be configured to [auto upgrade](https://www.digitalocean.com/docs/kubernetes/how-to/upgrade-cluster/#automatically) patch versions. +// For example: +// +// ```go +// package main +// +// import ( +// "github.com/pulumi/pulumi-digitalocean/sdk/v2/go/digitalocean" +// "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// opt0 := "1.18." +// example, err := digitalocean.GetKubernetesVersions(ctx, &digitalocean.GetKubernetesVersionsArgs{ +// VersionPrefix: &opt0, +// }, nil) +// if err != nil { +// return err +// } +// _, err = digitalocean.NewKubernetesCluster(ctx, "foo", &digitalocean.KubernetesClusterArgs{ +// Region: pulumi.String("nyc1"), +// AutoUpgrade: pulumi.Bool(true), +// Version: pulumi.String(example.LatestVersion), +// NodePool: &digitalocean.KubernetesClusterNodePoolArgs{ +// Name: pulumi.String("default"), +// Size: pulumi.String("s-1vcpu-2gb"), +// NodeCount: pulumi.Int(3), +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// ``` +// +// Note that a data source is used to supply the version. This is needed to prevent configuration diff whenever a cluster is upgraded. type KubernetesCluster struct { pulumi.CustomResourceState + // A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + AutoUpgrade pulumi.BoolPtrOutput `pulumi:"autoUpgrade"` // The range of IP addresses in the overlay network of the Kubernetes cluster. ClusterSubnet pulumi.StringOutput `pulumi:"clusterSubnet"` // The date and time when the node was created. @@ -98,6 +141,8 @@ type KubernetesCluster struct { ServiceSubnet pulumi.StringOutput `pulumi:"serviceSubnet"` // A string indicating the current status of the individual node. Status pulumi.StringOutput `pulumi:"status"` + // Enable/disable surge upgrades for a cluster. Default: false + SurgeUpgrade pulumi.BoolPtrOutput `pulumi:"surgeUpgrade"` // A list of tag names to be applied to the Kubernetes cluster. Tags pulumi.StringArrayOutput `pulumi:"tags"` // The date and time when the node was last updated. @@ -145,6 +190,8 @@ func GetKubernetesCluster(ctx *pulumi.Context, // Input properties used for looking up and filtering KubernetesCluster resources. type kubernetesClusterState struct { + // A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + AutoUpgrade *bool `pulumi:"autoUpgrade"` // The range of IP addresses in the overlay network of the Kubernetes cluster. ClusterSubnet *string `pulumi:"clusterSubnet"` // The date and time when the node was created. @@ -164,6 +211,8 @@ type kubernetesClusterState struct { ServiceSubnet *string `pulumi:"serviceSubnet"` // A string indicating the current status of the individual node. Status *string `pulumi:"status"` + // Enable/disable surge upgrades for a cluster. Default: false + SurgeUpgrade *bool `pulumi:"surgeUpgrade"` // A list of tag names to be applied to the Kubernetes cluster. Tags []string `pulumi:"tags"` // The date and time when the node was last updated. @@ -175,6 +224,8 @@ type kubernetesClusterState struct { } type KubernetesClusterState struct { + // A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + AutoUpgrade pulumi.BoolPtrInput // The range of IP addresses in the overlay network of the Kubernetes cluster. ClusterSubnet pulumi.StringPtrInput // The date and time when the node was created. @@ -194,6 +245,8 @@ type KubernetesClusterState struct { ServiceSubnet pulumi.StringPtrInput // A string indicating the current status of the individual node. Status pulumi.StringPtrInput + // Enable/disable surge upgrades for a cluster. Default: false + SurgeUpgrade pulumi.BoolPtrInput // A list of tag names to be applied to the Kubernetes cluster. Tags pulumi.StringArrayInput // The date and time when the node was last updated. @@ -209,12 +262,16 @@ func (KubernetesClusterState) ElementType() reflect.Type { } type kubernetesClusterArgs struct { + // A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + AutoUpgrade *bool `pulumi:"autoUpgrade"` // A name for the node pool. Name *string `pulumi:"name"` // A block representing the cluster's default node pool. Additional node pools may be added to the cluster using the `KubernetesNodePool` resource. The following arguments may be specified: NodePool KubernetesClusterNodePool `pulumi:"nodePool"` // The slug identifier for the region where the Kubernetes cluster will be created. Region string `pulumi:"region"` + // Enable/disable surge upgrades for a cluster. Default: false + SurgeUpgrade *bool `pulumi:"surgeUpgrade"` // A list of tag names to be applied to the Kubernetes cluster. Tags []string `pulumi:"tags"` // The slug identifier for the version of Kubernetes used for the cluster. Use [doctl](https://github.com/digitalocean/doctl) to find the available versions `doctl kubernetes options versions`. (**Note:** A cluster may only be upgraded to newer versions in-place. If the version is decreased, a new resource will be created.) @@ -225,12 +282,16 @@ type kubernetesClusterArgs struct { // The set of arguments for constructing a KubernetesCluster resource. type KubernetesClusterArgs struct { + // A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + AutoUpgrade pulumi.BoolPtrInput // A name for the node pool. Name pulumi.StringPtrInput // A block representing the cluster's default node pool. Additional node pools may be added to the cluster using the `KubernetesNodePool` resource. The following arguments may be specified: NodePool KubernetesClusterNodePoolInput // The slug identifier for the region where the Kubernetes cluster will be created. Region pulumi.StringInput + // Enable/disable surge upgrades for a cluster. Default: false + SurgeUpgrade pulumi.BoolPtrInput // A list of tag names to be applied to the Kubernetes cluster. Tags pulumi.StringArrayInput // The slug identifier for the version of Kubernetes used for the cluster. Use [doctl](https://github.com/digitalocean/doctl) to find the available versions `doctl kubernetes options versions`. (**Note:** A cluster may only be upgraded to newer versions in-place. If the version is decreased, a new resource will be created.) diff --git a/sdk/go/digitalocean/pulumiTypes.go b/sdk/go/digitalocean/pulumiTypes.go index bc425db2..a23cc89c 100644 --- a/sdk/go/digitalocean/pulumiTypes.go +++ b/sdk/go/digitalocean/pulumiTypes.go @@ -1606,7 +1606,7 @@ type LoadBalancerHealthcheck struct { Path *string `pulumi:"path"` // An integer representing the port on the backend Droplets on which the health check will attempt a connection. Port int `pulumi:"port"` - // The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + // The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. Protocol string `pulumi:"protocol"` // The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is `5`. ResponseTimeoutSeconds *int `pulumi:"responseTimeoutSeconds"` @@ -1634,7 +1634,7 @@ type LoadBalancerHealthcheckArgs struct { Path pulumi.StringPtrInput `pulumi:"path"` // An integer representing the port on the backend Droplets on which the health check will attempt a connection. Port pulumi.IntInput `pulumi:"port"` - // The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + // The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. Protocol pulumi.StringInput `pulumi:"protocol"` // The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is `5`. ResponseTimeoutSeconds pulumi.IntPtrInput `pulumi:"responseTimeoutSeconds"` @@ -1739,7 +1739,7 @@ func (o LoadBalancerHealthcheckOutput) Port() pulumi.IntOutput { return o.ApplyT(func(v LoadBalancerHealthcheck) int { return v.Port }).(pulumi.IntOutput) } -// The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. +// The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. func (o LoadBalancerHealthcheckOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v LoadBalancerHealthcheck) string { return v.Protocol }).(pulumi.StringOutput) } @@ -1812,7 +1812,7 @@ func (o LoadBalancerHealthcheckPtrOutput) Port() pulumi.IntPtrOutput { }).(pulumi.IntPtrOutput) } -// The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. +// The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. func (o LoadBalancerHealthcheckPtrOutput) Protocol() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadBalancerHealthcheck) *string { if v == nil { diff --git a/sdk/nodejs/README.md b/sdk/nodejs/README.md index cb769c12..e52429cc 100644 --- a/sdk/nodejs/README.md +++ b/sdk/nodejs/README.md @@ -1,4 +1,4 @@ -> This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-digitalocean) +> This provider is a derived work of the [Terraform Provider](https://github.com/digitalocean/terraform-provider-digitalocean) > distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature, > first check the [`pulumi/pulumi-digitalocean` repo](https://github.com/pulumi/pulumi-digitalocean/issues); however, if that doesn't turn up anything, -> please consult the source [`terraform-providers/terraform-provider-digitalocean` repo](https://github.com/terraform-providers/terraform-provider-digitalocean/issues). +> please consult the source [`digitalocean/terraform-provider-digitalocean` repo](https://github.com/digitalocean/terraform-provider-digitalocean/issues). diff --git a/sdk/nodejs/dnsRecord.ts b/sdk/nodejs/dnsRecord.ts index 9fef04e5..f73fb3b3 100644 --- a/sdk/nodejs/dnsRecord.ts +++ b/sdk/nodejs/dnsRecord.ts @@ -74,7 +74,7 @@ export class DnsRecord extends pulumi.CustomResource { */ public /*out*/ readonly fqdn!: pulumi.Output; /** - * The name of the record. Use `@` for records on domain's name itself. + * The hostname of the record. Use `@` for records on domain's name itself. */ public readonly name!: pulumi.Output; /** @@ -180,7 +180,7 @@ export interface DnsRecordState { */ readonly fqdn?: pulumi.Input; /** - * The name of the record. Use `@` for records on domain's name itself. + * The hostname of the record. Use `@` for records on domain's name itself. */ readonly name?: pulumi.Input; /** @@ -226,7 +226,7 @@ export interface DnsRecordArgs { */ readonly flags?: pulumi.Input; /** - * The name of the record. Use `@` for records on domain's name itself. + * The hostname of the record. Use `@` for records on domain's name itself. */ readonly name?: pulumi.Input; /** diff --git a/sdk/nodejs/getKubernetesCluster.ts b/sdk/nodejs/getKubernetesCluster.ts index 08204bf7..b4b087b6 100644 --- a/sdk/nodejs/getKubernetesCluster.ts +++ b/sdk/nodejs/getKubernetesCluster.ts @@ -41,6 +41,11 @@ export interface GetKubernetesClusterArgs { * A collection of values returned by getKubernetesCluster. */ export interface GetKubernetesClusterResult { + /** + * A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + * * `kube_config.0` - A representation of the Kubernetes cluster's kubeconfig with the following attributes: + */ + readonly autoUpgrade: boolean; /** * The range of IP addresses in the overlay network of the Kubernetes cluster. */ @@ -82,6 +87,7 @@ export interface GetKubernetesClusterResult { * A string indicating the current status of the individual node. */ readonly status: string; + readonly surgeUpgrade: boolean; /** * A list of tag names applied to the node pool. */ diff --git a/sdk/nodejs/kubernetesCluster.ts b/sdk/nodejs/kubernetesCluster.ts index a95ac517..91377168 100644 --- a/sdk/nodejs/kubernetesCluster.ts +++ b/sdk/nodejs/kubernetesCluster.ts @@ -52,6 +52,31 @@ import {Region} from "./index"; * ``` * * Note that, while individual node pools may scale to 0, a cluster must always include at least one node. + * ### Auto Upgrade Example + * + * DigitalOcean Kubernetes clusters may also be configured to [auto upgrade](https://www.digitalocean.com/docs/kubernetes/how-to/upgrade-cluster/#automatically) patch versions. + * For example: + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as digitalocean from "@pulumi/digitalocean"; + * + * const example = digitalocean.getKubernetesVersions({ + * versionPrefix: "1.18.", + * }); + * const foo = new digitalocean.KubernetesCluster("foo", { + * region: "nyc1", + * autoUpgrade: true, + * version: example.then(example => example.latestVersion), + * nodePool: { + * name: "default", + * size: "s-1vcpu-2gb", + * nodeCount: 3, + * }, + * }); + * ``` + * + * Note that a data source is used to supply the version. This is needed to prevent configuration diff whenever a cluster is upgraded. */ export class KubernetesCluster extends pulumi.CustomResource { /** @@ -81,6 +106,10 @@ export class KubernetesCluster extends pulumi.CustomResource { return obj['__pulumiType'] === KubernetesCluster.__pulumiType; } + /** + * A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + */ + public readonly autoUpgrade!: pulumi.Output; /** * The range of IP addresses in the overlay network of the Kubernetes cluster. */ @@ -118,6 +147,10 @@ export class KubernetesCluster extends pulumi.CustomResource { * A string indicating the current status of the individual node. */ public /*out*/ readonly status!: pulumi.Output; + /** + * Enable/disable surge upgrades for a cluster. Default: false + */ + public readonly surgeUpgrade!: pulumi.Output; /** * A list of tag names to be applied to the Kubernetes cluster. */ @@ -147,6 +180,7 @@ export class KubernetesCluster extends pulumi.CustomResource { let inputs: pulumi.Inputs = {}; if (opts && opts.id) { const state = argsOrState as KubernetesClusterState | undefined; + inputs["autoUpgrade"] = state ? state.autoUpgrade : undefined; inputs["clusterSubnet"] = state ? state.clusterSubnet : undefined; inputs["createdAt"] = state ? state.createdAt : undefined; inputs["endpoint"] = state ? state.endpoint : undefined; @@ -157,6 +191,7 @@ export class KubernetesCluster extends pulumi.CustomResource { inputs["region"] = state ? state.region : undefined; inputs["serviceSubnet"] = state ? state.serviceSubnet : undefined; inputs["status"] = state ? state.status : undefined; + inputs["surgeUpgrade"] = state ? state.surgeUpgrade : undefined; inputs["tags"] = state ? state.tags : undefined; inputs["updatedAt"] = state ? state.updatedAt : undefined; inputs["version"] = state ? state.version : undefined; @@ -172,9 +207,11 @@ export class KubernetesCluster extends pulumi.CustomResource { if (!args || args.version === undefined) { throw new Error("Missing required property 'version'"); } + inputs["autoUpgrade"] = args ? args.autoUpgrade : undefined; inputs["name"] = args ? args.name : undefined; inputs["nodePool"] = args ? args.nodePool : undefined; inputs["region"] = args ? args.region : undefined; + inputs["surgeUpgrade"] = args ? args.surgeUpgrade : undefined; inputs["tags"] = args ? args.tags : undefined; inputs["version"] = args ? args.version : undefined; inputs["vpcUuid"] = args ? args.vpcUuid : undefined; @@ -202,6 +239,10 @@ export class KubernetesCluster extends pulumi.CustomResource { * Input properties used for looking up and filtering KubernetesCluster resources. */ export interface KubernetesClusterState { + /** + * A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + */ + readonly autoUpgrade?: pulumi.Input; /** * The range of IP addresses in the overlay network of the Kubernetes cluster. */ @@ -239,6 +280,10 @@ export interface KubernetesClusterState { * A string indicating the current status of the individual node. */ readonly status?: pulumi.Input; + /** + * Enable/disable surge upgrades for a cluster. Default: false + */ + readonly surgeUpgrade?: pulumi.Input; /** * A list of tag names to be applied to the Kubernetes cluster. */ @@ -261,6 +306,10 @@ export interface KubernetesClusterState { * The set of arguments for constructing a KubernetesCluster resource. */ export interface KubernetesClusterArgs { + /** + * A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + */ + readonly autoUpgrade?: pulumi.Input; /** * A name for the node pool. */ @@ -273,6 +322,10 @@ export interface KubernetesClusterArgs { * The slug identifier for the region where the Kubernetes cluster will be created. */ readonly region: pulumi.Input; + /** + * Enable/disable surge upgrades for a cluster. Default: false + */ + readonly surgeUpgrade?: pulumi.Input; /** * A list of tag names to be applied to the Kubernetes cluster. */ diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 96eec1a2..b3c24099 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -474,7 +474,7 @@ export interface LoadBalancerHealthcheck { */ port: pulumi.Input; /** - * The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + * The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. */ protocol: pulumi.Input; /** diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index b6911082..76743bab 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -900,7 +900,7 @@ export interface LoadBalancerHealthcheck { */ port: number; /** - * The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + * The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. */ protocol: string; /** diff --git a/sdk/python/pulumi_digitalocean/README.md b/sdk/python/pulumi_digitalocean/README.md index 9a78f5a9..fa3ace7a 100644 --- a/sdk/python/pulumi_digitalocean/README.md +++ b/sdk/python/pulumi_digitalocean/README.md @@ -1,4 +1,4 @@ -> This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-digitalocean) +> This provider is a derived work of the [Terraform Provider](https://github.com/digitalocean/terraform-provider-digitalocean) > distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature, > first check the [`pulumi/pulumi-digitalocean` repo](https://github.com/pulumi/pulumi-digitalocean/issues); however, if that doesn't turn up anything, -> please consult the source [`terraform-providers/terraform-provider-digitalocean` repo](https://github.com/terraform-providers/terraform-provider-digitalocean/issues). \ No newline at end of file +> please consult the source [`digitalocean/terraform-provider-digitalocean` repo](https://github.com/digitalocean/terraform-provider-digitalocean/issues). \ No newline at end of file diff --git a/sdk/python/pulumi_digitalocean/_inputs.py b/sdk/python/pulumi_digitalocean/_inputs.py index 704b38bd..2a70f1a7 100644 --- a/sdk/python/pulumi_digitalocean/_inputs.py +++ b/sdk/python/pulumi_digitalocean/_inputs.py @@ -1060,7 +1060,7 @@ def __init__(__self__, *, unhealthy_threshold: Optional[pulumi.Input[float]] = None): """ :param pulumi.Input[float] port: An integer representing the port on the backend Droplets on which the health check will attempt a connection. - :param pulumi.Input[str] protocol: The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + :param pulumi.Input[str] protocol: The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. :param pulumi.Input[float] check_interval_seconds: The number of seconds between between two consecutive health checks. If not specified, the default value is `10`. :param pulumi.Input[float] healthy_threshold: The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. If not specified, the default value is `5`. :param pulumi.Input[str] path: The path on the backend Droplets to which the Load Balancer instance will send a request. @@ -1096,7 +1096,7 @@ def port(self, value: pulumi.Input[float]): @pulumi.getter def protocol(self) -> pulumi.Input[str]: """ - The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. """ return pulumi.get(self, "protocol") diff --git a/sdk/python/pulumi_digitalocean/_tables.py b/sdk/python/pulumi_digitalocean/_tables.py index a097fbaa..a7bd2ebb 100644 --- a/sdk/python/pulumi_digitalocean/_tables.py +++ b/sdk/python/pulumi_digitalocean/_tables.py @@ -6,6 +6,7 @@ "actual_node_count": "actualNodeCount", "api_endpoint": "apiEndpoint", "auto_scale": "autoScale", + "auto_upgrade": "autoUpgrade", "bucket_domain_name": "bucketDomainName", "bucket_urn": "bucketUrn", "cache_control": "cacheControl", @@ -88,6 +89,7 @@ "sql_mode": "sqlMode", "ssh_keys": "sshKeys", "sticky_sessions": "stickySessions", + "surge_upgrade": "surgeUpgrade", "total_resource_count": "totalResourceCount", "updated_at": "updatedAt", "user_data": "userData", @@ -106,6 +108,7 @@ "actualNodeCount": "actual_node_count", "apiEndpoint": "api_endpoint", "autoScale": "auto_scale", + "autoUpgrade": "auto_upgrade", "bucketDomainName": "bucket_domain_name", "bucketUrn": "bucket_urn", "cacheControl": "cache_control", @@ -188,6 +191,7 @@ "sqlMode": "sql_mode", "sshKeys": "ssh_keys", "stickySessions": "sticky_sessions", + "surgeUpgrade": "surge_upgrade", "totalResourceCount": "total_resource_count", "updatedAt": "updated_at", "userData": "user_data", diff --git a/sdk/python/pulumi_digitalocean/dns_record.py b/sdk/python/pulumi_digitalocean/dns_record.py index 9aedca2d..23c0c79d 100644 --- a/sdk/python/pulumi_digitalocean/dns_record.py +++ b/sdk/python/pulumi_digitalocean/dns_record.py @@ -57,7 +57,7 @@ def __init__(__self__, :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] domain: The domain to add the record to. :param pulumi.Input[float] flags: The flags of the record. Only valid when type is `CAA`. Must be between 0 and 255. - :param pulumi.Input[str] name: The name of the record. Use `@` for records on domain's name itself. + :param pulumi.Input[str] name: The hostname of the record. Use `@` for records on domain's name itself. :param pulumi.Input[float] port: The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535. :param pulumi.Input[float] priority: The priority of the record. Only valid when type is `MX` or `SRV`. Must be between 0 and 65535. :param pulumi.Input[str] tag: The tag of the record. Only valid when type is `CAA`. Must be one of `issue`, `issuewild`, or `iodef`. @@ -131,7 +131,7 @@ def get(resource_name: str, :param pulumi.Input[str] domain: The domain to add the record to. :param pulumi.Input[float] flags: The flags of the record. Only valid when type is `CAA`. Must be between 0 and 255. :param pulumi.Input[str] fqdn: The FQDN of the record - :param pulumi.Input[str] name: The name of the record. Use `@` for records on domain's name itself. + :param pulumi.Input[str] name: The hostname of the record. Use `@` for records on domain's name itself. :param pulumi.Input[float] port: The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535. :param pulumi.Input[float] priority: The priority of the record. Only valid when type is `MX` or `SRV`. Must be between 0 and 65535. :param pulumi.Input[str] tag: The tag of the record. Only valid when type is `CAA`. Must be one of `issue`, `issuewild`, or `iodef`. @@ -185,7 +185,7 @@ def fqdn(self) -> pulumi.Output[str]: @pulumi.getter def name(self) -> pulumi.Output[str]: """ - The name of the record. Use `@` for records on domain's name itself. + The hostname of the record. Use `@` for records on domain's name itself. """ return pulumi.get(self, "name") diff --git a/sdk/python/pulumi_digitalocean/get_kubernetes_cluster.py b/sdk/python/pulumi_digitalocean/get_kubernetes_cluster.py index 9fa2fde1..3c62f3cc 100644 --- a/sdk/python/pulumi_digitalocean/get_kubernetes_cluster.py +++ b/sdk/python/pulumi_digitalocean/get_kubernetes_cluster.py @@ -20,7 +20,10 @@ class GetKubernetesClusterResult: """ A collection of values returned by getKubernetesCluster. """ - def __init__(__self__, cluster_subnet=None, created_at=None, endpoint=None, id=None, ipv4_address=None, kube_configs=None, name=None, node_pools=None, region=None, service_subnet=None, status=None, tags=None, updated_at=None, version=None, vpc_uuid=None): + def __init__(__self__, auto_upgrade=None, cluster_subnet=None, created_at=None, endpoint=None, id=None, ipv4_address=None, kube_configs=None, name=None, node_pools=None, region=None, service_subnet=None, status=None, surge_upgrade=None, tags=None, updated_at=None, version=None, vpc_uuid=None): + if auto_upgrade and not isinstance(auto_upgrade, bool): + raise TypeError("Expected argument 'auto_upgrade' to be a bool") + pulumi.set(__self__, "auto_upgrade", auto_upgrade) if cluster_subnet and not isinstance(cluster_subnet, str): raise TypeError("Expected argument 'cluster_subnet' to be a str") pulumi.set(__self__, "cluster_subnet", cluster_subnet) @@ -54,6 +57,9 @@ def __init__(__self__, cluster_subnet=None, created_at=None, endpoint=None, id=N if status and not isinstance(status, str): raise TypeError("Expected argument 'status' to be a str") pulumi.set(__self__, "status", status) + if surge_upgrade and not isinstance(surge_upgrade, bool): + raise TypeError("Expected argument 'surge_upgrade' to be a bool") + pulumi.set(__self__, "surge_upgrade", surge_upgrade) if tags and not isinstance(tags, list): raise TypeError("Expected argument 'tags' to be a list") pulumi.set(__self__, "tags", tags) @@ -67,6 +73,15 @@ def __init__(__self__, cluster_subnet=None, created_at=None, endpoint=None, id=N raise TypeError("Expected argument 'vpc_uuid' to be a str") pulumi.set(__self__, "vpc_uuid", vpc_uuid) + @property + @pulumi.getter(name="autoUpgrade") + def auto_upgrade(self) -> bool: + """ + A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + * `kube_config.0` - A representation of the Kubernetes cluster's kubeconfig with the following attributes: + """ + return pulumi.get(self, "auto_upgrade") + @property @pulumi.getter(name="clusterSubnet") def cluster_subnet(self) -> str: @@ -152,6 +167,11 @@ def status(self) -> str: """ return pulumi.get(self, "status") + @property + @pulumi.getter(name="surgeUpgrade") + def surge_upgrade(self) -> bool: + return pulumi.get(self, "surge_upgrade") + @property @pulumi.getter def tags(self) -> Optional[List[str]]: @@ -191,6 +211,7 @@ def __await__(self): if False: yield self return GetKubernetesClusterResult( + auto_upgrade=self.auto_upgrade, cluster_subnet=self.cluster_subnet, created_at=self.created_at, endpoint=self.endpoint, @@ -202,6 +223,7 @@ def __await__(self): region=self.region, service_subnet=self.service_subnet, status=self.status, + surge_upgrade=self.surge_upgrade, tags=self.tags, updated_at=self.updated_at, version=self.version, @@ -228,6 +250,7 @@ def get_kubernetes_cluster(name: Optional[str] = None, __ret__ = pulumi.runtime.invoke('digitalocean:index/getKubernetesCluster:getKubernetesCluster', __args__, opts=opts, typ=GetKubernetesClusterResult).value return AwaitableGetKubernetesClusterResult( + auto_upgrade=__ret__.auto_upgrade, cluster_subnet=__ret__.cluster_subnet, created_at=__ret__.created_at, endpoint=__ret__.endpoint, @@ -239,6 +262,7 @@ def get_kubernetes_cluster(name: Optional[str] = None, region=__ret__.region, service_subnet=__ret__.service_subnet, status=__ret__.status, + surge_upgrade=__ret__.surge_upgrade, tags=__ret__.tags, updated_at=__ret__.updated_at, version=__ret__.version, diff --git a/sdk/python/pulumi_digitalocean/kubernetes_cluster.py b/sdk/python/pulumi_digitalocean/kubernetes_cluster.py index 54e12636..f43d6858 100644 --- a/sdk/python/pulumi_digitalocean/kubernetes_cluster.py +++ b/sdk/python/pulumi_digitalocean/kubernetes_cluster.py @@ -17,9 +17,11 @@ class KubernetesCluster(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + auto_upgrade: Optional[pulumi.Input[bool]] = None, name: Optional[pulumi.Input[str]] = None, node_pool: Optional[pulumi.Input[pulumi.InputType['KubernetesClusterNodePoolArgs']]] = None, region: Optional[pulumi.Input[str]] = None, + surge_upgrade: Optional[pulumi.Input[bool]] = None, tags: Optional[pulumi.Input[List[pulumi.Input[str]]]] = None, version: Optional[pulumi.Input[str]] = None, vpc_uuid: Optional[pulumi.Input[str]] = None, @@ -67,12 +69,36 @@ def __init__(__self__, ``` Note that, while individual node pools may scale to 0, a cluster must always include at least one node. + ### Auto Upgrade Example + + DigitalOcean Kubernetes clusters may also be configured to [auto upgrade](https://www.digitalocean.com/docs/kubernetes/how-to/upgrade-cluster/#automatically) patch versions. + For example: + + ```python + import pulumi + import pulumi_digitalocean as digitalocean + + example = digitalocean.get_kubernetes_versions(version_prefix="1.18.") + foo = digitalocean.KubernetesCluster("foo", + region="nyc1", + auto_upgrade=True, + version=example.latest_version, + node_pool=digitalocean.KubernetesClusterNodePoolArgs( + name="default", + size="s-1vcpu-2gb", + node_count=3, + )) + ``` + + Note that a data source is used to supply the version. This is needed to prevent configuration diff whenever a cluster is upgraded. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[bool] auto_upgrade: A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. :param pulumi.Input[str] name: A name for the node pool. :param pulumi.Input[pulumi.InputType['KubernetesClusterNodePoolArgs']] node_pool: A block representing the cluster's default node pool. Additional node pools may be added to the cluster using the `KubernetesNodePool` resource. The following arguments may be specified: :param pulumi.Input[str] region: The slug identifier for the region where the Kubernetes cluster will be created. + :param pulumi.Input[bool] surge_upgrade: Enable/disable surge upgrades for a cluster. Default: false :param pulumi.Input[List[pulumi.Input[str]]] tags: A list of tag names to be applied to the Kubernetes cluster. :param pulumi.Input[str] version: The slug identifier for the version of Kubernetes used for the cluster. Use [doctl](https://github.com/digitalocean/doctl) to find the available versions `doctl kubernetes options versions`. (**Note:** A cluster may only be upgraded to newer versions in-place. If the version is decreased, a new resource will be created.) :param pulumi.Input[str] vpc_uuid: The ID of the VPC where the Kubernetes cluster will be located. @@ -94,6 +120,7 @@ def __init__(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = dict() + __props__['auto_upgrade'] = auto_upgrade __props__['name'] = name if node_pool is None: raise TypeError("Missing required property 'node_pool'") @@ -101,6 +128,7 @@ def __init__(__self__, if region is None: raise TypeError("Missing required property 'region'") __props__['region'] = region + __props__['surge_upgrade'] = surge_upgrade __props__['tags'] = tags if version is None: raise TypeError("Missing required property 'version'") @@ -124,6 +152,7 @@ def __init__(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, + auto_upgrade: Optional[pulumi.Input[bool]] = None, cluster_subnet: Optional[pulumi.Input[str]] = None, created_at: Optional[pulumi.Input[str]] = None, endpoint: Optional[pulumi.Input[str]] = None, @@ -134,6 +163,7 @@ def get(resource_name: str, region: Optional[pulumi.Input[str]] = None, service_subnet: Optional[pulumi.Input[str]] = None, status: Optional[pulumi.Input[str]] = None, + surge_upgrade: Optional[pulumi.Input[bool]] = None, tags: Optional[pulumi.Input[List[pulumi.Input[str]]]] = None, updated_at: Optional[pulumi.Input[str]] = None, version: Optional[pulumi.Input[str]] = None, @@ -145,6 +175,7 @@ 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[bool] auto_upgrade: A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. :param pulumi.Input[str] cluster_subnet: The range of IP addresses in the overlay network of the Kubernetes cluster. :param pulumi.Input[str] created_at: The date and time when the node was created. :param pulumi.Input[str] endpoint: The base URL of the API server on the Kubernetes master node. @@ -154,6 +185,7 @@ def get(resource_name: str, :param pulumi.Input[str] region: The slug identifier for the region where the Kubernetes cluster will be created. :param pulumi.Input[str] service_subnet: The range of assignable IP addresses for services running in the Kubernetes cluster. :param pulumi.Input[str] status: A string indicating the current status of the individual node. + :param pulumi.Input[bool] surge_upgrade: Enable/disable surge upgrades for a cluster. Default: false :param pulumi.Input[List[pulumi.Input[str]]] tags: A list of tag names to be applied to the Kubernetes cluster. :param pulumi.Input[str] updated_at: The date and time when the node was last updated. :param pulumi.Input[str] version: The slug identifier for the version of Kubernetes used for the cluster. Use [doctl](https://github.com/digitalocean/doctl) to find the available versions `doctl kubernetes options versions`. (**Note:** A cluster may only be upgraded to newer versions in-place. If the version is decreased, a new resource will be created.) @@ -163,6 +195,7 @@ def get(resource_name: str, __props__ = dict() + __props__["auto_upgrade"] = auto_upgrade __props__["cluster_subnet"] = cluster_subnet __props__["created_at"] = created_at __props__["endpoint"] = endpoint @@ -173,12 +206,21 @@ def get(resource_name: str, __props__["region"] = region __props__["service_subnet"] = service_subnet __props__["status"] = status + __props__["surge_upgrade"] = surge_upgrade __props__["tags"] = tags __props__["updated_at"] = updated_at __props__["version"] = version __props__["vpc_uuid"] = vpc_uuid return KubernetesCluster(resource_name, opts=opts, __props__=__props__) + @property + @pulumi.getter(name="autoUpgrade") + def auto_upgrade(self) -> pulumi.Output[Optional[bool]]: + """ + A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. + """ + return pulumi.get(self, "auto_upgrade") + @property @pulumi.getter(name="clusterSubnet") def cluster_subnet(self) -> pulumi.Output[str]: @@ -256,6 +298,14 @@ def status(self) -> pulumi.Output[str]: """ return pulumi.get(self, "status") + @property + @pulumi.getter(name="surgeUpgrade") + def surge_upgrade(self) -> pulumi.Output[Optional[bool]]: + """ + Enable/disable surge upgrades for a cluster. Default: false + """ + return pulumi.get(self, "surge_upgrade") + @property @pulumi.getter def tags(self) -> pulumi.Output[Optional[List[str]]]: diff --git a/sdk/python/pulumi_digitalocean/outputs.py b/sdk/python/pulumi_digitalocean/outputs.py index 8f6d1ac9..0cd3adfb 100644 --- a/sdk/python/pulumi_digitalocean/outputs.py +++ b/sdk/python/pulumi_digitalocean/outputs.py @@ -877,7 +877,7 @@ def __init__(__self__, *, unhealthy_threshold: Optional[float] = None): """ :param float port: An integer representing the port on the backend Droplets on which the health check will attempt a connection. - :param str protocol: The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + :param str protocol: The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. :param float check_interval_seconds: The number of seconds between between two consecutive health checks. If not specified, the default value is `10`. :param float healthy_threshold: The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. If not specified, the default value is `5`. :param str path: The path on the backend Droplets to which the Load Balancer instance will send a request. @@ -909,7 +909,7 @@ def port(self) -> float: @pulumi.getter def protocol(self) -> str: """ - The protocol used for health checks sent to the backend Droplets. The possible values are `http` or `tcp`. + The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`. """ return pulumi.get(self, "protocol")