resource

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package resource provides the NetBird resource types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNS added in v0.0.13

type DNS struct{}

DNS represents a DNS Group.

func (*DNS) Annotate added in v0.0.13

func (n *DNS) Annotate(annotator infer.Annotator)

Annotate adds a description to the DNS resource type.

func (*DNS) Check added in v0.0.23

Check provides input validation and default setting.

func (*DNS) Create added in v0.0.13

Create creates a new NetBird DNS (Nameserver Group).

func (*DNS) Delete added in v0.0.13

Delete removes a DNS (Nameserver Group) from NetBird.

func (*DNS) Diff added in v0.0.13

Diff detects changes between DNSArgs and DNSState.

func (*DNS) Read added in v0.0.13

Read reads a DNS (Nameserver Group) from NetBird.

func (*DNS) Update added in v0.0.13

Update updates a DNS (Nameserver Group) from NetBird.

func (*DNS) WireDependencies added in v0.0.23

func (*DNS) WireDependencies(field infer.FieldSelector, args *DNSArgs, state *DNSState)

WireDependencies explicitly defines input/output relationships.

type DNSArgs added in v0.0.13

type DNSArgs struct {
	Name                 string       `pulumi:"name"`
	Description          string       `pulumi:"description"`
	Domains              []string     `pulumi:"domains"`
	Enabled              bool         `pulumi:"enabled"`
	Groups               []string     `pulumi:"groups"`
	Primary              bool         `pulumi:"primary"`
	Nameservers          []Nameserver `pulumi:"nameservers"`
	SearchDomainsEnabled bool         `pulumi:"searchDomainsEnabled"`
}

DNSArgs defines input fields for creating or updating a network.

func (*DNSArgs) Annotate added in v0.0.13

