Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ckbedwell opened this issue Jul 5, 2024 · 0 comments
Assignees
Labels
bug Something isn't working frontend Needs to be implemented in the frontend application terraform

Comments

@ckbedwell
Copy link
Contributor

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 ckbedwell added bug Something isn't working terraform frontend Needs to be implemented in the frontend application labels Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Needs to be implemented in the frontend application terraform
Projects
None yet
Development

No branches or pull requests

1 participant