I get the following warning in terraform cloud which is connected to azure. How can i resolve this error ?
Thanks a lot
I get the following warning in terraform cloud which is connected to azure. How can i resolve this error ?
Thanks a lot
Copyright © 2021 Jogjafile Inc.

This warning is asking you to decide between the following options:
variable "ARM_CLIENT_ID"block and avariable "ARM_TENANT_ID"block to your root module to declare each of these input variables.ARM_CLIENT_IDandARM_TENANT_IDfrom the input variables you've defined in the Terraform Cloud workspace settings, if they are not needed at all.TF_VAR_ARM_CLIENT_IDandTF_VAR_ARM_TENANT_IDso that Terraform will just ignore them if there isn't any declaration.However, I think this warning message is misleading you in this case because I think Terraform has misunderstood what you intended to do and is therefore suggesting solutions that don't make sense for what you intend to do.
I happen to know that
ARM_CLIENT_IDandARM_TENANT_IDare environment variable names that thehashicorp/azureprovider will use, and so I expect that you don't intend them to be Terraform variables at all, and were instead trying to set the environment variables for the provider.If that's true, then I suggest you first carry out the option 2 I mentioned above -- removing the declarations of those variables altogether. But then in addition to that, also add Environment Variables (which are separate from Terraform Variables) for
ARM_CLIENT_IDandARM_TENANT_IDin the Terraform Cloud workspace settings.By doing these two steps you should first quiet this warning but then separately you'll also give the Azure provider what it needs to work. If you only do my option 2 above without also adding the environment variables then you will quiet the warning but instead see an error from the
hashicorp/azurermprovider that it isn't properly configured.