func (n *DNSArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for DNSArgs fields.

type DNSRecord added in v0.3.0

type DNSRecord struct{}

DNSRecord represents a NetBird DNS record resource.

func (*DNSRecord) Annotate added in v0.3.0

func (d *DNSRecord) Annotate(annotator infer.Annotator)

Annotate adds a description to the DNSRecord resource type.

func (*DNSRecord) Check added in v0.3.0

Check validates input fields for a DNS record.

func (*DNSRecord) Create added in v0.3.0

Create creates a new DNS record in a NetBird DNS zone.

func (*DNSRecord) Delete added in v0.3.0

Delete removes a DNS record from NetBird.

func (*DNSRecord) Diff added in v0.3.0

Diff detects changes between DNSRecordArgs and DNSRecordState.

func (*DNSRecord) Read added in v0.3.0

Read reads a DNS record from NetBird.

func (*DNSRecord) Update added in v0.3.0

Update updates a DNS record in NetBird.

func (*DNSRecord) WireDependencies added in v0.3.0

func (*DNSRecord) WireDependencies(field infer.FieldSelector, args *DNSRecordArgs, state *DNSRecordState)

WireDependencies explicitly defines input/output relationships.

type DNSRecordArgs added in v0.3.0

type DNSRecordArgs struct {
	ZoneID  string        `pulumi:"zoneID"`
	Name    string        `pulumi:"name"`
	Content string        `pulumi:"content"`
	TTL     int           `pulumi:"ttl"`
	Type    DNSRecordType `pulumi:"type"`
}

DNSRecordArgs defines input fields for creating or updating a DNS record.

func (*DNSRecordArgs) Annotate added in v0.3.0

func (d *DNSRecordArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for DNSRecordArgs fields.

type DNSRecordState added in v0.3.0

type DNSRecordState struct {
	ZoneID  string        `pulumi:"zoneID"`
	Name    string        `pulumi:"name"`
	Content string        `pulumi:"content"`
	TTL     int           `pulumi:"ttl"`
	Type    DNSRecordType `pulumi:"type"`
}

DNSRecordState represents the output state of a DNS record resource.

func (*DNSRecordState) Annotate added in v0.3.0

func (d *DNSRecordState) Annotate(annotator infer.Annotator)

Annotate provides documentation for DNSRecordState fields.

type DNSRecordType added in v0.3.0

type DNSRecordType string

DNSRecordType defines the allowed DNS record types. This wraps the nbapi type to allow method definitions (like Values()).

const (
	// DNSRecordTypeA represents an A record.
	DNSRecordTypeA DNSRecordType = DNSRecordType(nbapi.DNSRecordTypeA)
	// DNSRecordTypeAAAA represents an AAAA record.
	DNSRecordTypeAAAA DNSRecordType = DNSRecordType(nbapi.DNSRecordTypeAAAA)
	// DNSRecordTypeCNAME represents a CNAME record.
	DNSRecordTypeCNAME DNSRecordType = DNSRecordType(nbapi.DNSRecordTypeCNAME)
)

func (DNSRecordType) Values added in v0.3.0

Values returns the valid enum values for DNSRecordType, used by Pulumi for schema generation and validation.

type DNSSettings added in v0.3.0

type DNSSettings struct{}

DNSSettings represents the global DNS settings resource.

func (*DNSSettings) Annotate added in v0.3.0

func (d *DNSSettings) Annotate(annotator infer.Annotator)

Annotate adds a description to the DNSSettings resource type.

func (*DNSSettings) Create added in v0.3.0

Create initialises the DNS settings resource by applying the desired settings. Since this is a singleton, Create calls UpdateSettings and uses a fixed ID.

func (*DNSSettings) Delete added in v0.3.0

Delete is a no-op because DNS settings are a singleton and cannot be deleted.

func (*DNSSettings) Diff added in v0.3.0

Diff detects changes between DNSSettingsArgs and DNSSettingsState.

func (*DNSSettings) Read added in v0.3.0

Read reads the current DNS settings from NetBird.

func (*DNSSettings) Update added in v0.3.0

Update updates the DNS settings.

func (*DNSSettings) WireDependencies added in v0.3.0

func (*DNSSettings) WireDependencies(field infer.FieldSelector, args *DNSSettingsArgs, state *DNSSettingsState)

WireDependencies explicitly defines input/output relationships.

type DNSSettingsArgs added in v0.3.0

type DNSSettingsArgs struct {
	DisabledManagementGroups []string `pulumi:"disabledManagementGroups"`
}

DNSSettingsArgs defines input fields for DNS settings.

func (*DNSSettingsArgs) Annotate added in v0.3.0

func (d *DNSSettingsArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for DNSSettingsArgs fields.

type DNSSettingsState added in v0.3.0

type DNSSettingsState struct {
	DisabledManagementGroups []string `pulumi:"disabledManagementGroups"`
}

DNSSettingsState represents the output state of the DNS settings resource.

func (*DNSSettingsState) Annotate added in v0.3.0

func (d *DNSSettingsState) Annotate(annotator infer.Annotator)

Annotate provides documentation for DNSSettingsState fields.

type DNSState added in v0.0.13

type DNSState struct {
	Name                 string       `pulumi:"name"`
	Description          string       `pulumi:"description"`
	Domains              []string     `pulumi:"domains"`
	Enabled              bool         `pulumi:"enabled"`
	Groups               []string     `pulumi:"groups"`
	Primary              bool         `pulumi:"primary"`
	Nameservers          []Nameserver `pulumi:"nameservers"`
	SearchDomainsEnabled bool         `pulumi:"searchDomainsEnabled"`
}

DNSState represents the output state of a network resource.

func (*DNSState) Annotate added in v0.0.13

func (nameserver *DNSState) Annotate(annotator infer.Annotator)

Annotate provides documentation for DNSState fields.

type DNSZone added in v0.3.0

type DNSZone struct{}

DNSZone represents a NetBird DNS zone resource.

func (*DNSZone) Annotate added in v0.3.0

func (d *DNSZone) Annotate(annotator infer.Annotator)

Annotate adds a description to the DNSZone resource type.

func (*DNSZone) Check added in v0.3.0

Check validates input fields for a DNS zone.

func (*DNSZone) Create added in v0.3.0

Create creates a new NetBird DNS zone.

func (*DNSZone) Delete added in v0.3.0

Delete removes a DNS zone from NetBird.

func (*DNSZone) Diff added in v0.3.0

Diff detects changes between DNSZoneArgs and DNSZoneState.

func (*DNSZone) Read added in v0.3.0

Read reads a DNS zone from NetBird.

func (*DNSZone) Update added in v0.3.0

Update updates a DNS zone in NetBird.

func (*DNSZone) WireDependencies added in v0.3.0

func (*DNSZone) WireDependencies(field infer.FieldSelector, args *DNSZoneArgs, state *DNSZoneState)

WireDependencies explicitly defines input/output relationships.

type DNSZoneArgs added in v0.3.0

type DNSZoneArgs struct {
	Name               string   `pulumi:"name"`
	Domain             string   `pulumi:"domain"`
	Enabled            bool     `pulumi:"enabled"`
	EnableSearchDomain bool     `pulumi:"enableSearchDomain"`
	DistributionGroups []string `pulumi:"distributionGroups"`
}

DNSZoneArgs defines input fields for creating or updating a DNS zone.

func (*DNSZoneArgs) Annotate added in v0.3.0

func (d *DNSZoneArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for DNSZoneArgs fields.

type DNSZoneState added in v0.3.0

type DNSZoneState struct {
	Name               string   `pulumi:"name"`
	Domain             string   `pulumi:"domain"`
	Enabled            bool     `pulumi:"enabled"`
	EnableSearchDomain bool     `pulumi:"enableSearchDomain"`
	DistributionGroups []string `pulumi:"distributionGroups"`
}

DNSZoneState represents the output state of a DNS zone resource.

func (*DNSZoneState) Annotate added in v0.3.0

func (d *DNSZoneState) Annotate(annotator infer.Annotator)

Annotate provides documentation for DNSZoneState fields.

type Group

type Group struct{}

Group represents a resource for managing NetBird groups.

func (*Group) Annotate

func (g *Group) Annotate(a infer.Annotator)

Annotate adds a description to the Group resource type.

func (*Group) Check

Check provides input validation and default setting.

func (*Group) Create

Create creates a new NetBird group.

func (*Group) Delete

Delete removes a group from NetBird.

func (*Group) Diff

Diff detects changes between inputs and prior state.

func (*Group) Read

Read fetches the current state of a group resource from NetBird.

func (*Group) Update

Update updates the state of the group if needed.

func (*Group) WireDependencies

func (*Group) WireDependencies(f infer.FieldSelector, args *GroupArgs, state *GroupState)

WireDependencies explicitly defines input/output relationships.

type GroupArgs

type GroupArgs struct {
	Name      string      `pulumi:"name"`
	Peers     *[]string   `pulumi:"peers,optional"`
	Resources *[]Resource `pulumi:"resources,optional"`
}

GroupArgs defines input fields for creating or updating a group.

func (*GroupArgs) Annotate

func (g *GroupArgs) Annotate(a infer.Annotator)

Annotate provides documentation for GroupArgs fields.

type GroupState

type GroupState struct {
	Name      string      `pulumi:"name"`
	Peers     *[]string   `pulumi:"peers,optional"`
	Resources *[]Resource `pulumi:"resources,optional"`
}

GroupState represents the output state of a group resource.

func (*GroupState) Annotate

func (g *GroupState) Annotate(a infer.Annotator)

Annotate provides documentation for GroupState fields.

type Nameserver added in v0.0.13

type Nameserver struct {
	IP     string           `pulumi:"ip"`
	NsType NameserverNsType `pulumi:"type"`
	Port   int              `pulumi:"port"`
}

Nameserver defines model for Nameserver.

func (*Nameserver) Annotate added in v0.0.13

func (nameserver *Nameserver) Annotate(annotator infer.Annotator)

Annotate provides documentation for DNSState fields.

type NameserverNsType added in v0.0.13

type NameserverNsType string

NameserverNsType defines the allowed DNS types This wraps the nbapi type to allow method definitions (like Values()).

const (
	NameserverNsTypeUDP NameserverNsType = NameserverNsType(nbapi.NameserverNsTypeUdp)
)

NameserverNyysTypeUDP represents a UDP nameserver type for DNS configuration.

func (NameserverNsType) Values added in v0.0.13

Values returns the valid enum values for NameserverNsType, used by Pulumi for schema generation and validation.

type Network

type Network struct{}

Network represents a resource for managing NetBird networks.

func (*Network) Annotate

func (n *Network) Annotate(a infer.Annotator)

Annotate adds a description to the Network resource type.

func (*Network) Check

Check provides input validation and default setting.

func (*Network) Create

Create creates a new NetBird network.

func (*Network) Delete

Delete removes a network from NetBird.

func (*Network) Diff

Diff detects changes between inputs and prior state.

func (*Network) Read

Read fetches the current state of a network from NetBird.

func (*Network) Update

Update updates the state of the network if needed.

func (*Network) WireDependencies

func (*Network) WireDependencies(f infer.FieldSelector, args *NetworkArgs, state *NetworkState)

WireDependencies explicitly defines input/output relationships.

type NetworkArgs

type NetworkArgs struct {
	Name        string  `pulumi:"name"`
	Description *string `pulumi:"description,optional"`
}

NetworkArgs defines input fields for creating or updating a network.

func (*NetworkArgs) Annotate

func (n *NetworkArgs) Annotate(a infer.Annotator)

Annotate provides documentation for NetworkArgs fields.

type NetworkResource

type NetworkResource struct{}

NetworkResource represents a Pulumi resource for NetBird network resources.

func (*NetworkResource) Annotate

func (net *NetworkResource) Annotate(a infer.Annotator)

Annotate adds a description annotation for the NetworkResource type for generated SDKs.

func (*NetworkResource) Check

Check provides input validation and default setting.

func (*NetworkResource) Create

Create creates a new NetBird network resource.

func (*NetworkResource) Delete

Delete removes a network resource from NetBird.

func (*NetworkResource) Diff

Diff detects changes between inputs and prior state.

func (*NetworkResource) Read

Read fetches the current state of a network resource from NetBird.

func (*NetworkResource) Update

Update updates the state of the NetBird network resource if needed.

func (*NetworkResource) WireDependencies added in v0.0.23

func (*NetworkResource) WireDependencies(field infer.FieldSelector, args *NetworkResourceArgs, state *NetworkResourceState)

WireDependencies explicitly defines input/output relationships.

type NetworkResourceArgs

type NetworkResourceArgs struct {
	Name        string   `pulumi:"name"`
	Description *string  `pulumi:"description,optional"`
	NetworkID   string   `pulumi:"networkID"`
	Address     string   `pulumi:"address"`
	Enabled     bool     `pulumi:"enabled"`
	GroupIDs    []string `pulumi:"groupIDs"`
}

NetworkResourceArgs represents the input arguments for creating or updating a network resource.

func (*NetworkResourceArgs) Annotate

func (a *NetworkResourceArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for NetworkResourceArgs fields.

type NetworkResourceState

type NetworkResourceState struct {
	Name        string   `pulumi:"name"`
	Description *string  `pulumi:"description,optional"`
	NetworkID   string   `pulumi:"networkID"`
	Address     string   `pulumi:"address"`
	Enabled     bool     `pulumi:"enabled"`
	GroupIDs    []string `pulumi:"groupIDs"`
}

NetworkResourceState represents the state of a network resource.

func (*NetworkResourceState) Annotate

func (s *NetworkResourceState) Annotate(annotator infer.Annotator)

Annotate provides documentation for NetworkResourceState fields.

type NetworkRouter

type NetworkRouter struct{}

NetworkRouter represents a Pulumi resource for NetBird network routers.

func (*NetworkRouter) Annotate

func (netR *NetworkRouter) Annotate(a infer.Annotator)

Annotate provides documentation for NetworkRouter.

func (*NetworkRouter) Check added in v0.0.23

Check provides input validation and default setting.

func (*NetworkRouter) Create

Create creates a new NetBird network router.

func (*NetworkRouter) Delete

Delete removes a network router from NetBird.

func (*NetworkRouter) Diff

Diff detects changes between inputs and prior state.

func (*NetworkRouter) Read

Read fetches the current state of a network router from NetBird.

func (*NetworkRouter) Update

Update updates the state of the NetBird network router if needed.

func (*NetworkRouter) WireDependencies added in v0.0.23

func (*NetworkRouter) WireDependencies(field infer.FieldSelector, args *NetworkRouterArgs, state *NetworkRouterState)

WireDependencies explicitly defines input/output relationships.

type NetworkRouterArgs

type NetworkRouterArgs struct {
	NetworkID  string    `pulumi:"networkID"`
	Enabled    bool      `pulumi:"enabled"`
	Masquerade bool      `pulumi:"masquerade"`
	Metric     int       `pulumi:"metric"`
	Peer       *string   `pulumi:"peer,optional"`
	PeerGroups *[]string `pulumi:"peerGroups,optional"`
}

NetworkRouterArgs represents the input arguments for creating or updating a network router.

func (*NetworkRouterArgs) Annotate

func (a *NetworkRouterArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for NetworkRouterArgs fields.

type NetworkRouterState

type NetworkRouterState struct {
	NetworkID  string    `pulumi:"networkID"`
	Enabled    bool      `pulumi:"enabled"`
	Masquerade bool      `pulumi:"masquerade"`
	Metric     int       `pulumi:"metric"`
	Peer       *string   `pulumi:"peer,optional"`
	PeerGroups *[]string `pulumi:"peerGroups,optional"`
}

NetworkRouterState represents the state of a network router.

func (*NetworkRouterState) Annotate

func (s *NetworkRouterState) Annotate(annotator infer.Annotator)

Annotate provides documentation for NetworkRouterState fields.

type NetworkState

type NetworkState struct {
	Name        string  `pulumi:"name"`
	Description *string `pulumi:"description,optional"`
}

NetworkState represents the output state of a network resource.

func (*NetworkState) Annotate

func (n *NetworkState) Annotate(a infer.Annotator)

Annotate provides documentation for NetworkState fields.

type Peer

type Peer struct{}

Peer represents a resource for managing NetBird peers.

func (*Peer) Annotate

func (peer *Peer) Annotate(a infer.Annotator)

Annotate describes the resource and its fields.

func (*Peer) Check added in v0.0.23

Check provides input validation and default setting.

func (*Peer) Create

Create is a no-op; peers must be imported.

func (*Peer) Delete added in v0.0.22

Delete removes a peer from NetBird.

func (*Peer) Diff

Diff detects changes between inputs and prior state.

func (*Peer) Read

Read fetches the current state of a peer from NetBird.

func (*Peer) Update

Update updates the state of the NetBird Peer if needed.

func (*Peer) WireDependencies added in v0.0.23

func (*Peer) WireDependencies(f infer.FieldSelector, args *PeerArgs, state *PeerState)

WireDependencies explicitly defines input/output relationships.

type PeerArgs

type PeerArgs struct {
	Name                        string `pulumi:"name"`
	InactivityExpirationEnabled bool   `pulumi:"inactivityExpirationEnabled,optional"`
	LoginExpirationEnabled      bool   `pulumi:"loginExpirationEnabled,optional"`
	SSHEnabled                  bool   `pulumi:"sshEnabled,optional"`
	// Cloud Only — deprecated, not maintained by this provider, always stored as nil
	ApprovalRequired *bool `pulumi:"approvalRequired,optional"`
}

PeerArgs represents the input arguments for a peer resource.

func (*PeerArgs) Annotate

func (p *PeerArgs) Annotate(a infer.Annotator)

Annotate adds descriptive annotations to the PeerArgs fields for use in generated SDKs.

type PeerState

type PeerState struct {
	Name                        string `pulumi:"name"`
	InactivityExpirationEnabled bool   `pulumi:"inactivityExpirationEnabled,optional"`
	LoginExpirationEnabled      bool   `pulumi:"loginExpirationEnabled,optional"`
	SSHEnabled                  bool   `pulumi:"sshEnabled,optional"`
	// Cloud Only — deprecated, not maintained by this provider, always stored as nil
	ApprovalRequired *bool `pulumi:"approvalRequired,optional"`
}

PeerState represents the state of the peer resource.

func (*PeerState) Annotate

func (p *PeerState) Annotate(a infer.Annotator)

Annotate adds descriptive annotations to the PeerState fields for use in generated SDKs.

type Policy

type Policy struct{}

Policy defines the Pulumi resource handler for NetBird policy resources.

func (*Policy) Annotate

func (policy *Policy) Annotate(annotator infer.Annotator)

Annotate adds a description annotation for the Policy type for generated SDKs.

func (*Policy) Check added in v0.0.23

Check provides input validation and default setting.

func (*Policy) Create

Create creates a new NetBird policy.

func (*Policy) Delete

Delete removes a Policy from NetBird.

func (*Policy) Diff

Diff detects changes between inputs and prior state.

func (*Policy) Read

Read reads a Policy from NetBird.

func (*Policy) Update

Update updates an existing NetBird policy.

func (*Policy) WireDependencies added in v0.0.23

func (*Policy) WireDependencies(f infer.FieldSelector, args *PolicyArgs, state *PolicyState)

WireDependencies explicitly defines input/output relationships.

type PolicyArgs

type PolicyArgs struct {
	Name                string           `pulumi:"name"`                   // Policy name (required)
	Description         *string          `pulumi:"description,optional"`   // Optional description
	Enabled             bool             `pulumi:"enabled"`                // Whether the policy is enabled
	Rules               []PolicyRuleArgs `pulumi:"rules"`                  // List of rules defined in the policy
	SourcePostureChecks *[]string        `pulumi:"postureChecks,optional"` // Optional list of posture check IDs
}

PolicyArgs defines the user-supplied arguments for creating/updating a Policy resource.

func (*PolicyArgs) Annotate

func (policy *PolicyArgs) Annotate(annotator infer.Annotator)

Annotate adds field descriptions to PolicyArgs for generated SDKs.

type PolicyRuleArgs

type PolicyRuleArgs struct {
	ID                  *string          `pulumi:"id,optional"`                  // Optional rule ID (used for updates)
	Name                string           `pulumi:"name"`                         // Rule name
	Description         *string          `pulumi:"description,optional"`         // Optional rule description
	Bidirectional       bool             `pulumi:"bidirectional"`                // Whether the rule is bidirectional
	Action              RuleAction       `pulumi:"action"`                       // Rule action (accept/drop)
	Enabled             bool             `pulumi:"enabled"`                      // Whether the rule is enabled
	Protocol            Protocol         `pulumi:"protocol"`                     // Network protocol
	Ports               *[]string        `pulumi:"ports,optional"`               // Optional list of specific ports
	PortRanges          *[]RulePortRange `pulumi:"portRanges,optional"`          // Optional list of port ranges
	Sources             *[]string        `pulumi:"sources,optional"`             // Optional list of source group IDs
	Destinations        *[]string        `pulumi:"destinations,optional"`        // Optional list of destination group IDs
	SourceResource      *Resource        `pulumi:"sourceResource,optional"`      // Optional single source resource
	DestinationResource *Resource        `pulumi:"destinationResource,optional"` // Optional single destination resource
}

PolicyRuleArgs represents user input for an individual rule in a policy.

func (*PolicyRuleArgs) Annotate

func (policy *PolicyRuleArgs) Annotate(annotator infer.Annotator)

Annotate adds descriptive annotations to the PolicyRuleArgs fields for use in generated SDKs.

type PolicyRuleState

type PolicyRuleState struct {
	ID                  *string          `pulumi:"id,optional"`
	Name                string           `pulumi:"name"`
	Description         *string          `pulumi:"description,optional"`
	Bidirectional       bool             `pulumi:"bidirectional"`
	Action              RuleAction       `pulumi:"action"`
	Enabled             bool             `pulumi:"enabled"`
	Protocol            Protocol         `pulumi:"protocol"`
	Ports               *[]string        `pulumi:"ports,optional"`
	PortRanges          *[]RulePortRange `pulumi:"portRanges,optional"`
	Sources             *[]RuleGroup     `pulumi:"sources,optional"` // Fully-resolved group info (not just IDs)
	Destinations        *[]RuleGroup     `pulumi:"destinations,optional"`
	SourceResource      *Resource        `pulumi:"sourceResource,optional"`
	DestinationResource *Resource        `pulumi:"destinationResource,optional"`
}

PolicyRuleState represents the state of an individual rule within a policy.

func (*PolicyRuleState) Annotate

func (policy *PolicyRuleState) Annotate(annotator infer.Annotator)

Annotate adds descriptive annotations to the PolicyRuleState fields for use in generated SDKs.

type PolicyState

type PolicyState struct {
	Name                string            `pulumi:"name"`
	Description         *string           `pulumi:"description,optional"`
	Enabled             bool              `pulumi:"enabled"`
	Rules               []PolicyRuleState `pulumi:"rules"`
	SourcePostureChecks *[]string         `pulumi:"postureChecks,optional"`
}

PolicyState represents the state of a Policy resource stored in Pulumi state.

func (*PolicyState) Annotate

func (policy *PolicyState) Annotate(annotator infer.Annotator)

Annotate adds descriptive annotations to the PolicyState fields for use in generated SDKs.

type PostureCheck added in v0.3.0

type PostureCheck struct{}

PostureCheck represents a NetBird posture check resource.

func (*PostureCheck) Annotate added in v0.3.0

func (pc *PostureCheck) Annotate(annotator infer.Annotator)

Annotate adds a description to the PostureCheck resource type.

func (*PostureCheck) Check added in v0.3.0

Check validates input fields for a posture check.

func (*PostureCheck) Create added in v0.3.0

Create creates a new NetBird posture check.

func (*PostureCheck) Delete added in v0.3.0

Delete removes a posture check from NetBird.

func (*PostureCheck) Diff added in v0.3.0

Diff detects changes between PostureCheckArgs and PostureCheckState.

func (*PostureCheck) Read added in v0.3.0

Read reads a posture check from NetBird.

func (*PostureCheck) Update added in v0.3.0

Update updates a posture check in NetBird.

func (*PostureCheck) WireDependencies added in v0.3.0

func (*PostureCheck) WireDependencies(field infer.FieldSelector, args *PostureCheckArgs, state *PostureCheckState)

WireDependencies explicitly defines input/output relationships.

type PostureCheckArgs added in v0.3.0

type PostureCheckArgs struct {
	Name        string              `pulumi:"name"`
	Description *string             `pulumi:"description,optional"`
	Checks      PostureChecksConfig `pulumi:"checks"`
}

PostureCheckArgs defines input fields for creating or updating a posture check.

func (*PostureCheckArgs) Annotate added in v0.3.0

func (pc *PostureCheckArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for PostureCheckArgs fields.

type PostureCheckState added in v0.3.0

type PostureCheckState struct {
	Name        string              `pulumi:"name"`
	Description *string             `pulumi:"description,optional"`
	Checks      PostureChecksConfig `pulumi:"checks"`
}

PostureCheckState represents the output state of a posture check resource.

func (*PostureCheckState) Annotate added in v0.3.0

func (pc *PostureCheckState) Annotate(annotator infer.Annotator)

Annotate provides documentation for PostureCheckState fields.

type PostureChecksConfig added in v0.3.0

type PostureChecksConfig struct {
	GeoLocation  *PostureGeoLocationCheck      `pulumi:"geoLocationCheck,optional"`
	NbVersion    *PostureMinVersionCheck       `pulumi:"nbVersionCheck,optional"`
	OsVersion    *PostureOSVersionCheck        `pulumi:"osVersionCheck,optional"`
	NetworkRange *PosturePeerNetworkRangeCheck `pulumi:"peerNetworkRangeCheck,optional"`
	Process      *PostureProcessCheck          `pulumi:"processCheck,optional"`
}

PostureChecksConfig groups all available posture checks.

func (*PostureChecksConfig) Annotate added in v0.3.0

func (pc *PostureChecksConfig) Annotate(annotator infer.Annotator)

Annotate provides documentation for PostureChecksConfig fields.

type PostureGeoLocationAction added in v0.3.0

type PostureGeoLocationAction string

PostureGeoLocationAction defines the action for a geo location posture check.

const (
	// PostureGeoLocationActionAllow permits peers matching the specified locations.
	PostureGeoLocationActionAllow PostureGeoLocationAction = PostureGeoLocationAction(nbapi.GeoLocationCheckActionAllow)
	// PostureGeoLocationActionDeny rejects peers matching the specified locations.
	PostureGeoLocationActionDeny PostureGeoLocationAction = PostureGeoLocationAction(nbapi.GeoLocationCheckActionDeny)
)

func (PostureGeoLocationAction) Values added in v0.3.0

Values returns the valid enum values for PostureGeoLocationAction.

type PostureGeoLocationCheck added in v0.3.0

type PostureGeoLocationCheck struct {
	Action    PostureGeoLocationAction `pulumi:"action"`
	Locations []PostureLocation        `pulumi:"locations"`
}

PostureGeoLocationCheck defines a geo location posture check.

func (*PostureGeoLocationCheck) Annotate added in v0.3.0

func (pc *PostureGeoLocationCheck) Annotate(annotator infer.Annotator)

Annotate provides documentation for PostureGeoLocationCheck fields.

type PostureLocation added in v0.3.0

type PostureLocation struct {
	CountryCode string  `pulumi:"countryCode"`
	CityName    *string `pulumi:"cityName,optional"`
}

PostureLocation defines a geographic location used in posture checks.

func (*PostureLocation) Annotate added in v0.3.0

func (pl *PostureLocation) Annotate(annotator infer.Annotator)

Annotate provides documentation for PostureLocation fields.

type PostureMinKernelVersionCheck added in v0.3.0

type PostureMinKernelVersionCheck struct {
	MinKernelVersion string `pulumi:"minKernelVersion"`
}

PostureMinKernelVersionCheck defines a minimum kernel version posture check.

func (*PostureMinKernelVersionCheck) Annotate added in v0.3.0

func (pc *PostureMinKernelVersionCheck) Annotate(annotator infer.Annotator)

Annotate provides documentation for PostureMinKernelVersionCheck fields.

type PostureMinVersionCheck added in v0.3.0

type PostureMinVersionCheck struct {
	MinVersion string `pulumi:"minVersion"`
}

PostureMinVersionCheck defines a minimum version posture check.

func (*PostureMinVersionCheck) Annotate added in v0.3.0

func (pc *PostureMinVersionCheck) Annotate(annotator infer.Annotator)

Annotate provides documentation for PostureMinVersionCheck fields.

type PostureOSVersionCheck added in v0.3.0

type PostureOSVersionCheck struct {
	Android *PostureMinVersionCheck       `pulumi:"android,optional"`
	Darwin  *PostureMinVersionCheck       `pulumi:"darwin,optional"`
	Ios     *PostureMinVersionCheck       `pulumi:"ios,optional"`
	Linux   *PostureMinKernelVersionCheck `pulumi:"linux,optional"`
	Windows *PostureMinKernelVersionCheck `pulumi:"windows,optional"`
}

PostureOSVersionCheck defines minimum OS version requirements per platform.

func (*PostureOSVersionCheck) Annotate added in v0.3.0

func (pc *PostureOSVersionCheck) Annotate(annotator infer.Annotator)

Annotate provides documentation for PostureOSVersionCheck fields.

type PosturePeerNetworkRangeAction added in v0.3.0

type PosturePeerNetworkRangeAction string

PosturePeerNetworkRangeAction defines the action for a network range posture check.

const (
	// PosturePeerNetworkRangeActionAllow permits peers whose local network matches.
	PosturePeerNetworkRangeActionAllow PosturePeerNetworkRangeAction = PosturePeerNetworkRangeAction(nbapi.PeerNetworkRangeCheckActionAllow)
	// PosturePeerNetworkRangeActionDeny rejects peers whose local network matches.
	PosturePeerNetworkRangeActionDeny PosturePeerNetworkRangeAction = PosturePeerNetworkRangeAction(nbapi.PeerNetworkRangeCheckActionDeny)
)

func (PosturePeerNetworkRangeAction) Values added in v0.3.0

Values returns the valid enum values for PosturePeerNetworkRangeAction.

type PosturePeerNetworkRangeCheck added in v0.3.0

type PosturePeerNetworkRangeCheck struct {
	Action PosturePeerNetworkRangeAction `pulumi:"action"`
	Ranges []string                      `pulumi:"ranges"`
}

PosturePeerNetworkRangeCheck defines a posture check based on peer network ranges.

func (*PosturePeerNetworkRangeCheck) Annotate added in v0.3.0

func (pc *PosturePeerNetworkRangeCheck) Annotate(annotator infer.Annotator)

Annotate provides documentation for PosturePeerNetworkRangeCheck fields.

type PostureProcess added in v0.3.0

type PostureProcess struct {
	LinuxPath   *string `pulumi:"linuxPath,optional"`
	MacPath     *string `pulumi:"macPath,optional"`
	WindowsPath *string `pulumi:"windowsPath,optional"`
}

PostureProcess defines a single process required by a posture check.

func (*PostureProcess) Annotate added in v0.3.0

func (pp *PostureProcess) Annotate(annotator infer.Annotator)

Annotate provides documentation for PostureProcess fields.

type PostureProcessCheck added in v0.3.0

type PostureProcessCheck struct {
	Processes []PostureProcess `pulumi:"processes"`
}

PostureProcessCheck defines a posture check for required running processes.

func (*PostureProcessCheck) Annotate added in v0.3.0

func (pc *PostureProcessCheck) Annotate(annotator infer.Annotator)

Annotate provides documentation for PostureProcessCheck fields.

type Protocol

type Protocol string

Protocol defines the allowed network protocols for a policy rule.

Enum constants for supported network protocols.

func (Protocol) Values

func (Protocol) Values() []infer.EnumValue[Protocol]

Values returns valid protocol values for Pulumi enum support.

type Resource

type Resource struct {
	ID   string `pulumi:"id"`   // The unique ID of the resource
	Type Type   `pulumi:"type"` // The type of the resource (domain, host, subnet)
}

Resource represents a single NetBird resource used in a rule (e.g., domain, host, subnet).

func (*Resource) Annotate

func (r *Resource) Annotate(a infer.Annotator)

Annotate adds descriptive annotations to the Resource fields for use in generated SDKs.

type ReverseProxyDomain added in v0.3.0

type ReverseProxyDomain struct{}

ReverseProxyDomain represents a NetBird reverse proxy custom domain resource.

func (*ReverseProxyDomain) Annotate added in v0.3.0

func (r *ReverseProxyDomain) Annotate(annotator infer.Annotator)

Annotate adds a description to the ReverseProxyDomain resource type.

func (*ReverseProxyDomain) Check added in v0.3.0

Check validates input fields for a reverse proxy domain.

func (*ReverseProxyDomain) Create added in v0.3.0

Create creates a new reverse proxy custom domain.

func (*ReverseProxyDomain) Delete added in v0.3.0

Delete removes a reverse proxy domain.

func (*ReverseProxyDomain) Diff added in v0.3.0

Diff detects changes between ReverseProxyDomainArgs and ReverseProxyDomainState. Since the API has no Update endpoint, any input change forces a replacement.

func (*ReverseProxyDomain) Read added in v0.3.0

Read reads a reverse proxy domain by listing all and finding by ID. The API does not provide a Get-by-ID endpoint for domains.

func (*ReverseProxyDomain) WireDependencies added in v0.3.0

WireDependencies explicitly defines input/output relationships.

type ReverseProxyDomainArgs added in v0.3.0

type ReverseProxyDomainArgs struct {
	Domain        string `pulumi:"domain"`
	TargetCluster string `pulumi:"targetCluster"`
}

ReverseProxyDomainArgs defines input fields for creating a reverse proxy domain.

func (*ReverseProxyDomainArgs) Annotate added in v0.3.0

func (r *ReverseProxyDomainArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for ReverseProxyDomainArgs fields.

type ReverseProxyDomainState added in v0.3.0

type ReverseProxyDomainState struct {
	Domain              string                 `pulumi:"domain"`
	TargetCluster       string                 `pulumi:"targetCluster"`
	Type                ReverseProxyDomainType `pulumi:"type"`
	Validated           bool                   `pulumi:"validated"`
	RequireSubdomain    *bool                  `pulumi:"requireSubdomain,optional"`
	SupportsCustomPorts *bool                  `pulumi:"supportsCustomPorts,optional"`
}

ReverseProxyDomainState represents the output state of a reverse proxy domain resource.

func (*ReverseProxyDomainState) Annotate added in v0.3.0

func (r *ReverseProxyDomainState) Annotate(annotator infer.Annotator)

Annotate provides documentation for ReverseProxyDomainState fields.

type ReverseProxyDomainType added in v0.3.0

type ReverseProxyDomainType string

ReverseProxyDomainType defines the allowed domain types.

const (
	// ReverseProxyDomainTypeCustom represents a custom domain.
	ReverseProxyDomainTypeCustom ReverseProxyDomainType = ReverseProxyDomainType(nbapi.ReverseProxyDomainTypeCustom)
	// ReverseProxyDomainTypeFree represents a free (managed) domain.
	ReverseProxyDomainTypeFree ReverseProxyDomainType = ReverseProxyDomainType(nbapi.ReverseProxyDomainTypeFree)
)

func (ReverseProxyDomainType) Values added in v0.3.0

Values returns the valid enum values for ReverseProxyDomainType.

type ReverseProxyService added in v0.3.0

type ReverseProxyService struct{}

ReverseProxyService represents a NetBird reverse proxy service resource.

func (*ReverseProxyService) Annotate added in v0.3.0

func (r *ReverseProxyService) Annotate(annotator infer.Annotator)

Annotate adds a description to the ReverseProxyService resource type.

func (*ReverseProxyService) Check added in v0.3.0

Check validates input fields for a reverse proxy service.

func (*ReverseProxyService) Create added in v0.3.0

Create creates a new NetBird reverse proxy service.

func (*ReverseProxyService) Delete added in v0.3.0

Delete removes a reverse proxy service from NetBird.

func (*ReverseProxyService) Diff added in v0.3.0

Diff detects changes between ReverseProxyServiceArgs and ReverseProxyServiceState.

func (*ReverseProxyService) Read added in v0.3.0

Read reads a reverse proxy service from NetBird.

func (*ReverseProxyService) Update added in v0.3.0

Update updates a reverse proxy service in NetBird.

func (*ReverseProxyService) WireDependencies added in v0.3.0

WireDependencies explicitly defines input/output relationships.

type ReverseProxyServiceArgs added in v0.3.0

type ReverseProxyServiceArgs struct {
	Name             string                   `pulumi:"name"`
	Domain           string                   `pulumi:"domain"`
	Enabled          bool                     `pulumi:"enabled"`
	Mode             *ReverseProxyServiceMode `pulumi:"mode,optional"`
	Targets          []ReverseProxyTarget     `pulumi:"targets"`
	PassHostHeader   *bool                    `pulumi:"passHostHeader,optional"`
	RewriteRedirects *bool                    `pulumi:"rewriteRedirects,optional"`
	ListenPort       *int                     `pulumi:"listenPort,optional"`
}

ReverseProxyServiceArgs defines input fields for creating or updating a reverse proxy service.

func (*ReverseProxyServiceArgs) Annotate added in v0.3.0

func (r *ReverseProxyServiceArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for ReverseProxyServiceArgs fields.

type ReverseProxyServiceMode added in v0.3.0

type ReverseProxyServiceMode string

ReverseProxyServiceMode defines the allowed service modes.

const (
	// ReverseProxyServiceModeHTTP represents L7 HTTP reverse proxy mode.
	ReverseProxyServiceModeHTTP ReverseProxyServiceMode = ReverseProxyServiceMode(nbapi.ServiceRequestModeHttp)
	// ReverseProxyServiceModeTCP represents L4 TCP passthrough mode.
	ReverseProxyServiceModeTCP ReverseProxyServiceMode = ReverseProxyServiceMode(nbapi.ServiceRequestModeTcp)
	// ReverseProxyServiceModeTLS represents L4 TLS passthrough mode.
	ReverseProxyServiceModeTLS ReverseProxyServiceMode = ReverseProxyServiceMode(nbapi.ServiceRequestModeTls)
	// ReverseProxyServiceModeUDP represents L4 UDP passthrough mode.
	ReverseProxyServiceModeUDP ReverseProxyServiceMode = ReverseProxyServiceMode(nbapi.ServiceRequestModeUdp)
)

func (ReverseProxyServiceMode) Values added in v0.3.0

Values returns the valid enum values for ReverseProxyServiceMode.

type ReverseProxyServiceState added in v0.3.0

type ReverseProxyServiceState struct {
	Name             string                   `pulumi:"name"`
	Domain           string                   `pulumi:"domain"`
	Enabled          bool                     `pulumi:"enabled"`
	Mode             *ReverseProxyServiceMode `pulumi:"mode,optional"`
	Targets          []ReverseProxyTarget     `pulumi:"targets"`
	PassHostHeader   *bool                    `pulumi:"passHostHeader,optional"`
	RewriteRedirects *bool                    `pulumi:"rewriteRedirects,optional"`
	ListenPort       *int                     `pulumi:"listenPort,optional"`
	ProxyCluster     *string                  `pulumi:"proxyCluster,optional"`
	Status           *string                  `pulumi:"status,optional"`
}

ReverseProxyServiceState represents the output state of a reverse proxy service resource.

func (*ReverseProxyServiceState) Annotate added in v0.3.0

func (r *ReverseProxyServiceState) Annotate(annotator infer.Annotator)

Annotate provides documentation for ReverseProxyServiceState fields.

type ReverseProxyTarget added in v0.3.0

type ReverseProxyTarget struct {
	TargetID   string                     `pulumi:"targetId"`
	Enabled    bool                       `pulumi:"enabled"`
	Host       *string                    `pulumi:"host,optional"`
	Port       int                        `pulumi:"port"`
	Protocol   ReverseProxyTargetProtocol `pulumi:"protocol"`
	TargetType ReverseProxyTargetType     `pulumi:"targetType"`
	Path       *string                    `pulumi:"path,optional"`
}

ReverseProxyTarget defines a single backend target for a reverse proxy service.

func (*ReverseProxyTarget) Annotate added in v0.3.0

func (r *ReverseProxyTarget) Annotate(annotator infer.Annotator)

Annotate provides documentation for ReverseProxyTarget fields.

type ReverseProxyTargetProtocol added in v0.3.0

type ReverseProxyTargetProtocol string

ReverseProxyTargetProtocol defines the protocol used to connect to a backend target.

const (
	// ReverseProxyTargetProtocolHTTP represents the HTTP protocol.
	ReverseProxyTargetProtocolHTTP ReverseProxyTargetProtocol = ReverseProxyTargetProtocol(nbapi.ServiceTargetProtocolHttp)
	// ReverseProxyTargetProtocolHTTPS represents the HTTPS protocol.
	ReverseProxyTargetProtocolHTTPS ReverseProxyTargetProtocol = ReverseProxyTargetProtocol(nbapi.ServiceTargetProtocolHttps)
	// ReverseProxyTargetProtocolTCP represents the TCP protocol.
	ReverseProxyTargetProtocolTCP ReverseProxyTargetProtocol = ReverseProxyTargetProtocol(nbapi.ServiceTargetProtocolTcp)
	// ReverseProxyTargetProtocolUDP represents the UDP protocol.
	ReverseProxyTargetProtocolUDP ReverseProxyTargetProtocol = ReverseProxyTargetProtocol(nbapi.ServiceTargetProtocolUdp)
)

func (ReverseProxyTargetProtocol) Values added in v0.3.0

Values returns the valid enum values for ReverseProxyTargetProtocol.

type ReverseProxyTargetType added in v0.3.0

type ReverseProxyTargetType string

ReverseProxyTargetType defines the type of backend target.

const (
	// ReverseProxyTargetTypeDomain represents a domain-based target.
	ReverseProxyTargetTypeDomain ReverseProxyTargetType = ReverseProxyTargetType(nbapi.ServiceTargetTargetTypeDomain)
	// ReverseProxyTargetTypeHost represents a host-based target.
	ReverseProxyTargetTypeHost ReverseProxyTargetType = ReverseProxyTargetType(nbapi.ServiceTargetTargetTypeHost)
	// ReverseProxyTargetTypePeer represents a peer-based target.
	ReverseProxyTargetTypePeer ReverseProxyTargetType = ReverseProxyTargetType(nbapi.ServiceTargetTargetTypePeer)
	// ReverseProxyTargetTypeSubnet represents a subnet-based target.
	ReverseProxyTargetTypeSubnet ReverseProxyTargetType = ReverseProxyTargetType(nbapi.ServiceTargetTargetTypeSubnet)
)

func (ReverseProxyTargetType) Values added in v0.3.0

Values returns the valid enum values for ReverseProxyTargetType.

type Route added in v0.3.4

type Route struct{}

Route represents a Pulumi resource for NetBird routes.

func (*Route) Annotate added in v0.3.4

func (r *Route) Annotate(a infer.Annotator)

Annotate provides documentation for Route.

func (*Route) Check added in v0.3.4

Check provides input validation.

func (*Route) Create added in v0.3.4

Create creates a new NetBird route.

func (*Route) Delete added in v0.3.4

Delete removes a route from NetBird.

func (*Route) Diff added in v0.3.4

Diff detects changes between inputs and prior state.

func (*Route) Read added in v0.3.4

Read fetches the current state of a route from NetBird.

func (*Route) Update added in v0.3.4

Update updates an existing NetBird route.

func (*Route) WireDependencies added in v0.3.4

func (*Route) WireDependencies(selector infer.FieldSelector, args *RouteArgs, state *RouteState)

WireDependencies defines input/output field relationships.

type RouteArgs added in v0.3.4

type RouteArgs struct {
	NetworkID           string    `pulumi:"networkId"`
	Description         string    `pulumi:"description"`
	Enabled             bool      `pulumi:"enabled"`
	Masquerade          bool      `pulumi:"masquerade"`
	Metric              int       `pulumi:"metric"`
	KeepRoute           bool      `pulumi:"keepRoute"`
	Network             *string   `pulumi:"network,optional"`
	Domains             *[]string `pulumi:"domains,optional"`
	Groups              []string  `pulumi:"groups"`
	Peer                *string   `pulumi:"peer,optional"`
	PeerGroups          *[]string `pulumi:"peerGroups,optional"`
	AccessControlGroups *[]string `pulumi:"accessControlGroups,optional"`
	SkipAutoApply       *bool     `pulumi:"skipAutoApply,optional"`
}

RouteArgs defines input fields for creating or updating a route.

func (*RouteArgs) Annotate added in v0.3.4

func (a *RouteArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for RouteArgs fields.

type RouteState added in v0.3.4

type RouteState struct {
	NetworkID           string    `pulumi:"networkId"`
	Description         string    `pulumi:"description"`
	Enabled             bool      `pulumi:"enabled"`
	Masquerade          bool      `pulumi:"masquerade"`
	Metric              int       `pulumi:"metric"`
	KeepRoute           bool      `pulumi:"keepRoute"`
	Network             *string   `pulumi:"network,optional"`
	Domains             *[]string `pulumi:"domains,optional"`
	Groups              []string  `pulumi:"groups"`
	Peer                *string   `pulumi:"peer,optional"`
	PeerGroups          *[]string `pulumi:"peerGroups,optional"`
	AccessControlGroups *[]string `pulumi:"accessControlGroups,optional"`
	SkipAutoApply       *bool     `pulumi:"skipAutoApply,optional"`
	NetworkType         *string   `pulumi:"networkType,optional"`
}

RouteState represents the output state of a route resource.

func (*RouteState) Annotate added in v0.3.4

func (s *RouteState) Annotate(annotator infer.Annotator)

Annotate provides documentation for RouteState fields.

type RuleAction

type RuleAction string

RuleAction defines the allowed actions for a rule (accept/drop). This wraps the nbapi type to allow method definitions (like Values()).

RuleActi2yyonAccept and RuleActionDrop represent possible actions for a policy rule. RuleActionAccept allows traffic, while RuleActionDrop blocks traffic.

func (RuleAction) Values

func (RuleAction) Values() []infer.EnumValue[RuleAction]

Values returns the valid enum values for RuleAction, used by Pulumi for schema generation and validation.

type RuleGroup

type RuleGroup struct {
	ID   string `pulumi:"id"`
	Name string `pulumi:"name"`
}

RuleGroup type.

func (*RuleGroup) Annotate

func (g *RuleGroup) Annotate(a infer.Annotator)

Annotate adds descriptive annotations to the RuleGroup fields for use in generated SDKs.

type RulePortRange

type RulePortRange struct {
	Start int `pulumi:"start"`
	End   int `pulumi:"end"`
}

RulePortRange type.

func (*RulePortRange) Annotate added in v0.0.13

func (r *RulePortRange) Annotate(a infer.Annotator)

Annotate adds descriptive annotations to the RulePortRange fields for use in generated SDKs.

type SetupKey added in v0.1.3

type SetupKey struct{}

SetupKey represents a resource for managing NetBird setup keys.

func (*SetupKey) Annotate added in v0.1.3

func (s *SetupKey) Annotate(a infer.Annotator)

Annotate adds a description to the SetupKey resource type.

func (*SetupKey) Check added in v0.2.0

Check provides input validation and default setting.

func (*SetupKey) Create added in v0.1.3

Create creates a new NetBird setup key.

func (*SetupKey) Delete added in v0.1.3

Delete removes a setup key from NetBird.

func (*SetupKey) Diff added in v0.2.0

Diff detects changes between inputs and prior state.

func (*SetupKey) Read added in v0.1.3

func (*SetupKey) Read(ctx context.Context, setupKeyID string, state SetupKeyState) (SetupKeyState, error)

Read fetches the current state of a setup key resource from NetBird.

func (*SetupKey) Update added in v0.1.3

Update updates the state of the setup key if needed.

type SetupKeyArgs added in v0.1.3

type SetupKeyArgs struct {
	Name                string       `pulumi:"name"`
	Type                SetupKeyType `pulumi:"type"`
	ExpiresIn           int          `pulumi:"expiresIn"` // seconds
	AutoGroups          []string     `pulumi:"autoGroups"`
	UsageLimit          int          `pulumi:"usageLimit"`
	Ephemeral           *bool        `pulumi:"ephemeral,optional"`
	AllowExtraDNSLabels *bool        `pulumi:"allowExtraDnsLabels,optional"`
}

SetupKeyArgs represents the input arguments for creating a setup key.

func (*SetupKeyArgs) Annotate added in v0.1.3

func (a *SetupKeyArgs) Annotate(annotator infer.Annotator)

Annotate provides documentation for SetupKeyArgs fields.

type SetupKeyState added in v0.1.3

type SetupKeyState struct {
	SetupKeyArgs

	Key       *string `pulumi:"key,optional"`
	Valid     *bool   `pulumi:"valid,optional"`
	Revoked   *bool   `pulumi:"revoked,optional"`
	UsedTimes *int    `pulumi:"usedTimes,optional"`
	LastUsed  *string `pulumi:"lastUsed,optional"`
	Expires   *string `pulumi:"expires,optional"`
	State     *string `pulumi:"state,optional"`
	UpdatedAt *string `pulumi:"updatedAt,optional"`
}

SetupKeyState represents the state/output of a setup key resource.

type SetupKeyType added in v0.1.3

type SetupKeyType string

SetupKeyType defines the kind of setup key accepted by NetBird.

const (
	// SetupKeyTypeReusable creates a key that can be used multiple times.
	SetupKeyTypeReusable SetupKeyType = SetupKeyType("reusable")
	// SetupKeyTypeOneOff creates a key that can only be used once.
	SetupKeyTypeOneOff SetupKeyType = SetupKeyType("one-off")
)

func (SetupKeyType) Values added in v0.1.3

func (SetupKeyType) Values() []infer.EnumValue[Type]

Values describes the setup key type enum for schema generation.

type Type added in v0.0.18

type Type string

Type defines the allowed resource types for a policy rule.

const (
	ResourceTypeDomain Type = Type(nbapi.ResourceTypeDomain)
	ResourceTypeHost   Type = Type(nbapi.ResourceTypeHost)
	ResourceTypeSubnet Type = Type(nbapi.ResourceTypeSubnet)
)

ResourceTypeDomain, ResourceTypeHost, and ResourceTypeSyyubnet represent different types of network resources.

func (Type) Values added in v0.0.18

func (Type) Values() []infer.EnumValue[Type]

Values returns the list of supported ResourceType values for Pulumi enum generation.

type User added in v0.0.21

type User struct{}

User represents a NetBird user resource (invitation).

func (*User) Annotate added in v0.0.21

func (u *User) Annotate(a infer.Annotator)

Annotate describes the resource and its fields.

func (*User) Check added in v0.0.23

Check provides input validation and default setting.

func (*User) Create added in v0.0.21

Create creates a new NetBird user.

func (*User) Delete added in v0.0.22

Delete removes a user from NetBird.

func (*User) Diff added in v0.0.22

Diff detects changes between inputs and prior state.

func (*User) Read added in v0.0.22

Read fetches the current state of a user from NetBird.

func (*User) Update added in v0.0.22

Update updates the state of the NetBird User resource if needed.

func (*User) WireDependencies added in v0.0.23

func (*User) WireDependencies(field infer.FieldSelector, args *UserArgs, state *UserState)

WireDependencies explicitly defines input/output relationships.

type UserArgs added in v0.0.21

type UserArgs struct {
	// Email is the user's email address to which the invite is sent.
	Email *string `pulumi:"email,optional"`
	// Name is the full name of the user.
	Name *string `pulumi:"name,optional"`
	// Role is the NetBird account role to assign (e.g. 'admin', 'user').
	Role string `pulumi:"role"`
	// IsServiceUser is true if the user is a service identity.
	IsServiceUser bool `pulumi:"isServiceUser,optional"`
	// AutoGroups is the list of group IDs to auto-assign peers to.
	AutoGroups []string `pulumi:"autoGroups,optional"`
	// IsBlocked indicates whether the user is blocked from accessing the system.
	// Used only on update, not create.
	IsBlocked *bool `pulumi:"blocked,optional"`
}

UserArgs defines input arguments for creating a NetBird user.

func (*UserArgs) Annotate added in v0.0.21

func (user *UserArgs) Annotate(annotator infer.Annotator)

Annotate adds descriptions for SDK schema generation.

type UserState added in v0.0.21

type UserState struct {
	Email         *string  `pulumi:"email,optional"`
	Name          *string  `pulumi:"name,optional"`
	Role          string   `pulumi:"role"`
	IsServiceUser bool     `pulumi:"isServiceUser"`
	AutoGroups    []string `pulumi:"autoGroups,optional"`
	IsBlocked     *bool    `pulumi:"blocked,optional"`
}

UserState represents the stored state of a NetBird user in Pulumi.

func (*UserState) Annotate added in v0.0.21

func (user *UserState) Annotate(annotator infer.Annotator)

Annotate documents the stored state for the Pulumi schema.

Jump to

Keyboard shortcuts

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