Files
terraform-provider-threshold/internal/provider/scope.go
T
hashicorp-copywrite[bot] 2248220850 [COMPLIANCE] Add/Update Copyright Headers (#799)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2026-05-11 20:53:55 -07:00

33 lines
598 B
Go

// Copyright IBM Corp. 2020, 2026
// SPDX-License-Identifier: MPL-2.0
package provider
import "github.com/hashicorp/boundary/api/scopes"
func flattenScopeInfo(scope *scopes.ScopeInfo) []interface{} {
if scope == nil {
return []interface{}{}
}
m := make(map[string]interface{})
if v := scope.Id; v != "" {
m[IDKey] = v
}
if v := scope.Type; v != "" {
m[TypeKey] = v
}
if v := scope.Description; v != "" {
m[DescriptionKey] = v
}
if v := scope.ParentScopeId; v != "" {
m[ParentScopeIdKey] = v
}
if v := scope.Name; v != "" {
m[NameKey] = v
}
return []interface{}{m}
}