synthetic-monitoring-app
synthetic-monitoring-app copied to clipboard
Scripted checks in the Terraform generation for tf.json don't add the script correctly
Problem
When using the "Generate config" for Terraform in the plugin, the scripted checks don't get generated correctly. The scripted field is just an empty object and not the script itself.
"job": "Scripted check",
"target": "hello",
"enabled": true,
"probes": [
57,
164
],
"labels": {},
"settings": {
"scripted": {}
}
}
Whereas the script I have for this script is:
import { check } from 'k6'
import http from 'k6/http'
export default function main() {
const res = http.get('http://test.k6.io/');
// console.log will be represented as logs in Loki
console.log('got a reponse')
check(res, {
'is status 200': (r) => r.status === 200,
});
}
Completion criteria
Please ensure the correct scripted
value is being passed here that is compatible with our terraform provider.