validators

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomBranchValidator

type CustomBranchValidator struct{}

CustomBranchValidator validates that custom_branch is set when use_custom_branch is true. This validator should be attached to the custom_branch field.

func (CustomBranchValidator) Description

func (v CustomBranchValidator) Description(ctx context.Context) string

func (CustomBranchValidator) MarkdownDescription

func (v CustomBranchValidator) MarkdownDescription(ctx context.Context) string

func (CustomBranchValidator) ValidateString

type PrimaryProfileValidator added in v1.8.0

type PrimaryProfileValidator struct{}

PrimaryProfileValidator returns an error when primary_profile_id is set alongside connection_id, credential_id, or extended_attributes_id. When a profile is assigned, the API mirrors the profile's values onto the environment, so direct field values would conflict with the API-determined values and cause inconsistent Terraform state.

func (PrimaryProfileValidator) Description added in v1.8.0

func (v PrimaryProfileValidator) Description(ctx context.Context) string

func (PrimaryProfileValidator) MarkdownDescription added in v1.8.0

func (v PrimaryProfileValidator) MarkdownDescription(ctx context.Context) string

func (PrimaryProfileValidator) ValidateInt64 added in v1.8.0

type UseCustomBranchValidator

type UseCustomBranchValidator struct{}

UseCustomBranchValidator validates that use_custom_branch requires custom_branch to be set. This validator should be attached to the use_custom_branch field.

func (UseCustomBranchValidator) Description

func (v UseCustomBranchValidator) Description(ctx context.Context) string

func (UseCustomBranchValidator) MarkdownDescription

func (v UseCustomBranchValidator) MarkdownDescription(ctx context.Context) string

func (UseCustomBranchValidator) ValidateBool

type UseStateWhenConfigSet added in v1.8.0

type UseStateWhenConfigSet struct{}

UseStateWhenConfigSet is a plan modifier for Optional+Computed attributes that preserves the prior state value only when the attribute is present in config. When the user removes the attribute from config (null), the planned value is set to null instead of carrying forward the prior state.

This differs from the built-in UseStateForUnknown which always copies state into an unknown plan value, even when the config no longer sets the field.

func (UseStateWhenConfigSet) Description added in v1.8.0

func (m UseStateWhenConfigSet) Description(_ context.Context) string

func (UseStateWhenConfigSet) MarkdownDescription added in v1.8.0

func (m UseStateWhenConfigSet) MarkdownDescription(_ context.Context) string

func (UseStateWhenConfigSet) PlanModifyInt64 added in v1.8.0

type UseUnknownWhenProfileChanges added in v1.8.0

type UseUnknownWhenProfileChanges struct{}

UseUnknownWhenProfileChanges is a plan modifier that sets a field to unknown when primary_profile_id is being newly set or changed. When the profile is stable (config matches state), the existing state value is preserved so the plan can settle. This prevents both "inconsistent result after apply" errors and perpetual diffs for connection_id, credential_id, and extended_attributes_id, which the API mirrors from the profile onto the environment.

func (UseUnknownWhenProfileChanges) Description added in v1.8.0

func (UseUnknownWhenProfileChanges) MarkdownDescription added in v1.8.0

func (m UseUnknownWhenProfileChanges) MarkdownDescription(_ context.Context) string

func (UseUnknownWhenProfileChanges) PlanModifyInt64 added in v1.8.0

Jump to

Keyboard shortcuts

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