firewall

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DataSourceType = "hcloud_firewall"

DataSourceType is the type name of the Hetzner Cloud Firewall resource.

View Source
const ResourceType = "hcloud_firewall"

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

Variables

This section is empty.

Functions

func ByID

func ByID(t *testing.T, firewall *hcloud.Firewall) func(*hcloud.Client, int) bool

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

func DataSource

func DataSource() *schema.Resource

func Resource

func Resource() *schema.Resource

func Sweep

func Sweep(r string) error

Sweep removes all firewalls from the Hetzner Cloud backend.

Types

type DData

type DData struct {
	testtemplate.DataCommon

	FirewallID    string
	FirewallName  string
	LabelSelector string
}

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

func (*DData) TFID

func (d *DData) TFID() string

TFID returns the data source identifier.

type RData

type RData struct {
	testtemplate.DataCommon

	Name   string
	Rules  []RDataRule
	Labels map[string]string
}

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

func NewRData

func NewRData(t *testing.T, name string, rules []RDataRule) *RData

NewRData creates data for a new firewall resource.

func (*RData) TFID

func (d *RData) TFID() string

TFID returns the resource identifier.

type RDataRule

type RDataRule struct {
	Direction      string
	Port           string
	SourceIPs      []string
	DestinationIPs []string
	Protocol       string
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL