provider

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewBackupDataSource

func NewBackupDataSource() datasource.DataSource

func NewFirewallDataSource

func NewFirewallDataSource() datasource.DataSource

func NewFirewallResource

func NewFirewallResource() resource.Resource

func NewFirewallRuleResource

func NewFirewallRuleResource() resource.Resource

func NewImageDataSource

func NewImageDataSource() datasource.DataSource

func NewServerDataSource

func NewServerDataSource() datasource.DataSource

func NewServerResource

func NewServerResource() resource.Resource

func NewSnapShotResource

func NewSnapShotResource() resource.Resource

func NewSnapshotDataSource

func NewSnapshotDataSource() datasource.DataSource

func NewSshKeyResource

func NewSshKeyResource() resource.Resource

func NewSshkeyDataSource

func NewSshkeyDataSource() datasource.DataSource

Types

type AccessConfigurationModel

type AccessConfigurationModel struct {
	SshKeyID     types.String `tfsdk:"ssh_key_id"`
	Password     types.String `tfsdk:"password"`
	SavePassword types.Bool   `tfsdk:"save_password"`
}

type BackupDataSource

type BackupDataSource struct {
	// contains filtered or unexported fields
}

BackupDataSource defines the data source implementation.

func (*BackupDataSource) Configure

func (*BackupDataSource) Metadata

func (*BackupDataSource) Read

func (*BackupDataSource) Schema

type BackupDataSourceModel

type BackupDataSourceModel struct {
	Id           types.String         `tfsdk:"id"`
	CreatedAt    types.String         `tfsdk:"created_at"`
	ServerId     types.String         `tfsdk:"server_id"`
	ServerName   types.String         `tfsdk:"server_name"`
	VolumeSizeGb types.Number         `tfsdk:"volume_size_gb"`
	Image        ImageDataSourceModel `tfsdk:"image"`
}

BackupDataSourceModel describes the data source data model.

type BackupPreferenceModel

type BackupPreferenceModel struct {
	Slots     types.Int64  `tfsdk:"slots"`
	Frequency types.String `tfsdk:"frequency"`
}

type BackupsModel

type BackupsModel struct {
	ID        types.String `tfsdk:"id"`
	CreatedAt types.String `tfsdk:"created_at"`
	Status    types.String `tfsdk:"status"`
}

type CloudingProvider

type CloudingProvider struct {
	// contains filtered or unexported fields
}

CloudingProvider defines the provider implementation.

func (*CloudingProvider) Configure

Configure configures the CloudingProvider with the given configuration in provider.tf. It validates the required fields and sets up the client configuration for data sources and resources.

func (*CloudingProvider) DataSources

func (p *CloudingProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*CloudingProvider) Metadata

func (*CloudingProvider) Resources

func (p *CloudingProvider) Resources(ctx context.Context) []func() resource.Resource

func (*CloudingProvider) Schema

Schema returns the schema for the provider, which includes the available resource types and their attributes.

type CloudingProviderModel

type CloudingProviderModel struct {
	Token types.String `tfsdk:"token"`
}

CloudingProviderModel describes the provider data model.

type CostModel

type CostModel struct {
	PricePerHour        types.Number `tfsdk:"price_per_hour"`
	PricePerMonthApprox types.Number `tfsdk:"price_per_month_approx"`
}

type FirewallAttachmentModel

type FirewallAttachmentModel struct {
	FirewallID   types.String `tfsdk:"firewall_id"`
	FirewallName types.String `tfsdk:"firewall_name"`
}

type FirewallDataSource

type FirewallDataSource struct {
	// contains filtered or unexported fields
}

FirewallDataSource defines the data source implementation.

func (*FirewallDataSource) Configure

func (*FirewallDataSource) Metadata

func (*FirewallDataSource) Read

func (*FirewallDataSource) Schema

type FirewallDataSourceModel

