Problem
When you use the tfe provider in your Terraform configuration, you may encounter the following error during the plan phase:
Error: idna: disallowed rune U+002F
with provider["registry.terraform.io/hashicorp/tfe"] on XXX.tf line X, in provider "tfe":
provider "tfe" {Cause
This error occurs when the value for the hostname argument in the tfe provider configuration, or the TFE_HOSTNAME environment variable, contains a forward slash (/) character. This commonly happens when a trailing slash is included in the URL, such as app.terraform.io/.
Solution
To resolve this error, remove any forward slash (/) characters from the value provided for the hostname argument or the TFE_HOSTNAME environment variable.
Incorrect Configuration
The following configuration will cause the error because the hostname value includes a trailing slash.
provider "tfe" {
hostname = "app.terraform.io/" ## Incorrect: contains a trailing slash
}Correct Configuration
Remove the trailing slash to correct the configuration.
provider "tfe" {
hostname = "app.terraform.io" ## Correct: no trailing slash
}