how to check a variable string with two values in terraform.
I want to check a string in a variable with two string values something like the below code.
virtual_network_type = var.vnet_type == "External" || "Internal" ? var.vnet_type : null
But terraform throws below error message
Error: Invalid operand
│
│ on ../../modules/test/test-instance.tf line 51, in resource "azurerm_api_management" "apim_demo":
│ 51: virtual_network_type = var.vnet_type == "External" || "Internal" ? var.vnet_type : null
│
│ Unsuitable value for right operand: a bool is required.
╵
Can we do this in terraform?