Documentation
¶
Index ¶
- func DecodeResourceData(d *schema.ResourceData, target any) error
- func EncodeResourceData(in any, d *schema.ResourceData) error
- type AccessRule
- type AccessRuleItem
- type Alarm
- type AlarmChannel
- type App
- type AppACL
- type Connector
- type Group
- type GroupMember
- type IDP
- type IDPOpenIDConfig
- type IDPSAMLConfig
- type KVMImage
- type KVMVolume
- type NetworkConfig
- type NetworkInterface
- type NetworkRoute
- type NetworkTunnel
- type Node
- type PortalAuth
- type Service
- type Tagging
- type VRF
- type VRFACL
- type VRFNAT
- type VRFRoute
- type VRFRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeResourceData ¶ added in v0.0.7
func DecodeResourceData(d *schema.ResourceData, target any) error
DecodeResourceData decodes TF resource data (HCL+schema filters/etc) into the given struct, using the `tf` tag. If a field doesn't have a `tf` tag, it won't be populated.
func EncodeResourceData ¶ added in v0.0.7
func EncodeResourceData(in any, d *schema.ResourceData) error
EncodeResourceData sets the values on the given ResourceData according to the struct's tf tags.
Types ¶
type AccessRule ¶ added in v1.0.0
type AccessRule struct { AppID string `tf:"app"` Action string `tf:"action"` Name string `tf:"name"` Exceptions []AccessRuleItem `tf:"exception"` Includes []AccessRuleItem `tf:"include"` Requires []AccessRuleItem `tf:"require"` }
func (*AccessRule) ResourceURL ¶ added in v1.0.0
func (h *AccessRule) ResourceURL(ID string) string
func (*AccessRule) ToTG ¶ added in v1.0.0
func (h *AccessRule) ToTG() tg.AppAccessRule
func (*AccessRule) URL ¶ added in v1.0.0
func (h *AccessRule) URL() string
func (*AccessRule) UpdateFromTG ¶ added in v1.0.0
func (h *AccessRule) UpdateFromTG(r tg.AppAccessRule)
type AccessRuleItem ¶ added in v1.0.0
type AccessRuleItem struct { Emails []string `tf:"emails"` Everyone bool `tf:"everyone"` IPRanges []string `tf:"ip_ranges"` Countries []string `tf:"countries"` EmailsEndingIn []string `tf:"emails_ending_in"` IDPGroups []string `tf:"idp_groups"` AccessGroups []string `tf:"access_groups"` }
func (*AccessRuleItem) ToTG ¶ added in v1.0.0
func (h *AccessRuleItem) ToTG() *tg.AppAccessRuleItem
func (*AccessRuleItem) UpdateFromTG ¶ added in v1.0.0
func (h *AccessRuleItem) UpdateFromTG(item tg.AppAccessRuleItem)
type Alarm ¶ added in v1.9.0
type Alarm struct { UID string `tf:"uid"` Name string `tf:"name"` Channels []string `tf:"channels"` Description string `tf:"description"` Expr string `tf:"expr"` FreeText string `tf:"freetext"` Nodes []string `tf:"nodes"` Operator string `tf:"operator"` TagOperator string `tf:"tag_operator"` Tags []tagging `tf:"tag"` Enabled bool `tf:"enabled"` Threshold string `tf:"threshold"` Types []string `tf:"types"` }
func (*Alarm) ResourceURL ¶ added in v1.9.0
func (*Alarm) UpdateFromTG ¶ added in v1.9.0
type AlarmChannel ¶ added in v1.9.0
type AlarmChannel struct { UID string `tf:"uid"` Name string `tf:"name"` Emails []string `tf:"emails"` GenericWebhook string `tf:"generic_webhook"` MSTeams string `tf:"ms_teams"` OpsGenie string `tf:"ops_genie"` Pagerduty string `tf:"pagerduty"` Slack []slackChannel `tf:"slack"` }
func (*AlarmChannel) ResourceURL ¶ added in v1.9.0
func (h *AlarmChannel) ResourceURL(ID string) string
func (*AlarmChannel) ToTG ¶ added in v1.9.0
func (h *AlarmChannel) ToTG() tg.AlarmChannel
func (*AlarmChannel) URL ¶ added in v1.9.0
func (h *AlarmChannel) URL() string
func (*AlarmChannel) UpdateFromTG ¶ added in v1.9.0
func (h *AlarmChannel) UpdateFromTG(a tg.AlarmChannel)
type App ¶ added in v1.0.0
type App struct { AppType string `tf:"type"` Name string `tf:"name"` UID string `tf:"uid"` Description string `tf:"description"` EdgeNodeID string `tf:"edge_node"` GatewayNodeID string `tf:"gateway_node"` IDPID string `tf:"idp"` IP string `tf:"ip"` Port int `tf:"port"` Protocol string `tf:"protocol"` Hostname string `tf:"hostname"` SessionDuration int `tf:"session_duration"` TLSVerificationMode string `tf:"tls_verification_mode"` TrustMode string `tf:"trust_mode"` GroupIDs []string `tf:"visibility_groups"` WireGuardTemplate string `tf:"wireguard_template"` VRF string `tf:"vrf"` VirtualNetwork string `tf:"virtual_network"` VirtualSourceIP string `tf:"virtual_source_ip"` }
func (*App) ResourceURL ¶ added in v1.0.0
func (*App) UpdateFromTG ¶ added in v1.0.0
type AppACL ¶ added in v1.0.0
type AppACL struct { AppID string `tf:"app"` Description string `tf:"description"` IPs []string `tf:"ips"` PortRange string `tf:"port_range"` Protocol string `tf:"protocol"` }
func (*AppACL) ResourceURL ¶ added in v1.0.0
func (*AppACL) UpdateFromTG ¶ added in v1.0.0
type Connector ¶ added in v1.6.0
type Connector struct { NodeID string `tf:"node_id"` ClusterFQDN string `tf:"cluster_fqdn"` Node string `tf:"node"` Port int `tf:"port"` Protocol string `tf:"protocol"` Service string `tf:"service"` Description string `tf:"description"` RateLimit int `tf:"rate_limit,omitempty"` }
func (*Connector) UpdateFromTG ¶ added in v1.6.0
type Group ¶ added in v1.3.7
type Group struct { Name string `tf:"name"` UID string `tf:"uid"` IDPID string `tf:"idp_id"` Description string `tf:"description"` }
Group holds the HCL representation of a group
func (*Group) ResourceURL ¶ added in v1.3.7
ResourceURL returns the URL for a specific group on the TG API side
func (*Group) ToTG ¶ added in v1.3.7
ToTG returns the TG API representation of a group from the HCL representation
func (*Group) UpdateFromTG ¶ added in v1.3.7
UpdateFromTG updates the HCL representation of a group from the TG API representation
type GroupMember ¶ added in v1.3.7
GroupMember holds the HCL representation of a group member
type IDP ¶ added in v1.0.0
type IDP struct { UID string `tf:"uid"` Type string `tf:"type"` Description string `tf:"description"` Name string `tf:"name"` }
IDP holds HCL-marshaled TF state for an IDP
func (*IDP) ResourceURL ¶ added in v1.0.0
ResourceURL sends back the IDP's specific URL for the TG API
func (*IDP) UpdateFromTG ¶ added in v1.0.0
UpdateFromTG updates the IDP with the IDP from the TG API
type IDPOpenIDConfig ¶ added in v1.3.7
type IDPOpenIDConfig struct { UID string `tf:"idp_id"` Issuer string `tf:"issuer"` ClientID string `tf:"client_id"` Secret string `tf:"secret"` AuthEndpoint string `tf:"auth_endpoint"` TokenEndpoint string `tf:"token_endpoint"` UserInfoEndpoint string `tf:"user_info_endpoint"` }
IDPOpenIDConfig holds HCL-marshaled TF state for an IDP OpenID config
func (*IDPOpenIDConfig) ResourceURL ¶ added in v1.3.7
func (idp *IDPOpenIDConfig) ResourceURL(ID string) string
ResourceURL sends back the IDP OpenID config's specific URL for the TG API
func (*IDPOpenIDConfig) ToTG ¶ added in v1.3.7
func (idp *IDPOpenIDConfig) ToTG() tg.IDPOpenIDConfig
ToTG returns the IDP OpenID config converted to a TG API consumable IDP OpenID config
func (*IDPOpenIDConfig) UpdateFromTG ¶ added in v1.3.7
func (idp *IDPOpenIDConfig) UpdateFromTG(o tg.IDPOpenIDConfig)
UpdateFromTG updates the IDP OpenID config with the IDP OpenID config from the TG API
type IDPSAMLConfig ¶ added in v1.3.7
type IDPSAMLConfig struct { UID string `tf:"idp_id"` LoginURL string `tf:"login_url"` Issuer string `tf:"issuer"` Cert string `tf:"cert"` }
IDPSAMLConfig holds HCL-marshaled TF state for an IDP SAML config
func (*IDPSAMLConfig) ResourceURL ¶ added in v1.3.7
func (idp *IDPSAMLConfig) ResourceURL(ID string) string
ResourceURL sends back the IDP SAML config's specific URL for the TG API
func (*IDPSAMLConfig) ToTG ¶ added in v1.3.7
func (idp *IDPSAMLConfig) ToTG() tg.IDPSAMLConfig
ToTG returns the IDP SAML config converted to a TG API consumable IDP SAML config
func (*IDPSAMLConfig) UpdateFromTG ¶ added in v1.3.7
func (idp *IDPSAMLConfig) UpdateFromTG(o tg.IDPSAMLConfig)
UpdateFromTG updates the IDP SAML config with the IDP SAML config from the TG API
type KVMImage ¶ added in v1.0.0
type KVMImage struct { NodeID string `tf:"node_id"` UID string `tf:"uid"` Description string `tf:"description"` DisplayName string `tf:"display_name"` Location string `tf:"location"` OS string `tf:"os"` }
func (*KVMImage) ResourceURL ¶ added in v1.0.0
func (*KVMImage) UpdateFromTG ¶ added in v1.0.0
type KVMVolume ¶ added in v1.0.0
type KVMVolume struct { NodeID string `tf:"node_id"` Name string `tf:"name"` DeviceType string `tf:"device_type"` DeviseBus string `tf:"device_bus"` Size int `tf:"size"` ProvisionType string `tf:"provision_type"` Encrypted bool `tf:"encrypted"` Path string `tf:"path"` }
func (*KVMVolume) ResourceURL ¶ added in v1.0.0
func (*KVMVolume) UpdateFromTG ¶ added in v1.0.0
type NetworkConfig ¶ added in v1.0.0
type NetworkConfig struct { DarkMode bool `tf:"dark_mode"` Forwarding bool `tf:"forwarding"` Tunnels []NetworkTunnel `tf:"tunnel"` Interfaces []NetworkInterface `tf:"interface"` VRFs []VRF `tf:"vrf"` }
func (*NetworkConfig) ToTG ¶ added in v1.0.0
func (h *NetworkConfig) ToTG() tg.NetworkConfig
func (*NetworkConfig) UpdateFromTG ¶ added in v1.0.0
func (h *NetworkConfig) UpdateFromTG(c tg.NetworkConfig)
type NetworkInterface ¶ added in v1.0.0
type NetworkInterface struct { NIC string `tf:"nic"` Routes []NetworkRoute `tf:"route,omitempty"` CloudRoutes []NetworkRoute `tf:"cloud_route,omitempty"` ClusterIP string `tf:"cluster_ip,omitempty"` DHCP bool `tf:"dhcp"` Gateway string `tf:"gateway"` IP string `tf:"ip"` Mode string `tf:"mode,omitempty"` DNS []string `tf:"dns,omitempty"` Duplex string `tf:"duplex,omitempty"` Speed int `tf:"speed,omitempty"` }
type NetworkRoute ¶ added in v1.7.0
type NetworkTunnel ¶ added in v1.0.0
type NetworkTunnel struct { Enabled bool `tf:"enabled"` Name string `tf:"name"` IKE int `tf:"ike,omitempty"` IKECipher string `tf:"ike_cipher,omitempty"` IKEGroup int `tf:"ike_group,omitempty"` RekeyInterval int `tf:"rekey_interval,omitempty"` IP string `tf:"ip,omitempty"` Destination string `tf:"destination,omitempty"` IPSecCipher string `tf:"ipsec_cipher,omitempty"` PSK string `tf:"psk,omitempty"` VRF string `tf:"vrf,omitempty"` Type string `tf:"type"` MTU int `tf:"mtu"` NetworkID int `tf:"network_id"` LocalID string `tf:"local_id,omitempty"` RemoteID string `tf:"remote_id,omitempty"` DPDRetries int `tf:"dpd_retries,omitempty"` DPDInterval int `tf:"dpd_interval,omitempty"` IFace string `tf:"iface,omitempty"` PFS int `tf:"pfs"` ReplayWindow int `tf:"replay_window,omitempty"` RemoteSubnet string `tf:"remote_subnet,omitempty"` LocalSubnet string `tf:"local_subnet,omitempty"` }
type Node ¶ added in v1.3.0
func (*Node) ResourceURL ¶ added in v1.3.0
func (*Node) UpdateFromTG ¶ added in v1.3.0
type PortalAuth ¶ added in v1.4.0
func (*PortalAuth) ToTG ¶ added in v1.4.0
func (p *PortalAuth) ToTG() *tg.PortalAuth
ToTG returns the auth info converted to a TG API consumable
func (*PortalAuth) UpdateFromTG ¶ added in v1.4.0
func (p *PortalAuth) UpdateFromTG(r tg.PortalAuth)
UpdateFromTG updates the HCL struct with data from the TG API
type Service ¶ added in v1.6.0
type Service struct { NodeID string `tf:"node_id"` ClusterFQDN string `tf:"cluster_fqdn"` Name string `tf:"name"` Host string `tf:"host"` Port int `tf:"port"` Protocol string `tf:"protocol"` Description string `tf:"description"` }