TFE | HCL Parser is unable to parse template with structured data type and fails to provision itDescriptionCustomers tried creating a catalog item in CPG to provision a S4 HANA instance on Azure through Terraform and are successfully discovered the templates and create a new catalog item.In provision tab there is map type of field in Terraform but in ServiceNow its represented as single line text. This expects like below for tag value but throwing error,Key:- TagsValue:-{ "key": "CloudNetwork"," value": "ipamdb01"}This expects value as HCL.variable "tags" {description = " The tag to assign to the virtual machine. "type =map(any)}For this variable when we tried to give value as per map field format but the request is not successful. Have verified in the mid server log for this variable it shows hcl=false.Steps to Reproduce Use Case-1:- 1)Try to create a terarform template using a structured data type: ex: main.tf->var.aws_amis[var.aws_region]variable.tf->variable "aws_amis" {default = {eu-west-1 = "ami-674cbc1e"us-east-1 = "ami-1d4e7a66"us-west-1 = "ami-969ab1f6"us-west-2 = "ami-8803e0f0"}} 2) The HCL Parser is unable to parse the this template and does not pass the variables from this template to TF cloud during provisioning through provider parameters Use Case-2 1. open cloud user portal2. launch a stack3. launch catalog item (Provision S4 HANA system)4. please enter some test value in all mandatory fields excepts auto populated fields.5. in provision tab for the variable "Provision S4 HANA System Tags" provide any of the sample value given blow. A. {“key”: “CloudNetwork”,“value”: “xxx"} B. {environment = "development",provider = "ServiceNow",ansible_role = "common-vm-setup",comment = "xxxx"} Cloud Trail Log error:- Terraform v0.12.0 Configuring remote state backend... Initializing Terraform configuration... 2020/12/28 14:34:12 [DEBUG] Using modified User-Agent: Terraform/0.12.0 TFC/294fe188ce [31m [1m[31mError: [0m[0m[1mInvalid value for input variable[0m [0m on /terraform/terraform.tfvars line 23: 23: tags = [4m"now_test_tags"[0m [0m The given value is not valid for variable "tags": map of any single type required. [0m[0m The input variable "tags" has not been assigned a value. This is a bug in Terraform; please report it in a GitHub issue.Error: Unassigned variableThe input variable "machine_name" has not been assigned a value. This is a bug in Terraform; please report it in a GitHub issue.Error: Unassigned variableThe input variable "network_name" has not been assigned a value. This is a bug in Terraform; please report it in a GitHub issue.Error: Unassigned variableThe input variable "region" has not been assigned a value. This is a bug in Terraform; please report it in a GitHub issue.Error: Unassigned variableThe input variable "ssh_key" has not been assigned a value. This is a bug in Terraform; please report it in a GitHub issue.Error: Unassigned variableThe input variable "instance_username" has not been assigned a value. This is a bug in Terraform; please report it in a GitHub issue.Error: Unassigned variableThe input variable "subnet_name" has not been assigned a value. This is a bug in Terraform; please report it in a GitHub issue.Unassigned variableThe input variable "name_prefix" has not been assigned a value. This is a bug in Terraform; please report it in a GitHub issue.Error: Unassigned variableThe input variable "resource_group" has not been assigned a value. This is a bug in Terraform; please report it in a GitHub issue.Error: Unassigned variableThe input variable "gallery_name" has not been assigned a value. This is a bug in Terraform; please report it in a GitHub issue.Workaround# Midserver script include:- TerraformEnterpriseVariable Old script hcl condition :- var category = environment ? "env" : "terraform"; var payload = { "data": { "type": "vars", "attributes": { "key": key, "value": value, "description": "", "category": category, "hcl": false, "sensitive": sensitive New script condition workaround:- var hcl = false; if (JSUtil.nil(sensitive)) sensitive = false; if(value.trim().startsWith('{') || value.trim().startsWith('[')) hcl = true; var category = environment ? "env" : "terraform"; var payload = { "data": { "type": "vars", "attributes": { "key": key, // "value": (value instanceof Object) ? JSON.stringify(value) : value, "value": value, "description": "", "category": category, "hcl": hcl, "sensitive": sensitive Download the update set from the PRB or attached is the script include XML to import in customer system:- anything should work as resolution of this issue. URL:-ecc_agent_script_include_85b23fe553c200109dd4ddeeff7b129aRelated Problem: PRB1429830