Documentation ¶
Index ¶
- Constants
- func AddWarning(diags diag.Diagnostics, service, action, resource, id string, gotError error) diag.Diagnostics
- func AddWarningNotFoundRemoveState(service, action, resource, id string) diag.Diagnostics
- func DiagError(service, action, resource, id string, gotError error) diag.Diagnostics
- func DiagSettingError(service, resource, id, argument string, gotError error) diag.Diagnostics
- func Error(service, action, resource, id string, gotError error) error
- func LogNotFoundRemoveState(service, action, resource, id string)
- func Name(name string, namePrefix string) string
- func NamePrefixFromName(name string) *string
- func NamePrefixFromNameWithSuffix(name, nameSuffix string) *string
- func NameWithSuffix(name string, namePrefix string, nameSuffix string) string
- func ProblemStandardMessage(service, action, resource, id string, gotError error) string
- func SettingError(service, resource, id, argument string, gotError error) error
- func StringHashcode(s string) int
- func WarnLog(service, action, resource, id string, gotError error)
Constants ¶
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 LogNotFoundRemoveState ¶
func LogNotFoundRemoveState(service, action, resource, id string)
func Name ¶
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 ¶
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 NameWithSuffix ¶
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 ¶
ProblemStandardMessage is a standardized message for reporting errors and warnings
func SettingError ¶
ErrorSetting returns an errors.Error with a standardized error message when setting arguments and attributes values.
func StringHashcode ¶
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.
Types ¶
This section is empty.