HI,
I am not sure its issue with Datadog Synthetic tests or its my poor understanding of Terraform Datadog documentation
I have created synthetic multi tests and generated authentication token ( lets say test name as aunthetic_token_generation) using extracted value as below
extracted_values =
{
name = "token"
type = "http_body"
parser = {
type = "json_path"
value = "$.access_token"
}
}
HOW TO USE THE EXTRACTED VALUE TO OTHER MULTI-TESTS ???
Now I need to access the token into another multi tests and pass it as Bearer token as request header
request_headers = {
Content-Type = "application/json"
X-Cricut-Client = "DD-synthetics"
Authorization = "Bearer {{ ${var.auth_token} }}"
OR
Authorization = "Bearer {{ AUTH_TOKEN}}" /// This is creating new global variable
}
I have tried assigning to global variable as below and try to assign and accessing it but no luck and also with local variable
resource "datadog_synthetics_global_variable" "aunthentication_token" {
name = "AUTH_TOKEN"
description = "Description of the variable"
value = ""
}
Is there way to extract and assign toaken value from one to many multi tests using terraform ??
Thanks in Advance