provider

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MPL-2.0 Imports: 35 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 NewLoadBalancerResource added in v0.9.0

func NewLoadBalancerResource() resource.Resource

func NewProjectDataSource

func NewProjectDataSource() datasource.DataSource

func NewProjectResource

func NewProjectResource() resource.Resource

func NewServiceResource

func NewServiceResource(template *ServiceTemplate) resource.Resource

func NewServiceResources added in v0.2.0

func NewServiceResources() []func() resource.Resource

func UpdateTerraformDataWithElestioProject

func UpdateTerraformDataWithElestioProject(data *ProjectResourceModel, project *elestio.Project)

Types

type AdminModel added in v0.10.0

type AdminModel struct {
	URL      types.String `tfsdk:"url"`
	User     types.String `tfsdk:"user"`
	Password types.String `tfsdk:"password"`
}

type ConfigModel added in v0.9.0

type ConfigModel struct {
	HostHeader            types.String        `tfsdk:"host_header"`
	AccessLogsEnabled     types.Bool          `tfsdk:"access_logs_enabled"`
	ForceHTTPSEnabled     types.Bool          `tfsdk:"force_https_enabled"`
	IPRateLimitPerSecond  types.Int64         `tfsdk:"ip_rate_limit_per_second"`
	IPRateLimitEnabled    types.Bool          `tfsdk:"ip_rate_limit_enabled"`
	OutputCacheInSeconds  types.Int64         `tfsdk:"output_cache_in_seconds"`
	StickySessionEnabled  types.Bool          `tfsdk:"sticky_session_enabled"`
	ProxyProtocolEnabled  types.Bool          `tfsdk:"proxy_protocol_enabled"`
	SSLDomains            types.Set           `tfsdk:"ssl_domains"`
	ForwardRules          []ForwardRuleModel  `tfsdk:"forward_rules"`
	OutputHeaders         []OutputHeaderModel `tfsdk:"output_headers"`
	TargetServices        types.Set           `tfsdk:"target_services"`
	RemoveResponseHeaders types.Set           `tfsdk:"remove_response_headers"`
}

type DatabaseAdminModel added in v0.10.0

type DatabaseAdminModel struct {
	Host     types.String `tfsdk:"host"`
	Port     types.String `tfsdk:"port"`
	User     types.String `tfsdk:"user"`
	Password types.String `tfsdk:"password"`
	Command  types.String `tfsdk:"command"`
}

type ElestioProvider

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

func (*ElestioProvider) Configure

func (*ElestioProvider) DataSources

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

func (*ElestioProvider) Metadata

func (*ElestioProvider) Resources

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

func (*ElestioProvider) Schema

type ElestioProviderModel

type ElestioProviderModel struct {
	Email    types.String `tfsdk:"email"`
	APIToken types.String `tfsdk:"api_token"`
}

type ForwardRuleModel added in v0.9.0

type ForwardRuleModel struct {
	Port           types.String `tfsdk:"port"`
	Protocol       types.String `tfsdk:"protocol"`
	TargetPort     types.String `tfsdk:"target_port"`
	TargetProtocol types.String `tfsdk:"target_protocol"`
}

type LoadBalancerResource added in v0.9.0

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

func (*LoadBalancerResource) Configure added in v0.9.0

func (*LoadBalancerResource) Create added in v0.9.0

func (*LoadBalancerResource) Delete added in v0.9.0

func (*LoadBalancerResource) ImportState added in v0.9.0

func (*LoadBalancerResource) Metadata added in v0.9.0

func (*LoadBalancerResource) Read added in v0.9.0

func (*LoadBalancerResource) Schema added in v0.9.0

func (*LoadBalancerResource) Update added in v0.9.0

type LoadBalancerResourceModel added in v0.9.0

type LoadBalancerResourceModel struct {
	Id               types.String `tfsdk:"id"`
	ProjectId        types.String `tfsdk:"project_id"`
	ProviderName     types.String `tfsdk:"provider_name"`
	Datacenter       types.String `tfsdk:"datacenter"`
	ServerType       types.String `tfsdk:"server_type"`
	Config           ConfigModel  `tfsdk:"config"`
	CreatedAt        types.String `tfsdk:"created_at"`
	CreatedBy        types.String `tfsdk:"created_by"`
	DeploymentStatus types.String `tfsdk:"deployment_status"`
	IPV4             types.String `tfsdk:"ipv4"`
	IPV6             types.String `tfsdk:"ipv6"`
	CNAME            types.String `tfsdk:"cname"`
	Country          types.String `tfsdk:"country"`
	City             types.String `tfsdk:"city"`
	GlobalIP         types.String `tfsdk:"global_ip"`
	Cores            types.Int64  `tfsdk:"cores"`
	RAMSizeGB        types.String `tfsdk:"ram_size_gb"`
	StorageSizeGB    types.Int64  `tfsdk:"storage_size_gb"`
	PricePerHour     types.String `tfsdk:"price_per_hour"`
}

