Update to the new DigitalOcean enums
MODIFY
digitalocean-ts-k8s/index.ts
digitalocean-ts-k8s/index.ts
@@ -13,11 +13,11 @@ const domainName = config.get("domainName");
// Provision a DigitalOcean Kubernetes cluster and export its resulting
// kubeconfig to make it easy to access from the kubectl command line.
const cluster = new digitalocean.KubernetesCluster("do-cluster", {
- region: digitalocean.Regions.NYC3,
+ region: digitalocean.Region.NYC3,
version: digitalocean.getKubernetesVersions().then(p => p.latestVersion),
nodePool: {
name: "default",
- size: digitalocean.DropletSlugs.DropletS2VCPU2GB,
+ size: digitalocean.DropletSlug.DropletS2VCPU2GB,
nodeCount: nodeCount,
},
});

MODIFY
digitalocean-ts-loadbalanced-droplets/index.ts
digitalocean-ts-loadbalanced-droplets/index.ts
@@ -4,7 +4,7 @@ import * as digitalocean from "@pulumi/digitalocean";
import * as pulumi from "@pulumi/pulumi";
const dropletCount = 3;
-const region = digitalocean.Regions.NYC3;
+const region = digitalocean.Region.NYC3;
const dropletTypeTag = new digitalocean.Tag(`demo-app-${pulumi.getStack()}`);
const userData =
@@ -18,7 +18,7 @@ for (let i = 0; i < dropletCount; i++) {
image: "ubuntu-18-04-x64",
region: region,
privateNetworking: true,
- size: digitalocean.DropletSlugs.Droplet512mb,
+ size: digitalocean.DropletSlug.Droplet512mb,
tags: [nameTag.id, dropletTypeTag.id],
userData: userData,
}));
@@ -28,13 +28,13 @@ const lb = new digitalocean.LoadBalancer("public", {
dropletTag: dropletTypeTag.name,
forwardingRules: [{
entryPort: 80,
- entryProtocol: digitalocean.Protocols.HTTP,
+ entryProtocol: digitalocean.Protocol.HTTP,
targetPort: 80,
- targetProtocol: digitalocean.Protocols.HTTP,
+ targetProtocol: digitalocean.Protocol.HTTP,
}],
healthcheck: {
port: 80,
- protocol: digitalocean.Protocols.TCP,
+ protocol: digitalocean.Protocol.TCP,
},
region: region,
});

Update to the new DigitalOcean enums (#1006)