@checkly/pulumi 0.0.1-alpha.3 → 0.0.1-alpha.4
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 +57 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@ The Checkly Pulumi provider enables you to create and configure Checkly resource
|
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
1. To use this package, please install the Pulumi CLI first.
|
|
10
|
-
2. This package is only available for JavaScript and TypeScript but support for other languages
|
|
9
|
+
1. To use this package, please [install the Pulumi CLI first](https://www.pulumi.com/docs/get-started/install/).
|
|
10
|
+
2. This package is only available for JavaScript and TypeScript but support for other languages will be available soon.
|
|
11
11
|
|
|
12
12
|
### Node.js (JavaScript/TypeScript)
|
|
13
13
|
|
|
@@ -23,14 +23,15 @@ or `yarn`:
|
|
|
23
23
|
yarn add @checkly/pulumi
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
> TBA
|
|
26
|
+
Install the provider binary plugin. This is only needed due to an outstanding bug in with Pulumi registry
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
```bash
|
|
29
|
+
pulumi plugin install resource checkly v0.0.1-alpha.1 --server https://github.com/checkly/pulumi-checkly/releases/download/v0.0.1-alpha.1
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Python, Go & .NET
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
> TBA
|
|
34
|
+
*TBA*
|
|
34
35
|
|
|
35
36
|
## Authentication
|
|
36
37
|
|
|
@@ -56,28 +57,71 @@ Once you generated the `API Key` there are two ways to communicate your authoriz
|
|
|
56
57
|
|
|
57
58
|
## Creating Resources
|
|
58
59
|
|
|
60
|
+
The example below shows a basic API check and Browser check.
|
|
61
|
+
|
|
59
62
|
```javascript
|
|
63
|
+
// index.js
|
|
60
64
|
const checkly = require("@checkly/pulumi")
|
|
61
65
|
|
|
62
66
|
new checkly.Check("api-check", {
|
|
67
|
+
type: "API",
|
|
68
|
+
name: "Public SpaceX API",
|
|
63
69
|
activated: true,
|
|
64
70
|
frequency: 10,
|
|
65
|
-
|
|
71
|
+
locations: ["us-east-1"],
|
|
66
72
|
request: {
|
|
67
73
|
method: "GET",
|
|
68
74
|
url: "https://api.spacexdata.com/v3",
|
|
75
|
+
assertions: [
|
|
76
|
+
{
|
|
77
|
+
source: 'STATUS_CODE',
|
|
78
|
+
comparison: 'EQUALS',
|
|
79
|
+
target: 200
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
source: 'JSON_BODY',
|
|
83
|
+
property: '$.project_name',
|
|
84
|
+
comparison: 'EQUALS',
|
|
85
|
+
target: 'SpaceX-API'
|
|
86
|
+
}
|
|
87
|
+
]
|
|
69
88
|
}
|
|
70
89
|
})
|
|
71
90
|
|
|
72
91
|
new checkly.Check("browser-check", {
|
|
92
|
+
type: "BROWSER",
|
|
93
|
+
name: "Google.com Playwright check",
|
|
73
94
|
activated: true,
|
|
74
95
|
frequency: 10,
|
|
75
|
-
|
|
76
|
-
script: `
|
|
96
|
+
locations: ["us-east-1"],
|
|
97
|
+
script: `const { chromium } = require('playwright')
|
|
98
|
+
|
|
99
|
+
async function run () {
|
|
100
|
+
const browser = await chromium.launch()
|
|
101
|
+
const page = await browser.newPage()
|
|
102
|
+
|
|
103
|
+
const response = await page.goto('https://google.com')
|
|
104
|
+
|
|
105
|
+
if (response.status() > 399) {
|
|
106
|
+
throw new Error('Failed with response code ${response.status()}')
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
await page.screenshot({ path: 'screenshot.jpg' })
|
|
110
|
+
|
|
111
|
+
await page.close()
|
|
112
|
+
await browser.close()
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
run()`
|
|
77
116
|
})
|
|
78
117
|
```
|
|
79
118
|
|
|
80
|
-
> Check the
|
|
119
|
+
> Check the [examples directory](https://github.com/checkly/pulumi-checkly/tree/main/examples) for more detailed code samples.
|
|
120
|
+
|
|
121
|
+
## Syncing resources
|
|
122
|
+
|
|
123
|
+
Just run the regular `pulumi up` command
|
|
124
|
+
|
|
81
125
|
|
|
82
126
|
## Configuration
|
|
83
127
|
|
|
@@ -98,7 +142,7 @@ For detailed reference documentation, please visit [the Pulumi registry](https:/
|
|
|
98
142
|
|
|
99
143
|
|
|
100
144
|
<p align="center">
|
|
101
|
-
<a href="https://checklyhq.com?utm_source=github&utm_medium=sponsor-logo-github&utm_campaign=
|
|
145
|
+
<a href="https://checklyhq.com?utm_source=github&utm_medium=sponsor-logo-github&utm_campaign=pulumi-checkly" target="_blank">
|
|
102
146
|
<img width="100px" src="https://www.checklyhq.com/images/text_racoon_logo.svg" alt="Checkly" />
|
|
103
147
|
</a>
|
|
104
148
|
<br />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkly/pulumi",
|
|
3
|
-
"version": "v0.0.1-alpha.
|
|
3
|
+
"version": "v0.0.1-alpha.4",
|
|
4
4
|
"description": "A Pulumi package for creating and managing Checkly monitoring resources.",
|
|
5
5
|
"main": "./bin/index.js",
|
|
6
6
|
"types": "./bin/index.d.ts",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
},
|
|
27
27
|
"pulumi": {
|
|
28
28
|
"resource": true,
|
|
29
|
-
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/v0.0.1-alpha.
|
|
29
|
+
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/v0.0.1-alpha.4"
|
|
30
30
|
}
|
|
31
31
|
}
|