Terraform apply is removing flower brackets from terraform.tfvars values

I upgraded my terraform version from 1.8.5 to 1.9.8. So I have one of the values in terraform.tfvars as given below.

“https:///adb2c/userroles/{objectId}”

What I noticed is after doing terraform apply, in the output, it is removing the flower brackets and I am getting like below:

“https:///adb2c/userroles/objectId”

So is this something related to new version of terraform?

If the value is a simple string, Terraform would have no reason to ever alter that string.

Can you show how you are using that variable in the configuration, or create a reproducible example?

In variables, I am using like below

variable “apim_url_1” {
description = “Value for apim_url_1”
type = string
}

and in the configuration, actually I am using this in null resource file because I am creating custom policies in Azure ADB2C with this so I am using bash scripting for that.

Below is the one where I am using it in null resource main.tf file

apim_url_1=${var.apim_url_1}

But its very surprising that it was working absolutely fine before

One thing worked for me. I replaced the value in terraform.tfvars like below

apim_url_1 = “https:///adb2c/userroles/\{objectId\}”

and the output came as expected. See below

apim_url_1 = “https:///adb2c/userroles/{objectId}”

Is it OK if I use like this?