Documentation
¶
Index ¶
- Constants
- func ByID(t *testing.T, lb *hcloud.LoadBalancer) func(*hcloud.Client, int64) bool
- func DataSource() *schema.Resource
- func DataSourceList() *schema.Resource
- func NewNetworkResource() resource.Resource
- func Resource() *schema.Resource
- func ServiceResource() *schema.Resource
- func TargetResource() *schema.Resource
- type DData
- type DDataList
- type NetworkResource
- func (r *NetworkResource) ConfigValidators(context.Context) []resource.ConfigValidator
- func (r *NetworkResource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r *NetworkResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *NetworkResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *NetworkResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *NetworkResource) Metadata(_ context.Context, _ resource.MetadataRequest, resp *resource.MetadataResponse)
- func (r *NetworkResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, ...)
- func (r *NetworkResource) ParseID(s string) (*hcloud.LoadBalancer, *hcloud.Network, error)
- func (r *NetworkResource) ParseSubnetID(s string) (*hcloud.Network, *net.IPNet, error)
- func (r *NetworkResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *NetworkResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *NetworkResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- 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"
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 ¶
This section is empty.
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 NewNetworkResource ¶ added in v1.56.0
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
}
DDataList defines the fields for the "testdata/d/hcloud_load_balancers" template.
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 (r *NetworkResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*NetworkResource) Create ¶ added in v1.56.0
func (r *NetworkResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*NetworkResource) Delete ¶ added in v1.56.0
func (r *NetworkResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*NetworkResource) ImportState ¶ added in v1.56.0
func (r *NetworkResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*NetworkResource) Metadata ¶ added in v1.56.0
func (r *NetworkResource) Metadata(_ context.Context, _ resource.MetadataRequest, resp *resource.MetadataResponse)
func (*NetworkResource) ModifyPlan ¶ added in v1.56.0
func (r *NetworkResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse)
func (*NetworkResource) ParseID ¶ added in v1.56.0
func (r *NetworkResource) ParseID(s string) (*hcloud.LoadBalancer, *hcloud.Network, error)
func (*NetworkResource) ParseSubnetID ¶ added in v1.56.0
func (*NetworkResource) Read ¶ added in v1.56.0
func (r *NetworkResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*NetworkResource) Schema ¶ added in v1.56.0
func (r *NetworkResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
func (*NetworkResource) Update ¶ added in v1.56.0
func (r *NetworkResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
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.
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.
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.