Open rshah28 opened 1 month ago
Datadog Terraform Provider Version
= 3.39.0
Unable to create or update tests with the extracted_value option and the parser type set to 'raw'. The Provider version had not been changed. Tried with multiple Provider versions and as recent as version 3.44.1
Relevant debug or panic output
Error: error creating synthetics API test from /api/v1/synthetics/tests/api: 400 Bad Request: {"errors":["'extractedValues' value '{'field': 'location', 'name': 'OKTA_REDIRECT_URL', 'parser': {'type': 'raw', 'value': ''}, 'secure': False, 'type': 'http_header'}' is invalid"]}
Change the parser type to regex and use value .* as the regex.
From:
extracted_value {
name = "AUTHORIZE_URL"
type = "http_header"
field = "location"
parser {
type = "raw"
}
to:
extracted_value {
name = "AUTHORIZE_URL"
type = "http_header"
field = "location"
parser {
type = "regex"
value = ".*"
}
@Lord-Gusarov thanks! will give it a try.
Datadog Terraform Provider Version
3.44.1
Terraform Version
v1.5.3
What resources or data sources are affected?
datadog_synthetics_test
Terraform Configuration Files
Relevant debug or panic output
Error: error updating synthetics API test from /api/v1/synthetics/tests/api/{public_id}: 400 Bad Request: {"errors":["'extractedValues' value '{'field': 'location', 'name': 'AUTHORIZE_URL', 'parser': {'type': 'raw', 'value': ''}, 'secure': False, 'type': 'http_header'}' is invalid"]}
Expected Behavior
Per API docs the "value" config should not be set for the "raw" type parser. https://docs.datadoghq.com/api/latest/synthetics/#edit-an-api-test
Actual Behavior
It fails to edit the existing Synthetic Test when upgrading the terraform datadog provider version from 3.32.0 to 3.44.1
Steps to Reproduce
terraform apply
Important Factoids
No response
References
No response