connection

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVPNConnectionDataSource

func NewVPNConnectionDataSource() datasource.DataSource

func NewVpnConnectionResource

func NewVpnConnectionResource() resource.Resource

Types

type BGPTunnelConfigModel

type BGPTunnelConfigModel struct {
	RemoteAsn types.Int64 `tfsdk:"remote_asn"`
}

type BasePhaseModel

type BasePhaseModel struct {
	DhGroups             types.List  `tfsdk:"dh_groups"`
	EncryptionAlgorithms types.List  `tfsdk:"encryption_algorithms"`
	IntegrityAlgorithms  types.List  `tfsdk:"integrity_algorithms"`
	RekeyTime            types.Int32 `tfsdk:"rekey_time"`
}

type BasePhasePayload

type BasePhasePayload interface {
	GetDhGroupsOk() ([]vpn.PhaseDhGroupsInner, bool)
	GetEncryptionAlgorithmsOk() ([]vpn.PhaseEncryptionAlgorithmsInner, bool)
	GetIntegrityAlgorithmsOk() ([]vpn.PhaseIntegrityAlgorithmsInner, bool)
	GetRekeyTimeOk() (*int32, bool)

	SetDhGroups([]vpn.PhaseDhGroupsInner)
	SetEncryptionAlgorithms([]vpn.PhaseEncryptionAlgorithmsInner)
	SetIntegrityAlgorithms([]vpn.PhaseIntegrityAlgorithmsInner)
	SetRekeyTime(int32)
}

type CommonModel

type CommonModel struct {
	ID            types.String `tfsdk:"id"`
	ConnectionID  types.String `tfsdk:"connection_id"`
	ProjectID     types.String `tfsdk:"project_id"`
	Region        types.String `tfsdk:"region"`
	GatewayID     types.String `tfsdk:"gateway_id"`
	DisplayName   types.String `tfsdk:"display_name"`
	Enabled       types.Bool   `tfsdk:"enabled"`
	RemoteSubnets types.List   `tfsdk:"remote_subnets"`
	LocalSubnets  types.List   `tfsdk:"local_subnets"`
	StaticRoutes  types.List   `tfsdk:"static_routes"`
	Labels        types.Map    `tfsdk:"labels"`
}

CommonModel is used in the resource and the datasource implementation to share most of the mapping logic

type DataSourceModel

type DataSourceModel struct {
	CommonModel
	Tunnel1 *DataSourceTunnelModel `tfsdk:"tunnel1"`
	Tunnel2 *DataSourceTunnelModel `tfsdk:"tunnel2"`
}

type DataSourceTunnelModel

type DataSourceTunnelModel struct {
	RemoteAddress types.String          `tfsdk:"remote_address"`
	Phase1        *Phase1Model          `tfsdk:"phase1"`
	Phase2        *Phase2Model          `tfsdk:"phase2"`
	Peering       *PeeringConfigModel   `tfsdk:"peering"`
	Bgp           *BGPTunnelConfigModel `tfsdk:"bgp"`
}

type Model

type Model struct {
	CommonModel
	Tunnel1 *TunnelModel `tfsdk:"tunnel1"`
	Tunnel2 *TunnelModel `tfsdk:"tunnel2"`
}

Model is used for the resource implementation

type PeeringConfigModel

type PeeringConfigModel struct {
	LocalAddress  types.String `tfsdk:"local_address"`
	RemoteAddress types.String `tfsdk:"remote_address"`
}

type Phase1Model

type Phase1Model struct {
	BasePhaseModel
}

type Phase2Model

type Phase2Model struct {
	StartAction types.String `tfsdk:"start_action"`
	DpdAction   types.String `tfsdk:"dpd_action"`
	BasePhaseModel
}

type TunnelModel

type TunnelModel struct {
	DataSourceTunnelModel
	PreSharedKey          types.String `tfsdk:"pre_shared_key"`
	PreSharedKeyWo        types.String `tfsdk:"pre_shared_key_wo"`
	PreSharedKeyWoVersion types.Int64  `tfsdk:"pre_shared_key_wo_version"`
}

Jump to

Keyboard shortcuts

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