Documentation ¶
Index ¶
- func AttributeTypes[T any](ctx context.Context) (map[string]attr.Type, error)
- func ExpandFrameworkObject[ObjectT any, ExpandT any](ctx context.Context, object types.Object, f func(ObjectT) *ExpandT) *ExpandT
- func ExpandFrameworkSet[SetT any, ExpandT any](ctx context.Context, set types.Set, f func(SetT) ExpandT) []ExpandT
- func ExpandFrameworkStringSet(ctx context.Context, tfSet types.Set) []string
- func FlattenFrameworkSet[T any](ctx context.Context, elementType attr.Type, list []T, f func(T) attr.Value) types.Set
- func PrettyOneOf[T ~string](options []T) string
- func PrettyRFC3339Timestamp() string
- func ResourceSchemaToDataSourceSchema(resourceSchema map[string]resource_schema.Attribute, idField *string) map[string]datasource_schema.Attribute
- func StringFromFramework(_ context.Context, v types.String) *string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttributeTypes ¶
AttributeTypes returns a map of attribute types for the specified type T. T must be a struct and reflection is used to find exported fields of T with the `tfsdk` tag.
func ExpandFrameworkObject ¶ added in v0.3.0
func ExpandFrameworkObject[ObjectT any, ExpandT any](ctx context.Context, object types.Object, f func(ObjectT) *ExpandT) *ExpandT
ExpandFrameworkObject converts a framework Object value to a value of type ExpandT according to the specified map function f.
If the framework value is null or unknown, or if an error occurs when converting the object into a value of type ObjectT, nil is returned.
func ExpandFrameworkSet ¶
func ExpandFrameworkSet[SetT any, ExpandT any](ctx context.Context, set types.Set, f func(SetT) ExpandT) []ExpandT
ExpandFrameworkSet converts a framework Set value to a slice of values according to the specified map function f.
If the framework value is null or unknown, or if an error occurs when first converting the set into a slice of type SetT, an empty slice is returned.
func ExpandFrameworkStringSet ¶
ExpandFrameworkStringSet converts a framework Set value to a slice of string values.
If the framework value is null or unknown, or if an error occurs when first converting the set into a slice of element type string, an empty slice is returned.
func FlattenFrameworkSet ¶
func FlattenFrameworkSet[T any](ctx context.Context, elementType attr.Type, list []T, f func(T) attr.Value) types.Set
FlattenFrameworkSet converts an arbitrary slice to a framework Set value of the specified elementType and map function f to do the conversion.
If the slice has 0 elements, then an empty set is returned.
func PrettyOneOf ¶
PrettyOneOf returns "(one of options...)"
func PrettyRFC3339Timestamp ¶
func PrettyRFC3339Timestamp() string
PrettyRFC3339Timestamp returns "formatted as a UTC timestamp string in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format"
func ResourceSchemaToDataSourceSchema ¶
func ResourceSchemaToDataSourceSchema(resourceSchema map[string]resource_schema.Attribute, idField *string) map[string]datasource_schema.Attribute
ResourceSchemaToDataSourceSchema converts a resource schema to a data source schema by copying all common fields between the two schemas, and setting required = true for the specified id field
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
bzdatasource provides abstractions that make it easier to write data sources for the BastionZero API.
|
bzdatasource provides abstractions that make it easier to write data sources for the BastionZero API. |
Package testgen provides property based test (PBT) generators that can be used to test properties of the Terraform provider implementation
|
Package testgen provides property based test (PBT) generators that can be used to test properties of the Terraform provider implementation |
bzgen
Package bzgen provides property based test (PBT) generators for BastionZero API types
|
Package bzgen provides property based test (PBT) generators for BastionZero API types |
bzgen/bzpolicygen
Package bzpolicygen provides property based test (PBT) generators for BastionZero policy API types
|
Package bzpolicygen provides property based test (PBT) generators for BastionZero policy API types |
tfgen
Package tfgen provides property based test (PBT) generators for BastionZero Terraform Provider schema model types
|
Package tfgen provides property based test (PBT) generators for BastionZero Terraform Provider schema model types |
tfgen/tfpolicygen
Package tfpolicygen provides property based test (PBT) generators for BastionZero Terraform Provider policy schema model types
|
Package tfpolicygen provides property based test (PBT) generators for BastionZero Terraform Provider policy schema model types |