type FirewallDataSourceModel struct {
	Id          types.String              `tfsdk:"id"`
	Name        types.String              `tfsdk:"name"`
	Description types.String              `tfsdk:"description"`
	Rules       []FirewallRuleModel       `tfsdk:"rules"`
	Attachments []FirewallAttachmentModel `tfsdk:"attachments"`
}

FirewallDataSourceModel describes the data source data model.

type FirewallModel

type FirewallModel struct {
	Id   types.String `tfsdk:"id"`
	Name types.String `tfsdk:"name"`
}

type FirewallResource

type FirewallResource struct {
	// contains filtered or unexported fields
}

FirewallResource defines the resource implementation.

func (*FirewallResource) Configure

func (*FirewallResource) Create

func (*FirewallResource) Delete

func (*FirewallResource) ImportState

func (*FirewallResource) Metadata

func (*FirewallResource) Read

func (*FirewallResource) Schema

func (*FirewallResource) Update

type FirewallResourceModel

type FirewallResourceModel struct {
	Id          types.String `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`
	LastUpdated types.String `tfsdk:"last_updated"`
}

FirewallResourceModel describes the resource data model.

type FirewallRuleModel

type FirewallRuleModel struct {
	Id           types.String `tfsdk:"id"`
	Description  types.String `tfsdk:"description"`
	Protocol     types.String `tfsdk:"protocol"`
	PortRangeMin types.Int64  `tfsdk:"port_range_min"`
	PortRangeMax types.Int64  `tfsdk:"port_range_max"`
	SourceIP     types.String `tfsdk:"source_ip"`
	Enable       types.Bool   `tfsdk:"enable"`
}

type FirewallRuleResource

type FirewallRuleResource struct {
	// contains filtered or unexported fields
}

FirewallRuleResource defines the resource implementation.

func (*FirewallRuleResource) Configure

func (*FirewallRuleResource) Create

func (*FirewallRuleResource) Delete

func (*FirewallRuleResource) ImportState

func (*FirewallRuleResource) Metadata

func (*FirewallRuleResource) Read

func (*FirewallRuleResource) Schema

func (*FirewallRuleResource) Update

type FirewallRuleResourceModel

type FirewallRuleResourceModel struct {
	Id           types.String `tfsdk:"id"`
	FirewallID   types.String `tfsdk:"firewall_id"`
	SourceIP     types.String `tfsdk:"source_ip"`
	Protocol     types.String `tfsdk:"protocol"`
	Description  types.String `tfsdk:"description"`
	PortRangeMin types.Int64  `tfsdk:"port_range_min"`
	PortRangeMax types.Int64  `tfsdk:"port_range_max"`
}

FirewallResourceModel describes the resource data model.

type ImageAccessMethodsModel

type ImageAccessMethodsModel struct {
	SshKey   types.String `tfsdk:"ssh_key"`
	Password types.String `tfsdk:"password"`
}

type ImageDataSource

type ImageDataSource struct {
	// contains filtered or unexported fields
}

ImageDataSource defines the data source implementation.

func (*ImageDataSource) Configure

func (*ImageDataSource) Metadata

func (*ImageDataSource) Read

func (*ImageDataSource) Schema

type ImageDataSourceModel

type ImageDataSourceModel struct {
	Id                  types.String             `tfsdk:"id"`
	Name                types.String             `tfsdk:"name"`
	MinimumSizeGb       types.Int64              `tfsdk:"minimum_size_gb"`
	AccessMethods       *ImageAccessMethodsModel `tfsdk:"access_methods"`
	PricePerHour        types.Float64            `tfsdk:"price_per_hour"`
	PricePerMonthApprox types.Float64            `tfsdk:"price_per_month_approx"`
	BillingUnit         types.String             `tfsdk:"billing_unit"`
}

ImageDataSourceModel describes the data source data model.

type ImageModel

type ImageModel struct {
	Id   types.String `tfsdk:"id"`
	Name types.String `tfsdk:"name"`
}

type ServerDataSource

type ServerDataSource struct {
	// contains filtered or unexported fields
}

