volume

package
v1.48.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DataSourceType is the type name of the Hetzner Cloud Volume data source.
	DataSourceType = "hcloud_volume"

	// DataSourceListType is the type name to receive a list of Hetzner Cloud Volume data source.
	DataSourceListType = "hcloud_volumes"
)
View Source
const AttachmentResourceType = "hcloud_volume_attachment"

AttachmentResourceType is the type name of the Hetzner Cloud Volume attachment resource.

View Source
const ResourceType = "hcloud_volume"

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

Variables

View Source
var Basic = &RData{
	Name:         "basic-volume",
	LocationName: "nbg1",
	Size:         10,
}

Basic Volume for use in volume related test.

Do not modify!

Functions

func AttachmentResource added in v1.25.0

func AttachmentResource() *schema.Resource

AttachmentResource creates a Terraform schema for the hcloud_volume_attachmetn resource.

func ByID

func ByID(t *testing.T, fl *hcloud.Volume) func(*hcloud.Client, int) bool

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

func DataSource added in v1.24.1

func DataSource() *schema.Resource

DataSource creates a Terraform schema for the hcloud_volume data source.

func DataSourceList added in v1.31.0

func DataSourceList() *schema.Resource

func Resource added in v1.24.1

func Resource() *schema.Resource

Resource creates a Terraform schema for the hcloud_volume resource.

func Sweep

func Sweep(r string) error

Sweep removes all Volumes from the Hetzner Cloud backend.

Types

type DData

type DData struct {
	testtemplate.DataCommon

	VolumeID      string
	VolumeName    string
	LabelSelector string
}

DData defines the fields for the "testdata/d/hcloud_volume" 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_volumes" 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
	Size             int
	LocationName     string
	Labels           map[string]string
	ServerID         string
	DeleteProtection bool
}

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

func (*RData) TFID

func (d *RData) TFID() string

TFID returns the resource identifier.

type RDataAttachment

type RDataAttachment struct {
	testtemplate.DataCommon

	VolumeID string
	ServerID string
}

RDataAttachment defines the fields for the "testdata/r/hcloud_volume_attachment" template.

func (*RDataAttachment) TFID

func (d *RDataAttachment) 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