server

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DataSourceType = "hcloud_server"

DataSourceType is the type name of the Hetzner Cloud server resource.

View Source
const NetworkResourceType = "hcloud_server_network"

NetworkResourceType is the type name of the Hetzner Cloud Server network resource.

View Source
const ResourceType = "hcloud_server"

ResourceType is the type name of the Hetzner Cloud Server resource.

Variables

This section is empty.

Functions

func ByID

func ByID(t *testing.T, srv *hcloud.Server) func(*hcloud.Client, int) bool

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

func Sweep

func Sweep(r string) error

Sweep removes all Servers from the Hetzner Cloud backend.

Types

type DData

type DData struct {
	testtemplate.DataCommon

	ServerID      string
	ServerName    string
	LabelSelector string
}

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

func (*DData) TFID

func (d *DData) TFID() string

TFID returns the data source identifier.

type RData

type RData struct {
	testtemplate.DataCommon

	Name         string
	Type         string
	Image        string
	LocationName string
	DataCenter   string
	SSHKeys      []string
	KeepDisk     bool
	Rescue       bool
	Backups      bool
	ISO          string
	Labels       map[string]string
	UserData     string
	Network      RDataInlineNetwork
	DependsOn    []string
}

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

func (*RData) TFID

func (d *RData) TFID() string

TFID returns the resource identifier.

type RDataInlineNetwork added in v1.24.0

type RDataInlineNetwork struct {
	NetworkID string
	IP        string
	AliasIPs  []string
}

RDataInlineNetwork defines the information required to attach a server to a network directly in the server resource.

type RDataNetwork

type RDataNetwork struct {
	testtemplate.DataCommon

	Name      string
	ServerID  string
	NetworkID string
	SubNetID  string
	IP        string
	AliasIPs  []string
	DependsOn []string
}

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

Jump to

Keyboard shortcuts

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