sshkey

package
v1.49.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DataSourceListType = "hcloud_ssh_keys"

DataSourceListType is the type name of the Hetzner Cloud SSH Keys data source.

View Source
const DataSourceType = "hcloud_ssh_key"

DataSourceType is the type name of the Hetzner Cloud SSH Key data source.

View Source
const ResourceType = "hcloud_ssh_key"

ResourceType is the type name of the Hetzner Cloud SSH Key resource.

Variables

This section is empty.

Functions

func ByID

func ByID(t *testing.T, cert *hcloud.SSHKey) func(*hcloud.Client, int) bool

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

func NewDataSource added in v1.46.0

func NewDataSource() datasource.DataSource

func NewDataSourceList added in v1.46.0

func NewDataSourceList() datasource.DataSource

func NewResource added in v1.46.0

func NewResource() resource.Resource

func Sweep

func Sweep(r string) error

Sweep removes all sshkeys from the Hetzner Cloud backend.

Types

type DData

type DData struct {
	testtemplate.DataCommon

	SSHKeyID      string
	SSHKeyName    string
	LabelSelector string
}

DData defines the fields for the "testdata/d/hcloud_ssh_key" 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
}

DDataList defines the fields for the "testdata/d/hcloud_ssh_keys" 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
	PublicKey  string
	PrivateKey string
	Labels     map[string]string
}

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

func NewRData

func NewRData(t *testing.T, name string) *RData

NewRData creates data for a new sshkey resource.

func (*RData) TFID

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