@checkly/pulumi 0.0.1-alpha.9 → 0.0.1
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/{bin/LICENSE → LICENSE} +0 -0
- package/README.md +8 -3
- package/{bin/alertChannel.d.ts → alertChannel.d.ts} +0 -0
- package/{bin/alertChannel.js → alertChannel.js} +0 -0
- package/{bin/alertChannel.js.map → alertChannel.js.map} +0 -0
- package/{bin/check.d.ts → check.d.ts} +0 -0
- package/{bin/check.js → check.js} +0 -0
- package/{bin/check.js.map → check.js.map} +0 -0
- package/{bin/checkGroup.d.ts → checkGroup.d.ts} +0 -0
- package/{bin/checkGroup.js → checkGroup.js} +0 -0
- package/{bin/checkGroup.js.map → checkGroup.js.map} +0 -0
- package/{bin/config → config}/index.d.ts +0 -0
- package/{bin/config → config}/index.js +0 -0
- package/{bin/config → config}/index.js.map +0 -0
- package/{bin/config → config}/vars.d.ts +0 -0
- package/{bin/config → config}/vars.js +0 -0
- package/{bin/config → config}/vars.js.map +0 -0
- package/{bin/dashboard.d.ts → dashboard.d.ts} +0 -0
- package/{bin/dashboard.js → dashboard.js} +0 -0
- package/{bin/dashboard.js.map → dashboard.js.map} +0 -0
- package/{bin/environmentVariable.d.ts → environmentVariable.d.ts} +0 -0
- package/{bin/environmentVariable.js → environmentVariable.js} +0 -0
- package/{bin/environmentVariable.js.map → environmentVariable.js.map} +0 -0
- package/{bin/index.d.ts → index.d.ts} +0 -0
- package/{bin/index.js → index.js} +0 -0
- package/{bin/index.js.map → index.js.map} +0 -0
- package/{bin/maintenanceWindow.d.ts → maintenanceWindow.d.ts} +0 -0
- package/{bin/maintenanceWindow.js → maintenanceWindow.js} +0 -0
- package/{bin/maintenanceWindow.js.map → maintenanceWindow.js.map} +0 -0
- package/package.json +3 -3
- package/{bin/package.json.bak → package.json.bak} +0 -0
- package/{bin/provider.d.ts → provider.d.ts} +0 -0
- package/{bin/provider.js → provider.js} +0 -0
- package/{bin/provider.js.map → provider.js.map} +0 -0
- package/{bin/snippet.d.ts → snippet.d.ts} +0 -0
- package/{bin/snippet.js → snippet.js} +0 -0
- package/{bin/snippet.js.map → snippet.js.map} +0 -0
- package/{bin/triggerCheck.d.ts → triggerCheck.d.ts} +0 -0
- package/{bin/triggerCheck.js → triggerCheck.js} +0 -0
- package/{bin/triggerCheck.js.map → triggerCheck.js.map} +0 -0
- package/{bin/triggerCheckGroup.d.ts → triggerCheckGroup.d.ts} +0 -0
- package/{bin/triggerCheckGroup.js → triggerCheckGroup.js} +0 -0
- package/{bin/triggerCheckGroup.js.map → triggerCheckGroup.js.map} +0 -0
- package/{bin/types → types}/index.d.ts +0 -0
- package/{bin/types → types}/index.js +0 -0
- package/{bin/types → types}/index.js.map +0 -0
- package/{bin/types → types}/input.d.ts +0 -0
- package/{bin/types → types}/input.js +0 -0
- package/{bin/types → types}/input.js.map +0 -0
- package/{bin/types → types}/output.d.ts +0 -0
- package/{bin/types → types}/output.js +0 -0
- package/{bin/types → types}/output.js.map +0 -0
- package/{bin/utilities.d.ts → utilities.d.ts} +0 -0
- package/{bin/utilities.js → utilities.js} +0 -0
- package/{bin/utilities.js.map → utilities.js.map} +0 -0
- package/Pulumi.yaml +0 -0
- package/alertChannel.ts +0 -236
- package/bin/README.md +0 -151
- package/bin/package.json +0 -29
- package/bin/yarn.lock +0 -805
- package/check.ts +0 -453
- package/checkGroup.ts +0 -382
- package/config/index.ts +0 -5
- package/config/vars.ts +0 -33
- package/dashboard.ts +0 -231
- package/environmentVariable.ts +0 -107
- package/index.ts +0 -86
- package/maintenanceWindow.ts +0 -188
- package/provider.ts +0 -62
- package/snippet.ts +0 -98
- package/triggerCheck.ts +0 -123
- package/triggerCheckGroup.ts +0 -123
- package/tsconfig.json +0 -34
- package/types/index.ts +0 -11
- package/types/input.ts +0 -166
- package/types/output.ts +0 -167
- package/utilities.ts +0 -54
package/{bin/LICENSE → LICENSE}
RENAMED
|
File without changes
|
package/README.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
<p>
|
|
2
|
+
<img height="128" src="https://www.checklyhq.com/images/footer-logo.svg" align="right" />
|
|
3
|
+
<h1>Checkly Pulumi Provider</h1>
|
|
4
|
+
</p>
|
|
5
|
+
|
|
6
|
+

