-
Notifications
You must be signed in to change notification settings - Fork 18
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
The code generator fails to generate valid code for plan_modifiers
#115
Comments
@bendbennett Is this under development? |
Hi @TheNilesh 👋 Sorry you ran into trouble here. The processing of plan modifiers specified with Replace the following: "plan_modifiers": [
{
"use_state_for_unknown": {}
}
] Replace with: "plan_modifiers": [
{
"custom": {
"imports": [
{
"path": "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
}
],
"schema_definition": "stringplanmodifier.UseStateForUnknown()"
}
}
] We will discuss handling of |
References:
A PR has been opened to remove Framework-specific implementation details from the codegen-spec schema. Issues have been opened on codegen-spec, and codegen-framework to consider inclusion, and handling of Terraform-specific behaviour properties, respectively. |
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. |
tfplugingen-framework CLI version
tfplugingen-framework module: v0.3.1
Provider Code Spec File
Expected Behavior
For the
id
field generated code to be similar to thisImports:
And the generated schema function should be:
Actual Behavior
The generated code does not generate import statements. Hence the IDE complains:
planmodifier
is undefined.Additional Information
The schema is available at https://github.com/hashicorp/terraform-plugin-codegen-spec/blob/main/spec/v0.1/schema.json#L3589
Code of Conduct
The text was updated successfully, but these errors were encountered: