-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Panic thrown if Optional or Required not set to true #31211
Copy link
Copy link
Closed
Labels
bugnewnew issue not yet triagednew issue not yet triagedwaiting-responseAn issue/pull request is waiting for a response from the communityAn issue/pull request is waiting for a response from the community
Description
Terraform Version
Terraform v1.2.2
on darwin_amd64
+ provider registry.terraform.io/hashicorp/google v4.24.0
Terraform Configuration Files
data "scaffolding_example" "test" {
configurable_attribute = "example"
}Debug Output
Expected Behavior
Expecting the modified example data source to work. Modification included an object set with "Required: false" + markdown and type.
Actual Behavior
Panic attack thrown when example_data_source_test.go run
Steps to Reproduce
- Instantiate a terraform plugin frameworks template.2.
- Modify the example_data_source.go code to add a new attribute test with markdown, type, and required set to false.
- Run the test and a panic attack will result4.
- Make sure all modifications include either a Required: true or Optional: true and the test will pass.5.
Additional Context
Nothing atypical. Took a while to find the issue.
Note: if you change the name of the provider, the provider_test.go must be updated or none of the tests will pass. This was not obvious in any documentation. Naming is hyper-sensitive to get plugin working. Additional diagnostics would be very helpful.
References
Unknown
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugnewnew issue not yet triagednew issue not yet triagedwaiting-responseAn issue/pull request is waiting for a response from the communityAn issue/pull request is waiting for a response from the community