|
|
2
7
|
|
|
3
8
|
The Checkly Pulumi provider enables you to create and configure Checkly resources using your favourite programming language.
|
|
4
9
|
Note that this project is in its early stages and breaking changes could happen.
|
|
@@ -25,7 +30,7 @@ yarn add @checkly/pulumi
|
|
|
25
30
|
Install the provider binary plugin. This is only needed due to an outstanding bug in with Pulumi registry
|
|
26
31
|
|
|
27
32
|
```bash
|
|
28
|
-
pulumi plugin install resource checkly v0.0.1-alpha.
|
|
33
|
+
pulumi plugin install resource checkly v0.0.1-alpha.9 --server https://github.com/checkly/pulumi-checkly/releases/download/v0.0.1-alpha.9
|
|
29
34
|
```
|
|
30
35
|
|
|
31
36
|
### Python, Go & .NET
|
|
@@ -102,7 +107,7 @@ async function run () {
|
|
|
102
107
|
const response = await page.goto('https://google.com')
|
|
103
108
|
|
|
104
109
|
if (response.status() > 399) {
|
|
105
|
-
throw new Error('Failed with response code
|
|
110
|
+
throw new Error('Failed with response code \${response.status()}')
|
|
106
111
|
}
|
|
107
112
|
|
|
108
113
|
await page.screenshot({ path: 'screenshot.jpg' })
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkly/pulumi",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "v0.0.1",
|
|
4
4
|
"description": "A Pulumi package for creating and managing Checkly monitoring resources.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pulumi",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc",
|
|
15
|
-
"install": "node scripts/install-pulumi-plugin.js resource checkly
|
|
15
|
+
"install": "node scripts/install-pulumi-plugin.js resource checkly v0.0.1"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@pulumi/pulumi": "^3.0.0"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"pulumi": {
|
|
26
26
|
"resource": true,
|
|
27
|
-
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/download/
|
|
27
|
+
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/download/v0.0.1"
|
|
28
28
|
},
|
|
29
29
|
"main": "./bin/index.js",
|
|
30
30
|
"types": "./bin/index.d.ts"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/Pulumi.yaml
DELETED
|
File without changes
|
package/alertChannel.ts
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
2
|
-
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
-
|
|
4
|
-
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
-
import { input as inputs, output as outputs } from "./types";
|
|
6
|
-
import * as utilities from "./utilities";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Allows you to define alerting channels for the checks and groups in your account
|
|
10
|
-
*
|
|
11
|
-
* ## Example Usage
|
|
12
|
-
*
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
-
* import * as pulumi from "@checkly/pulumi";
|
|
16
|
-
*
|
|
17
|
-
* // An Email alert channel
|
|
18
|
-
* const emailAc = new checkly.AlertChannel("emailAc", {
|
|
19
|
-
* email: {
|
|
20
|
-
* address: "john@example.com",
|
|
21
|
-
* },
|
|
22
|
-
* sendRecovery: true,
|
|
23
|
-
* sendFailure: false,
|
|
24
|
-
* sendDegraded: true,
|
|
25
|
-
* sslExpiry: true,
|
|
26
|
-
* sslExpiryThreshold: 22,
|
|
27
|
-
* });
|
|
28
|
-
* // A SMS alert channel
|
|
29
|
-
* const smsAc = new checkly.AlertChannel("smsAc", {
|
|
30
|
-
* sms: {
|
|
31
|
-
* name: "john",
|
|
32
|
-
* number: "+5491100001111",
|
|
33
|
-
* },
|
|
34
|
-
* sendRecovery: true,
|
|
35
|
-
* sendFailure: true,
|
|
36
|
-
* });
|
|
37
|
-
* // A Slack alert channel
|
|
38
|
-
* const slackAc = new checkly.AlertChannel("slackAc", {slack: {
|
|
39
|
-
* channel: "#checkly-notifications",
|
|
40
|
-
* url: "https://slack.com/webhook",
|
|
41
|
-
* }});
|
|
42
|
-
* // An Opsgenie alert channel
|
|
43
|
-
* const opsgenieAc = new checkly.AlertChannel("opsgenieAc", {opsgenie: {
|
|
44
|
-
* name: "opsalerts",
|
|
45
|
-
* apiKey: "fookey",
|
|
46
|
-
* region: "fooregion",
|
|
47
|
-
* priority: "foopriority",
|
|
48
|
-
* }});
|
|
49
|
-
* // An Pagerduty alert channel
|
|
50
|
-
* const pagerdutyAc = new checkly.AlertChannel("pagerdutyAc", {pagerduty: {
|
|
51
|
-
* account: "checkly",
|
|
52
|
-
* serviceKey: "key1",
|
|
53
|
-
* serviceName: "pdalert",
|
|
54
|
-
* }});
|
|
55
|
-
* // An Webhook alert channel
|
|
56
|
-
* const webhookAc = new checkly.AlertChannel("webhookAc", {webhook: {
|
|
57
|
-
* name: "foo",
|
|
58
|
-
* method: "get",
|
|
59
|
-
* template: "footemplate",
|
|
60
|
-
* url: "https://example.com/foo",
|
|
61
|
-
* webhookSecret: "foosecret",
|
|
62
|
-
* }});
|
|
63
|
-
* // Connecting the alert channel to a check
|
|
64
|
-
* const example_check = new checkly.Check("example-check", {alertChannelSubscriptions: [
|
|
65
|
-
* {
|
|
66
|
-
* channelId: emailAc.id,
|
|
67
|
-
* activated: true,
|
|
68
|
-
* },
|
|
69
|
-
* {
|
|
70
|
-
* channelId: smsAc.id,
|
|
71
|
-
* activated: true,
|
|
72
|
-
* },
|
|
73
|
-
* ]});
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
export class AlertChannel extends pulumi.CustomResource {
|
|
77
|
-
/**
|
|
78
|
-
* Get an existing AlertChannel resource's state with the given name, ID, and optional extra
|
|
79
|
-
* properties used to qualify the lookup.
|
|
80
|
-
*
|
|
81
|
-
* @param name The _unique_ name of the resulting resource.
|
|
82
|
-
* @param id The _unique_ provider ID of the resource to lookup.
|
|
83
|
-
* @param state Any extra arguments used during the lookup.
|
|
84
|
-
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
85
|
-
*/
|
|
86
|
-
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AlertChannelState, opts?: pulumi.CustomResourceOptions): AlertChannel {
|
|
87
|
-
return new AlertChannel(name, <any>state, { ...opts, id: id });
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/** @internal */
|
|
91
|
-
public static readonly __pulumiType = 'checkly:index/alertChannel:AlertChannel';
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Returns true if the given object is an instance of AlertChannel. This is designed to work even
|
|
95
|
-
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
96
|
-
*/
|
|
97
|
-
public static isInstance(obj: any): obj is AlertChannel {
|
|
98
|
-
if (obj === undefined || obj === null) {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
return obj['__pulumiType'] === AlertChannel.__pulumiType;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
public readonly email!: pulumi.Output<outputs.AlertChannelEmail | undefined>;
|
|
105
|
-
public readonly opsgenie!: pulumi.Output<outputs.AlertChannelOpsgenie | undefined>;
|
|
106
|
-
public readonly pagerduty!: pulumi.Output<outputs.AlertChannelPagerduty | undefined>;
|
|
107
|
-
/**
|
|
108
|
-
* (Default `false`)
|
|
109
|
-
*/
|
|
110
|
-
public readonly sendDegraded!: pulumi.Output<boolean | undefined>;
|
|
111
|
-
/**
|
|
112
|
-
* (Default `true`)
|
|
113
|
-
*/
|
|
114
|
-
public readonly sendFailure!: pulumi.Output<boolean | undefined>;
|
|
115
|
-
/**
|
|
116
|
-
* (Default `true`)
|
|
117
|
-
*/
|
|
118
|
-
public readonly sendRecovery!: pulumi.Output<boolean | undefined>;
|
|
119
|
-
public readonly slack!: pulumi.Output<outputs.AlertChannelSlack | undefined>;
|
|
120
|
-
public readonly sms!: pulumi.Output<outputs.AlertChannelSms | undefined>;
|
|
121
|
-
/**
|
|
122
|
-
* (Default `false`)
|
|
123
|
-
*/
|
|
124
|
-
public readonly sslExpiry!: pulumi.Output<boolean | undefined>;
|
|
125
|
-
/**
|
|
126
|
-
* Value must be between 1 and 30 (Default `30`)
|
|
127
|
-
*/
|
|
128
|
-
public readonly sslExpiryThreshold!: pulumi.Output<number | undefined>;
|
|
129
|
-
public readonly webhook!: pulumi.Output<outputs.AlertChannelWebhook | undefined>;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Create a AlertChannel resource with the given unique name, arguments, and options.
|
|
133
|
-
*
|
|
134
|
-
* @param name The _unique_ name of the resource.
|
|
135
|
-
* @param args The arguments to use to populate this resource's properties.
|
|
136
|
-
* @param opts A bag of options that control this resource's behavior.
|
|
137
|
-
*/
|
|
138
|
-
constructor(name: string, args?: AlertChannelArgs, opts?: pulumi.CustomResourceOptions)
|
|
139
|
-
constructor(name: string, argsOrState?: AlertChannelArgs | AlertChannelState, opts?: pulumi.CustomResourceOptions) {
|
|
140
|
-
let resourceInputs: pulumi.Inputs = {};
|
|
141
|
-
opts = opts || {};
|
|
142
|
-
if (opts.id) {
|
|
143
|
-
const state = argsOrState as AlertChannelState | undefined;
|
|
144
|
-
resourceInputs["email"] = state ? state.email : undefined;
|
|
145
|
-
resourceInputs["opsgenie"] = state ? state.opsgenie : undefined;
|
|
146
|
-
resourceInputs["pagerduty"] = state ? state.pagerduty : undefined;
|
|
147
|
-
resourceInputs["sendDegraded"] = state ? state.sendDegraded : undefined;
|
|
148
|
-
resourceInputs["sendFailure"] = state ? state.sendFailure : undefined;
|
|
149
|
-
resourceInputs["sendRecovery"] = state ? state.sendRecovery : undefined;
|
|
150
|
-
resourceInputs["slack"] = state ? state.slack : undefined;
|
|
151
|
-
resourceInputs["sms"] = state ? state.sms : undefined;
|
|
152
|
-
resourceInputs["sslExpiry"] = state ? state.sslExpiry : undefined;
|
|
153
|
-
resourceInputs["sslExpiryThreshold"] = state ? state.sslExpiryThreshold : undefined;
|
|
154
|
-
resourceInputs["webhook"] = state ? state.webhook : undefined;
|
|
155
|
-
} else {
|
|
156
|
-
const args = argsOrState as AlertChannelArgs | undefined;
|
|
157
|
-
resourceInputs["email"] = args ? args.email : undefined;
|
|
158
|
-
resourceInputs["opsgenie"] = args ? args.opsgenie : undefined;
|
|
159
|
-
resourceInputs["pagerduty"] = args ? args.pagerduty : undefined;
|
|
160
|
-
resourceInputs["sendDegraded"] = args ? args.sendDegraded : undefined;
|
|
161
|
-
resourceInputs["sendFailure"] = args ? args.sendFailure : undefined;
|
|
162
|
-
resourceInputs["sendRecovery"] = args ? args.sendRecovery : undefined;
|
|
163
|
-
resourceInputs["slack"] = args ? args.slack : undefined;
|
|
164
|
-
resourceInputs["sms"] = args ? args.sms : undefined;
|
|
165
|
-
resourceInputs["sslExpiry"] = args ? args.sslExpiry : undefined;
|
|
166
|
-
resourceInputs["sslExpiryThreshold"] = args ? args.sslExpiryThreshold : undefined;
|
|
167
|
-
resourceInputs["webhook"] = args ? args.webhook : undefined;
|
|
168
|
-
}
|
|
169
|
-
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
170
|
-
super(AlertChannel.__pulumiType, name, resourceInputs, opts);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Input properties used for looking up and filtering AlertChannel resources.
|
|
176
|
-
*/
|
|
177
|
-
export interface AlertChannelState {
|
|
178
|
-
email?: pulumi.Input<inputs.AlertChannelEmail>;
|
|
179
|
-
opsgenie?: pulumi.Input<inputs.AlertChannelOpsgenie>;
|
|
180
|
-
pagerduty?: pulumi.Input<inputs.AlertChannelPagerduty>;
|
|
181
|
-
/**
|
|
182
|
-
* (Default `false`)
|
|
183
|
-
*/
|
|
184
|
-
sendDegraded?: pulumi.Input<boolean>;
|
|
185
|
-
/**
|
|
186
|
-
* (Default `true`)
|
|
187
|
-
*/
|
|
188
|
-
sendFailure?: pulumi.Input<boolean>;
|
|
189
|
-
/**
|
|
190
|
-
* (Default `true`)
|
|
191
|
-
*/
|
|
192
|
-
sendRecovery?: pulumi.Input<boolean>;
|
|
193
|
-
slack?: pulumi.Input<inputs.AlertChannelSlack>;
|
|
194
|
-
sms?: pulumi.Input<inputs.AlertChannelSms>;
|
|
195
|
-
/**
|
|
196
|
-
* (Default `false`)
|
|
197
|
-
*/
|
|
198
|
-
sslExpiry?: pulumi.Input<boolean>;
|
|
199
|
-
/**
|
|
200
|
-
* Value must be between 1 and 30 (Default `30`)
|
|
201
|
-
*/
|
|
202
|
-
sslExpiryThreshold?: pulumi.Input<number>;
|
|
203
|
-
webhook?: pulumi.Input<inputs.AlertChannelWebhook>;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* The set of arguments for constructing a AlertChannel resource.
|
|
208
|
-
*/
|
|
209
|
-
export interface AlertChannelArgs {
|
|
210
|
-
email?: pulumi.Input<inputs.AlertChannelEmail>;
|
|
211
|
-
opsgenie?: pulumi.Input<inputs.AlertChannelOpsgenie>;
|
|
212
|
-
pagerduty?: pulumi.Input<inputs.AlertChannelPagerduty>;
|
|
213
|
-
/**
|
|
214
|
-
* (Default `false`)
|
|
215
|
-
*/
|
|
216
|
-
sendDegraded?: pulumi.Input<boolean>;
|
|
217
|
-
/**
|
|
218
|
-
* (Default `true`)
|
|
219
|
-
*/
|
|
220
|
-
sendFailure?: pulumi.Input<boolean>;
|
|
221
|
-
/**
|
|
222
|
-
* (Default `true`)
|
|
223
|
-
*/
|
|
224
|
-
sendRecovery?: pulumi.Input<boolean>;
|
|
225
|
-
slack?: pulumi.Input<inputs.AlertChannelSlack>;
|
|
226
|
-
sms?: pulumi.Input<inputs.AlertChannelSms>;
|
|
227
|
-
/**
|
|
228
|
-
* (Default `false`)
|
|
229
|
-
*/
|
|
230
|
-
sslExpiry?: pulumi.Input<boolean>;
|
|
231
|
-
/**
|
|
232
|
-
* Value must be between 1 and 30 (Default `30`)
|
|
233
|
-
*/
|
|
234
|
-
sslExpiryThreshold?: pulumi.Input<number>;
|
|
235
|
-
webhook?: pulumi.Input<inputs.AlertChannelWebhook>;
|
|
236
|
-
}
|
package/bin/README.md
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
# Checkly Pulumi Provider
|
|
2
|
-
|
|
3
|
-
The Checkly Pulumi provider enables you to create and configure Checkly resources using your favourite programming language.
|
|
4
|
-
Note that this project is in its early stages and breaking changes could happen.
|
|
5
|
-
|
|
6
|
-
## Installation
|
|
7
|
-
|
|
8
|
-
1. To use this package, please [install the Pulumi CLI first](https://www.pulumi.com/docs/get-started/install/).
|
|
9
|
-
2. This package is only available for JavaScript and TypeScript but support for other languages will be available soon.
|
|
10
|
-
|
|
11
|
-
### Node.js (JavaScript/TypeScript)
|
|
12
|
-
|
|
13
|
-
To use from JavaScript or TypeScript in Node.js, install using either `npm`:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm install @checkly/pulumi
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
or `yarn`:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
yarn add @checkly/pulumi
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Install the provider binary plugin. This is only needed due to an outstanding bug in with Pulumi registry
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
pulumi plugin install resource checkly v0.0.1-alpha.5 --server https://github.com/checkly/pulumi-checkly/releases/download/v0.0.1-alpha.5
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Python, Go & .NET
|
|
32
|
-
|
|
33
|
-
*TBA*
|
|
34
|
-
|
|
35
|
-
## Authentication
|
|
36
|
-
|
|
37
|
-
The Pulumi Checkly Provider needs to be configured with a Checkly `API Key` and `Account ID` before it can be used to create resources.
|
|
38
|
-
|
|
39
|
-
> If you don't have an `API Key`, you can create one [here](https://app.checklyhq.com/settings/user/api-keys).
|
|
40
|
-
|
|
41
|
-
Once you generated the `API Key` there are two ways to communicate your authorization tokens to Pulumi:
|
|
42
|
-
|
|
43
|
-
1. Set the environment variables `CHECKLY_API_KEY` and `CHECKLY_ACCOUNT_ID`:
|
|
44
|
-
```bash
|
|
45
|
-
$ export CHECKLY_API_KEY=cu_xxx
|
|
46
|
-
$ export CHECKLY_ACCOUNT_ID=xxx
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
2. Set them using `pulumi config` command, if you prefer that they be stored alongside your Pulumi stack for easy multi-user access:
|
|
50
|
-
```bash
|
|
51
|
-
$ pulumi config set checkly:apiKey cu_xxx --secret
|
|
52
|
-
$ pulumi config set checkly:accountId xxx
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
> Remember to pass `--secret` when setting `checkly:apiKey` so it is properly encrypted.
|
|
56
|
-
|
|
57
|
-
## Creating Resources
|
|
58
|
-
|
|
59
|
-
The example below shows a basic API check and Browser check.
|
|
60
|
-
|
|
61
|
-
```javascript
|
|
62
|
-
// index.js
|
|
63
|
-
const checkly = require("@checkly/pulumi")
|
|
64
|
-
|
|
65
|
-
new checkly.Check("api-check", {
|
|
66
|
-
type: "API",
|
|
67
|
-
name: "Public SpaceX API",
|
|
68
|
-
activated: true,
|
|
69
|
-
frequency: 10,
|
|
70
|
-
locations: ["us-east-1"],
|
|
71
|
-
request: {
|
|
72
|
-
method: "GET",
|
|
73
|
-
url: "https://api.spacexdata.com/v3",
|
|
74
|
-
assertions: [
|
|
75
|
-
{
|
|
76
|
-
source: 'STATUS_CODE',
|
|
77
|
-
comparison: 'EQUALS',
|
|
78
|
-
target: 200
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
source: 'JSON_BODY',
|
|
82
|
-
property: '$.project_name',
|
|
83
|
-
comparison: 'EQUALS',
|
|
84
|
-
target: 'SpaceX-API'
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
new checkly.Check("browser-check", {
|
|
91
|
-
type: "BROWSER",
|
|
92
|
-
name: "Google.com Playwright check",
|
|
93
|
-
activated: true,
|
|
94
|
-
frequency: 10,
|
|
95
|
-
locations: ["us-east-1"],
|
|
96
|
-
script: `const { chromium } = require('playwright')
|
|
97
|
-
|
|
98
|
-
async function run () {
|
|
99
|
-
const browser = await chromium.launch()
|
|
100
|
-
const page = await browser.newPage()
|
|
101
|
-
|
|
102
|
-
const response = await page.goto('https://google.com')
|
|
103
|
-
|
|
104
|
-
if (response.status() > 399) {
|
|
105
|
-
throw new Error('Failed with response code ${response.status()}')
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
await page.screenshot({ path: 'screenshot.jpg' })
|
|
109
|
-
|
|
110
|
-
await page.close()
|
|
111
|
-
await browser.close()
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
run()`
|
|
115
|
-
})
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
> Check the [examples directory](https://github.com/checkly/pulumi-checkly/tree/main/examples) for more detailed code samples.
|
|
119
|
-
|
|
120
|
-
## Syncing resources
|
|
121
|
-
|
|
122
|
-
Just run the regular `pulumi up` command
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
## Configuration
|
|
126
|
-
|
|
127
|
-
The following configuration points are available for the `foo` provider:
|
|
128
|
-
|
|
129
|
-
- `checkly:apiKey` (environment: `CHECKLY_API_KEY`) - the Checkly API Key.
|
|
130
|
-
- `checkly:accountId` (environment: `CHECKLY_ACCOUNT_ID`) - the Checkly account ID.
|
|
131
|
-
|
|
132
|
-
## Reference
|
|
133
|
-
|
|
134
|
-
For detailed reference documentation, please visit [the Pulumi registry](https://www.pulumi.com/registry/packages/checkly/api-docs/).
|
|
135
|
-
|
|
136
|
-
## License
|
|
137
|
-
|
|
138
|
-
[MIT](https://github.com/checkly/pulumi-checkly/blob/main/LICENSE)
|
|
139
|
-
|
|
140
|
-
<br>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<p align="center">
|
|
144
|
-
<a href="https://checklyhq.com?utm_source=github&utm_medium=sponsor-logo-github&utm_campaign=pulumi-checkly" target="_blank">
|
|
145
|
-
<img width="100px" src="https://www.checklyhq.com/images/text_racoon_logo.svg" alt="Checkly" />
|
|
146
|
-
</a>
|
|
147
|
-
<br />
|
|
148
|
-
<i><sub>Delightful Active Monitoring for Developers</sub></i>
|
|
149
|
-
<br>
|
|
150
|
-
<b><sub>From Checkly with ♥️</sub></b>
|
|
151
|
-
<p>
|
package/bin/package.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@checkly/pulumi",
|
|
3
|
-
"version": "v0.0.1-alpha.9",
|
|
4
|
-
"description": "A Pulumi package for creating and managing Checkly monitoring resources.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"pulumi",
|
|
7
|
-
"checkly",
|
|
8
|
-
"category/monitoring"
|
|
9
|
-
],
|
|
10
|
-
"homepage": "https://www.pulumi.com/registry/packages/checkly",
|
|
11
|
-
"repository": "https://github.com/checkly/pulumi-checkly",
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "tsc",
|
|
15
|
-
"install": "node scripts/install-pulumi-plugin.js resource checkly v0.0.1-alpha.9"
|
|
16
|
-
},
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"@pulumi/pulumi": "^3.0.0"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"@types/mime": "^2.0.0",
|
|
22
|
-
"@types/node": "^10.0.0",
|
|
23
|
-
"typescript": "^4.3.5"
|
|
24
|
-
},
|
|
25
|
-
"pulumi": {
|
|
26
|
-
"resource": true,
|
|
27
|
-
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/download/v0.0.1-alpha.9"
|
|
28
|
-
}
|
|
29
|
-
}
|