provider

package
v0.0.0-...-1363388 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 18 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 NewImagesDataSource

func NewImagesDataSource() datasource.DataSource

func NewLocationDataSource

func NewLocationDataSource() datasource.DataSource

func NewProfileDataSource

func NewProfileDataSource() datasource.DataSource

func NewPublicKeyResource

func NewPublicKeyResource() resource.Resource

NewPublicKeyResource is a helper function to simplify the provider implementation.

func NewServerDataSource

func NewServerDataSource() datasource.DataSource

func NewServerResource

func NewServerResource() resource.Resource

NewServerResource is a helper function to simplify the provider implementation.

Types

type CPU

type CPU struct {
	Cores   types.Int64 `tfsdk:"cores"`
	Threads types.Int64 `tfsdk:"threads"`
}

type ImagesDataSource

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

func (*ImagesDataSource) Configure

Configure adds the provider configured client to the data source.

func (*ImagesDataSource) Metadata

func (*ImagesDataSource) Read

Read refreshes the Terraform state with the latest data

func (*ImagesDataSource) Schema

Schema defines the schema for the data source.

type ImagesDataSourceModel

type ImagesDataSourceModel struct {
	Images []ImagesModel `tfsdk:"images"`
}

type ImagesModel

type ImagesModel struct {
	Slug       types.String `tfsdk:"slug"`
	Name       types.String `tfsdk:"name"`
	WebServer  types.String `tfsdk:"web_server"`
	PhpVersion types.String `tfsdk:"php_version"`
}

type LocationDataSource

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

func (*LocationDataSource) Configure

Configure adds the provider configured client to the data source.

func (*LocationDataSource) Metadata

func (*LocationDataSource) Read

Read refreshes the Terraform state with the latest data

func (*LocationDataSource) Schema

Schema defines the schema for the data source.

type LocationDataSourceModel

type LocationDataSourceModel struct {
	ID          types.String `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	City        types.String `tfsdk:"city"`
	Country     types.String `tfsdk:"country"`
	Description types.String `tfsdk:"description"`
	Icon        types.String `tfsdk:"icon"`
}

type Price

type Price struct {
	Amount   types.Int64  `tfsdk:"amount"`
	Currency types.String `tfsdk:"currency"`
}

type ProfileDataSource

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

func (*ProfileDataSource) Configure

Configure adds the provider configured client to the data source.

func (*ProfileDataSource) Metadata

func (*ProfileDataSource) Read

Read refreshes the Terraform state with the latest data

func (*ProfileDataSource) Schema

Schema defines the schema for the data source.

type ProfileDataSourceModel

type ProfileDataSourceModel struct {
	LocationId types.String   `tfsdk:"location_id"`
	Profile    []ProfileModel `tfsdk:"profiles"`
}

type ProfileModel

type ProfileModel struct {
	Slug  types.String `tfsdk:"slug"`
	Name  types.String `tfsdk:"name"`
	RAM   types.Int64  `tfsdk:"ram"`
	Disk  types.Int64  `tfsdk:"disk"`
	CPU   CPU          `tfsdk:"cpu"`
	Price Price        `tfsdk:"price"`
}

type PublicKeyResource

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

PublicKeyResource is the resource implementation.

func (*PublicKeyResource) Configure

Configure adds the provider configured client to the data source.

func (*PublicKeyResource) Create

Create a new resource.

func (*PublicKeyResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*PublicKeyResource) ImportState

Import using slug as the attribute

func (*PublicKeyResource) Metadata

Metadata returns the resource type name.

func (*PublicKeyResource) Read

Read resource information.

func (*PublicKeyResource) Schema

Schema defines the schema for the resource.

func (*PublicKeyResource) Update

type PublicKeyResourceModel

type PublicKeyResourceModel struct {
	ID          types.String `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Key         types.String `tfsdk:"key"`
	Created     types.String `tfsdk:"created"`
	PublicKey   types.String `tfsdk:"public_key"`
	LastUpdated types.String `tfsdk:"last_updated"`
}

PublicKeyResource is the model implementation.

type ServerDataSource

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

func (*ServerDataSource) Configure

Configure adds the provider configured client to the data source.

func (*ServerDataSource) Metadata

func (*ServerDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*ServerDataSource) Schema

Schema defines the schema for the data source.

type ServerDataSourceModel

type ServerDataSourceModel struct {
	Slug                   types.String `tfsdk:"slug"`
	Name                   types.String `tfsdk:"name"`
	Date                   types.String `tfsdk:"date"`
	Location               types.String `tfsdk:"location"`
	Image                  types.String `tfsdk:"image"`
	Profile                types.String `tfsdk:"profile"`
	Ipv4                   types.String `tfsdk:"ipv4"`
	Ipv6                   types.String `tfsdk:"ipv6"`
	Status                 types.String `tfsdk:"status"`
	Virtualization         types.String `tfsdk:"virtualization"`
	WebServer              types.String `tfsdk:"web_server"`
	SnapshotRunTime        types.Int64  `tfsdk:"snapshot_run_time"`
	WordPressLockDown      types.Bool   `tfsdk:"word_press_lock_down"`
	SSHPasswordAuthEnabled types.Bool   `tfsdk:"ssh_password_auth_enabled"`
}

type ServerResource

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

ServerResource is the resource implementation.

func (*ServerResource) Configure

Configure adds the provider configured client to the data source.

func (*ServerResource) Create

Create a new resource.

func (*ServerResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*ServerResource) ImportState

Import using slug as the attribute

func (*ServerResource) Metadata

Metadata returns the resource type name.

func (*ServerResource) ModifyPlan

ModifyPlan tailor the plan to match the expected end state.

func (*ServerResource) Read

Read resource information.

func (*ServerResource) Schema

Schema defines the schema for the resource.

func (*ServerResource) Update

type ServerResourceModel

type ServerResourceModel struct {
	Slug                   types.String `tfsdk:"slug"`
	Name                   types.String `tfsdk:"name"`
	LocationID             types.String `tfsdk:"location_id"`
	ProfileSlug            types.String `tfsdk:"profile_slug"`
	ImageSlug              types.String `tfsdk:"image_slug"`
	Date                   types.String `tfsdk:"date"`
	Location               types.String `tfsdk:"location"`
	Image                  types.String `tfsdk:"image"`
	Profile                types.String `tfsdk:"profile"`
	Ipv4                   types.String `tfsdk:"ipv4"`
	Ipv6                   types.String `tfsdk:"ipv6"`
	Status                 types.String `tfsdk:"status"`
	Virtualization         types.String `tfsdk:"virtualization"`
	WebServer              types.String `tfsdk:"web_server"`
	SnapshotRunTime        types.Int64  `tfsdk:"snapshot_run_time"`
	WordPressLockDown      types.Bool   `tfsdk:"word_press_lock_down"`
	SSHPasswordAuthEnabled types.Bool   `tfsdk:"ssh_password_auth_enabled"`
	LastUpdated            types.String `tfsdk:"last_updated"`
}

ServerResource is the model implementation.

Jump to

Keyboard shortcuts

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