Closed arhill05 closed 1 year ago
Well as is true any time I open an issue, I found a workaround right after opening it. #2062 shows that you can remove the script_language
, runtime_type
and runtime_type_version
attributes to use the legacy runtime version even though the documentation identifies those properties as required.
If this was properly documented it would've saved me a day's worth of a headache :D
Can the documentation be updated to reflect this behavior?
Hi @arhill05, sorry for causing the confusion. Will update the document.
The docs are updated ( link ). If you feel the issue is still valid, feel free to raise a new issue.
Hi there,
Please include the following with your bug report
provider
configuration (sensitive details redacted)Terraform Version
Terraform v1.3.3
Affected Resource(s)
Please list the resources as a list, for example:
newrelic_synthetics_script_monitor
Terraform Configuration
provider "newrelic" { api_key = var.api_key account_id = var.account_id region = "US" }
resource "newrelic_synthetics_script_monitor" "canary_synthetic_monitor" { account_id = var.account_id for_each = { for app in var.apps : app.monitor_name => app }
period = "EVERY_10_MINUTES" location_private { guid = data.newrelic_synthetics_private_location.louisville.id }
name = "TF_${each.value.monitor_name}" runtime_type = "NODE_API" runtime_type_version = "10.15" status = coalesce(each.value.is_enabled, true) ? "ENABLED" : "DISABLED" type = "SCRIPT_API"
tag { key = "environment" values = ["${var.environment}"] }
tag { key = "server-group" values = [coalesce(each.value.server_group, "UNKNOWN")] }
tag { key = "managed-by-terraform" values = [true] }
script_language = "JAVASCRIPT" script = templatefile( "${path.module}/synthetics-scripts/${coalesce(each.value.custom_canary_script_name, "default.jstpl")}", { app = each.value }) }