-
Notifications
You must be signed in to change notification settings - Fork 99
Closed as not planned
Closed as not planned
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Module version
github.com/hashicorp/terraform-plugin-framework v1.13.0
Relevant provider source code
https://github.com/valentindeaconu/terraform-provider-func/blob/a282896fd2da6427afb2340d21f575c30cc61121/internal/provider/provider.go#L111-L202
https://github.com/valentindeaconu/terraform-provider-func/blob/a282896fd2da6427afb2340d21f575c30cc61121/internal/provider/provider.go#L226-L250Terraform Configuration Files
terraform {
required_providers {
func = {
source = "valentindeaconu/func"
version = "0.1.0"
}
}
}
provider "func" {
library {
source = "file://${path.module}/library.js"
}
}
output "results" {
value = {
sum = provider::func::sum(10, 5) # Expected result => 15
}
}
Debug Output
https://gist.github.com/valentindeaconu/157501a91c011f3c719baed846076802
Expected Behavior
I am expecting Terraform to initially call the provider's Configure method, so the ProviderData is initialised, then call the Functions method, to get the provider's functions. Or, at least, call the Functions twice (at least once after the Configure method), as it does for Resources and DataSources methods and leave the graceful failure handling to the provider developer.
Actual Behavior
The Functions method gets called only once, and since the Functions slice is only known after parsing the provider configuration, it is empty at the time of the call, making Terraform crash.
Steps to Reproduce
terraform initterraform plan
References
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working