utils

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListValuetoStringSlice

func ListValuetoStringSlice(list basetypes.ListValue) ([]string, error)

func ReconcileStringSlices

func ReconcileStringSlices(list1, list2 []string) []string

ReconcileStringSlices reconciles two string lists by removing elements from the first list that are not in the second list and appending elements from the second list that are not in the first list. This preserves the order of the elements in the first list that are also in the second list, which is useful when using ListAttributes in Terraform. The source of truth for the order is the first list and the source of truth for the content is the second list.

func SimplifyBackupSchedule added in v0.19.0

func SimplifyBackupSchedule(schedule string) string

Remove leading 0s from backup schedule numbers (e.g. "00 00 * * *" becomes "0 0 * * *") Needed as the API does it internally and would otherwise cause inconsistent result in Terraform

Types

This section is empty.

Jump to

Keyboard shortcuts

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