Help us shape the future of Go! Take the 2026 Go Developer Survey

boolplanmodifier

package
v1.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package boolplanmodifier provides a plan modifier for boolean values.

Package boolplanmodifier provides a plan modifier for boolean values.

Package boolplanmodifier provides a plan modifier for boolean values.

Package boolplanmodifier provides a plan modifier for boolean values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireReplaceIfBool

func RequireReplaceIfBool(path path.Path, exceptedValue bool) planmodifier.Bool

RequireReplaceIfBool

returns a plan modifier that requires replacement if the attribute value is equal to the excepted value.

func SetDefault

func SetDefault(str bool) planmodifier.Bool

SetDefault

SetDefault returns a plan modifier that sets the plan value to the provided value if the following conditions are met:

  • The resource is planned for update.
  • The plan and state values are not equal.
  • The plan or state values are not null or known

func SetDefaultEnvVar

func SetDefaultEnvVar(envVar string) planmodifier.Bool

SetDefaultEnvVar returns a plan modifier that conditionally requires resource replacement if:

  • The resource is planned for update.
  • The plan and state values are not equal.
  • The plan or state values are not null or known

func SetDefaultFunc

func SetDefaultFunc(f DefaultFunc) planmodifier.Bool

SetDefaultFunc returns a plan modifier that conditionally requires resource replacement if:

  • The resource is planned for update.
  • The plan and state values are not equal.
  • The plan or state values are not null or known

Types

type DefaultFunc

DefaultFunc is a function that can be used to set a default value for a boolean attribute.

type DefaultFuncResponse

type DefaultFuncResponse struct {
	// Diagnostics report errors or warnings related to this logic. An empty
	// or unset slice indicates success, with no warnings or errors generated.
	Diagnostics diag.Diagnostics

	// Value is the value to use by default if the attribute is not configured.
	Value bool
}

DefaultFuncResponse is the response type for a DefaultFunc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL