Search code examples
terraformazure-rm

Error: Unsupported argument while deploying azure resource tls version


Helo Guys,

I have created the eventhub with terrafrom but it get deployed using TLS_verisn =1.0 now i want to change it to TLS version 1.2. When i am trying to update this TLS change it throwing me error like " Error: Unsupported argument minimum_tls_version = 1.2 │An argument named "minimum_tls_version" is not expected here.

Note : My enter image description hereazurerm verison with "3.65"

Any suggestion how can i fix this error message ?


Solution

  • Error: Unsupported argument while deploying azure resource tls version.

    minimum_tls_version in Terraform it supports latest Azurerm providers. check the same issue in Github

    I updated the TLS version in Azure Event Hub using the latest AzureRM provider (v3.77.0)

    To resolve the issue, update your AzureRM version to the latest.

        provider "azurerm" {
          features {}
        }
        
        resource "azurerm_resource_group" "example" {
          name     = "example-resources"
          location = "West Europe"
        }
        
        resource "azurerm_eventhub_namespace" "example" {
          name                = "demo-namespace"
          location            = azurerm_resource_group.example.location
          resource_group_name = azurerm_resource_group.example.name
          sku                 = "Standard"
          capacity            = 2
          minimum_tls_version = 1.1
        
          tags = {
            environment = "Production"
          }
        }
    

    AzureRM Version:

    enter image description here

    Terraform Apply:

    Once Terraform code run, Event Hub TLS version has been updated.

    enter image description here