@checkly/pulumi 0.0.1-alpha.2 → 0.0.1-alpha.6
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/README.md +70 -44
- package/alertChannel.ts +56 -141
- package/bin/README.md +102 -41
- package/bin/alertChannel.d.ts +55 -138
- package/bin/alertChannel.js +41 -108
- package/bin/alertChannel.js.map +1 -1
- package/bin/check.d.ts +90 -51
- package/bin/check.js +4 -3
- package/bin/check.js.map +1 -1
- package/bin/checkGroup.d.ts +112 -36
- package/bin/checkGroup.js +89 -3
- package/bin/checkGroup.js.map +1 -1
- package/bin/dashboard.d.ts +125 -14
- package/bin/dashboard.js +22 -24
- package/bin/dashboard.js.map +1 -1
- package/bin/environmentVariable.d.ts +64 -0
- package/bin/environmentVariable.js +78 -0
- package/bin/environmentVariable.js.map +1 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +5 -0
- package/bin/index.js.map +1 -1
- package/bin/maintenanceWindow.d.ts +16 -36
- package/bin/maintenanceWindow.js +2 -33
- package/bin/maintenanceWindow.js.map +1 -1
- package/bin/package.json +4 -3
- package/bin/package.json.bak +2 -1
- package/bin/provider.js +1 -3
- package/bin/provider.js.map +1 -1
- package/bin/snippet.d.ts +3 -3
- package/bin/snippet.js +1 -3
- package/bin/snippet.js.map +1 -1
- package/bin/triggerCheck.d.ts +19 -7
- package/bin/triggerCheck.js +2 -10
- package/bin/triggerCheck.js.map +1 -1
- package/bin/triggerCheckGroup.d.ts +19 -7
- package/bin/triggerCheckGroup.js +2 -10
- package/bin/triggerCheckGroup.js.map +1 -1
- package/bin/types/input.d.ts +2 -188
- package/bin/types/input.js.map +1 -1
- package/bin/types/output.d.ts +2 -188
- package/bin/types/output.js.map +1 -1
- package/bin/utilities.js +6 -1
- package/bin/utilities.js.map +1 -1
- package/bin/yarn.lock +179 -117
- package/check.ts +91 -54
- package/checkGroup.ts +113 -39
- package/dashboard.ts +126 -38
- package/environmentVariable.ts +107 -0
- package/index.ts +5 -0
- package/maintenanceWindow.ts +17 -48
- package/package.json +7 -6
- package/provider.ts +1 -3
- package/scripts/install-pulumi-plugin.js +26 -0
- package/snippet.ts +4 -6
- package/triggerCheck.ts +20 -10
- package/triggerCheckGroup.ts +20 -10
- package/tsconfig.json +1 -0
- package/types/input.ts +2 -188
- package/types/output.ts +2 -188
- package/utilities.ts +5 -0
package/dashboard.ts
CHANGED
|
@@ -4,6 +4,27 @@
|
|
|
4
4
|
import * as pulumi from "@pulumi/pulumi";
|
|
5
5
|
import * as utilities from "./utilities";
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* ## Example Usage
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
12
|
+
* import * as checkly from "@pulumi/checkly";
|
|
13
|
+
*
|
|
14
|
+
* const dashboard_1 = new checkly.Dashboard("dashboard-1", {
|
|
15
|
+
* customDomain: "status.example.com",
|
|
16
|
+
* customUrl: "checkly",
|
|
17
|
+
* header: "Public dashboard",
|
|
18
|
+
* hideTags: false,
|
|
19
|
+
* logo: "https://www.checklyhq.com/logo.png",
|
|
20
|
+
* paginate: false,
|
|
21
|
+
* paginationRate: 30,
|
|
22
|
+
* refreshRate: 60,
|
|
23
|
+
* tags: ["production"],
|
|
24
|
+
* width: "FULL",
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
7
28
|
export class Dashboard extends pulumi.CustomResource {
|
|
8
29
|
/**
|
|
9
30
|
* Get an existing Dashboard resource's state with the given name, ID, and optional extra
|
|
@@ -32,15 +53,45 @@ export class Dashboard extends pulumi.CustomResource {
|
|
|
32
53
|
return obj['__pulumiType'] === Dashboard.__pulumiType;
|
|
33
54
|
}
|
|
34
55
|
|
|
35
|
-
|
|
56
|
+
/**
|
|
57
|
+
* A custom user domain, e.g. 'status.example.com'. See the docs on updating your DNS and SSL usage.
|
|
58
|
+
*/
|
|
59
|
+
public readonly customDomain!: pulumi.Output<string | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* A subdomain name under 'checklyhq.com'. Needs to be unique across all users.
|
|
62
|
+
*/
|
|
36
63
|
public readonly customUrl!: pulumi.Output<string>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
public readonly
|
|
41
|
-
|
|
42
|
-
|
|
64
|
+
/**
|
|
65
|
+
* A piece of text displayed at the top of your dashboard.
|
|
66
|
+
*/
|
|
67
|
+
public readonly header!: pulumi.Output<string | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* Show or hide the tags on the dashboard.
|
|
70
|
+
*/
|
|
71
|
+
public readonly hideTags!: pulumi.Output<boolean | undefined>;
|
|
72
|
+
/**
|
|
73
|
+
* A URL pointing to an image file.
|
|
74
|
+
*/
|
|
75
|
+
public readonly logo!: pulumi.Output<string | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* Determines if pagination is on or off.
|
|
78
|
+
*/
|
|
79
|
+
public readonly paginate!: pulumi.Output<boolean | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* How often to trigger pagination in seconds. Possible values `30`, `60` and `300`.
|
|
82
|
+
*/
|
|
83
|
+
public readonly paginationRate!: pulumi.Output<number | undefined>;
|
|
84
|
+
/**
|
|
85
|
+
* How often to refresh the dashboard in seconds. Possible values `30`, `60` and `600`.
|
|
86
|
+
*/
|
|
87
|
+
public readonly refreshRate!: pulumi.Output<number | undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* A list of one or more tags that filter which checks to display on the dashboard.
|
|
90
|
+
*/
|
|
43
91
|
public readonly tags!: pulumi.Output<string[] | undefined>;
|
|
92
|
+
/**
|
|
93
|
+
* Determines whether to use the full screen or focus in the center. Possible values `FULL` and `960PX`.
|
|
94
|
+
*/
|
|
44
95
|
public readonly width!: pulumi.Output<string | undefined>;
|
|
45
96
|
|
|
46
97
|
/**
|
|
@@ -68,30 +119,9 @@ export class Dashboard extends pulumi.CustomResource {
|
|
|
68
119
|
resourceInputs["width"] = state ? state.width : undefined;
|
|
69
120
|
} else {
|
|
70
121
|
const args = argsOrState as DashboardArgs | undefined;
|
|
71
|
-
if ((!args || args.customDomain === undefined) && !opts.urn) {
|
|
72
|
-
throw new Error("Missing required property 'customDomain'");
|
|
73
|
-
}
|
|
74
122
|
if ((!args || args.customUrl === undefined) && !opts.urn) {
|
|
75
123
|
throw new Error("Missing required property 'customUrl'");
|
|
76
124
|
}
|
|
77
|
-
if ((!args || args.header === undefined) && !opts.urn) {
|
|
78
|
-
throw new Error("Missing required property 'header'");
|
|
79
|
-
}
|
|
80
|
-
if ((!args || args.hideTags === undefined) && !opts.urn) {
|
|
81
|
-
throw new Error("Missing required property 'hideTags'");
|
|
82
|
-
}
|
|
83
|
-
if ((!args || args.logo === undefined) && !opts.urn) {
|
|
84
|
-
throw new Error("Missing required property 'logo'");
|
|
85
|
-
}
|
|
86
|
-
if ((!args || args.paginate === undefined) && !opts.urn) {
|
|
87
|
-
throw new Error("Missing required property 'paginate'");
|
|
88
|
-
}
|
|
89
|
-
if ((!args || args.paginationRate === undefined) && !opts.urn) {
|
|
90
|
-
throw new Error("Missing required property 'paginationRate'");
|
|
91
|
-
}
|
|
92
|
-
if ((!args || args.refreshRate === undefined) && !opts.urn) {
|
|
93
|
-
throw new Error("Missing required property 'refreshRate'");
|
|
94
|
-
}
|
|
95
125
|
resourceInputs["customDomain"] = args ? args.customDomain : undefined;
|
|
96
126
|
resourceInputs["customUrl"] = args ? args.customUrl : undefined;
|
|
97
127
|
resourceInputs["header"] = args ? args.header : undefined;
|
|
@@ -103,9 +133,7 @@ export class Dashboard extends pulumi.CustomResource {
|
|
|
103
133
|
resourceInputs["tags"] = args ? args.tags : undefined;
|
|
104
134
|
resourceInputs["width"] = args ? args.width : undefined;
|
|
105
135
|
}
|
|
106
|
-
|
|
107
|
-
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
|
108
|
-
}
|
|
136
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
109
137
|
super(Dashboard.__pulumiType, name, resourceInputs, opts);
|
|
110
138
|
}
|
|
111
139
|
}
|
|
@@ -114,15 +142,45 @@ export class Dashboard extends pulumi.CustomResource {
|
|
|
114
142
|
* Input properties used for looking up and filtering Dashboard resources.
|
|
115
143
|
*/
|
|
116
144
|
export interface DashboardState {
|
|
145
|
+
/**
|
|
146
|
+
* A custom user domain, e.g. 'status.example.com'. See the docs on updating your DNS and SSL usage.
|
|
147
|
+
*/
|
|
117
148
|
customDomain?: pulumi.Input<string>;
|
|
149
|
+
/**
|
|
150
|
+
* A subdomain name under 'checklyhq.com'. Needs to be unique across all users.
|
|
151
|
+
*/
|
|
118
152
|
customUrl?: pulumi.Input<string>;
|
|
153
|
+
/**
|
|
154
|
+
* A piece of text displayed at the top of your dashboard.
|
|
155
|
+
*/
|
|
119
156
|
header?: pulumi.Input<string>;
|
|
157
|
+
/**
|
|
158
|
+
* Show or hide the tags on the dashboard.
|
|
159
|
+
*/
|
|
120
160
|
hideTags?: pulumi.Input<boolean>;
|
|
161
|
+
/**
|
|
162
|
+
* A URL pointing to an image file.
|
|
163
|
+
*/
|
|
121
164
|
logo?: pulumi.Input<string>;
|
|
165
|
+
/**
|
|
166
|
+
* Determines if pagination is on or off.
|
|
167
|
+
*/
|
|
122
168
|
paginate?: pulumi.Input<boolean>;
|
|
169
|
+
/**
|
|
170
|
+
* How often to trigger pagination in seconds. Possible values `30`, `60` and `300`.
|
|
171
|
+
*/
|
|
123
172
|
paginationRate?: pulumi.Input<number>;
|
|
173
|
+
/**
|
|
174
|
+
* How often to refresh the dashboard in seconds. Possible values `30`, `60` and `600`.
|
|
175
|
+
*/
|
|
124
176
|
refreshRate?: pulumi.Input<number>;
|
|
177
|
+
/**
|
|
178
|
+
* A list of one or more tags that filter which checks to display on the dashboard.
|
|
179
|
+
*/
|
|
125
180
|
tags?: pulumi.Input<pulumi.Input<string>[]>;
|
|
181
|
+
/**
|
|
182
|
+
* Determines whether to use the full screen or focus in the center. Possible values `FULL` and `960PX`.
|
|
183
|
+
*/
|
|
126
184
|
width?: pulumi.Input<string>;
|
|
127
185
|
}
|
|
128
186
|
|
|
@@ -130,14 +188,44 @@ export interface DashboardState {
|
|
|
130
188
|
* The set of arguments for constructing a Dashboard resource.
|
|
131
189
|
*/
|
|
132
190
|
export interface DashboardArgs {
|
|
133
|
-
|
|
191
|
+
/**
|
|
192
|
+
* A custom user domain, e.g. 'status.example.com'. See the docs on updating your DNS and SSL usage.
|
|
193
|
+
*/
|
|
194
|
+
customDomain?: pulumi.Input<string>;
|
|
195
|
+
/**
|
|
196
|
+
* A subdomain name under 'checklyhq.com'. Needs to be unique across all users.
|
|
197
|
+
*/
|
|
134
198
|
customUrl: pulumi.Input<string>;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
199
|
+
/**
|
|
200
|
+
* A piece of text displayed at the top of your dashboard.
|
|
201
|
+
*/
|
|
202
|
+
header?: pulumi.Input<string>;
|
|
203
|
+
/**
|
|
204
|
+
* Show or hide the tags on the dashboard.
|
|
205
|
+
*/
|
|
206
|
+
hideTags?: pulumi.Input<boolean>;
|
|
207
|
+
/**
|
|
208
|
+
* A URL pointing to an image file.
|
|
209
|
+
*/
|
|
210
|
+
logo?: pulumi.Input<string>;
|
|
211
|
+
/**
|
|
212
|
+
* Determines if pagination is on or off.
|
|
213
|
+
*/
|
|
214
|
+
paginate?: pulumi.Input<boolean>;
|
|
215
|
+
/**
|
|
216
|
+
* How often to trigger pagination in seconds. Possible values `30`, `60` and `300`.
|
|
217
|
+
*/
|
|
218
|
+
paginationRate?: pulumi.Input<number>;
|
|
219
|
+
/**
|
|
220
|
+
* How often to refresh the dashboard in seconds. Possible values `30`, `60` and `600`.
|
|
221
|
+
*/
|
|
222
|
+
refreshRate?: pulumi.Input<number>;
|
|
223
|
+
/**
|
|
224
|
+
* A list of one or more tags that filter which checks to display on the dashboard.
|
|
225
|
+
*/
|
|
141
226
|
tags?: pulumi.Input<pulumi.Input<string>[]>;
|
|
227
|
+
/**
|
|
228
|
+
* Determines whether to use the full screen or focus in the center. Possible values `FULL` and `960PX`.
|
|
229
|
+
*/
|
|
142
230
|
width?: pulumi.Input<string>;
|
|
143
231
|
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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 * as utilities from "./utilities";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* ## Example Usage
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
12
|
+
* import * as checkly from "@pulumi/checkly";
|
|
13
|
+
*
|
|
14
|
+
* // Simple Enviroment Variable example
|
|
15
|
+
* const variable_1 = new checkly.EnvironmentVariable("variable-1", {
|
|
16
|
+
* key: "API_KEY",
|
|
17
|
+
* locked: true,
|
|
18
|
+
* value: "loZd9hOGHDUrGvmW",
|
|
19
|
+
* });
|
|
20
|
+
* const variable_2 = new checkly.EnvironmentVariable("variable-2", {
|
|
21
|
+
* key: "API_URL",
|
|
22
|
+
* value: "http://localhost:3000",
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export class EnvironmentVariable extends pulumi.CustomResource {
|
|
27
|
+
/**
|
|
28
|
+
* Get an existing EnvironmentVariable resource's state with the given name, ID, and optional extra
|
|
29
|
+
* properties used to qualify the lookup.
|
|
30
|
+
*
|
|
31
|
+
* @param name The _unique_ name of the resulting resource.
|
|
32
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
33
|
+
* @param state Any extra arguments used during the lookup.
|
|
34
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
35
|
+
*/
|
|
36
|
+
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: EnvironmentVariableState, opts?: pulumi.CustomResourceOptions): EnvironmentVariable {
|
|
37
|
+
return new EnvironmentVariable(name, <any>state, { ...opts, id: id });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
public static readonly __pulumiType = 'checkly:index/environmentVariable:EnvironmentVariable';
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Returns true if the given object is an instance of EnvironmentVariable. This is designed to work even
|
|
45
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
46
|
+
*/
|
|
47
|
+
public static isInstance(obj: any): obj is EnvironmentVariable {
|
|
48
|
+
if (obj === undefined || obj === null) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return obj['__pulumiType'] === EnvironmentVariable.__pulumiType;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public readonly key!: pulumi.Output<string>;
|
|
55
|
+
public readonly locked!: pulumi.Output<boolean | undefined>;
|
|
56
|
+
public readonly value!: pulumi.Output<string>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Create a EnvironmentVariable resource with the given unique name, arguments, and options.
|
|
60
|
+
*
|
|
61
|
+
* @param name The _unique_ name of the resource.
|
|
62
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
63
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
64
|
+
*/
|
|
65
|
+
constructor(name: string, args: EnvironmentVariableArgs, opts?: pulumi.CustomResourceOptions)
|
|
66
|
+
constructor(name: string, argsOrState?: EnvironmentVariableArgs | EnvironmentVariableState, opts?: pulumi.CustomResourceOptions) {
|
|
67
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
68
|
+
opts = opts || {};
|
|
69
|
+
if (opts.id) {
|
|
70
|
+
const state = argsOrState as EnvironmentVariableState | undefined;
|
|
71
|
+
resourceInputs["key"] = state ? state.key : undefined;
|
|
72
|
+
resourceInputs["locked"] = state ? state.locked : undefined;
|
|
73
|
+
resourceInputs["value"] = state ? state.value : undefined;
|
|
74
|
+
} else {
|
|
75
|
+
const args = argsOrState as EnvironmentVariableArgs | undefined;
|
|
76
|
+
if ((!args || args.key === undefined) && !opts.urn) {
|
|
77
|
+
throw new Error("Missing required property 'key'");
|
|
78
|
+
}
|
|
79
|
+
if ((!args || args.value === undefined) && !opts.urn) {
|
|
80
|
+
throw new Error("Missing required property 'value'");
|
|
81
|
+
}
|
|
82
|
+
resourceInputs["key"] = args ? args.key : undefined;
|
|
83
|
+
resourceInputs["locked"] = args ? args.locked : undefined;
|
|
84
|
+
resourceInputs["value"] = args ? args.value : undefined;
|
|
85
|
+
}
|
|
86
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
87
|
+
super(EnvironmentVariable.__pulumiType, name, resourceInputs, opts);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Input properties used for looking up and filtering EnvironmentVariable resources.
|
|
93
|
+
*/
|
|
94
|
+
export interface EnvironmentVariableState {
|
|
95
|
+
key?: pulumi.Input<string>;
|
|
96
|
+
locked?: pulumi.Input<boolean>;
|
|
97
|
+
value?: pulumi.Input<string>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The set of arguments for constructing a EnvironmentVariable resource.
|
|
102
|
+
*/
|
|
103
|
+
export interface EnvironmentVariableArgs {
|
|
104
|
+
key: pulumi.Input<string>;
|
|
105
|
+
locked?: pulumi.Input<boolean>;
|
|
106
|
+
value: pulumi.Input<string>;
|
|
107
|
+
}
|
package/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./alertChannel";
|
|
|
9
9
|
export * from "./check";
|
|
10
10
|
export * from "./checkGroup";
|
|
11
11
|
export * from "./dashboard";
|
|
12
|
+
export * from "./environmentVariable";
|
|
12
13
|
export * from "./maintenanceWindow";
|
|
13
14
|
export * from "./provider";
|
|
14
15
|
export * from "./snippet";
|
|
@@ -29,6 +30,7 @@ import { AlertChannel } from "./alertChannel";
|
|
|
29
30
|
import { Check } from "./check";
|
|
30
31
|
import { CheckGroup } from "./checkGroup";
|
|
31
32
|
import { Dashboard } from "./dashboard";
|
|
33
|
+
import { EnvironmentVariable } from "./environmentVariable";
|
|
32
34
|
import { MaintenanceWindow } from "./maintenanceWindow";
|
|
33
35
|
import { Snippet } from "./snippet";
|
|
34
36
|
import { TriggerCheck } from "./triggerCheck";
|
|
@@ -46,6 +48,8 @@ const _module = {
|
|
|
46
48
|
return new CheckGroup(name, <any>undefined, { urn })
|
|
47
49
|
case "checkly:index/dashboard:Dashboard":
|
|
48
50
|
return new Dashboard(name, <any>undefined, { urn })
|
|
51
|
+
case "checkly:index/environmentVariable:EnvironmentVariable":
|
|
52
|
+
return new EnvironmentVariable(name, <any>undefined, { urn })
|
|
49
53
|
case "checkly:index/maintenanceWindow:MaintenanceWindow":
|
|
50
54
|
return new MaintenanceWindow(name, <any>undefined, { urn })
|
|
51
55
|
case "checkly:index/snippet:Snippet":
|
|
@@ -63,6 +67,7 @@ pulumi.runtime.registerResourceModule("checkly", "index/alertChannel", _module)
|
|
|
63
67
|
pulumi.runtime.registerResourceModule("checkly", "index/check", _module)
|
|
64
68
|
pulumi.runtime.registerResourceModule("checkly", "index/checkGroup", _module)
|
|
65
69
|
pulumi.runtime.registerResourceModule("checkly", "index/dashboard", _module)
|
|
70
|
+
pulumi.runtime.registerResourceModule("checkly", "index/environmentVariable", _module)
|
|
66
71
|
pulumi.runtime.registerResourceModule("checkly", "index/maintenanceWindow", _module)
|
|
67
72
|
pulumi.runtime.registerResourceModule("checkly", "index/snippet", _module)
|
|
68
73
|
pulumi.runtime.registerResourceModule("checkly", "index/triggerCheck", _module)
|
package/maintenanceWindow.ts
CHANGED
|
@@ -5,28 +5,8 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
5
5
|
import * as utilities from "./utilities";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* ## # checkly.MaintenanceWindow
|
|
9
|
-
*
|
|
10
|
-
* `checkly.MaintenanceWindow` allows users to manage Checkly maintenance windows. Add a `checkly.MaintenanceWindow` resource to your resource file.
|
|
11
|
-
*
|
|
12
8
|
* ## Example Usage
|
|
13
9
|
*
|
|
14
|
-
* Minimal maintenance windows example
|
|
15
|
-
*
|
|
16
|
-
* ```typescript
|
|
17
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
18
|
-
* import * as checkly from "@pulumi/checkly";
|
|
19
|
-
*
|
|
20
|
-
* const maintenance_1 = new checkly.MaintenanceWindow("maintenance-1", {
|
|
21
|
-
* endsAt: "2014-08-25T00:00:00.000Z",
|
|
22
|
-
* repeatUnit: "MONTH",
|
|
23
|
-
* startsAt: "2014-08-24T00:00:00.000Z",
|
|
24
|
-
* tags: ["auto"],
|
|
25
|
-
* });
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* Full maintenance windows example (includes optional fields)
|
|
29
|
-
*
|
|
30
10
|
* ```typescript
|
|
31
11
|
* import * as pulumi from "@pulumi/pulumi";
|
|
32
12
|
* import * as checkly from "@pulumi/checkly";
|
|
@@ -37,7 +17,7 @@ import * as utilities from "./utilities";
|
|
|
37
17
|
* repeatInterval: 1,
|
|
38
18
|
* repeatUnit: "MONTH",
|
|
39
19
|
* startsAt: "2014-08-24T00:00:00.000Z",
|
|
40
|
-
* tags: ["
|
|
20
|
+
* tags: ["production"],
|
|
41
21
|
* });
|
|
42
22
|
* ```
|
|
43
23
|
*/
|
|
@@ -78,17 +58,17 @@ export class MaintenanceWindow extends pulumi.CustomResource {
|
|
|
78
58
|
*/
|
|
79
59
|
public readonly name!: pulumi.Output<string>;
|
|
80
60
|
/**
|
|
81
|
-
* The
|
|
61
|
+
* The date on which the maintenance window should stop repeating.
|
|
82
62
|
*/
|
|
83
|
-
public readonly repeatEndsAt!: pulumi.Output<string>;
|
|
63
|
+
public readonly repeatEndsAt!: pulumi.Output<string | undefined>;
|
|
84
64
|
/**
|
|
85
|
-
* The repeat interval of the maintenance window from the first
|
|
65
|
+
* The repeat interval of the maintenance window from the first occurrence.
|
|
86
66
|
*/
|
|
87
|
-
public readonly repeatInterval!: pulumi.Output<number>;
|
|
67
|
+
public readonly repeatInterval!: pulumi.Output<number | undefined>;
|
|
88
68
|
/**
|
|
89
|
-
* The repeat
|
|
69
|
+
* The repeat cadence for the maintenance window. Possible values `DAY`, `WEEK` and `MONTH`.
|
|
90
70
|
*/
|
|
91
|
-
public readonly repeatUnit!: pulumi.Output<string>;
|
|
71
|
+
public readonly repeatUnit!: pulumi.Output<string | undefined>;
|
|
92
72
|
/**
|
|
93
73
|
* The start date of the maintenance window.
|
|
94
74
|
*/
|
|
@@ -123,15 +103,6 @@ export class MaintenanceWindow extends pulumi.CustomResource {
|
|
|
123
103
|
if ((!args || args.endsAt === undefined) && !opts.urn) {
|
|
124
104
|
throw new Error("Missing required property 'endsAt'");
|
|
125
105
|
}
|
|
126
|
-
if ((!args || args.repeatEndsAt === undefined) && !opts.urn) {
|
|
127
|
-
throw new Error("Missing required property 'repeatEndsAt'");
|
|
128
|
-
}
|
|
129
|
-
if ((!args || args.repeatInterval === undefined) && !opts.urn) {
|
|
130
|
-
throw new Error("Missing required property 'repeatInterval'");
|
|
131
|
-
}
|
|
132
|
-
if ((!args || args.repeatUnit === undefined) && !opts.urn) {
|
|
133
|
-
throw new Error("Missing required property 'repeatUnit'");
|
|
134
|
-
}
|
|
135
106
|
if ((!args || args.startsAt === undefined) && !opts.urn) {
|
|
136
107
|
throw new Error("Missing required property 'startsAt'");
|
|
137
108
|
}
|
|
@@ -143,9 +114,7 @@ export class MaintenanceWindow extends pulumi.CustomResource {
|
|
|
143
114
|
resourceInputs["startsAt"] = args ? args.startsAt : undefined;
|
|
144
115
|
resourceInputs["tags"] = args ? args.tags : undefined;
|
|
145
116
|
}
|
|
146
|
-
|
|
147
|
-
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
|
148
|
-
}
|
|
117
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
149
118
|
super(MaintenanceWindow.__pulumiType, name, resourceInputs, opts);
|
|
150
119
|
}
|
|
151
120
|
}
|
|
@@ -163,15 +132,15 @@ export interface MaintenanceWindowState {
|
|
|
163
132
|
*/
|
|
164
133
|
name?: pulumi.Input<string>;
|
|
165
134
|
/**
|
|
166
|
-
* The
|
|
135
|
+
* The date on which the maintenance window should stop repeating.
|
|
167
136
|
*/
|
|
168
137
|
repeatEndsAt?: pulumi.Input<string>;
|
|
169
138
|
/**
|
|
170
|
-
* The repeat interval of the maintenance window from the first
|
|
139
|
+
* The repeat interval of the maintenance window from the first occurrence.
|
|
171
140
|
*/
|
|
172
141
|
repeatInterval?: pulumi.Input<number>;
|
|
173
142
|
/**
|
|
174
|
-
* The repeat
|
|
143
|
+
* The repeat cadence for the maintenance window. Possible values `DAY`, `WEEK` and `MONTH`.
|
|
175
144
|
*/
|
|
176
145
|
repeatUnit?: pulumi.Input<string>;
|
|
177
146
|
/**
|
|
@@ -197,17 +166,17 @@ export interface MaintenanceWindowArgs {
|
|
|
197
166
|
*/
|
|
198
167
|
name?: pulumi.Input<string>;
|
|
199
168
|
/**
|
|
200
|
-
* The
|
|
169
|
+
* The date on which the maintenance window should stop repeating.
|
|
201
170
|
*/
|
|
202
|
-
repeatEndsAt
|
|
171
|
+
repeatEndsAt?: pulumi.Input<string>;
|
|
203
172
|
/**
|
|
204
|
-
* The repeat interval of the maintenance window from the first
|
|
173
|
+
* The repeat interval of the maintenance window from the first occurrence.
|
|
205
174
|
*/
|
|
206
|
-
repeatInterval
|
|
175
|
+
repeatInterval?: pulumi.Input<number>;
|
|
207
176
|
/**
|
|
208
|
-
* The repeat
|
|
177
|
+
* The repeat cadence for the maintenance window. Possible values `DAY`, `WEEK` and `MONTH`.
|
|
209
178
|
*/
|
|
210
|
-
repeatUnit
|
|
179
|
+
repeatUnit?: pulumi.Input<string>;
|
|
211
180
|
/**
|
|
212
181
|
* The start date of the maintenance window.
|
|
213
182
|
*/
|
package/package.json
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkly/pulumi",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.6",
|
|
4
4
|
"description": "A Pulumi package for creating and managing Checkly monitoring resources.",
|
|
5
|
-
"main": "./bin/index.js",
|
|
6
|
-
"types": "./bin/index.d.ts",
|
|
7
5
|
"keywords": [
|
|
8
6
|
"pulumi",
|
|
9
7
|
"checkly",
|
|
@@ -13,7 +11,8 @@
|
|
|
13
11
|
"repository": "https://github.com/checkly/pulumi-checkly",
|
|
14
12
|
"license": "MIT",
|
|
15
13
|
"scripts": {
|
|
16
|
-
"build": "tsc"
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"install": "node scripts/install-pulumi-plugin.js resource checkly ${VERSION}"
|
|
17
16
|
},
|
|
18
17
|
"dependencies": {
|
|
19
18
|
"@pulumi/pulumi": "^3.0.0"
|
|
@@ -25,6 +24,8 @@
|
|
|
25
24
|
},
|
|
26
25
|
"pulumi": {
|
|
27
26
|
"resource": true,
|
|
28
|
-
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/0.0.1-alpha.
|
|
29
|
-
}
|
|
27
|
+
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/0.0.1-alpha.6"
|
|
28
|
+
},
|
|
29
|
+
"main": "./bin/index.js",
|
|
30
|
+
"types": "./bin/index.d.ts"
|
|
30
31
|
}
|
package/provider.ts
CHANGED
|
@@ -47,9 +47,7 @@ export class Provider extends pulumi.ProviderResource {
|
|
|
47
47
|
resourceInputs["apiKey"] = args ? args.apiKey : undefined;
|
|
48
48
|
resourceInputs["apiUrl"] = args ? args.apiUrl : undefined;
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
|
52
|
-
}
|
|
50
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
53
51
|
super(Provider.__pulumiType, name, resourceInputs, opts);
|
|
54
52
|
}
|
|
55
53
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var childProcess = require("child_process");
|
|
3
|
+
|
|
4
|
+
var args = process.argv.slice(2);
|
|
5
|
+
|
|
6
|
+
if (args.indexOf("${VERSION}") !== -1) {
|
|
7
|
+
process.exit(0);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
var res = childProcess.spawnSync("pulumi", ["plugin", "install", "--server", "https://github.com/checkly/pulumi-checkly/releases/${VERSION}"].concat(args), {
|
|
11
|
+
stdio: ["ignore", "inherit", "inherit"]
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
if (res.error && res.error.code === "ENOENT") {
|
|
15
|
+
console.error("\nThere was an error installing the resource provider plugin. " +
|
|
16
|
+
"It looks like `pulumi` is not installed on your system. " +
|
|
17
|
+
"Please visit https://pulumi.com/ to install the Pulumi CLI.\n" +
|
|
18
|
+
"You may try manually installing the plugin by running " +
|
|
19
|
+
"`pulumi plugin install " + args.join(" ") + "`");
|
|
20
|
+
} else if (res.error || res.status !== 0) {
|
|
21
|
+
console.error("\nThere was an error installing the resource provider plugin. " +
|
|
22
|
+
"You may try to manually installing the plugin by running " +
|
|
23
|
+
"`pulumi plugin install " + args.join(" ") + "`");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
process.exit(0);
|
package/snippet.ts
CHANGED
|
@@ -33,7 +33,7 @@ export class Snippet extends pulumi.CustomResource {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* The name of the snippet
|
|
36
|
+
* The name of the snippet
|
|
37
37
|
*/
|
|
38
38
|
public readonly name!: pulumi.Output<string>;
|
|
39
39
|
/**
|
|
@@ -64,9 +64,7 @@ export class Snippet extends pulumi.CustomResource {
|
|
|
64
64
|
resourceInputs["name"] = args ? args.name : undefined;
|
|
65
65
|
resourceInputs["script"] = args ? args.script : undefined;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
|
69
|
-
}
|
|
67
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
70
68
|
super(Snippet.__pulumiType, name, resourceInputs, opts);
|
|
71
69
|
}
|
|
72
70
|
}
|
|
@@ -76,7 +74,7 @@ export class Snippet extends pulumi.CustomResource {
|
|
|
76
74
|
*/
|
|
77
75
|
export interface SnippetState {
|
|
78
76
|
/**
|
|
79
|
-
* The name of the snippet
|
|
77
|
+
* The name of the snippet
|
|
80
78
|
*/
|
|
81
79
|
name?: pulumi.Input<string>;
|
|
82
80
|
/**
|
|
@@ -90,7 +88,7 @@ export interface SnippetState {
|
|
|
90
88
|
*/
|
|
91
89
|
export interface SnippetArgs {
|
|
92
90
|
/**
|
|
93
|
-
* The name of the snippet
|
|
91
|
+
* The name of the snippet
|
|
94
92
|
*/
|
|
95
93
|
name?: pulumi.Input<string>;
|
|
96
94
|
/**
|
package/triggerCheck.ts
CHANGED
|
@@ -5,17 +5,11 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
5
5
|
import * as utilities from "./utilities";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* ## # checkly.TriggerCheck
|
|
9
|
-
*
|
|
10
|
-
* `checkly.TriggerCheck` allows users to manage Checkly trigger checks. Add a `checkly.TriggerCheck` resource to your resource file.
|
|
11
|
-
*
|
|
12
8
|
* ## Example Usage
|
|
13
9
|
*
|
|
14
|
-
* Trigger check example
|
|
15
|
-
*
|
|
16
10
|
* ```typescript
|
|
17
11
|
* import * as pulumi from "@pulumi/pulumi";
|
|
18
|
-
* import * as
|
|
12
|
+
* import * as pulumi from "@checkly/pulumi";
|
|
19
13
|
*
|
|
20
14
|
* const test_trigger_check = new checkly.TriggerCheck("test-trigger-check", {checkId: "c1ff95c5-d7f6-4a90-9ce2-1e605f117592"});
|
|
21
15
|
* export const test_trigger_check_url = test_trigger_check.url;
|
|
@@ -53,7 +47,13 @@ export class TriggerCheck extends pulumi.CustomResource {
|
|
|
53
47
|
* The id of the check that you want to attach the trigger to.
|
|
54
48
|
*/
|
|
55
49
|
public readonly checkId!: pulumi.Output<string>;
|
|
50
|
+
/**
|
|
51
|
+
* The token value created to trigger the check
|
|
52
|
+
*/
|
|
56
53
|
public readonly token!: pulumi.Output<string>;
|
|
54
|
+
/**
|
|
55
|
+
* The request URL to trigger the check run.
|
|
56
|
+
*/
|
|
57
57
|
public readonly url!: pulumi.Output<string>;
|
|
58
58
|
|
|
59
59
|
/**
|
|
@@ -81,9 +81,7 @@ export class TriggerCheck extends pulumi.CustomResource {
|
|
|
81
81
|
resourceInputs["token"] = args ? args.token : undefined;
|
|
82
82
|
resourceInputs["url"] = args ? args.url : undefined;
|
|
83
83
|
}
|
|
84
|
-
|
|
85
|
-
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
|
86
|
-
}
|
|
84
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
87
85
|
super(TriggerCheck.__pulumiType, name, resourceInputs, opts);
|
|
88
86
|
}
|
|
89
87
|
}
|
|
@@ -96,7 +94,13 @@ export interface TriggerCheckState {
|
|
|
96
94
|
* The id of the check that you want to attach the trigger to.
|
|
97
95
|
*/
|
|
98
96
|
checkId?: pulumi.Input<string>;
|
|
97
|
+
/**
|
|
98
|
+
* The token value created to trigger the check
|
|
99
|
+
*/
|
|
99
100
|
token?: pulumi.Input<string>;
|
|
101
|
+
/**
|
|
102
|
+
* The request URL to trigger the check run.
|
|
103
|
+
*/
|
|
100
104
|
url?: pulumi.Input<string>;
|
|
101
105
|
}
|
|
102
106
|
|
|
@@ -108,6 +112,12 @@ export interface TriggerCheckArgs {
|
|
|
108
112
|
* The id of the check that you want to attach the trigger to.
|
|
109
113
|
*/
|
|
110
114
|
checkId: pulumi.Input<string>;
|
|
115
|
+
/**
|
|
116
|
+
* The token value created to trigger the check
|
|
117
|
+
*/
|
|
111
118
|
token?: pulumi.Input<string>;
|
|
119
|
+
/**
|
|
120
|
+
* The request URL to trigger the check run.
|
|
121
|
+
*/
|
|
112
122
|
url?: pulumi.Input<string>;
|
|
113
123
|
}
|