volume

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AttachmentResourceType = "hcloud_volume_attachment"

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

View Source
const DataSourceType = "hcloud_volume"

DataSourceType is the type name of the Hetzner Cloud Volume data source.

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 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

	Name          string
	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 RData

type RData struct {
	testtemplate.DataCommon

	Name         string
	Size         int
	LocationName string
	Labels       map[string]string
	ServerID     string
}

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