Maybe related: [azurerm\_resource\_group\_template\_deployment ignoring parameter file](https://stackoverflow.com/questions/65257838/azurerm-resource-group-template-deployment-ignoring-parameter-file)

I would like to use the resource `azurerm_resource_group_template_deployment` from Terraform version 0.37. But there is the problem that Terraform wants to reapply the resource every month, so I thought I could tell to ignore changes to start date and end date, but this would (opposite to the deprecated resource `azurerm_template_deployment`) need a compute operation, namely `jsondecode`, which is not allowed. I.e. the following code would not work.

```sh
terraform {
  required_version = "~> 0.13.0"
  required_providers {
    azurerm = "~> 2.37.0"
  }
}

provider azurerm {
  features {}
}

locals {
  budget_start_date = formatdate("YYYY-MM-01", timestamp())
  budget_end_date = formatdate("YYYY-MM-01", timeadd(timestamp(), "17568h"))
  budget_params = jsonencode({
    "budgetName" = "budgettest",
    "amount" = "4000",
    "timeGrain" = "Annually",
    "startDate" = local.budget_start_date,
    "endDate" = local.budget_end_date,
    "firstThreshold" = "75",
    "secondThreshold" = "100",
    "thirdThreshold" = "50",
    "contactGroups" = ""
  }) 
  }

resource "azurerm_resource_group" "rg" {
  # A subscription cannot have more than 980 resource groups:
  # https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits
  name = "example-rg"
  location = "westeurope"
}

resource "azurerm_resource_group_template_deployment" "dsw_budget" {
  name = "test-budget-template"
  resource_group_name = azurerm_resource_group.rg[0].name
  deployment_mode = "Incremental"

  template_content = file("${path.module}/arm/budget_deploy.json")

  parameters_content = local.budget_params

  lifecycle {
    ignore_changes = [
      jsondecode(parameters_content)["startDate"],
      jsondecode(parameters_content)["endDate"]
    ]
  }

}

```

For the sake of completeness, content of `budget_deploy.json`:

```json
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "budgetName": {
      "type": "string",
      "defaultValue": "MyBudget"
    },
    "amount": {
      "type": "string",
      "defaultValue": "1000"
    },
    "timeGrain": {
      "type": "string",
      "defaultValue": "Monthly",
      "allowedValues": [
        "Monthly",
        "Quarterly",
        "Annually"
      ]
    },
    "startDate": {
      "type": "string"
    },
    "endDate": {
      "type": "string"
    },
    "firstThreshold": {
      "type": "string",
      "defaultValue": "90"
    },
    "secondThreshold": {
      "type": "string",
      "defaultValue": "110"
    },
    "thirdThreshold": {
      "type": "string",
      "defaultValue": "80"
    },
    "contactEmails": {
      "type": "string",
      "defaultValue": ""
    },
    "contactGroups": {
      "type": "string",
      "defaultValue": ""
    },
    "location": {
      "type": "string",
      "defaultValue": "[resourceGroup().location]"
    }
  },
  "variables": {
    "groups": "[split(parameters('contactGroups'),',')]"
  },
  "resources": [
    {
      "name": "[parameters('budgetName')]",
      "type": "Microsoft.Consumption/budgets",
      "location": "[parameters('location')]",
      "apiVersion": "2019-10-01",
      "properties": {
        "timePeriod": {
          "startDate": "[parameters('startDate')]",
          "endDate": "[parameters('endDate')]"
        },
        "timeGrain": "[parameters('timeGrain')]",
        "amount": "[parameters('amount')]",
        "category": "Cost",
        "notifications": {
          "NotificationForExceededBudget1": {
            "enabled": true,
            "operator": "GreaterThan",
            "threshold": "[parameters('firstThreshold')]",
            "contactGroups": "[variables('groups')]"
          },
          "NotificationForExceededBudget2": {
            "enabled": true,
            "operator": "GreaterThan",
            "threshold": "[parameters('secondThreshold')]",
            "contactGroups": "[variables('groups')]"
          },
          "NotificationForExceededBudget3": {
            "enabled": true,
            "operator": "GreaterThan",
            "threshold": "[parameters('thirdThreshold')]",
            "contactGroups": "[variables('groups')]"
          }
        }
      }
    }
  ]
}

```

Is there any way that I can still achieve my goal? - thank you!