Documentation ¶
Index ¶
- Constants
- Variables
- func ByID(t *testing.T, lb *hcloud.LoadBalancer) func(*hcloud.Client, int) bool
- func DataSource() *schema.Resource
- func DataSourceList() *schema.Resource
- func NetworkResource() *schema.Resource
- func Resource() *schema.Resource
- func ServiceResource() *schema.Resource
- func Sweep(r string) error
- func TargetResource() *schema.Resource
- type DData
- type DDataList
- type RData
- type RDataInlineServerTarget
- type RDataNetwork
- type RDataService
- type RDataServiceHTTP
- type RDataServiceHealthCheck
- type RDataServiceHealthCheckHTTP
- type RDataTarget
Constants ¶
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" )
const NetworkResourceType = "hcloud_load_balancer_network"
NetworkResourceType is the type name of the Hetzner Cloud Load Balancer network resource.
const ResourceType = "hcloud_load_balancer"
ResourceType is the type name of the Hetzner Cloud Load Balancer resource.
const ServiceResourceType = "hcloud_load_balancer_service"
ServiceResourceType is the type name of the Hetzner Cloud Load Balancer resource.
const TargetResourceType = "hcloud_load_balancer_target"
TargetResourceType is the type name of the Hetzner Cloud Load Balancer target resource.
Variables ¶
var Basic = &RData{
Name: "basic-load-balancer",
LocationName: "nbg1",
}
Basic Load Balancer for use in load balancer related test.
Do not modify!
Functions ¶
func DataSource ¶ added in v1.24.1
DataSource creates a new Terraform schema for the hcloud_load_balancer resource.
func DataSourceList ¶ added in v1.31.0
func NetworkResource ¶ added in v1.24.1
NetworkResource creates a Terraform schema for the hcloud_load_balancer_network resource.
func Resource ¶ added in v1.24.1
Resource creates a Terraform schema for the hcloud_load_balancer resource.
func ServiceResource ¶ added in v1.24.1
ServiceResource creates a Terraform schema for the hcloud_load_balancer_service resource.
func TargetResource ¶ added in v1.24.1
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.
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.
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.
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.