type OutputHeaderModel added in v0.9.0

type OutputHeaderModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

type ProjectDataSource

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

func (*ProjectDataSource) Configure

func (*ProjectDataSource) Metadata

func (*ProjectDataSource) Read

func (*ProjectDataSource) Schema

type ProjectDataSourceModel

type ProjectDataSourceModel struct {
	Id              types.String `tfsdk:"id"`
	Name            types.String `tfsdk:"name"`
	Description     types.String `tfsdk:"description"`
	TechnicalEmails types.String `tfsdk:"technical_emails"` // deprecated
	TechnicalEmail  types.String `tfsdk:"technical_email"`
	NetworkCIDR     types.String `tfsdk:"network_cidr"`
	CreationDate    types.String `tfsdk:"creation_date"`
}

type ProjectResource

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

func (*ProjectResource) Configure

func (*ProjectResource) Create

func (*ProjectResource) Delete

func (*ProjectResource) ImportState

func (*ProjectResource) Metadata

func (*ProjectResource) Read

func (*ProjectResource) Schema

func (*ProjectResource) Update

type ProjectResourceModel

type ProjectResourceModel struct {
	Id              types.String `tfsdk:"id"`
	Name            types.String `tfsdk:"name"`
	Description     types.String `tfsdk:"description"`
	TechnicalEmails types.String `tfsdk:"technical_emails"` // deprecated
	TechnicalEmail  types.String `tfsdk:"technical_email"`
	NetworkCIDR     types.String `tfsdk:"network_cidr"`
	CreationDate    types.String `tfsdk:"creation_date"`
	LastUpdated     types.String `tfsdk:"last_updated"`
}

type SSHKeyModel added in v0.10.0

type SSHKeyModel struct {
	// Deprecated: replaced by SSHPublicKeyModel
	KeyName   types.String `tfsdk:"key_name"`
	PublicKey types.String `tfsdk:"public_key"`
}

type SSHPublicKeyModel added in v0.11.0

type SSHPublicKeyModel struct {
	Username types.String `tfsdk:"username"`
	KeyData  types.String `tfsdk:"key_data"`
}

type ServiceResource

type ServiceResource struct {
	*ServiceTemplate
	// contains filtered or unexported fields
}

func (*ServiceResource) Configure

func (*ServiceResource) Create

func (*ServiceResource) Delete

func (*ServiceResource) ImportState

func (*ServiceResource) Metadata

func (*ServiceResource) ModifyPlan added in v0.18.0

func (*ServiceResource) Read

func (*ServiceResource) Schema

func (*ServiceResource) Update

func (*ServiceResource) ValidateConfig

ValidateConfig without provider configuration ("offline"), so therefore the resource Configure method will not have been called. To implement validation with a configured API client, use ModifyPlan instead, which occurs during Terraform's planning phase.

type ServiceResourceModel

