planmodifiers

package
v0.0.84 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeTrailingNewlines added in v0.0.84

func NormalizeTrailingNewlines() planmodifier.String

NormalizeTrailingNewlines returns a plan modifier that trims trailing newline characters from the planned value. Use this when the API strips trailing newlines from a field, which would otherwise cause "inconsistent result after apply" errors.

func RequiresReplaceIfCleared

func RequiresReplaceIfCleared(summary, detail string) planmodifier.String

RequiresReplaceIfCleared returns a plan modifier that triggers resource replacement when an attribute that was previously set is cleared from the configuration. This is intended for API fields that accept a value on create/update but cannot be unset afterward — the only way to remove the value is to destroy and recreate the resource.

The modifier is a no-op during initial creation (state is null) and when the attribute was never set (state value is null or empty). It only fires when the state holds a non-empty value and the config removes it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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