v6provider

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(k *KatapultProvider) func() provider.Provider

Types

type IPDataSource

type IPDataSource struct {
	M *Meta
}

func (*IPDataSource) Configure

func (IPDataSource) Metadata

func (*IPDataSource) Read

func (IPDataSource) Schema

type IPDataSourceModel

type IPDataSourceModel struct {
	ID              types.String `tfsdk:"id"`
	NetworkID       types.String `tfsdk:"network_id"`
	Version         types.Int64  `tfsdk:"version"`
	Address         types.String `tfsdk:"address"`
	AddressWithMask types.String `tfsdk:"address_with_mask"`
	ReverseDNS      types.String `tfsdk:"reverse_dns"`
	VIP             types.Bool   `tfsdk:"vip"`
	Label           types.String `tfsdk:"label"`
	AllocationType  types.String `tfsdk:"allocation_type"`
	AllocationID    types.String `tfsdk:"allocation_id"`
}

type IPResource

type IPResource struct {
	M *Meta
}

func (*IPResource) Configure

func (*IPResource) Create

func (r *IPResource) Create(
	ctx context.Context,
	req resource.CreateRequest,
	resp *resource.CreateResponse,
)

func (*IPResource) Delete

func (r *IPResource) Delete(
	ctx context.Context,
	req resource.DeleteRequest,
	resp *resource.DeleteResponse,
)

func (*IPResource) IPRead

func (r *IPResource) IPRead(
	ctx context.Context,
	model *IPResourceModel,
	state *tfsdk.State,
) error

func (*IPResource) ImportState

func (IPResource) Metadata

func (*IPResource) Read

func (r *IPResource) Read(
	ctx context.Context,
	req resource.ReadRequest,
	resp *resource.ReadResponse,
)

func (IPResource) Schema

func (*IPResource) Update

func (r *IPResource) Update(
	ctx context.Context,
	req resource.UpdateRequest,
	resp *resource.UpdateResponse,
)

type IPResourceModel

type IPResourceModel struct {
	ID              types.String `tfsdk:"id"`
	NetworkID       types.String `tfsdk:"network_id"`
	Version         types.Int64  `tfsdk:"version"`
	Address         types.String `tfsdk:"address"`
	AddressWithMask types.String `tfsdk:"address_with_mask"`
	ReverseDNS      types.String `tfsdk:"reverse_dns"`
	VIP             types.Bool   `tfsdk:"vip"`
	Label           types.String `tfsdk:"label"`
	AllocationType  types.String `tfsdk:"allocation_type"`
	AllocationID    types.String `tfsdk:"allocation_id"`
}

type KatapultProvider

type KatapultProvider struct {
	Version    string
	Commit     string
	HTTPClient *http.Client

	GeneratedNamePrefix string
	// contains filtered or unexported fields
}

func (*KatapultProvider) Configure

func (*KatapultProvider) DataSources

func (k *KatapultProvider) DataSources(
	_ context.Context,
) []func() datasource.DataSource

func (*KatapultProvider) Metadata

func (*KatapultProvider) Resources

func (k *KatapultProvider) Resources(
	_ context.Context,
) []func() resource.Resource

func (*KatapultProvider) Schema

type KatapultProviderModel

type KatapultProviderModel struct {
	APIKey               types.String `tfsdk:"api_key"`
	Organization         types.String `tfsdk:"organization"`
	DataCenter           types.String `tfsdk:"data_center"`
	SkipTrashObjectPurge types.Bool   `tfsdk:"skip_trash_object_purge"`
	LogLevel             types.String `tfsdk:"log_level"`
}

type LoadBalancerDataSource

type LoadBalancerDataSource struct {
	M *Meta
}

func (*LoadBalancerDataSource) Configure

func (*LoadBalancerDataSource) Metadata

func (*LoadBalancerDataSource) Read

func (*LoadBalancerDataSource) Schema

type LoadBalancerDataSourceModel

type LoadBalancerDataSourceModel struct {
	ID                  types.String `tfsdk:"id"`
	Name                types.String `tfsdk:"name"`
	ResourceType        types.String `tfsdk:"resource_type"`
	VirtualMachine      types.List   `tfsdk:"virtual_machine"`
	VirtualMachineGroup types.List   `tfsdk:"virtual_machine_group"`
	Tag                 types.List   `tfsdk:"tag"`
	IPAddress           types.String `tfsdk:"ip_address"`
	HTTPSRedirect       types.Bool   `tfsdk:"https_redirect"`
}

type LoadBalancerResource

type LoadBalancerResource struct {
	M *Meta
}

func (*LoadBalancerResource) Configure

func (*LoadBalancerResource) Create

func (*LoadBalancerResource) Delete

func (*LoadBalancerResource) ImportState

func (*LoadBalancerResource) LoadBalancerRead

func (r *LoadBalancerResource) LoadBalancerRead(
	ctx context.Context,
	id string,
	model *LoadBalancerResourceModel,
	state *tfsdk.State,
) error

func (*LoadBalancerResource) Metadata

func (*LoadBalancerResource) Read

func (LoadBalancerResource) Schema

func (*LoadBalancerResource) Update

type LoadBalancerResourceModel

type LoadBalancerResourceModel struct {
	ID                  types.String `tfsdk:"id"`
	Name                types.String `tfsdk:"name"`
	ResourceType        types.String `tfsdk:"resource_type"`
	VirtualMachine      types.List   `tfsdk:"virtual_machine"`
	VirtualMachineGroup types.List   `tfsdk:"virtual_machine_group"`
	Tag                 types.List   `tfsdk:"tag"`
	IPAddress           types.String `tfsdk:"ip_address"`
	HTTPSRedirect       types.Bool   `tfsdk:"https_redirect"`
}

type Meta

type Meta struct {
	Client *katapult.Client
	Core   *core.Client
	Logger hclog.Logger

	GeneratedNamePrefix  string
	SkipTrashObjectPurge bool

	// Internal cache of shallow lookup reference objects
	DataCenterRef   core.DataCenterRef
	OrganizationRef core.OrganizationRef
	// contains filtered or unexported fields
}

func NewMeta

func NewMeta(
	apiKey string,
	datacenter string,
	org string,
	skipTrashObjectPurge *bool,
	logLevel string,
	generatedNamePrefix string,
	httpClient *http.Client,
	version string,
	terraformVersion string,
) (*Meta, error)

func (*Meta) UseOrGenerateHostname

func (m *Meta) UseOrGenerateHostname(hostname string) string

func (*Meta) UseOrGenerateName

func (m *Meta) UseOrGenerateName(name string) string

Jump to

Keyboard shortcuts

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