Documentation
¶
Index ¶
- Variables
- func HandleReqRespSecrets(ctx context.Context, req kbapi.PackagePolicyRequest, resp *kbapi.PackagePolicy, ...) (diags diag.Diagnostics)
- func HandleRespSecrets(ctx context.Context, resp *kbapi.PackagePolicy, private privateData) (diags diag.Diagnostics)
- func NewResource() resource.Resource
- type InputType
- func (t InputType) Equal(o attr.Type) bool
- func (t InputType) String() string
- func (t InputType) ValueFromObject(_ context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics)
- func (t InputType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t InputType) ValueType(_ context.Context) attr.Value
- type InputValue
- func NewInputNull(attrTypes map[string]attr.Type) InputValue
- func NewInputUnknown(attrTypes map[string]attr.Type) InputValue
- func NewInputValue(attrTypes map[string]attr.Type, attributes map[string]attr.Value) (InputValue, diag.Diagnostics)
- func NewInputValueFrom(ctx context.Context, attrTypes map[string]attr.Type, val any) (InputValue, diag.Diagnostics)
- func (v InputValue) EnabledByDefault(ctx context.Context) (bool, diag.Diagnostics)
- func (v InputValue) Equal(o attr.Value) bool
- func (v InputValue) MaybeEnabled(ctx context.Context) (bool, diag.Diagnostics)
- func (v InputValue) ObjectSemanticEquals(ctx context.Context, newValuable basetypes.ObjectValuable) (bool, diag.Diagnostics)
- func (v InputValue) Type(ctx context.Context) attr.Type
- type InputsType
- func (t InputsType) Equal(o attr.Type) bool
- func (t InputsType) String() string
- func (t InputsType) ValueFromMap(_ context.Context, in basetypes.MapValue) (basetypes.MapValuable, diag.Diagnostics)
- func (t InputsType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t InputsType) ValueType(_ context.Context) attr.Value
- type InputsValue
- func NewInputsNull(elemType InputType) InputsValue
- func NewInputsUnknown(elemType InputType) InputsValue
- func NewInputsValue(elemType InputType, elements map[string]attr.Value) (InputsValue, diag.Diagnostics)
- func NewInputsValueFrom(ctx context.Context, elemType InputType, elements any) (InputsValue, diag.Diagnostics)
- type VarsJSONType
- func (t VarsJSONType) Equal(o attr.Type) bool
- func (t VarsJSONType) String() string
- func (t VarsJSONType) ValueFromString(ctx context.Context, in basetypes.StringValue) (basetypes.StringValuable, diag.Diagnostics)
- func (t VarsJSONType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t VarsJSONType) ValueType(ctx context.Context) attr.Value
- type VarsJSONValue
Constants ¶
This section is empty.
Variables ¶
var ( MinVersionPolicyIDs = version.Must(version.NewVersion("8.15.0")) MinVersionOutputID = version.Must(version.NewVersion("8.16.0")) )
Functions ¶
func HandleReqRespSecrets ¶ added in v0.11.9
func HandleReqRespSecrets(ctx context.Context, req kbapi.PackagePolicyRequest, resp *kbapi.PackagePolicy, private privateData) (diags diag.Diagnostics)
HandleReqRespSecrets extracts the wrapped value from each response var, then maps any secret refs to the original request value.
func HandleRespSecrets ¶ added in v0.11.9
func HandleRespSecrets(ctx context.Context, resp *kbapi.PackagePolicy, private privateData) (diags diag.Diagnostics)
HandleRespSecrets extracts the wrapped value from each response var, then replaces any secret refs with the original value from secrets if available.
func NewResource ¶
NewResource is a helper function to simplify the provider implementation.
Types ¶
type InputType ¶ added in v0.14.0
type InputType struct {
basetypes.ObjectType
}
InputType is a custom type for an individual input that supports semantic equality
func NewInputType ¶ added in v0.14.0
NewInputType creates a new InputType with the given attribute types
func (InputType) ValueFromObject ¶ added in v0.14.0
func (t InputType) ValueFromObject(_ context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics)
ValueFromObject returns an ObjectValuable type given a basetypes.ObjectValue.
func (InputType) ValueFromTerraform ¶ added in v0.14.0
ValueFromTerraform returns a Value given a tftypes.Value.
type InputValue ¶ added in v0.14.0
type InputValue struct {
basetypes.ObjectValue
}
InputValue is a custom value type for an individual input that implements semantic equality Semantic equality uses the defaults attribute to populate unspecified values before comparison
func NewInputNull ¶ added in v0.14.0
func NewInputNull(attrTypes map[string]attr.Type) InputValue
NewInputNull creates an InputValue with a null value.
func NewInputUnknown ¶ added in v0.14.0
func NewInputUnknown(attrTypes map[string]attr.Type) InputValue
NewInputUnknown creates an InputValue with an unknown value.
func NewInputValue ¶ added in v0.14.0
func NewInputValue(attrTypes map[string]attr.Type, attributes map[string]attr.Value) (InputValue, diag.Diagnostics)
NewInputValue creates an InputValue with a known value.
func NewInputValueFrom ¶ added in v0.14.0
func NewInputValueFrom(ctx context.Context, attrTypes map[string]attr.Type, val any) (InputValue, diag.Diagnostics)
NewInputValueFrom creates an InputValue from a Go value.
func (InputValue) EnabledByDefault ¶ added in v0.14.0
func (v InputValue) EnabledByDefault(ctx context.Context) (bool, diag.Diagnostics)
func (InputValue) Equal ¶ added in v0.14.0
func (v InputValue) Equal(o attr.Value) bool
Equal returns true if the given value is equivalent.
func (InputValue) MaybeEnabled ¶ added in v0.14.0
func (v InputValue) MaybeEnabled(ctx context.Context) (bool, diag.Diagnostics)
func (InputValue) ObjectSemanticEquals ¶ added in v0.14.0
func (v InputValue) ObjectSemanticEquals(ctx context.Context, newValuable basetypes.ObjectValuable) (bool, diag.Diagnostics)
ObjectSemanticEquals returns true if the given object value is semantically equal to the current object value. Semantic equality applies defaults from the defaults attribute before comparing values.
type InputsType ¶ added in v0.14.0
InputsType is a custom type for the inputs map that supports semantic equality
func NewInputsType ¶ added in v0.14.0
func NewInputsType(elemType InputType) InputsType
NewInputsType creates a new InputsType with the given element type
func (InputsType) Equal ¶ added in v0.14.0
func (t InputsType) Equal(o attr.Type) bool
Equal returns true if the given type is equivalent.
func (InputsType) String ¶ added in v0.14.0
func (t InputsType) String() string
String returns a human readable string of the type name.
func (InputsType) ValueFromMap ¶ added in v0.14.0
func (t InputsType) ValueFromMap(_ context.Context, in basetypes.MapValue) (basetypes.MapValuable, diag.Diagnostics)
ValueFromMap returns a MapValuable type given a basetypes.MapValue.
func (InputsType) ValueFromTerraform ¶ added in v0.14.0
ValueFromTerraform returns a Value given a tftypes.Value.
type InputsValue ¶ added in v0.14.0
InputsValue is a custom value type for the inputs map that implements semantic equality Disabled inputs (enabled=false) are ignored during equality checks
func NewInputsNull ¶ added in v0.14.0
func NewInputsNull(elemType InputType) InputsValue
NewInputsNull creates an InputsValue with a null value.
func NewInputsUnknown ¶ added in v0.14.0
func NewInputsUnknown(elemType InputType) InputsValue
NewInputsUnknown creates an InputsValue with an unknown value.
func NewInputsValue ¶ added in v0.14.0
func NewInputsValue(elemType InputType, elements map[string]attr.Value) (InputsValue, diag.Diagnostics)
NewInputsValue creates an InputsValue with a known value.
func NewInputsValueFrom ¶ added in v0.14.0
func NewInputsValueFrom(ctx context.Context, elemType InputType, elements any) (InputsValue, diag.Diagnostics)
NewInputsValueFrom creates an InputsValue from a map of Go values.
func (InputsValue) Equal ¶ added in v0.14.0
func (v InputsValue) Equal(o attr.Value) bool
Equal returns true if the given value is equivalent.
func (InputsValue) MapSemanticEquals ¶ added in v0.14.0
func (v InputsValue) MapSemanticEquals(ctx context.Context, priorValuable basetypes.MapValuable) (bool, diag.Diagnostics)
MapSemanticEquals returns true if the given map value is semantically equal to the current map value. Disabled inputs (enabled=false) are ignored during the comparison.
type VarsJSONType ¶ added in v0.14.0
type VarsJSONType struct {
customtypes.JSONWithContextualDefaultsType
}
func (VarsJSONType) Equal ¶ added in v0.14.0
func (t VarsJSONType) Equal(o attr.Type) bool
Equal returns true if the given type is equivalent.
func (VarsJSONType) String ¶ added in v0.14.0
func (t VarsJSONType) String() string
String returns a human readable string of the type name.
func (VarsJSONType) ValueFromString ¶ added in v0.14.0
func (t VarsJSONType) ValueFromString(ctx context.Context, in basetypes.StringValue) (basetypes.StringValuable, diag.Diagnostics)
ValueFromString returns a StringValuable type given a StringValue.
func (VarsJSONType) ValueFromTerraform ¶ added in v0.14.0
ValueFromTerraform returns a Value given a tftypes.Value. This is meant to convert the tftypes.Value into a more convenient Go type for the provider to consume the data with.
type VarsJSONValue ¶ added in v0.14.0
type VarsJSONValue struct {
customtypes.JSONWithContextualDefaultsValue
}
func NewVarsJSONNull ¶ added in v0.14.0
func NewVarsJSONNull() VarsJSONValue
NewVarsJSONNull creates a VarsJSONValue with a null value. Determine whether the value is null via IsNull method.
func NewVarsJSONUnknown ¶ added in v0.14.0
func NewVarsJSONUnknown() VarsJSONValue
NewVarsJSONUnknown creates a VarsJSONValue with an unknown value. Determine whether the value is unknown via IsUnknown method.
func NewVarsJSONWithIntegration ¶ added in v0.14.0
func NewVarsJSONWithIntegration(value string, name, version string) (VarsJSONValue, diag.Diagnostics)
NewVarsJSONWithIntegration creates a VarsJSONValue with a known value and a integration context. Access the value via ValueString method.
func (VarsJSONValue) Equal ¶ added in v0.14.0
func (v VarsJSONValue) Equal(o attr.Value) bool
Equal returns true if the given value is equivalent.
func (VarsJSONValue) StringSemanticEquals ¶ added in v0.14.0
func (v VarsJSONValue) StringSemanticEquals(ctx context.Context, newValuable basetypes.StringValuable) (bool, diag.Diagnostics)
StringSemanticEquals returns true if the given config object value is semantically equal to the current vars object value.