ServerDataSource defines the data source implementation.

func (*ServerDataSource) Configure

func (*ServerDataSource) Metadata

func (*ServerDataSource) Read

func (*ServerDataSource) Schema

type ServerDataSourceModel

type ServerDataSourceModel struct {
	Id                    types.String          `tfsdk:"id"`
	Name                  types.String          `tfsdk:"name"`
	Hostname              types.String          `tfsdk:"hostname"`
	Vcores                types.Number          `tfsdk:"vcores"`
	RamGB                 types.Number          `tfsdk:"ram_gb"`
	Flavor                types.String          `tfsdk:"flavor"`
	VolumeSizeGB          types.Number          `tfsdk:"volume_size_gb"`
	ImageModel            ImageModel            `tfsdk:"image"`
	Status                types.String          `tfsdk:"status"`
	PowerState            types.String          `tfsdk:"power_state"`
	Features              []types.String        `tfsdk:"features"`
	CreatedAt             types.String          `tfsdk:"created_at"`
	DnsAddresses          types.String          `tfsdk:"dns_addresses"`
	PublicIP              types.String          `tfsdk:"public_ip"`
	PrivateIP             types.String          `tfsdk:"private_ip"`
	SshKeyID              types.String          `tfsdk:"ssh_key_id"`
	Firewalls             []FirewallModel       `tfsdk:"firewalls"`
	Snapshots             []SnapshotsModel      `tfsdk:"snapshots"`
	BackupsModel          []BackupsModel        `tfsdk:"backups"`
	BackupPreferenceModel BackupPreferenceModel `tfsdk:"backup_preference"`
	CostModel             CostModel             `tfsdk:"cost"`
}

ServerDataSourceModel describes the data source data model.

type ServerResource

type ServerResource struct {
	// contains filtered or unexported fields
}

ServerResource defines the resource implementation.

func (*ServerResource) Configure

func (*ServerResource) Create

func (*ServerResource) Delete

func (*ServerResource) ImportState

func (*ServerResource) Metadata

func (*ServerResource) Read

func (*ServerResource) Schema

func (*ServerResource) Update

type ServerResourceModel

type ServerResourceModel struct {
	Id                            types.String              `tfsdk:"id"`
	Name                          types.String              `tfsdk:"name"`
	Hostname                      types.String              `tfsdk:"hostname"`
	FlavorID                      types.String              `tfsdk:"flavor_id"`
	FirewallID                    types.String              `tfsdk:"firewall_id"`
	AccessConfiguration           *AccessConfigurationModel `tfsdk:"access_configuration"`
	Volume                        *VolumeModel              `tfsdk:"volume"`
	EnablePrivateNetwork          types.Bool                `tfsdk:"enable_private_network"`
	EnableStrictAntiDDoSFiltering types.Bool                `tfsdk:"enable_strict_antiddos_filtering"`
	UserData                      types.String              `tfsdk:"user_data"`
	BackupPreference              *BackupPreferenceModel    `tfsdk:"backup_preference"`
	LastUpdated                   types.String              `tfsdk:"last_updated"`
	Timeouts                      timeouts.Value            `tfsdk:"timeouts"`
}

ServerResourceModel describes the resource data model.

type SnapShotImageModel

type SnapShotImageModel struct {
	Id            types.String               `tfsdk:"id"`
	Name          types.String               `tfsdk:"name"`
	AccessMethods SnapshotAccessMethodsModel `tfsdk:"access_methods"`
}

type SnapShotResource

type SnapShotResource struct {
	// contains filtered or unexported fields
}

SnapShotResource defines the resource implementation.

func (*SnapShotResource) Configure

func (*SnapShotResource) Create

func (*SnapShotResource) Delete

func (*SnapShotResource) ImportState

func (*SnapShotResource) Metadata

func (*SnapShotResource) Read

func (*SnapShotResource) Schema

func (*SnapShotResource) Update

type SnapShotResourceModel

