firewalls

package
v2.32.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FirewallRuleObject = schema.NestedBlockObject{
	Attributes: map[string]schema.Attribute{
		"label": schema.StringAttribute{
			Description: "The label of this rule for display purposes only.",
			Computed:    true,
		},
		"action": schema.StringAttribute{
			Description: "Controls whether traffic is accepted or dropped by this rule (ACCEPT, DROP).",
			Computed:    true,
		},
		"protocol": schema.StringAttribute{
			Description: "The network protocol this rule controls. (TCP, UDP, ICMP)",
			Computed:    true,
		},
		"ports": schema.StringAttribute{
			Description: "A string representation of ports and/or port ranges (i.e. \"443\" or \"80-90, 91\").",
			Computed:    true,
		},
		"ipv4": schema.SetAttribute{
			Description: "A list of IPv4 addresses or networks in IP/mask format.",
			ElementType: types.StringType,
			Computed:    true,
		},
		"ipv6": schema.SetAttribute{
			Description: "A list of IPv6 addresses or networks in IP/mask format.",
			ElementType: types.StringType,
			Computed:    true,
		},
	},
}

Functions

func NewDataSource

func NewDataSource() datasource.DataSource

Types

type DataSource

type DataSource struct {
	helper.BaseDataSource
}

func (*DataSource) Read

type FirewallDeviceModel

type FirewallDeviceModel struct {
	ID       types.Int64  `tfsdk:"id"`
	EntityID types.Int64  `tfsdk:"entity_id"`
	Type     types.String `tfsdk:"type"`
	Label    types.String `tfsdk:"label"`
	URL      types.String `tfsdk:"url"`
}

type FirewallFilterModel

type FirewallFilterModel struct {
	ID        types.String                     `tfsdk:"id"`
	Filters   frameworkfilter.FiltersModelType `tfsdk:"filter"`
	Order     types.String                     `tfsdk:"order"`
	OrderBy   types.String                     `tfsdk:"order_by"`
	Firewalls []FirewallModel                  `tfsdk:"firewalls"`
}

type FirewallModel

type FirewallModel struct {
	ID             types.Int64       `tfsdk:"id"`
	Label          types.String      `tfsdk:"label"`
	Tags           []types.String    `tfsdk:"tags"`
	Disabled       types.Bool        `tfsdk:"disabled"`
	InboundPolicy  types.String      `tfsdk:"inbound_policy"`
	OutboundPolicy types.String      `tfsdk:"outbound_policy"`
	Linodes        []types.Int64     `tfsdk:"linodes"`
	NodeBalancers  []types.Int64     `tfsdk:"nodebalancers"`
	Status         types.String      `tfsdk:"status"`
	Created        timetypes.RFC3339 `tfsdk:"created"`
	Updated        timetypes.RFC3339 `tfsdk:"updated"`

	Inbound  []FirewallRuleModel   `tfsdk:"inbound"`
	Outbound []FirewallRuleModel   `tfsdk:"outbound"`
	Devices  []FirewallDeviceModel `tfsdk:"devices"`
}

FirewallModel describes the Terraform resource data model to match the resource schema.

type FirewallRuleModel

type FirewallRuleModel struct {
	Label    types.String   `tfsdk:"label"`
	Action   types.String   `tfsdk:"action"`
	Protocol types.String   `tfsdk:"protocol"`
	Ports    types.String   `tfsdk:"ports"`
	IPv4     []types.String `tfsdk:"ipv4"`
	IPv6     []types.String `tfsdk:"ipv6"`
}

func (*FirewallRuleModel) ParseRule added in v2.14.0

func (data *FirewallRuleModel) ParseRule(rule linodego.FirewallRule)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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