Https://www.terraform.io/docs/providers/azurerm/r/hdinsight_hadoop_cluster.html

We would like to find the module options under “azurerm_hdinsight_hadoop_cluster” by which we can enable security in the cluster.

This security feature can be enabled with option “Enterprise security package” from Azure portal as also can be seen via the below link.

I have gone through the official documentation page (https://www.terraform.io/docs/providers/azurerm/r/hdinsight_hadoop_cluster.html) from terraform and I cannot find the options.

Also, please note we were able to achieve it using azure cli but we are exploring a way to implement it using terraform.

az hdinsight create –esp -t hadoop -g RG-US-hadoop -n xxxx -p “xxxx” --version 4.0 --storage-account xxxx --subnet “/subscriptions/xxxx/resourceGroups/RG-US-hadoop/providers/Microsoft.Network/virtualNetworks/aadds-vnet/subnets/aadds-subnet” --domain “/subscriptions/xxxx/resourceGroups/RG-US-hadoop/providers/Microsoft.AAD/domainServices/xxxx.xxx” --assign-identity “/subscriptions/xxxx/resourceGroups/RG-US-hadoop/providers/Microsoft.ManagedIdentity/userAssignedIdentities/hdinsights_mi” --cluster-admin-account xxxx@xxx.xxx --cluster-users-group-dns xxxx

Please also note that when I run terraform apply on the attachedhdinsights.txt (2.3 KB) code it throws error. please help me how to fix this.

PS C:\Orange\Azure\POC_hdinsights\hdinsights_code> terraform validate

Error: Unsupported block type

on hdinsights.tf line 73, in resource “azurerm_hdinsight_hadoop_cluster” “hdinsights_cluster”:
73: security {

Blocks of type “security” are not expected here.

PS C:\Orange\Azure\POC_hdinsights\hdinsights_code> terraform version
Terraform v0.12.20

  • provider.azurerm v1.35.0
    PS C:\Orange\Azure\POC_hdinsights\hdinsights_code>

Hello!

The Enterprise Security Package has a Github Issue open here. Please upvote on the issue! Note that it might be fixed by a PR, which is listed in the issue. That will be the best way to track whether or not the feature gets merged.

As for the security block error you received, this is because there is no implementation in the hdinsight_hadoop_cluster resource that has security. It currently not in the documentation or in the Terraform provider implementation. If you remove the security block within the resource, the Terraform configuration will plan!