ipallowlists

package
v1.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CrudDelayTime = 1 * time.Second
	PollDelayTime = 3 * time.Second
	Timeout       = 20 * time.Minute
	PollInterval  = 1 * time.Minute
)
View Source
const (
	ResourceKey = "scp_ip_allowlists"
)

Variables

View Source
var (
	PendingStatusCRUD          = []string{http.StatusText(429)}
	PendingStatusVerifyCreated = []string{http.StatusText(429)}
	PendingStatusVerifyDeleted = []string{http.StatusText(200), http.StatusText(429)}

	TargetStatusResourceChange  = []string{http.StatusText(200)}
	TargetStatusResourceExists  = []string{http.StatusText(200)}
	TargetStatusResourceDeleted = []string{http.StatusText(404)}
)

Functions

func GetSubnetsFromSet

func GetSubnetsFromSet(subnets *schema.Set) []string

func IPAllowlistStatusCreate

func IPAllowlistStatusCreate(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, feature v2.Feature, subnets []string) resource.StateRefreshFunc

func IPAllowlistStatusDelete

func IPAllowlistStatusDelete(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, feature v2.Feature, subnets []string) resource.StateRefreshFunc

func IPAllowlistStatusRead

func IPAllowlistStatusRead(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, feature string) resource.StateRefreshFunc

func ProcessResponse

func ProcessResponse(resp *http.Response, targetStateCodes []string, pendingStatusCodes []string) (interface{}, string, error)

func ResourceIPAllowlist

func ResourceIPAllowlist() *schema.Resource

func WaitIPAllowlistCreate

func WaitIPAllowlistCreate(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, feature v2.Feature, newSubnets []string) error

WaitIPAllowlistCreate Handles retry logic for POST requests for create lifecycle function

func WaitIPAllowlistDelete

func WaitIPAllowlistDelete(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, feature v2.Feature, oldSubnets []string) error

WaitIPAllowlistDelete Handles retry logic for POST requests for delete lifecycle function

func WaitIPAllowlistRead

func WaitIPAllowlistRead(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, feature string) ([]string, error)

WaitIPAllowlistRead Handles retry logic for GET requests for the read lifecycle function

Types

This section is empty.

Jump to

Keyboard shortcuts

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