firewall

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

Documentation

Index

Constants

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

	// DataSourceListType is the type name to receive a list of Hetzner Cloud Firewall resources.
	DataSourceListType = "hcloud_firewalls"
)
View Source
const AttachmentResourceType = "hcloud_firewall_attachment"

AttachmentResourceType is the type of the hcloud_firewall_attachment 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 AttachmentResource added in v1.33.0

func AttachmentResource() *schema.Resource

AttachmentResource defines the schema for the hcloud_firewall_attachment resource.

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 DataSourceList added in v1.31.0

func DataSourceList() *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 DDataList added in v1.31.0

type DDataList struct {
	testtemplate.DataCommon

	LabelSelector string
}

DDataList defines the fields for the "testdata/d/hcloud_firewalls" 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
	Rules   []RDataRule
	ApplyTo []RDataApplyTo
	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, applyTo []RDataApplyTo) *RData

NewRData creates data for a new firewall resource.

func (*RData) TFID

func (d *RData) TFID() string

TFID returns the resource identifier.

type RDataApplyTo added in v1.31.0

type RDataApplyTo struct {
	Server        string
	LabelSelector string
}

type RDataAttachment added in v1.33.0

type RDataAttachment struct {
	testtemplate.DataCommon

	FirewallIDRef  string
	ServerIDRefs   []string
	LabelSelectors []string
}

RDataAttachment defines the fields for the "testdata/r/hcloud_firewall_attachment" template.

Fields ending in Ref are meant to contain a string referencing a Terraform value.

func NewRDataAttachment added in v1.33.0

func NewRDataAttachment(resName, fwIDRef string) *RDataAttachment

NewRDataAttachment creates a new RDataAttachment with the passed terraform resource name. It references a firewall using fwIDRef.

func (*RDataAttachment) TFID added in v1.33.0

func (d *RDataAttachment) TFID() string

TFID returns the resource identifier.

type RDataRule

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

RDataRule 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