network

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

Documentation

Index

Constants

View Source
const (
	// DataSourceType is the type name of the Hetzner Cloud Network resource.
	DataSourceType = "hcloud_network"

	// DataSourceListType is the type name to receive a list of Hetzner Cloud Network resources.
	DataSourceListType = "hcloud_networks"
)
View Source
const ResourceType = "hcloud_network"

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

View Source
const RouteResourceType = "hcloud_network_route"

RouteResourceType is the type name of the Hetzner Cloud Network Route resource.

View Source
const SubnetResourceType = "hcloud_network_subnet"

SubnetResourceType is the type name of the Hetzner Cloud Network Subnet resource.

Variables

This section is empty.

Functions

func ByID

func ByID(t *testing.T, nw *hcloud.Network) func(*hcloud.Client, int) bool

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

func DataSource added in v1.24.1

func DataSource() *schema.Resource

DataSource creates a new Terraform schema for the hcloud_network resource.

func DataSourceList added in v1.31.0

func DataSourceList() *schema.Resource

func ParseSubnetID added in v1.24.1

func ParseSubnetID(s string) (int, *net.IPNet, error)

ParseSubnetID parses the faux subnet ID we from s.

The faux subnet ID is created by the hcloud_network_subnet resource during creation. Using this method it can be read from the state and used in the implementation of other resources.

func Resource added in v1.24.1

func Resource() *schema.Resource

Resource creates a Terraform schema for the hcloud_network resource.

func RouteResource added in v1.24.1

func RouteResource() *schema.Resource

RouteResource creates a Terraform schema for the hcloud_network_route resource.

func SubnetResource added in v1.24.1

func SubnetResource() *schema.Resource

SubnetResource creates a Terraform schema for the hcloud_network_subnet resource.

func Sweep

func Sweep(r string) error

Sweep removes all Networks from the Hetzner Cloud backend.

Types

type DData

type DData struct {
	testtemplate.DataCommon

	NetworkID     string
	NetworkName   string
	LabelSelector string
}

DData defines the fields for the "testdata/d/hcloud_network" 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_networks" template.

func (*DDataList) TFID added in v1.31.0

func (d *DDataList) TFID() string

TFID DDataList the data source identifier.

type RData

type RData struct {
	testtemplate.DataCommon

	Name                  string
	IPRange               string
	Labels                map[string]string
	DeleteProtection      bool
	ExposeRoutesToVSwitch bool
}

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

func (*RData) TFID

func (d *RData) TFID() string

TFID returns the resource identifier.

type RDataRoute

type RDataRoute struct {
	testtemplate.DataCommon

	NetworkID   string
	Destination string
	Gateway     string
}

RDataRoute defines the fields for the "testdata/r/hcloud_network_route" template.

func (*RDataRoute) TFID

func (d *RDataRoute) TFID() string

TFID returns the resource identifier.

type RDataSubnet

type RDataSubnet struct {
	testtemplate.DataCommon

	Type        string
	NetworkID   string
	NetworkZone string
	IPRange     string
	VSwitchID   string
}

RDataSubnet defines the fields for the "testdata/r/hcloud_network_subnet" template.

func (*RDataSubnet) TFID

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