loadbalancer

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DataSourceType is the type name of the Hetzner Cloud Load Balancer resource.
	DataSourceType = "hcloud_load_balancer"

	// DataSourceListType is the type name to receive a list of Hetzner Cloud Load Balancer resources.
	DataSourceListType = "hcloud_load_balancers"
)
View Source
const NetworkResourceType = "hcloud_load_balancer_network"

NetworkResourceType is the type name of the Hetzner Cloud Load Balancer network resource.

View Source
const ResourceType = "hcloud_load_balancer"

ResourceType is the type name of the Hetzner Cloud Load Balancer resource.

View Source
const ServiceResourceType = "hcloud_load_balancer_service"

ServiceResourceType is the type name of the Hetzner Cloud Load Balancer resource.

View Source
const TargetResourceType = "hcloud_load_balancer_target"

TargetResourceType is the type name of the Hetzner Cloud Load Balancer target resource.

Variables

View Source
var Basic = &RData{
	Name:         "basic-load-balancer",
	LocationName: "nbg1",
}

Basic Load Balancer for use in load balancer related test.

Do not modify!

Functions

func ByID

func ByID(t *testing.T, lb *hcloud.LoadBalancer) func(*hcloud.Client, int) bool

ByID returns a function that obtains a loadbalancer by its ID.

func DataSource added in v1.24.1

func DataSource() *schema.Resource

DataSource creates a new Terraform schema for the hcloud_load_balancer resource.

func DataSourceList added in v1.31.0

func DataSourceList() *schema.Resource

func NetworkResource added in v1.24.1

func NetworkResource() *schema.Resource

NetworkResource creates a Terraform schema for the hcloud_load_balancer_network resource.

func Resource added in v1.24.1

func Resource() *schema.Resource

Resource creates a Terraform schema for the hcloud_load_balancer resource.

func ServiceResource added in v1.24.1

func ServiceResource() *schema.Resource

ServiceResource creates a Terraform schema for the hcloud_load_balancer_service resource.

func Sweep

func Sweep(r string) error

Sweep removes all Load Balancers from the Hetzner Cloud backend.

func TargetResource added in v1.24.1

func TargetResource() *schema.Resource

TargetResource creates a Terraform schema for the hcloud_load_balancer_target resource.

Types

type DData

type DData struct {
	testtemplate.DataCommon

	LoadBalancerID   string
	LoadBalancerName string
	LabelSelector    string
}

DData defines the fields for the "testdata/d/hcloud_load_balancer" template.

func (*DData) TFID

func (d *DData) TFID() string

TFID returns the data source identifier.

type DDataList added in v1.31.0

type DDataList struct {
	testtemplate.DataCommon

	LabelSelector string
}

DData defines the fields for the "testdata/d/hcloud_load_balancers" template.

func (*DDataList) TFID added in v1.31.0

func (d *DDataList) TFID() string

TFID returns the data source identifier.

type RData

type RData struct {
	testtemplate.DataCommon

	Name             string
	Type             string
	LocationName     string
	NetworkZone      string
	Algorithm        string
	ServerTargets    []RDataInlineServerTarget
	Labels           map[string]string
	DeleteProtection bool
}

RData defines the fields for the "testdata/r/hcloud_load_balancer" template.

func (*RData) TFID

func (d *RData) TFID() string

TFID returns the resource identifier.

type RDataInlineServerTarget

type RDataInlineServerTarget struct {
	ServerID string
}

RDataInlineServerTarget represents a Load Balancer server target that is added inline to the Load Balancer.

type RDataNetwork

type RDataNetwork struct {
	testtemplate.DataCommon

	Name                  string
	LoadBalancerID        string
	NetworkID             string
	SubNetID              string
	IP                    string
	EnablePublicInterface bool
	DependsOn             []string
}

RDataNetwork defines the fields for the "testdata/r/hcloud_load_balancer_network" template.

type RDataService

type RDataService struct {
	testtemplate.DataCommon

	Name            string
	LoadBalancerID  string
	Protocol        string
	ListenPort      int
	DestinationPort int
	Proxyprotocol   bool

	AddHTTP bool // Required as the RLoadBalancerServiceHTTP is not comparable
	HTTP    RDataServiceHTTP

	AddHealthCheck bool // Required as the RLoadBalancerServiceHealthCheck is not comparable
	HealthCheck    RDataServiceHealthCheck
}

RDataService defines the fields for the "testdata/r/hcloud_load_balancer_service" template.

type RDataServiceHTTP

type RDataServiceHTTP struct {
	CookieName     string
	CookieLifeTime int
	Certificates   []string
	RedirectHTTP   bool
	StickySessions bool
}

RDataServiceHTTP contains data for an HTTP load balancer service.

type RDataServiceHealthCheck

type RDataServiceHealthCheck struct {
	Protocol string
	Port     int
	Interval int
	Timeout  int
	Retries  int
	HTTP     RDataServiceHealthCheckHTTP
}

RDataServiceHealthCheck contains data for a load balancer service Health Check.

type RDataServiceHealthCheckHTTP

type RDataServiceHealthCheckHTTP struct {
	Domain      string
	Path        string
	Response    string
	TLS         bool
	StatusCodes []string
}

RDataServiceHealthCheckHTTP contains data for a load balancer service HTTP Health Check.

type RDataTarget

type RDataTarget struct {
	testtemplate.DataCommon

	Name           string
	Type           string
	LoadBalancerID string
	ServerID       string
	LabelSelector  string
	IP             string
	UsePrivateIP   bool
	DependsOn      []string
}

RDataTarget defines the fields for the "testdata/r/hcloud_load_balancer_target" template.

Jump to

Keyboard shortcuts

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