hetzner

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFirewallDisabled = errors.New("firewall is disabled")

Functions

This section is empty.

Types

type Deployed

type Deployed struct {
	Servers map[string]*Server
}

type Hetzner

type Hetzner struct {
	Servers   map[string]*config.NodeConfig
	Firewalls map[string]*firewall.Config
	Pools     map[string][]string
	Network   *network.Network
	// contains filtered or unexported fields
}

func New

func New(ctx *program.Context, nodes []*config.NodeConfig) *Hetzner

func (*Hetzner) FindInPools

func (h *Hetzner) FindInPools(node string) string

func (*Hetzner) FirewallConfigByID

func (h *Hetzner) FirewallConfigByID(id, pool string) (*firewall.Config, error)

FirewallConfigByID returns the firewall config for the node. If not found, then search a config for nodepool. If not found again, then return a config for role.

func (*Hetzner) NewSSHKey

func (h *Hetzner) NewSSHKey(key pulumi.StringOutput) (*hcloud.SshKey, error)

func (*Hetzner) Up

func (h *Hetzner) Up(keys *sshkeypair.KeyPair) (*Deployed, error)

Up creates hetzner cloud infrastructure. It must be refactored.

func (*Hetzner) WithNetwork

func (h *Hetzner) WithNetwork(config *network.Config) *Hetzner

func (*Hetzner) WithNodepools

func (h *Hetzner) WithNodepools(pools *config.NodepoolsConfig) *Hetzner

type InterconnectFirewall

type InterconnectFirewall struct {
	Config *firewall.Config
	Ips    pulumi.StringArray
	IDs    pulumi.IntArray
}

func NewInterconnectFirewall

func NewInterconnectFirewall() *InterconnectFirewall

func (*InterconnectFirewall) Up

type Server

type Server struct {
	ID         pulumi.IDOutput
	InternalIP pulumi.StringOutput
	Connection *connection.Connection
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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