type ServiceResourceModel struct {
	Id                                          types.String  `tfsdk:"id"`
	ElestioId                                   types.Int64   `tfsdk:"elestio_id"`
	ProjectID                                   types.String  `tfsdk:"project_id"`
	ServerName                                  types.String  `tfsdk:"server_name"`
	ServerType                                  types.String  `tfsdk:"server_type"`
	TemplateId                                  types.Int64   `tfsdk:"template_id"`
	Version                                     types.String  `tfsdk:"version"`
	ProviderName                                types.String  `tfsdk:"provider_name"`
	Datacenter                                  types.String  `tfsdk:"datacenter"`
	SupportLevel                                types.String  `tfsdk:"support_level"`
	AdminEmail                                  types.String  `tfsdk:"admin_email"`
	DefaultPassword                             types.String  `tfsdk:"default_password"`
	Category                                    types.String  `tfsdk:"category"`
	Status                                      types.String  `tfsdk:"status"`
	DeploymentStatus                            types.String  `tfsdk:"deployment_status"`
	DeploymentStartedAt                         types.String  `tfsdk:"deployment_started_at"`
	DeploymentEndedAt                           types.String  `tfsdk:"deployment_ended_at"`
	CreatorName                                 types.String  `tfsdk:"creator_name"`
	CreatedAt                                   types.String  `tfsdk:"created_at"`
	IPV4                                        types.String  `tfsdk:"ipv4"`
	IPV6                                        types.String  `tfsdk:"ipv6"`
	CNAME                                       types.String  `tfsdk:"cname"`
	CustomDomainNames                           types.Set     `tfsdk:"custom_domain_names"`
	SSHKeys                                     types.Set     `tfsdk:"ssh_keys"`
	SSHPublicKeys                               types.Set     `tfsdk:"ssh_public_keys"`
	Country                                     types.String  `tfsdk:"country"`
	City                                        types.String  `tfsdk:"city"`
	AdminUser                                   types.String  `tfsdk:"admin_user"`
	RootAppPath                                 types.String  `tfsdk:"root_app_path"`
	Env                                         types.Map     `tfsdk:"env"`
	Admin                                       types.Object  `tfsdk:"admin"`
	DatabaseAdmin                               types.Object  `tfsdk:"database_admin"`
	GlobalIP                                    types.String  `tfsdk:"global_ip"`
	TrafficOutgoing                             types.Int64   `tfsdk:"traffic_outgoing"`
	TrafficIncoming                             types.Int64   `tfsdk:"traffic_incoming"`
	TrafficIncluded                             types.Int64   `tfsdk:"traffic_included"`
	Cores                                       types.Int64   `tfsdk:"cores"`
	RAMSizeGB                                   types.String  `tfsdk:"ram_size_gb"`
	StorageSizeGB                               types.Int64   `tfsdk:"storage_size_gb"`
	PricePerHour                                types.String  `tfsdk:"price_per_hour"`
	AppAutoUpdatesEnabled                       types.Bool    `tfsdk:"app_auto_updates_enabled"`
	AppAutoUpdatesDayOfWeek                     types.Int64   `tfsdk:"app_auto_updates_day_of_week"`
	AppAutoUpdatesHour                          types.Int64   `tfsdk:"app_auto_updates_hour"`
	AppAutoUpdatesMinute                        types.Int64   `tfsdk:"app_auto_updates_minute"`
	SystemAutoUpdatesEnabled                    types.Bool    `tfsdk:"system_auto_updates_enabled"`
	SystemAutoUpdatesSecurityPatchesOnlyEnabled types.Bool    `tfsdk:"system_auto_updates_security_patches_only_enabled"`
	SystemAutoUpdatesRebootDayOfWeek            types.Int64   `tfsdk:"system_auto_updates_reboot_day_of_week"`
	SystemAutoUpdatesRebootHour                 types.Int64   `tfsdk:"system_auto_updates_reboot_hour"`
	SystemAutoUpdatesRebootMinute               types.Int64   `tfsdk:"system_auto_updates_reboot_minute"`
	BackupsEnabled                              types.Bool    `tfsdk:"backups_enabled"`
	RemoteBackupsEnabled                        types.Bool    `tfsdk:"remote_backups_enabled"`
	ExternalBackupsEnabled                      types.Bool    `tfsdk:"external_backups_enabled"`
	ExternalBackupsUpdateDayOfWeek              types.Int64   `tfsdk:"external_backups_update_day_of_week"`
	ExternalBackupsUpdateHour                   types.Int64   `tfsdk:"external_backups_update_hour"`
	ExternalBackupsUpdateMinute                 types.Int64   `tfsdk:"external_backups_update_minute"`
	ExternalBackupsUpdateType                   types.String  `tfsdk:"external_backups_update_type"`
	ExternalBackupsRetainDayOfWeek              types.Int64   `tfsdk:"external_backups_retain_day_of_week"`
	KeepBackupsOnDeleteEnabled                  types.Bool    `tfsdk:"keep_backups_on_delete_enabled"`
	FirewallEnabled                             types.Bool    `tfsdk:"firewall_enabled"`
	FirewallId                                  types.String  `tfsdk:"firewall_id"`
	FirewallPorts                               types.String  `tfsdk:"firewall_ports"`
	AlertsEnabled                               types.Bool    `tfsdk:"alerts_enabled"`
	LastUpdated                                 types.String  `tfsdk:"last_updated"`
	LocalField                                  types.Dynamic `tfsdk:"local_field"`
	LocalFieldSensitive                         types.Dynamic `tfsdk:"local_field_sensitive"`
}

type ServiceTemplate

type ServiceTemplate struct {
	TemplateId         int64
	ResourceName       string
	DocumentationName  string
	Description        string
	DeprecationMessage string
	DockerHubImage     string
	DefaultVersion     string
	Category           string
	FirewallPorts      []elestio.ServiceFirewallPort
}

type TemplatesList added in v0.4.0

type TemplatesList struct {
	Templates []struct {
		ID                  int64  `json:"id"`
		Name                string `json:"title"`
		Category            string `json:"category"`
		Description         string `json:"description"`
		Logo                string `json:"mainImage"`
		DockerHubImage      string `json:"dockerhub_image"`
		DockerHubDefaultTag string `json:"dockerhub_default_tag"`
		FirewallPorts       string `json:"firewallPorts"`
	} `json:"templates"`
}

Jump to

Keyboard shortcuts

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