Help us shape the future of Go! Take the 2026 Go Developer Survey

loadbalancer

package
v1.70.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MPL-2.0 Imports: 37 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"
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

This section is empty.

Functions

func ByID

func ByID(t *testing.T, lb *hcloud.LoadBalancer) func(*hcloud.Client, int64) 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 GetAPIResource added in v1.64.0

GetAPIResource returns a testsupport.GetAPIResourceFunc for hcloud.LoadBalancer.

func NewNetworkResource added in v1.56.0

func NewNetworkResource() resource.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 TargetResource added in v1.24.1

func TargetResource() *schema.Resource

TargetResource creates a Terraform schema for the hcloud_load_balancer_target resource.

Types

type Blueprint added in v1.65.0

type Blueprint struct {
	LoadBalancerA *RData
	LoadBalancerB *RData
}

func NewBlueprint added in v1.65.0

func NewBlueprint(t *testing.T) *Blueprint

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
}

DDataList 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 NetworkResource added in v1.24.1

type NetworkResource struct {
	// contains filtered or unexported fields
}

func (*NetworkResource) ConfigValidators added in v1.56.0

func (r *NetworkResource) ConfigValidators(context.Context) []resource.ConfigValidator

func (*NetworkResource) Configure added in v1.56.0

func (*NetworkResource) Create added in v1.56.0

func (*NetworkResource) Delete added in v1.56.0

func (*NetworkResource) ImportState added in v1.56.0

func (*NetworkResource) Metadata added in v1.56.0

func (*NetworkResource) ModifyPlan added in v1.56.0

func (*NetworkResource) ParseID added in v1.56.0

func (*NetworkResource) ParseSubnetID added in v1.56.0

func (r *NetworkResource) ParseSubnetID(s string) (*hcloud.Network, *net.IPNet, error)

func (*NetworkResource) Read added in v1.56.0

func (*NetworkResource) Schema added in v1.56.0

func (*NetworkResource) Update added in v1.56.0

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
	IPv4ID           string
	IPv6ID           string
}

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.

func (*RDataNetwork) TFID added in v1.56.0

func (d *RDataNetwork) TFID() string

TFID returns the resource identifier.

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.

func (*RDataService) TFID added in v1.64.0

func (d *RDataService) TFID() string

TFID returns the resource identifier.

type RDataServiceHTTP

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

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.

func (*RDataTarget) TFID added in v1.64.0

func (d *RDataTarget) TFID() string

TFID returns the resource identifier.

Jump to

Keyboard shortcuts

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