Skip to content

Commit

Permalink
Merge pull request #132 from pulumi/stack72/v1.22.2
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 authored Sep 2, 2020
2 parents 44b9d66 + 2e75de5 commit 8febd1b
Show file tree
Hide file tree
Showing 28 changed files with 376 additions and 46 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHANGELOG
=========

## HEAD (Unreleased)
_(none)_
* Upgrade to v1.22.0 of the DigitalOcean Terraform Provider

---

Expand Down
49 changes: 41 additions & 8 deletions provider/cmd/pulumi-resource-digitalocean/schema.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -957,13 +964,16 @@ 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=
github.com/terraform-providers/terraform-provider-http v1.2.0/go.mod h1:2Iot921OkLVSZr8FbIkvRN84ZV3w+oFKb7RlmPTQQAQ=
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=
Expand Down
3 changes: 2 additions & 1 deletion provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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{
Expand Down
6 changes: 3 additions & 3 deletions sdk/dotnet/DnsRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public partial class DnsRecord : Pulumi.CustomResource
public Output<string> Fqdn { get; private set; } = null!;

/// <summary>
/// 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.
/// </summary>
[Output("name")]
public Output<string> Name { get; private set; } = null!;
Expand Down Expand Up @@ -179,7 +179,7 @@ public sealed class DnsRecordArgs : Pulumi.ResourceArgs
public Input<int>? Flags { get; set; }

/// <summary>
/// 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.
/// </summary>
[Input("name")]
public Input<string>? Name { get; set; }
Expand Down Expand Up @@ -252,7 +252,7 @@ public sealed class DnsRecordState : Pulumi.ResourceArgs
public Input<string>? Fqdn { get; set; }

/// <summary>
/// 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.
/// </summary>
[Input("name")]
public Input<string>? Name { get; set; }
Expand Down
12 changes: 12 additions & 0 deletions sdk/dotnet/GetKubernetesCluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public GetKubernetesClusterArgs()
[OutputType]
public sealed class GetKubernetesClusterResult
{
/// <summary>
/// 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:
/// </summary>
public readonly bool AutoUpgrade;
/// <summary>
/// The range of IP addresses in the overlay network of the Kubernetes cluster.
/// </summary>
Expand Down Expand Up @@ -89,6 +94,7 @@ public sealed class GetKubernetesClusterResult
/// A string indicating the current status of the individual node.
/// </summary>
public readonly string Status;
public readonly bool SurgeUpgrade;
/// <summary>
/// A list of tag names applied to the node pool.
/// </summary>
Expand All @@ -108,6 +114,8 @@ public sealed class GetKubernetesClusterResult

[OutputConstructor]
private GetKubernetesClusterResult(
bool autoUpgrade,

string clusterSubnet,

string createdAt,
Expand All @@ -130,6 +138,8 @@ private GetKubernetesClusterResult(

string status,

bool surgeUpgrade,

ImmutableArray<string> tags,

string updatedAt,
Expand All @@ -138,6 +148,7 @@ private GetKubernetesClusterResult(

string vpcUuid)
{
AutoUpgrade = autoUpgrade;
ClusterSubnet = clusterSubnet;
CreatedAt = createdAt;
Endpoint = endpoint;
Expand All @@ -149,6 +160,7 @@ private GetKubernetesClusterResult(
Region = region;
ServiceSubnet = serviceSubnet;
Status = status;
SurgeUpgrade = surgeUpgrade;
Tags = tags;
UpdatedAt = updatedAt;
Version = version;
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Inputs/LoadBalancerHealthcheckArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public sealed class LoadBalancerHealthcheckArgs : Pulumi.ResourceArgs
public Input<int> Port { get; set; } = null!;

/// <summary>
/// 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`.
/// </summary>
[Input("protocol", required: true)]
public Input<string> Protocol { get; set; } = null!;
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Inputs/LoadBalancerHealthcheckGetArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public sealed class LoadBalancerHealthcheckGetArgs : Pulumi.ResourceArgs
public Input<int> Port { get; set; } = null!;

/// <summary>
/// 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`.
/// </summary>
[Input("protocol", required: true)]
public Input<string> Protocol { get; set; } = null!;
Expand Down
71 changes: 71 additions & 0 deletions sdk/dotnet/KubernetesCluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =&gt; 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.
/// </summary>
public partial class KubernetesCluster : Pulumi.CustomResource
{
/// <summary>
/// A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.
/// </summary>
[Output("autoUpgrade")]
public Output<bool?> AutoUpgrade { get; private set; } = null!;

/// <summary>
/// The range of IP addresses in the overlay network of the Kubernetes cluster.
/// </summary>
Expand Down Expand Up @@ -130,6 +171,12 @@ public partial class KubernetesCluster : Pulumi.CustomResource
[Output("status")]
public Output<string> Status { get; private set; } = null!;

/// <summary>
/// Enable/disable surge upgrades for a cluster. Default: false
/// </summary>
[Output("surgeUpgrade")]
public Output<bool?> SurgeUpgrade { get; private set; } = null!;

/// <summary>
/// A list of tag names to be applied to the Kubernetes cluster.
/// </summary>
Expand Down Expand Up @@ -200,6 +247,12 @@ public static KubernetesCluster Get(string name, Input<string> id, KubernetesClu

public sealed class KubernetesClusterArgs : Pulumi.ResourceArgs
{
/// <summary>
/// A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.
/// </summary>
[Input("autoUpgrade")]
public Input<bool>? AutoUpgrade { get; set; }

/// <summary>
/// A name for the node pool.
/// </summary>
Expand All @@ -218,6 +271,12 @@ public sealed class KubernetesClusterArgs : Pulumi.ResourceArgs
[Input("region", required: true)]
public Input<string> Region { get; set; } = null!;

/// <summary>
/// Enable/disable surge upgrades for a cluster. Default: false
/// </summary>
[Input("surgeUpgrade")]
public Input<bool>? SurgeUpgrade { get; set; }

[Input("tags")]
private InputList<string>? _tags;

Expand Down Expand Up @@ -249,6 +308,12 @@ public KubernetesClusterArgs()

public sealed class KubernetesClusterState : Pulumi.ResourceArgs
{
/// <summary>
/// A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.
/// </summary>
[Input("autoUpgrade")]
public Input<bool>? AutoUpgrade { get; set; }

/// <summary>
/// The range of IP addresses in the overlay network of the Kubernetes cluster.
/// </summary>
Expand Down Expand Up @@ -311,6 +376,12 @@ public InputList<Inputs.KubernetesClusterKubeConfigGetArgs> KubeConfigs
[Input("status")]
public Input<string>? Status { get; set; }

/// <summary>
/// Enable/disable surge upgrades for a cluster. Default: false
/// </summary>
[Input("surgeUpgrade")]
public Input<bool>? SurgeUpgrade { get; set; }

[Input("tags")]
private InputList<string>? _tags;

Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Outputs/LoadBalancerHealthcheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public sealed class LoadBalancerHealthcheck
/// </summary>
public readonly int Port;
/// <summary>
/// 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`.
/// </summary>
public readonly string Protocol;
/// <summary>
Expand Down
10 changes: 5 additions & 5 deletions sdk/go/digitalocean/dnsRecord.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand All @@ -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
Expand All @@ -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"`
Expand All @@ -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
Expand Down
Loading

0 comments on commit 8febd1b

Please sign in to comment.