Trying in Terraform doing ARM deployment with updated/modified arm_parameter.json values

Looking for help with terraform when I am trying to do the below:

I have arm_template_parameters.json file which is getting fetched from repo thru a pipeline, having below structure, which need to be passed to an AzureARMdeployment after changing First-Key-Value and Second-Key-Value in Terraform.

For the First-Key-Vaule, I need to set local.FirstValue and for Second-Key-Value, I need to set local.SecondValue before passing it for deployment. Rest all keys in that JSON will remain same.

arm_template_parameters.json :

    "$schema": "",
    "contentVersion": "",
    "parameters": {
        "First Key": {
            "value": "First Key Value"
        "Second Key": {
            "value": "Second Key Value"
        "Third Key": {
            "value": "Third Key Value"
        "Fourth Key": {
            "value": "Fourth Key Value"

I am trying this as below:

// ---- ----    
raw_data     = jsondecode(file("arm_template_parameters.json"))
local.raw_data.parameters["First Key"] = local.FirstValue
local.raw_data.parameters["Second Key"] = local.SecondValue

// ---- ----
resource "azurerm_resource_group_template_deployment" "rgtemplatedeployment" {
  name                = local.arm_temp_deployment_name
  resource_group_name = var.resource_group_name
  deployment_mode     = "Incremental"
  parameters_content = jsonencode({ local.raw_data })
  template_content = file("arm_template.json")

Is this will be correct or is there a simpler/better way to achieve this in terraform as I need to make the deployment by changing specific two keys with updated values, keeping the rest of values same.