mirror of
https://github.com/LukeHagar/plexterraform.git
synced 2025-12-06 04:20:52 +00:00
26 lines
652 B
Go
26 lines
652 B
Go
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
|
|
package utils
|
|
|
|
import (
|
|
"context"
|
|
"github.com/hashicorp/terraform-plugin-framework/attr"
|
|
"github.com/hashicorp/terraform-plugin-framework/path"
|
|
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
|
|
)
|
|
|
|
func IsAllStateUnknown(ctx context.Context, state tfsdk.State) bool {
|
|
attrs := state.Schema.GetAttributes()
|
|
anyFound := false
|
|
for k, _ := range attrs {
|
|
attrValue := new(attr.Value)
|
|
state.GetAttribute(ctx, path.Root(k), attrValue)
|
|
if attrValue != nil && !(*attrValue).IsUnknown() && !(*attrValue).IsNull() {
|
|
anyFound = true
|
|
break
|
|
}
|
|
}
|
|
|
|
return !anyFound
|
|
}
|