utils

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListIDsToModify

func ListIDsToModify(
	ctx context.Context,
	plan, state types.List,
) (idsToAdd []string, idsToRemove []string, diags diag.Diagnostics)

ListIDsToModify takes a list of unique IDs from plan and state and returns the IDs to add and remove to get from the state to the plan. idsToAdd is the slice of IDs that are in the plan but not in the state. idsToRemove is the slice of IDs that are in the state but not in the plan. useful for resources with HostGroups, RuleGroups, etc.

func SetIDsToModify

func SetIDsToModify(
	ctx context.Context,
	plan, state types.Set,
) (idsToAdd []string, idsToRemove []string, diags diag.Diagnostics)

SetIDsToModify takes a set of IDs from plan and state and returns the IDs to add and remove to get from the state to the plan. idsToAdd is the slice of IDs that are in the plan but not in the state. idsToRemove is the slice of IDs that are in the state but not in the plan. useful for resources with HostGroups, RuleGroups, etc.

Types

This section is empty.

Jump to

Keyboard shortcuts

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