create

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrActionChecking             = "checking"
	ErrActionCheckingDestroyed    = "checking destroyed"
	ErrActionCheckingExistence    = "checking existence"
	ErrActionCheckingNotRecreated = "checking not recreated"
	ErrActionCheckingRecreated    = "checking recreated"
	ErrActionCreating             = "creating"
	ErrActionDeleting             = "deleting"
	ErrActionImporting            = "importing"
	ErrActionReading              = "reading"
	ErrActionSetting              = "setting"
	ErrActionUpdating             = "updating"
	ErrActionWaitingForCreation   = "waiting for creation"
	ErrActionWaitingForDeletion   = "waiting for delete"
	ErrActionWaitingForUpdate     = "waiting for update"
)

Variables

This section is empty.

Functions

func AddWarning

func AddWarning(diags diag.Diagnostics, service, action, resource, id string, gotError error) diag.Diagnostics

AddWarning returns diag.Diagnostics with an additional diag.Diagnostic containing a warning using a standardized problem message

func AddWarningNotFoundRemoveState

func AddWarningNotFoundRemoveState(service, action, resource, id string) diag.Diagnostics

AddWarningNotFoundRemoveState returns diag.Diagnostics with an additional diag.Diagnostic containing a warning using a standardized problem message

func DiagError

func DiagError(service, action, resource, id string, gotError error) diag.Diagnostics

DiagError returns a 1-length diag.Diagnostics with a diag.Error-level diag.Diagnostic with a standardized error message

func DiagSettingError

func DiagSettingError(service, resource, id, argument string, gotError error) diag.Diagnostics

DiagSettingError returns an errors.Error with a standardized error message when setting arguments and attributes values.

func Error

func Error(service, action, resource, id string, gotError error) error

Error returns an errors.Error with a standardized error message

func LogNotFoundRemoveState

func LogNotFoundRemoveState(service, action, resource, id string)

func Name

func Name(name string, namePrefix string) string

Name returns in order the name if non-empty, a prefix generated name if non-empty, or fully generated name prefixed with terraform-

func NamePrefixFromName

func NamePrefixFromName(name string) *string

NamePrefixFromName returns a name prefix if the string matches prefix criteria

The input to this function must be strictly the "name" and not any additional information such as a full Amazon Resource Name (ARN).

An expected usage might be:

d.Set("name_prefix", create.NamePrefixFromName(d.Id()))

func NamePrefixFromNameWithSuffix

func NamePrefixFromNameWithSuffix(name, nameSuffix string) *string

func NameWithSuffix

func NameWithSuffix(name string, namePrefix string, nameSuffix string) string

NameWithSuffix returns in order the name if non-empty, a prefix generated name if non-empty, or fully generated name prefixed with "terraform-". In the latter two cases, any suffix is appended to the generated name

func ProblemStandardMessage

func ProblemStandardMessage(service, action, resource, id string, gotError error) string

ProblemStandardMessage is a standardized message for reporting errors and warnings

func SettingError

func SettingError(service, resource, id, argument string, gotError error) error

ErrorSetting returns an errors.Error with a standardized error message when setting arguments and attributes values.

func StringHashcode

func StringHashcode(s string) int

StringHashcode hashes a string to a unique hashcode.

crc32 returns a uint32, but for our use we need and non negative integer. Here we cast to an integer and invert it if the result is negative.

func WarnLog

func WarnLog(service, action, resource, id string, gotError error)

WarnLog logs to the default logger a standardized problem message

Types

This section is empty.

Jump to

Keyboard shortcuts

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