synthetic-monitoring-app icon indicating copy to clipboard operation
synthetic-monitoring-app copied to clipboard

Scripted checks in the Terraform generation for tf.json don't add the script correctly

Open ckbedwell opened this issue 7 months ago • 0 comments

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.

ckbedwell avatar Jul 05 '24 14:07 ckbedwell