type SnapShotResourceModel struct {
	Id             types.String `tfsdk:"id"`
	Name           types.String `tfsdk:"name"`
	Description    types.String `tfsdk:"description"`
	ShutDownServer types.Bool   `tfsdk:"shutdown_server"`
	LastUpdated    types.String `tfsdk:"last_updated"`
}

SnapShotResourceModel describes the resource data model.

type SnapshotAccessMethodsModel

type SnapshotAccessMethodsModel struct {
	SshKey   types.String `tfsdk:"ssh_key"`
	Password types.String `tfsdk:"password"`
}

type SnapshotCostModel

type SnapshotCostModel struct {
	PricePerHour        types.Float64 `tfsdk:"price_per_hour"`
	PricePerMonthApprox types.Float64 `tfsdk:"price_per_month_approx"`
}

type SnapshotDataSource

type SnapshotDataSource struct {
	// contains filtered or unexported fields
}

SnapshotDataSource defines the data source implementation.

func (*SnapshotDataSource) Configure

func (*SnapshotDataSource) Metadata

func (*SnapshotDataSource) Read

func (*SnapshotDataSource) Schema

type SnapshotDataSourceModel

type SnapshotDataSourceModel struct {
	Id               types.String        `tfsdk:"id"`
	SizeGb           types.Int64         `tfsdk:"size_gb"`
	Name             types.String        `tfsdk:"name"`
	Description      types.String        `tfsdk:"description"`
	CreatedAt        types.String        `tfsdk:"created_at"`
	SourceServerName types.String        `tfsdk:"source_server_name"`
	Image            *SnapShotImageModel `tfsdk:"image"`
	Cost             *SnapshotCostModel  `tfsdk:"cost"`
}

SnapshotDataSourceModel describes the data source data model.

type SnapshotsModel

type SnapshotsModel struct {
	ID        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	CreatedAt types.String `tfsdk:"created_at"`
}

type SshKeyResource

type SshKeyResource struct {
	// contains filtered or unexported fields
}

SshKeyResource defines the resource implementation.

func (*SshKeyResource) Configure

func (*SshKeyResource) Create

func (*SshKeyResource) Delete

func (*SshKeyResource) ImportState

func (*SshKeyResource) Metadata

func (*SshKeyResource) Read

func (*SshKeyResource) Schema

func (*SshKeyResource) Update

type SshKeyResourceModel

type SshKeyResourceModel struct {
	Id            types.String `tfsdk:"id"`
	Name          types.String `tfsdk:"name"`
	PublicKey     types.String `tfsdk:"public_key"`
	PrivateKey    types.String `tfsdk:"private_key"`
	HasPrivateKey types.Bool   `tfsdk:"has_private_key"`
	FingerPrint   types.String `tfsdk:"fingerprint"`
	LastUpdated   types.String `tfsdk:"last_updated"`
}

SshKeyResourceModel describes the resource data model.

type SshkeyDataSource

type SshkeyDataSource struct {
	// contains filtered or unexported fields
}

SshkeyDataSource defines the data source implementation.

func (*SshkeyDataSource) Configure

func (*SshkeyDataSource) Metadata

func (*SshkeyDataSource) Read

func (*SshkeyDataSource) Schema

type SshkeyDataSourceModel

type SshkeyDataSourceModel struct {
	Id            types.String `tfsdk:"id"`
	Name          types.String `tfsdk:"name"`
	FingerPrint   types.String `tfsdk:"fingerprint"`
	PublicKey     types.String `tfsdk:"public_key"`
	PrivateKey    types.String `tfsdk:"private_key"`
	HasPrivateKey types.Bool   `tfsdk:"has_private_key"`
}

SshkeyDataSourceModel describes the data source data model.

type VolumeModel

type VolumeModel struct {
	Source types.String `tfsdk:"source"`
	Id     types.String `tfsdk:"id"`
	SsdGB  types.Int64  `tfsdk:"ssd_gb"`
}

Jump to

Keyboard shortcuts

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