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

stringplanmodifier

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package stringplanmodifier provides a plan modifier for string values.

Package stringplanmodifier provides a plan modifier for string values.

Package stringplanmodifier provides a plan modifier for string values.

Package stringplanmodifier provides a plan modifier for string values.

Package stringplanmodifier provides a plan modifier for string values.

Package stringplanmodifier provides a plan modifier for string values.

Package stringplanmodifier provides a plan modifier for string values.

Package stringplanmodifier provides a plan modifier for string values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireReplaceIfBool

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

RequireReplaceIfBool

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

func SetDefault

func SetDefault(str string) planmodifier.String

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 SetDefaultEmptyString

func SetDefaultEmptyString() planmodifier.String

SetDefaultEmptyString 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 SetDefaultEnvVar

func SetDefaultEnvVar(envVar string) planmodifier.String

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.String

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

func ToLower

func ToLower() planmodifier.String

func ToUpper

func ToUpper() planmodifier.String

Types

type DefaultFunc

DefaultFunc is a function that can be used to set a default value for a string 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 string
}

DefaultFuncResponse is the response type for a DefaultFunc.

type StringChangeFunc

StringChangeFunc is a function that can be used to change a string value.

type StringChangeFuncResponse

type StringChangeFuncResponse 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 types.String
}

StringChangeFuncResponse 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