primaryip

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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DataSourceType is the type name of the Hetzner Cloud Primary IP resource.
	DataSourceType = "hcloud_primary_ip"

	// DataSourceListType is the type name to receive a list of Hetzner Cloud Primary IPs resources.
	DataSourceListType = "hcloud_primary_ips"
)
View Source
const ResourceType = "hcloud_primary_ip"

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

Variables

This section is empty.

Functions

func AssignPrimaryIP added in v1.35.0

func AssignPrimaryIP(ctx context.Context, c *hcloud.Client, primaryIPID int, serverID int) diag.Diagnostics

func ByID

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

ByID returns a function that obtains a primary IP by its ID.

func CreateRandomPrimaryIP added in v1.35.0

func CreateRandomPrimaryIP(ctx context.Context, c *hcloud.Client, server *hcloud.Server, ipType hcloud.PrimaryIPType) diag.Diagnostics

func DataSource

func DataSource() *schema.Resource

DataSource creates a new Terraform schema for the hcloud_primary_ip data source.

func DataSourceList

func DataSourceList() *schema.Resource

func DeletePrimaryIP added in v1.35.0

func DeletePrimaryIP(ctx context.Context, c *hcloud.Client, p *hcloud.PrimaryIP) diag.Diagnostics

func Resource

func Resource() *schema.Resource

Resource creates a new Terraform schema for the hcloud_primary_ip resource.

func Sweep

func Sweep(r string) error

Sweep removes all primary IPs from the Hetzner Cloud backend.

func UnassignPrimaryIP added in v1.35.0

func UnassignPrimaryIP(ctx context.Context, c *hcloud.Client, v int) diag.Diagnostics

Types

type DData

type DData struct {
	testtemplate.DataCommon

	PrimaryIPID   string
	PrimaryIPName string
	PrimaryIPIP   string
	LabelSelector string
}

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

func (*DData) TFID

func (d *DData) TFID() string

TFID returns the data source identifier.

type DDataList

type DDataList struct {
	testtemplate.DataCommon

	LabelSelector string
}

DDataList defines the fields for the "testdata/d/hcloud_primary_ips" template.

func (*DDataList) TFID

func (d *DDataList) TFID() string

TFID DDataList the data source identifier.

type RData

type RData struct {
	testtemplate.DataCommon

	Name             string
	Type             string
	Datacenter       string
	AssigneeType     string
	AssigneeID       string
	Labels           map[string]string
	AutoDelete       bool
	DeleteProtection bool
}

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

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