You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
terraform {
required_version=">= 1.5.7"# Intentional typo below to force a crash. The correct would be "google-beta" instead.provider_meta"google_beta" { #hello="world"
}
}
Debug Output
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Terraform crashed! This is always indicative of a bug within Terraform.
Please report the crash with Terraform[1] so that we can fix this.
When reporting bugs, please include your terraform version, the stack trace
shown below, and any additional information which may help replicate the issue.
[1]: https://github.com/hashicorp/terraform/issues
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
panic: must contain only letters, digits, and dashes, and may not use leading or trailing dashes
goroutine 1 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x5e
github.com/hashicorp/terraform/internal/logging.PanicHandler()
github.com/hashicorp/terraform/internal/logging/panic.go:84 +0x18b
panic({0x2e73cc0?, 0xc0003e07d0?})
runtime/panic.go:770 +0x132
github.com/hashicorp/terraform/internal/addrs.MustParseProviderPart({0xc00074a170?, 0xc0008ca6e8?})
github.com/hashicorp/terraform/internal/addrs/provider.go:193 +0x45
github.com/hashicorp/terraform/internal/addrs.NewDefaultProvider(...)
github.com/hashicorp/terraform/internal/addrs/provider.go:89
github.com/hashicorp/terraform/internal/addrs.ImpliedProviderForUnqualifiedType({0xc00074a170?, 0x7bbf85a79ef8?})
github.com/hashicorp/terraform/internal/addrs/provider.go:81 +0x10e
github.com/hashicorp/terraform/internal/configs.(*Module).ImpliedProviderForUnqualifiedType(...)
github.com/hashicorp/terraform/internal/configs/module.go:694
github.com/hashicorp/terraform/internal/configs.(*Module).ProviderForLocalConfig(0x0?, {{0xc00074a170?, 0x200025?}, {0x0?, 0x314ab00?}})
github.com/hashicorp/terraform/internal/configs/module.go:680 +0xaf
github.com/hashicorp/terraform/internal/configs.(*Module).appendFile(0xc0005c2000, 0xc0007681a0)
github.com/hashicorp/terraform/internal/configs/module.go:269 +0xda8
github.com/hashicorp/terraform/internal/configs.NewModule({0xc000133db0, 0x1, 0x1?}, {0x0, 0x0, 0x1?})
github.com/hashicorp/terraform/internal/configs/module.go:169 +0x4d5
github.com/hashicorp/terraform/internal/configs.NewModuleWithTests(...)
github.com/hashicorp/terraform/internal/configs/module.go:102
github.com/hashicorp/terraform/internal/configs.(*Parser).LoadConfigDirWithTests(0xc000a150c0, {0x3dc2468, 0x1}, {0x3524347?, 0x0?})
github.com/hashicorp/terraform/internal/configs/parser_config_dir.go:73 +0x39b
github.com/hashicorp/terraform/internal/command.(*Meta).loadSingleModuleWithTests(0xc0006828c0, {0xc000082004?, 0xc00042ba70?}, {0x3524347, 0x5})
github.com/hashicorp/terraform/internal/command/meta_config.go:108 +0xac
github.com/hashicorp/terraform/internal/command.(*InitCommand).Run(0xc0006828c0, {0xc000118030?, 0x0?, 0x0?})
github.com/hashicorp/terraform/internal/command/init.go:163 +0xe7e
github.com/hashicorp/cli.(*CLI).Run(0xc0003ec280)
github.com/hashicorp/[email protected]/cli.go:265 +0x5b8
main.realMain()
github.com/hashicorp/terraform/main.go:339 +0x1e6b
main.main()
github.com/hashicorp/terraform/main.go:64 +0x13
Expected Behavior
I would expect a handled error message or a successful run when I run terraform init and the configuration files has a provider_meta with an underline (_), or a dot (.) within a string.
Actual Behavior
Currently, if you update the above's code to provider_meta "google-beta-typooooooo" and run a terraform init, it will return Terraform has been successfully initialized!. A successful run.
But a simple typo, provider_meta "google_beta" instead of provider_meta "google-beta" will cause a terraform crash error, and it won't be clear to users why this crash is happening. In a large codebase it can be hard to figure it out why this crash is happening.
Steps to Reproduce
terraform init
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
I would expect a handled error message or a successful run when I run
terraform init
and the configuration files has aprovider_meta
with an underline (_
), or a dot (.
) within a string.Actual Behavior
Currently, if you update the above's code to
provider_meta "google-beta-typooooooo"
and run aterraform init
, it will returnTerraform has been successfully initialized!
. A successful run.But a simple typo,
provider_meta "google_beta"
instead ofprovider_meta "google-beta"
will cause a terraform crash error, and it won't be clear to users why this crash is happening. In a large codebase it can be hard to figure it out why this crash is happening.Steps to Reproduce
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: