-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: provider
block inside resource
causes crash on plan
#5740
Comments
provider
block inside resource
causes crash on plan
This now gives an error instead of a panic when encountering configuration such as described in hashicorp/terraform#5740: ``` resource "aws" "web" { provider = "aws" { region = "us-west-2" } } ``` We now return an error message - "hcl object keys must be a string" instead of crashing. Fixes hashicorp/terraform#5740.
This should be fixed by hashicorp/hcl#105 - once that has been reviewed and merged (likely later today when the US timezones come one) we can update the vendored version for a fix in 0.6.14. As you say - this is invalid configuration (though that is no excuse for a crash!): what you probably want is:
Thanks for reporting this! |
This now gives an error instead of a panic when encountering configuration such as described in hashicorp/terraform#5740: ``` resource "aws" "web" { provider = "aws" { region = "us-west-2" } } ``` We now return an error message - "hcl object keys must be a string" instead of crashing. Fixes hashicorp/terraform#5740.
This now gives an error instead of a panic when encountering configuration such as described in hashicorp/terraform#5740: ``` resource "aws" "web" { provider = "aws" { region = "us-west-2" } } ``` We now return an error message - "hcl object keys must be a string" instead of crashing. Fixes hashicorp/terraform#5740.
Closed this by mistake when the HCL fix got merged - it will actually be fixed in Terraform when #5749 lands. |
Thanks for addressign this Jen. Hope the report was helpful. |
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. |
I've just downloaded and started playing around with Terraform. Creating a simple
aws.tf
config file, then runningterraform plan
, gave a _panic: runtime error: index out of range_ .Here's the version.
Here's the (probably erroneous) config file.
And here's the crash log
The text was updated successfully, but these errors were encountered: