An equal to sign after " in all examples like version = "=4.1.0"

Hi ,

I assume its typo in all the examples that i see in terraform registry like below.

See the highlighted red. Is it correct or the typo?

BR/

SS

Hi @satzmnl,

The version argument uses version constraint syntax.

In the table of “operators” on that page, you will find that = and “no operator” both have the same meaning:

Allows only one exact version number. Cannot be combined with other conditions.

=4.1.0 is therefore exactly equivalent to 4.1.0. The example in the registry is not wrong, but that equals sign is not actually necessary and omitting it would have exactly the same meaning.


Since the original comment includes a screenshot of some code, I’ll include the same code as normal text here for the benefit of those who can’t see images:

# We strongly recommend using the required_providers block to set the
# Azure Provider source and version being used
terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "=4.1.0"
    }
  }
}

In the image in the original post, the = character in =4.1.0 has been underlined in red.