Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ICMPRule = &RuleConfig{ Protocol: "icmp", Description: "Allow ICMP", Port: "", SourceIps: []string{ "0.0.0.0/0", "::/0", }, } SSHRule = &RuleConfig{ Protocol: "tcp", Description: "Allow SSH", Port: "22", SourceIps: []string{ "0.0.0.0/0", "::/0", }, } )
Functions ¶
This section is empty.
Types ¶
type AllowAllRules ¶
type AllowAllRules struct {
// contains filtered or unexported fields
}
func NewAllowAllRules ¶
func NewAllowAllRules() *AllowAllRules
func (*AllowAllRules) Rules ¶
func (a *AllowAllRules) Rules() []*RuleConfig
func (*AllowAllRules) WithPulumiSourceIPs ¶
func (a *AllowAllRules) WithPulumiSourceIPs(ips pulumi.StringArray) *AllowAllRules
type Config ¶
type Config struct { // Enabled specifies if the configuration is active. // Default is false. Enabled *bool // AllowICMP indicates whether ICMP traffic is allowed. // Default is false. AllowICMP *bool `json:"allow-icmp" yaml:"allow-icmp" mapstructure:"allow-icmp"` // SSH holds the SSH specific configurations. SSH *SSHConfig // AdditionalRules is a list of additional rules to be applied. AdditionalRules []*RuleConfig `json:"additional-rules" yaml:"additional-rules" mapstructure:"additional-rules"` // contains filtered or unexported fields }
func (*Config) AddRules ¶
func (c *Config) AddRules(rules []*RuleConfig)
func (*Config) DedicatedPool ¶
func (*Config) MarkAsDedicated ¶
func (c *Config) MarkAsDedicated()
func (*Config) MarkWithDedicatedPool ¶
func (c *Config) MarkWithDedicatedPool()
type Firewall ¶
type Firewall struct { Config *Config // contains filtered or unexported fields }
type RuleConfig ¶
type RuleConfig struct { // Protocol specifies the network protocol (e.g., TCP, UDP) applicable for the rule. // Default is TCP. Protocol string // Port specifies the network port number or range applicable for the rule. // Required. Port string // SourceIps lists IP addresses or subnets from which traffic is allowed or to which traffic is directed, based on the Direction. // Required. SourceIps []string `json:"source-ips" yaml:"source-ips" mapstructure:"source-ips"` // Description provides a human-readable explanation of what the rule is intended to do. Description string // contains filtered or unexported fields }
type SSHConfig ¶
type SSHConfig struct { // Allow indicates whether SSH access is permitted. // Default is false. Allow *bool // DisallowOwnIP specifies whether SSH access from the deployer's own IP address is disallowed. // Default is false. DisallowOwnIP *bool `json:"disallow-own-ip" yaml:"disallow-own-ip" mapstructure:"disallow-own-ip"` // AllowedIps lists specific IP addresses that are permitted to access via SSH. AllowedIps []string `json:"allowed-ips" yaml:"allowed-ips" mapstructure:"allowed-ips"` }
Click to show internal directories.
Click to hide internal directories.