@pulumi/digitalocean 4.7.0-alpha.1633346817
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +68 -0
- package/app.d.ts +203 -0
- package/app.js +174 -0
- package/app.js.map +1 -0
- package/cdn.d.ts +169 -0
- package/cdn.js +116 -0
- package/cdn.js.map +1 -0
- package/certificate.d.ts +225 -0
- package/certificate.js +137 -0
- package/certificate.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +10 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +20 -0
- package/config/vars.js +28 -0
- package/config/vars.js.map +1 -0
- package/containerRegistry.d.ts +88 -0
- package/containerRegistry.js +83 -0
- package/containerRegistry.js.map +1 -0
- package/containerRegistryDockerCredentials.d.ts +108 -0
- package/containerRegistryDockerCredentials.js +93 -0
- package/containerRegistryDockerCredentials.js.map +1 -0
- package/customImage.d.ts +155 -0
- package/customImage.js +113 -0
- package/customImage.js.map +1 -0
- package/databaseCluster.d.ts +306 -0
- package/databaseCluster.js +165 -0
- package/databaseCluster.js.map +1 -0
- package/databaseConnectionPool.d.ts +189 -0
- package/databaseConnectionPool.js +120 -0
- package/databaseConnectionPool.js.map +1 -0
- package/databaseDb.d.ts +87 -0
- package/databaseDb.js +82 -0
- package/databaseDb.js.map +1 -0
- package/databaseFirewall.d.ts +129 -0
- package/databaseFirewall.js +126 -0
- package/databaseFirewall.js.map +1 -0
- package/databaseReplica.d.ts +204 -0
- package/databaseReplica.js +110 -0
- package/databaseReplica.js.map +1 -0
- package/databaseUser.d.ts +117 -0
- package/databaseUser.js +90 -0
- package/databaseUser.js.map +1 -0
- package/dnsRecord.d.ts +200 -0
- package/dnsRecord.js +114 -0
- package/dnsRecord.js.map +1 -0
- package/domain.d.ts +103 -0
- package/domain.js +83 -0
- package/domain.js.map +1 -0
- package/droplet.d.ts +386 -0
- package/droplet.js +137 -0
- package/droplet.js.map +1 -0
- package/dropletSnapshot.d.ts +117 -0
- package/dropletSnapshot.js +88 -0
- package/dropletSnapshot.js.map +1 -0
- package/firewall.d.ts +226 -0
- package/firewall.js +150 -0
- package/firewall.js.map +1 -0
- package/floatingIp.d.ts +112 -0
- package/floatingIp.js +91 -0
- package/floatingIp.js.map +1 -0
- package/floatingIpAssignment.d.ts +85 -0
- package/floatingIpAssignment.js +83 -0
- package/floatingIpAssignment.js.map +1 -0
- package/getAccount.d.ts +32 -0
- package/getAccount.js +31 -0
- package/getAccount.js.map +1 -0
- package/getApp.d.ts +63 -0
- package/getApp.js +36 -0
- package/getApp.js.map +1 -0
- package/getCertificate.d.ts +48 -0
- package/getCertificate.js +40 -0
- package/getCertificate.js.map +1 -0
- package/getContainerRegistry.d.ts +54 -0
- package/getContainerRegistry.js +41 -0
- package/getContainerRegistry.js.map +1 -0
- package/getDatabaseCluster.d.ts +103 -0
- package/getDatabaseCluster.js +35 -0
- package/getDatabaseCluster.js.map +1 -0
- package/getDatabaseReplica.d.ts +87 -0
- package/getDatabaseReplica.js +40 -0
- package/getDatabaseReplica.js.map +1 -0
- package/getDomain.d.ts +37 -0
- package/getDomain.js +28 -0
- package/getDomain.js.map +1 -0
- package/getDomains.d.ts +61 -0
- package/getDomains.js +49 -0
- package/getDomains.js.map +1 -0
- package/getDroplet.d.ts +161 -0
- package/getDroplet.js +67 -0
- package/getDroplet.js.map +1 -0
- package/getDropletSnapshot.d.ts +76 -0
- package/getDropletSnapshot.js +43 -0
- package/getDropletSnapshot.js.map +1 -0
- package/getDroplets.d.ts +85 -0
- package/getDroplets.js +73 -0
- package/getDroplets.js.map +1 -0
- package/getFirewall.d.ts +83 -0
- package/getFirewall.js +40 -0
- package/getFirewall.js.map +1 -0
- package/getFloatingIp.d.ts +48 -0
- package/getFloatingIp.js +43 -0
- package/getFloatingIp.js.map +1 -0
- package/getImage.d.ts +110 -0
- package/getImage.js +71 -0
- package/getImage.js.map +1 -0
- package/getImages.d.ts +90 -0
- package/getImages.js +74 -0
- package/getImages.js.map +1 -0
- package/getKubernetesCluster.d.ts +95 -0
- package/getKubernetesCluster.js +23 -0
- package/getKubernetesCluster.js.map +1 -0
- package/getKubernetesVersions.d.ts +79 -0
- package/getKubernetesVersions.js +70 -0
- package/getKubernetesVersions.js.map +1 -0
- package/getLoadBalancer.d.ts +59 -0
- package/getLoadBalancer.js +41 -0
- package/getLoadBalancer.js.map +1 -0
- package/getProject.d.ts +72 -0
- package/getProject.js +37 -0
- package/getProject.js.map +1 -0
- package/getProjects.d.ts +85 -0
- package/getProjects.js +72 -0
- package/getProjects.js.map +1 -0
- package/getRecord.d.ts +42 -0
- package/getRecord.js +28 -0
- package/getRecord.js.map +1 -0
- package/getRecords.d.ts +39 -0
- package/getRecords.js +25 -0
- package/getRecords.js.map +1 -0
- package/getRegion.d.ts +56 -0
- package/getRegion.js +35 -0
- package/getRegion.js.map +1 -0
- package/getRegions.d.ts +82 -0
- package/getRegions.js +70 -0
- package/getRegions.js.map +1 -0
- package/getSizes.d.ts +35 -0
- package/getSizes.js +26 -0
- package/getSizes.js.map +1 -0
- package/getSpacesBucket.d.ts +59 -0
- package/getSpacesBucket.js +39 -0
- package/getSpacesBucket.js.map +1 -0
- package/getSpacesBucketObject.d.ts +125 -0
- package/getSpacesBucketObject.js +53 -0
- package/getSpacesBucketObject.js.map +1 -0
- package/getSpacesBucketObjects.d.ts +83 -0
- package/getSpacesBucketObjects.js +49 -0
- package/getSpacesBucketObjects.js.map +1 -0
- package/getSpacesBuckets.d.ts +75 -0
- package/getSpacesBuckets.js +63 -0
- package/getSpacesBuckets.js.map +1 -0
- package/getSshKey.d.ts +47 -0
- package/getSshKey.js +46 -0
- package/getSshKey.js.map +1 -0
- package/getSshKeys.d.ts +58 -0
- package/getSshKeys.js +46 -0
- package/getSshKeys.js.map +1 -0
- package/getTag.d.ts +71 -0
- package/getTag.js +45 -0
- package/getTag.js.map +1 -0
- package/getTags.d.ts +50 -0
- package/getTags.js +41 -0
- package/getTags.js.map +1 -0
- package/getVolume.d.ts +98 -0
- package/getVolume.js +64 -0
- package/getVolume.js.map +1 -0
- package/getVolumeSnapshot.d.ts +98 -0
- package/getVolumeSnapshot.js +61 -0
- package/getVolumeSnapshot.js.map +1 -0
- package/getVpc.d.ts +95 -0
- package/getVpc.js +61 -0
- package/getVpc.js.map +1 -0
- package/index.d.ts +74 -0
- package/index.js +240 -0
- package/index.js.map +1 -0
- package/kubernetesCluster.d.ts +220 -0
- package/kubernetesCluster.js +102 -0
- package/kubernetesCluster.js.map +1 -0
- package/kubernetesNodePool.d.ts +242 -0
- package/kubernetesNodePool.js +141 -0
- package/kubernetesNodePool.js.map +1 -0
- package/loadBalancer.d.ts +307 -0
- package/loadBalancer.js +161 -0
- package/loadBalancer.js.map +1 -0
- package/monitorAlert.d.ts +193 -0
- package/monitorAlert.js +99 -0
- package/monitorAlert.js.map +1 -0
- package/package.json +28 -0
- package/package.json.bak +27 -0
- package/package.json.dev +27 -0
- package/project.d.ts +191 -0
- package/project.js +129 -0
- package/project.js.map +1 -0
- package/projectResources.d.ts +100 -0
- package/projectResources.js +98 -0
- package/projectResources.js.map +1 -0
- package/provider.d.ts +67 -0
- package/provider.js +51 -0
- package/provider.js.map +1 -0
- package/scripts/install-pulumi-plugin.js +21 -0
- package/spacesBucket.d.ts +210 -0
- package/spacesBucket.js +139 -0
- package/spacesBucket.js.map +1 -0
- package/spacesBucketObject.d.ts +293 -0
- package/spacesBucketObject.js +139 -0
- package/spacesBucketObject.js.map +1 -0
- package/sshKey.d.ts +103 -0
- package/sshKey.js +89 -0
- package/sshKey.js.map +1 -0
- package/tag.d.ts +127 -0
- package/tag.js +93 -0
- package/tag.js.map +1 -0
- package/types/enums/index.d.ts +151 -0
- package/types/enums/index.js +148 -0
- package/types/enums/index.js.map +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.js +12 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +1584 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +2730 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/utilities.d.ts +4 -0
- package/utilities.js +51 -0
- package/utilities.js.map +1 -0
- package/volume.d.ts +225 -0
- package/volume.js +128 -0
- package/volume.js.map +1 -0
- package/volumeAttachment.d.ts +88 -0
- package/volumeAttachment.js +86 -0
- package/volumeAttachment.js.map +1 -0
- package/volumeSnapshot.d.ts +129 -0
- package/volumeSnapshot.js +90 -0
- package/volumeSnapshot.js.map +1 -0
- package/vpc.d.ts +152 -0
- package/vpc.js +109 -0
- package/vpc.js.map +1 -0
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { input as inputs, output as outputs, enums } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Provides a DigitalOcean Load Balancer resource. This can be used to create,
|
|
5
|
+
* modify, and delete Load Balancers.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
12
|
+
*
|
|
13
|
+
* const web = new digitalocean.Droplet("web", {
|
|
14
|
+
* size: "s-1vcpu-1gb",
|
|
15
|
+
* image: "ubuntu-18-04-x64",
|
|
16
|
+
* region: "nyc3",
|
|
17
|
+
* });
|
|
18
|
+
* const _public = new digitalocean.LoadBalancer("public", {
|
|
19
|
+
* region: "nyc3",
|
|
20
|
+
* forwardingRules: [{
|
|
21
|
+
* entryPort: 80,
|
|
22
|
+
* entryProtocol: "http",
|
|
23
|
+
* targetPort: 80,
|
|
24
|
+
* targetProtocol: "http",
|
|
25
|
+
* }],
|
|
26
|
+
* healthcheck: {
|
|
27
|
+
* port: 22,
|
|
28
|
+
* protocol: "tcp",
|
|
29
|
+
* },
|
|
30
|
+
* dropletIds: [web.id],
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* When managing certificates attached to the load balancer, make sure to add the `createBeforeDestroy`
|
|
35
|
+
* lifecycle property in order to ensure the certificate is correctly updated when changed. The order of
|
|
36
|
+
* operations will then be: `Create new certificate` > `Update loadbalancer with new certificate` ->
|
|
37
|
+
* `Delete old certificate`. When doing so, you must also change the name of the certificate,
|
|
38
|
+
* as there cannot be multiple certificates with the same name in an account.
|
|
39
|
+
*
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
42
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
43
|
+
*
|
|
44
|
+
* const cert = new digitalocean.Certificate("cert", {
|
|
45
|
+
* privateKey: "file('key.pem')",
|
|
46
|
+
* leafCertificate: "file('cert.pem')",
|
|
47
|
+
* });
|
|
48
|
+
* const web = new digitalocean.Droplet("web", {
|
|
49
|
+
* size: "s-1vcpu-1gb",
|
|
50
|
+
* image: "ubuntu-18-04-x64",
|
|
51
|
+
* region: "nyc3",
|
|
52
|
+
* });
|
|
53
|
+
* const _public = new digitalocean.LoadBalancer("public", {
|
|
54
|
+
* region: "nyc3",
|
|
55
|
+
* forwardingRules: [{
|
|
56
|
+
* entryPort: 443,
|
|
57
|
+
* entryProtocol: "https",
|
|
58
|
+
* targetPort: 80,
|
|
59
|
+
* targetProtocol: "http",
|
|
60
|
+
* certificateName: cert.name,
|
|
61
|
+
* }],
|
|
62
|
+
* healthcheck: {
|
|
63
|
+
* port: 22,
|
|
64
|
+
* protocol: "tcp",
|
|
65
|
+
* },
|
|
66
|
+
* dropletIds: [web.id],
|
|
67
|
+
* });
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* ## Import
|
|
71
|
+
*
|
|
72
|
+
* Load Balancers can be imported using the `id`, e.g.
|
|
73
|
+
*
|
|
74
|
+
* ```sh
|
|
75
|
+
* $ pulumi import digitalocean:index/loadBalancer:LoadBalancer myloadbalancer 4de7ac8b-495b-4884-9a69-1050c6793cd6
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export declare class LoadBalancer extends pulumi.CustomResource {
|
|
79
|
+
/**
|
|
80
|
+
* Get an existing LoadBalancer resource's state with the given name, ID, and optional extra
|
|
81
|
+
* properties used to qualify the lookup.
|
|
82
|
+
*
|
|
83
|
+
* @param name The _unique_ name of the resulting resource.
|
|
84
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
85
|
+
* @param state Any extra arguments used during the lookup.
|
|
86
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
87
|
+
*/
|
|
88
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LoadBalancerState, opts?: pulumi.CustomResourceOptions): LoadBalancer;
|
|
89
|
+
/**
|
|
90
|
+
* Returns true if the given object is an instance of LoadBalancer. This is designed to work even
|
|
91
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
92
|
+
*/
|
|
93
|
+
static isInstance(obj: any): obj is LoadBalancer;
|
|
94
|
+
/**
|
|
95
|
+
* The load balancing algorithm used to determine
|
|
96
|
+
* which backend Droplet will be selected by a client. It must be either `roundRobin`
|
|
97
|
+
* or `leastConnections`. The default value is `roundRobin`.
|
|
98
|
+
*/
|
|
99
|
+
readonly algorithm: pulumi.Output<string | undefined>;
|
|
100
|
+
/**
|
|
101
|
+
* A list of the IDs of each droplet to be attached to the Load Balancer.
|
|
102
|
+
*/
|
|
103
|
+
readonly dropletIds: pulumi.Output<number[]>;
|
|
104
|
+
/**
|
|
105
|
+
* The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
|
|
106
|
+
*/
|
|
107
|
+
readonly dropletTag: pulumi.Output<string | undefined>;
|
|
108
|
+
/**
|
|
109
|
+
* A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is `false`.
|
|
110
|
+
*/
|
|
111
|
+
readonly enableBackendKeepalive: pulumi.Output<boolean | undefined>;
|
|
112
|
+
/**
|
|
113
|
+
* A boolean value indicating whether PROXY
|
|
114
|
+
* Protocol should be used to pass information from connecting client requests to
|
|
115
|
+
* the backend service. Default value is `false`.
|
|
116
|
+
*/
|
|
117
|
+
readonly enableProxyProtocol: pulumi.Output<boolean | undefined>;
|
|
118
|
+
/**
|
|
119
|
+
* A list of `forwardingRule` to be assigned to the
|
|
120
|
+
* Load Balancer. The `forwardingRule` block is documented below.
|
|
121
|
+
*/
|
|
122
|
+
readonly forwardingRules: pulumi.Output<outputs.LoadBalancerForwardingRule[]>;
|
|
123
|
+
/**
|
|
124
|
+
* A `healthcheck` block to be assigned to the
|
|
125
|
+
* Load Balancer. The `healthcheck` block is documented below. Only 1 healthcheck is allowed.
|
|
126
|
+
*/
|
|
127
|
+
readonly healthcheck: pulumi.Output<outputs.LoadBalancerHealthcheck>;
|
|
128
|
+
readonly ip: pulumi.Output<string>;
|
|
129
|
+
/**
|
|
130
|
+
* The uniform resource name for the Load Balancer
|
|
131
|
+
*/
|
|
132
|
+
readonly loadBalancerUrn: pulumi.Output<string>;
|
|
133
|
+
/**
|
|
134
|
+
* The Load Balancer name
|
|
135
|
+
*/
|
|
136
|
+
readonly name: pulumi.Output<string>;
|
|
137
|
+
/**
|
|
138
|
+
* A boolean value indicating whether
|
|
139
|
+
* HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443.
|
|
140
|
+
* Default value is `false`.
|
|
141
|
+
*/
|
|
142
|
+
readonly redirectHttpToHttps: pulumi.Output<boolean | undefined>;
|
|
143
|
+
/**
|
|
144
|
+
* The region to start in
|
|
145
|
+
*/
|
|
146
|
+
readonly region: pulumi.Output<string>;
|
|
147
|
+
/**
|
|
148
|
+
* The size of the Load Balancer. It must be either `lb-small`, `lb-medium`, or `lb-large`. Defaults to `lb-small`.
|
|
149
|
+
*/
|
|
150
|
+
readonly size: pulumi.Output<string | undefined>;
|
|
151
|
+
readonly status: pulumi.Output<string>;
|
|
152
|
+
/**
|
|
153
|
+
* A `stickySessions` block to be assigned to the
|
|
154
|
+
* Load Balancer. The `stickySessions` block is documented below. Only 1 stickySessions block is allowed.
|
|
155
|
+
*/
|
|
156
|
+
readonly stickySessions: pulumi.Output<outputs.LoadBalancerStickySessions>;
|
|
157
|
+
/**
|
|
158
|
+
* The ID of the VPC where the load balancer will be located.
|
|
159
|
+
*/
|
|
160
|
+
readonly vpcUuid: pulumi.Output<string>;
|
|
161
|
+
/**
|
|
162
|
+
* Create a LoadBalancer resource with the given unique name, arguments, and options.
|
|
163
|
+
*
|
|
164
|
+
* @param name The _unique_ name of the resource.
|
|
165
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
166
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
167
|
+
*/
|
|
168
|
+
constructor(name: string, args: LoadBalancerArgs, opts?: pulumi.CustomResourceOptions);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Input properties used for looking up and filtering LoadBalancer resources.
|
|
172
|
+
*/
|
|
173
|
+
export interface LoadBalancerState {
|
|
174
|
+
/**
|
|
175
|
+
* The load balancing algorithm used to determine
|
|
176
|
+
* which backend Droplet will be selected by a client. It must be either `roundRobin`
|
|
177
|
+
* or `leastConnections`. The default value is `roundRobin`.
|
|
178
|
+
*/
|
|
179
|
+
algorithm?: pulumi.Input<string | enums.Algorithm>;
|
|
180
|
+
/**
|
|
181
|
+
* A list of the IDs of each droplet to be attached to the Load Balancer.
|
|
182
|
+
*/
|
|
183
|
+
dropletIds?: pulumi.Input<pulumi.Input<number>[]>;
|
|
184
|
+
/**
|
|
185
|
+
* The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
|
|
186
|
+
*/
|
|
187
|
+
dropletTag?: pulumi.Input<string>;
|
|
188
|
+
/**
|
|
189
|
+
* A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is `false`.
|
|
190
|
+
*/
|
|
191
|
+
enableBackendKeepalive?: pulumi.Input<boolean>;
|
|
192
|
+
/**
|
|
193
|
+
* A boolean value indicating whether PROXY
|
|
194
|
+
* Protocol should be used to pass information from connecting client requests to
|
|
195
|
+
* the backend service. Default value is `false`.
|
|
196
|
+
*/
|
|
197
|
+
enableProxyProtocol?: pulumi.Input<boolean>;
|
|
198
|
+
/**
|
|
199
|
+
* A list of `forwardingRule` to be assigned to the
|
|
200
|
+
* Load Balancer. The `forwardingRule` block is documented below.
|
|
201
|
+
*/
|
|
202
|
+
forwardingRules?: pulumi.Input<pulumi.Input<inputs.LoadBalancerForwardingRule>[]>;
|
|
203
|
+
/**
|
|
204
|
+
* A `healthcheck` block to be assigned to the
|
|
205
|
+
* Load Balancer. The `healthcheck` block is documented below. Only 1 healthcheck is allowed.
|
|
206
|
+
*/
|
|
207
|
+
healthcheck?: pulumi.Input<inputs.LoadBalancerHealthcheck>;
|
|
208
|
+
ip?: pulumi.Input<string>;
|
|
209
|
+
/**
|
|
210
|
+
* The uniform resource name for the Load Balancer
|
|
211
|
+
*/
|
|
212
|
+
loadBalancerUrn?: pulumi.Input<string>;
|
|
213
|
+
/**
|
|
214
|
+
* The Load Balancer name
|
|
215
|
+
*/
|
|
216
|
+
name?: pulumi.Input<string>;
|
|
217
|
+
/**
|
|
218
|
+
* A boolean value indicating whether
|
|
219
|
+
* HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443.
|
|
220
|
+
* Default value is `false`.
|
|
221
|
+
*/
|
|
222
|
+
redirectHttpToHttps?: pulumi.Input<boolean>;
|
|
223
|
+
/**
|
|
224
|
+
* The region to start in
|
|
225
|
+
*/
|
|
226
|
+
region?: pulumi.Input<string | enums.Region>;
|
|
227
|
+
/**
|
|
228
|
+
* The size of the Load Balancer. It must be either `lb-small`, `lb-medium`, or `lb-large`. Defaults to `lb-small`.
|
|
229
|
+
*/
|
|
230
|
+
size?: pulumi.Input<string>;
|
|
231
|
+
status?: pulumi.Input<string>;
|
|
232
|
+
/**
|
|
233
|
+
* A `stickySessions` block to be assigned to the
|
|
234
|
+
* Load Balancer. The `stickySessions` block is documented below. Only 1 stickySessions block is allowed.
|
|
235
|
+
*/
|
|
236
|
+
stickySessions?: pulumi.Input<inputs.LoadBalancerStickySessions>;
|
|
237
|
+
/**
|
|
238
|
+
* The ID of the VPC where the load balancer will be located.
|
|
239
|
+
*/
|
|
240
|
+
vpcUuid?: pulumi.Input<string>;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* The set of arguments for constructing a LoadBalancer resource.
|
|
244
|
+
*/
|
|
245
|
+
export interface LoadBalancerArgs {
|
|
246
|
+
/**
|
|
247
|
+
* The load balancing algorithm used to determine
|
|
248
|
+
* which backend Droplet will be selected by a client. It must be either `roundRobin`
|
|
249
|
+
* or `leastConnections`. The default value is `roundRobin`.
|
|
250
|
+
*/
|
|
251
|
+
algorithm?: pulumi.Input<string | enums.Algorithm>;
|
|
252
|
+
/**
|
|
253
|
+
* A list of the IDs of each droplet to be attached to the Load Balancer.
|
|
254
|
+
*/
|
|
255
|
+
dropletIds?: pulumi.Input<pulumi.Input<number>[]>;
|
|
256
|
+
/**
|
|
257
|
+
* The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
|
|
258
|
+
*/
|
|
259
|
+
dropletTag?: pulumi.Input<string>;
|
|
260
|
+
/**
|
|
261
|
+
* A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is `false`.
|
|
262
|
+
*/
|
|
263
|
+
enableBackendKeepalive?: pulumi.Input<boolean>;
|
|
264
|
+
/**
|
|
265
|
+
* A boolean value indicating whether PROXY
|
|
266
|
+
* Protocol should be used to pass information from connecting client requests to
|
|
267
|
+
* the backend service. Default value is `false`.
|
|
268
|
+
*/
|
|
269
|
+
enableProxyProtocol?: pulumi.Input<boolean>;
|
|
270
|
+
/**
|
|
271
|
+
* A list of `forwardingRule` to be assigned to the
|
|
272
|
+
* Load Balancer. The `forwardingRule` block is documented below.
|
|
273
|
+
*/
|
|
274
|
+
forwardingRules: pulumi.Input<pulumi.Input<inputs.LoadBalancerForwardingRule>[]>;
|
|
275
|
+
/**
|
|
276
|
+
* A `healthcheck` block to be assigned to the
|
|
277
|
+
* Load Balancer. The `healthcheck` block is documented below. Only 1 healthcheck is allowed.
|
|
278
|
+
*/
|
|
279
|
+
healthcheck?: pulumi.Input<inputs.LoadBalancerHealthcheck>;
|
|
280
|
+
/**
|
|
281
|
+
* The Load Balancer name
|
|
282
|
+
*/
|
|
283
|
+
name?: pulumi.Input<string>;
|
|
284
|
+
/**
|
|
285
|
+
* A boolean value indicating whether
|
|
286
|
+
* HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443.
|
|
287
|
+
* Default value is `false`.
|
|
288
|
+
*/
|
|
289
|
+
redirectHttpToHttps?: pulumi.Input<boolean>;
|
|
290
|
+
/**
|
|
291
|
+
* The region to start in
|
|
292
|
+
*/
|
|
293
|
+
region: pulumi.Input<string | enums.Region>;
|
|
294
|
+
/**
|
|
295
|
+
* The size of the Load Balancer. It must be either `lb-small`, `lb-medium`, or `lb-large`. Defaults to `lb-small`.
|
|
296
|
+
*/
|
|
297
|
+
size?: pulumi.Input<string>;
|
|
298
|
+
/**
|
|
299
|
+
* A `stickySessions` block to be assigned to the
|
|
300
|
+
* Load Balancer. The `stickySessions` block is documented below. Only 1 stickySessions block is allowed.
|
|
301
|
+
*/
|
|
302
|
+
stickySessions?: pulumi.Input<inputs.LoadBalancerStickySessions>;
|
|
303
|
+
/**
|
|
304
|
+
* The ID of the VPC where the load balancer will be located.
|
|
305
|
+
*/
|
|
306
|
+
vpcUuid?: pulumi.Input<string>;
|
|
307
|
+
}
|
package/loadBalancer.js
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const pulumi = require("@pulumi/pulumi");
|
|
6
|
+
const utilities = require("./utilities");
|
|
7
|
+
/**
|
|
8
|
+
* Provides a DigitalOcean Load Balancer resource. This can be used to create,
|
|
9
|
+
* modify, and delete Load Balancers.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
16
|
+
*
|
|
17
|
+
* const web = new digitalocean.Droplet("web", {
|
|
18
|
+
* size: "s-1vcpu-1gb",
|
|
19
|
+
* image: "ubuntu-18-04-x64",
|
|
20
|
+
* region: "nyc3",
|
|
21
|
+
* });
|
|
22
|
+
* const _public = new digitalocean.LoadBalancer("public", {
|
|
23
|
+
* region: "nyc3",
|
|
24
|
+
* forwardingRules: [{
|
|
25
|
+
* entryPort: 80,
|
|
26
|
+
* entryProtocol: "http",
|
|
27
|
+
* targetPort: 80,
|
|
28
|
+
* targetProtocol: "http",
|
|
29
|
+
* }],
|
|
30
|
+
* healthcheck: {
|
|
31
|
+
* port: 22,
|
|
32
|
+
* protocol: "tcp",
|
|
33
|
+
* },
|
|
34
|
+
* dropletIds: [web.id],
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* When managing certificates attached to the load balancer, make sure to add the `createBeforeDestroy`
|
|
39
|
+
* lifecycle property in order to ensure the certificate is correctly updated when changed. The order of
|
|
40
|
+
* operations will then be: `Create new certificate` > `Update loadbalancer with new certificate` ->
|
|
41
|
+
* `Delete old certificate`. When doing so, you must also change the name of the certificate,
|
|
42
|
+
* as there cannot be multiple certificates with the same name in an account.
|
|
43
|
+
*
|
|
44
|
+
* ```typescript
|
|
45
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
46
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
47
|
+
*
|
|
48
|
+
* const cert = new digitalocean.Certificate("cert", {
|
|
49
|
+
* privateKey: "file('key.pem')",
|
|
50
|
+
* leafCertificate: "file('cert.pem')",
|
|
51
|
+
* });
|
|
52
|
+
* const web = new digitalocean.Droplet("web", {
|
|
53
|
+
* size: "s-1vcpu-1gb",
|
|
54
|
+
* image: "ubuntu-18-04-x64",
|
|
55
|
+
* region: "nyc3",
|
|
56
|
+
* });
|
|
57
|
+
* const _public = new digitalocean.LoadBalancer("public", {
|
|
58
|
+
* region: "nyc3",
|
|
59
|
+
* forwardingRules: [{
|
|
60
|
+
* entryPort: 443,
|
|
61
|
+
* entryProtocol: "https",
|
|
62
|
+
* targetPort: 80,
|
|
63
|
+
* targetProtocol: "http",
|
|
64
|
+
* certificateName: cert.name,
|
|
65
|
+
* }],
|
|
66
|
+
* healthcheck: {
|
|
67
|
+
* port: 22,
|
|
68
|
+
* protocol: "tcp",
|
|
69
|
+
* },
|
|
70
|
+
* dropletIds: [web.id],
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* ## Import
|
|
75
|
+
*
|
|
76
|
+
* Load Balancers can be imported using the `id`, e.g.
|
|
77
|
+
*
|
|
78
|
+
* ```sh
|
|
79
|
+
* $ pulumi import digitalocean:index/loadBalancer:LoadBalancer myloadbalancer 4de7ac8b-495b-4884-9a69-1050c6793cd6
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
class LoadBalancer extends pulumi.CustomResource {
|
|
83
|
+
constructor(name, argsOrState, opts) {
|
|
84
|
+
let inputs = {};
|
|
85
|
+
opts = opts || {};
|
|
86
|
+
if (opts.id) {
|
|
87
|
+
const state = argsOrState;
|
|
88
|
+
inputs["algorithm"] = state ? state.algorithm : undefined;
|
|
89
|
+
inputs["dropletIds"] = state ? state.dropletIds : undefined;
|
|
90
|
+
inputs["dropletTag"] = state ? state.dropletTag : undefined;
|
|
91
|
+
inputs["enableBackendKeepalive"] = state ? state.enableBackendKeepalive : undefined;
|
|
92
|
+
inputs["enableProxyProtocol"] = state ? state.enableProxyProtocol : undefined;
|
|
93
|
+
inputs["forwardingRules"] = state ? state.forwardingRules : undefined;
|
|
94
|
+
inputs["healthcheck"] = state ? state.healthcheck : undefined;
|
|
95
|
+
inputs["ip"] = state ? state.ip : undefined;
|
|
96
|
+
inputs["loadBalancerUrn"] = state ? state.loadBalancerUrn : undefined;
|
|
97
|
+
inputs["name"] = state ? state.name : undefined;
|
|
98
|
+
inputs["redirectHttpToHttps"] = state ? state.redirectHttpToHttps : undefined;
|
|
99
|
+
inputs["region"] = state ? state.region : undefined;
|
|
100
|
+
inputs["size"] = state ? state.size : undefined;
|
|
101
|
+
inputs["status"] = state ? state.status : undefined;
|
|
102
|
+
inputs["stickySessions"] = state ? state.stickySessions : undefined;
|
|
103
|
+
inputs["vpcUuid"] = state ? state.vpcUuid : undefined;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
const args = argsOrState;
|
|
107
|
+
if ((!args || args.forwardingRules === undefined) && !opts.urn) {
|
|
108
|
+
throw new Error("Missing required property 'forwardingRules'");
|
|
109
|
+
}
|
|
110
|
+
if ((!args || args.region === undefined) && !opts.urn) {
|
|
111
|
+
throw new Error("Missing required property 'region'");
|
|
112
|
+
}
|
|
113
|
+
inputs["algorithm"] = args ? args.algorithm : undefined;
|
|
114
|
+
inputs["dropletIds"] = args ? args.dropletIds : undefined;
|
|
115
|
+
inputs["dropletTag"] = args ? args.dropletTag : undefined;
|
|
116
|
+
inputs["enableBackendKeepalive"] = args ? args.enableBackendKeepalive : undefined;
|
|
117
|
+
inputs["enableProxyProtocol"] = args ? args.enableProxyProtocol : undefined;
|
|
118
|
+
inputs["forwardingRules"] = args ? args.forwardingRules : undefined;
|
|
119
|
+
inputs["healthcheck"] = args ? args.healthcheck : undefined;
|
|
120
|
+
inputs["name"] = args ? args.name : undefined;
|
|
121
|
+
inputs["redirectHttpToHttps"] = args ? args.redirectHttpToHttps : undefined;
|
|
122
|
+
inputs["region"] = args ? args.region : undefined;
|
|
123
|
+
inputs["size"] = args ? args.size : undefined;
|
|
124
|
+
inputs["stickySessions"] = args ? args.stickySessions : undefined;
|
|
125
|
+
inputs["vpcUuid"] = args ? args.vpcUuid : undefined;
|
|
126
|
+
inputs["ip"] = undefined /*out*/;
|
|
127
|
+
inputs["loadBalancerUrn"] = undefined /*out*/;
|
|
128
|
+
inputs["status"] = undefined /*out*/;
|
|
129
|
+
}
|
|
130
|
+
if (!opts.version) {
|
|
131
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
132
|
+
}
|
|
133
|
+
super(LoadBalancer.__pulumiType, name, inputs, opts);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Get an existing LoadBalancer resource's state with the given name, ID, and optional extra
|
|
137
|
+
* properties used to qualify the lookup.
|
|
138
|
+
*
|
|
139
|
+
* @param name The _unique_ name of the resulting resource.
|
|
140
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
141
|
+
* @param state Any extra arguments used during the lookup.
|
|
142
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
143
|
+
*/
|
|
144
|
+
static get(name, id, state, opts) {
|
|
145
|
+
return new LoadBalancer(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns true if the given object is an instance of LoadBalancer. This is designed to work even
|
|
149
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
150
|
+
*/
|
|
151
|
+
static isInstance(obj) {
|
|
152
|
+
if (obj === undefined || obj === null) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
return obj['__pulumiType'] === LoadBalancer.__pulumiType;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
exports.LoadBalancer = LoadBalancer;
|
|
159
|
+
/** @internal */
|
|
160
|
+
LoadBalancer.__pulumiType = 'digitalocean:index/loadBalancer:LoadBalancer';
|
|
161
|
+
//# sourceMappingURL=loadBalancer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadBalancer.js","sourceRoot":"","sources":["../loadBalancer.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACx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193 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { input as inputs, output as outputs } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Provides a [DigitalOcean Monitoring](https://docs.digitalocean.com/reference/api/api-reference/#tag/Monitoring) resource.
|
|
5
|
+
* Monitor alerts can be configured to alert about, e.g., disk or memory usage exceeding certain threshold, or traffic at certain
|
|
6
|
+
* limits. Notifications can be sent to either an email address or a Slack channel.
|
|
7
|
+
*
|
|
8
|
+
* ## Import
|
|
9
|
+
*
|
|
10
|
+
* Monitor alerts can be imported using the monitor alert `uuid`, e.g.
|
|
11
|
+
*
|
|
12
|
+
* ```sh
|
|
13
|
+
* $ pulumi import digitalocean:index/monitorAlert:MonitorAlert cpu_alert b8ecd2ab-2267-4a5e-8692-cbf1d32583e3
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare class MonitorAlert extends pulumi.CustomResource {
|
|
17
|
+
/**
|
|
18
|
+
* Get an existing MonitorAlert resource's state with the given name, ID, and optional extra
|
|
19
|
+
* properties used to qualify the lookup.
|
|
20
|
+
*
|
|
21
|
+
* @param name The _unique_ name of the resulting resource.
|
|
22
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
23
|
+
* @param state Any extra arguments used during the lookup.
|
|
24
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
25
|
+
*/
|
|
26
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MonitorAlertState, opts?: pulumi.CustomResourceOptions): MonitorAlert;
|
|
27
|
+
/**
|
|
28
|
+
* Returns true if the given object is an instance of MonitorAlert. This is designed to work even
|
|
29
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
30
|
+
*/
|
|
31
|
+
static isInstance(obj: any): obj is MonitorAlert;
|
|
32
|
+
/**
|
|
33
|
+
* How to send notifications about the alerts. This is a list with one element, .
|
|
34
|
+
* Note that for Slack, the DigitalOcean app needs to have permissions for your workspace. You can
|
|
35
|
+
* read more in [Slack's documentation](https://slack.com/intl/en-dk/help/articles/222386767-Manage-app-installation-settings-for-your-workspace)
|
|
36
|
+
*/
|
|
37
|
+
readonly alerts: pulumi.Output<outputs.MonitorAlertAlerts>;
|
|
38
|
+
/**
|
|
39
|
+
* The comparison for `value`.
|
|
40
|
+
* This may be either `GreaterThan` or `LessThan`.
|
|
41
|
+
*/
|
|
42
|
+
readonly compare: pulumi.Output<string>;
|
|
43
|
+
/**
|
|
44
|
+
* The description of the alert.
|
|
45
|
+
*/
|
|
46
|
+
readonly description: pulumi.Output<string>;
|
|
47
|
+
/**
|
|
48
|
+
* The status of the alert.
|
|
49
|
+
*/
|
|
50
|
+
readonly enabled: pulumi.Output<boolean | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* The resources to which the alert policy applies.
|
|
53
|
+
*/
|
|
54
|
+
readonly entities: pulumi.Output<string[] | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* Tags for the alert.
|
|
57
|
+
*/
|
|
58
|
+
readonly tags: pulumi.Output<string[] | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* The type of the alert.
|
|
61
|
+
* This may be either `v1/insights/droplet/load_1`, `v1/insights/droplet/load_5`, `v1/insights/droplet/load_15`,
|
|
62
|
+
* `v1/insights/droplet/memory_utilization_percent`, `v1/insights/droplet/disk_utilization_percent`,
|
|
63
|
+
* `v1/insights/droplet/cpu`, `v1/insights/droplet/disk_read`, `v1/insights/droplet/disk_write`,
|
|
64
|
+
* `v1/insights/droplet/public_outbound_bandwidth`, `v1/insights/droplet/public_inbound_bandwidth`,
|
|
65
|
+
* `v1/insights/droplet/private_outbound_bandwidth`, `v1/insights/droplet/private_inbound_bandwidth`.
|
|
66
|
+
*/
|
|
67
|
+
readonly type: pulumi.Output<string>;
|
|
68
|
+
/**
|
|
69
|
+
* The uuid of the alert.
|
|
70
|
+
*/
|
|
71
|
+
readonly uuid: pulumi.Output<string>;
|
|
72
|
+
/**
|
|
73
|
+
* The value to start alerting at, e.g., 90% or 85Mbps. This is a floating-point number.
|
|
74
|
+
* DigitalOcean will show the correct unit in the web panel.
|
|
75
|
+
*/
|
|
76
|
+
readonly value: pulumi.Output<number>;
|
|
77
|
+
/**
|
|
78
|
+
* The time frame of the alert. Either `5m`, `10m`, `30m`, or `1h`.
|
|
79
|
+
*/
|
|
80
|
+
readonly window: pulumi.Output<string>;
|
|
81
|
+
/**
|
|
82
|
+
* Create a MonitorAlert resource with the given unique name, arguments, and options.
|
|
83
|
+
*
|
|
84
|
+
* @param name The _unique_ name of the resource.
|
|
85
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
86
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
87
|
+
*/
|
|
88
|
+
constructor(name: string, args: MonitorAlertArgs, opts?: pulumi.CustomResourceOptions);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Input properties used for looking up and filtering MonitorAlert resources.
|
|
92
|
+
*/
|
|
93
|
+
export interface MonitorAlertState {
|
|
94
|
+
/**
|
|
95
|
+
* How to send notifications about the alerts. This is a list with one element, .
|
|
96
|
+
* Note that for Slack, the DigitalOcean app needs to have permissions for your workspace. You can
|
|
97
|
+
* read more in [Slack's documentation](https://slack.com/intl/en-dk/help/articles/222386767-Manage-app-installation-settings-for-your-workspace)
|
|
98
|
+
*/
|
|
99
|
+
alerts?: pulumi.Input<inputs.MonitorAlertAlerts>;
|
|
100
|
+
/**
|
|
101
|
+
* The comparison for `value`.
|
|
102
|
+
* This may be either `GreaterThan` or `LessThan`.
|
|
103
|
+
*/
|
|
104
|
+
compare?: pulumi.Input<string>;
|
|
105
|
+
/**
|
|
106
|
+
* The description of the alert.
|
|
107
|
+
*/
|
|
108
|
+
description?: pulumi.Input<string>;
|
|
109
|
+
/**
|
|
110
|
+
* The status of the alert.
|
|
111
|
+
*/
|
|
112
|
+
enabled?: pulumi.Input<boolean>;
|
|
113
|
+
/**
|
|
114
|
+
* The resources to which the alert policy applies.
|
|
115
|
+
*/
|
|
116
|
+
entities?: pulumi.Input<pulumi.Input<string>[]>;
|
|
117
|
+
/**
|
|
118
|
+
* Tags for the alert.
|
|
119
|
+
*/
|
|
120
|
+
tags?: pulumi.Input<pulumi.Input<string>[]>;
|
|
121
|
+
/**
|
|
122
|
+
* The type of the alert.
|
|
123
|
+
* This may be either `v1/insights/droplet/load_1`, `v1/insights/droplet/load_5`, `v1/insights/droplet/load_15`,
|
|
124
|
+
* `v1/insights/droplet/memory_utilization_percent`, `v1/insights/droplet/disk_utilization_percent`,
|
|
125
|
+
* `v1/insights/droplet/cpu`, `v1/insights/droplet/disk_read`, `v1/insights/droplet/disk_write`,
|
|
126
|
+
* `v1/insights/droplet/public_outbound_bandwidth`, `v1/insights/droplet/public_inbound_bandwidth`,
|
|
127
|
+
* `v1/insights/droplet/private_outbound_bandwidth`, `v1/insights/droplet/private_inbound_bandwidth`.
|
|
128
|
+
*/
|
|
129
|
+
type?: pulumi.Input<string>;
|
|
130
|
+
/**
|
|
131
|
+
* The uuid of the alert.
|
|
132
|
+
*/
|
|
133
|
+
uuid?: pulumi.Input<string>;
|
|
134
|
+
/**
|
|
135
|
+
* The value to start alerting at, e.g., 90% or 85Mbps. This is a floating-point number.
|
|
136
|
+
* DigitalOcean will show the correct unit in the web panel.
|
|
137
|
+
*/
|
|
138
|
+
value?: pulumi.Input<number>;
|
|
139
|
+
/**
|
|
140
|
+
* The time frame of the alert. Either `5m`, `10m`, `30m`, or `1h`.
|
|
141
|
+
*/
|
|
142
|
+
window?: pulumi.Input<string>;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* The set of arguments for constructing a MonitorAlert resource.
|
|
146
|
+
*/
|
|
147
|
+
export interface MonitorAlertArgs {
|
|
148
|
+
/**
|
|
149
|
+
* How to send notifications about the alerts. This is a list with one element, .
|
|
150
|
+
* Note that for Slack, the DigitalOcean app needs to have permissions for your workspace. You can
|
|
151
|
+
* read more in [Slack's documentation](https://slack.com/intl/en-dk/help/articles/222386767-Manage-app-installation-settings-for-your-workspace)
|
|
152
|
+
*/
|
|
153
|
+
alerts: pulumi.Input<inputs.MonitorAlertAlerts>;
|
|
154
|
+
/**
|
|
155
|
+
* The comparison for `value`.
|
|
156
|
+
* This may be either `GreaterThan` or `LessThan`.
|
|
157
|
+
*/
|
|
158
|
+
compare: pulumi.Input<string>;
|
|
159
|
+
/**
|
|
160
|
+
* The description of the alert.
|
|
161
|
+
*/
|
|
162
|
+
description: pulumi.Input<string>;
|
|
163
|
+
/**
|
|
164
|
+
* The status of the alert.
|
|
165
|
+
*/
|
|
166
|
+
enabled?: pulumi.Input<boolean>;
|
|
167
|
+
/**
|
|
168
|
+
* The resources to which the alert policy applies.
|
|
169
|
+
*/
|
|
170
|
+
entities?: pulumi.Input<pulumi.Input<string>[]>;
|
|
171
|
+
/**
|
|
172
|
+
* Tags for the alert.
|
|
173
|
+
*/
|
|
174
|
+
tags?: pulumi.Input<pulumi.Input<string>[]>;
|
|
175
|
+
/**
|
|
176
|
+
* The type of the alert.
|
|
177
|
+
* This may be either `v1/insights/droplet/load_1`, `v1/insights/droplet/load_5`, `v1/insights/droplet/load_15`,
|
|
178
|
+
* `v1/insights/droplet/memory_utilization_percent`, `v1/insights/droplet/disk_utilization_percent`,
|
|
179
|
+
* `v1/insights/droplet/cpu`, `v1/insights/droplet/disk_read`, `v1/insights/droplet/disk_write`,
|
|
180
|
+
* `v1/insights/droplet/public_outbound_bandwidth`, `v1/insights/droplet/public_inbound_bandwidth`,
|
|
181
|
+
* `v1/insights/droplet/private_outbound_bandwidth`, `v1/insights/droplet/private_inbound_bandwidth`.
|
|
182
|
+
*/
|
|
183
|
+
type: pulumi.Input<string>;
|
|
184
|
+
/**
|
|
185
|
+
* The value to start alerting at, e.g., 90% or 85Mbps. This is a floating-point number.
|
|
186
|
+
* DigitalOcean will show the correct unit in the web panel.
|
|
187
|
+
*/
|
|
188
|
+
value: pulumi.Input<number>;
|
|
189
|
+
/**
|
|
190
|
+
* The time frame of the alert. Either `5m`, `10m`, `30m`, or `1h`.
|
|
191
|
+
*/
|
|
192
|
+
window: pulumi.Input<string>;
|
|
193
|
+
}
|