Documentation ¶
Index ¶
- Constants
- func CheckFileExists(filePath string) bool
- func CreateTransport() *http.Transport
- func DiffEmptyIps(_, old, new string, _ *schema.ResourceData) bool
- func DiffSlice(slice1 []string, slice2 []string) []string
- func DiffSliceOneWay(a, b []string) []string
- func DiffToLower(_, old, new string, _ *schema.ResourceData) bool
- func DiffWithoutNewLines(_, old, new string, _ *schema.ResourceData) bool
- func GenerateEmail() string
- func GenerateImmutableError(resource, field string) error
- func GenerateSetError(resource, field string, err error) error
- func IsValidUUID(uuid string) bool
- func RemoveNewLines(s string) string
- func SetPropWithNilCheck(m map[string]interface{}, prop string, v interface{})
- func TestImageNotNull(resource, attribute string) resource.TestCheckFunc
- func TestNotEmptySlice(resource, attribute string) resource.TestCheckFunc
- func TestValueInSlice(resource, attribute, value string) resource.TestCheckFunc
- func WaitForResourceToBeDeleted(ctx context.Context, d *schema.ResourceData, fn IsResourceDeletedFunc) error
- func WaitForResourceToBeReady(ctx context.Context, d *schema.ResourceData, fn ResourceReadyFunc) error
- func WriteToFile(name, value string) error
- type ApiResponseInfo
- type IsResourceDeletedFunc
- type ResourceReadyFunc
Constants ¶
const Available = "AVAILABLE"
const DefaultTimeout = 60 * time.Minute
const IonosDebug = "IONOS_DEBUG"
IonosDebug - env variable, set to true to enable debug
const MaxRetries = 999
MaxRetries - number of retries in case of rate-limit
const MaxWaitTime = 4 * time.Second
MaxWaitTime - waits 4 seconds before retry in case of rate limit
const SleepInterval = 5 * time.Second
Variables ¶
This section is empty.
Functions ¶
func CheckFileExists ¶ added in v6.3.2
func CreateTransport ¶
CreateTransport - creates customizable transport for http clients
func DiffEmptyIps ¶ added in v6.3.6
func DiffEmptyIps(_, old, new string, _ *schema.ResourceData) bool
DiffEmptyIps suppress difference when empty value for array is overwritten by API and assigned an actual IP address
func DiffSliceOneWay ¶
DiffSliceOneWay returns the elements in `a` that aren't in `b`.
func DiffToLower ¶ added in v6.3.2
func DiffToLower(_, old, new string, _ *schema.ResourceData) bool
DiffToLower terraform suppress differences between lower and upper
func DiffWithoutNewLines ¶ added in v6.3.2
func DiffWithoutNewLines(_, old, new string, _ *schema.ResourceData) bool
DiffWithoutNewLines terraform suppress differences between newlines
func GenerateEmail ¶
func GenerateEmail() string
func GenerateImmutableError ¶ added in v6.3.6
func GenerateSetError ¶
func IsValidUUID ¶ added in v6.3.0
func RemoveNewLines ¶ added in v6.3.2
func SetPropWithNilCheck ¶
func TestImageNotNull ¶ added in v6.3.0
func TestImageNotNull(resource, attribute string) resource.TestCheckFunc
func TestNotEmptySlice ¶ added in v6.3.0
func TestNotEmptySlice(resource, attribute string) resource.TestCheckFunc
func TestValueInSlice ¶
func TestValueInSlice(resource, attribute, value string) resource.TestCheckFunc
func WaitForResourceToBeDeleted ¶ added in v6.3.4
func WaitForResourceToBeDeleted(ctx context.Context, d *schema.ResourceData, fn IsResourceDeletedFunc) error
WaitForResourceToBeDeleted - keeps retrying until resource is not found(404), or until ctx is cancelled
func WaitForResourceToBeReady ¶ added in v6.3.4
func WaitForResourceToBeReady(ctx context.Context, d *schema.ResourceData, fn ResourceReadyFunc) error
WaitForResourceToBeReady - keeps retrying until resource is ready(true is returned), or until err is thrown, or ctx is cancelled
func WriteToFile ¶ added in v6.3.3
WriteToFile - creates the file and writes 'value' to it.
Types ¶
type ApiResponseInfo ¶ added in v6.3.4
type ApiResponseInfo interface { HttpNotFound() bool LogInfo() }
ApiResponseInfo - interface over different ApiResponse types from sdks
type IsResourceDeletedFunc ¶ added in v6.3.4
IsResourceDeletedFunc polls api to see if resource exists based on id
type ResourceReadyFunc ¶ added in v6.3.4
ResourceReadyFunc polls api to see if resource exists based on id