ah

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ImageName      = "centos-7-x64"
	DatacenterID   = "c54e8896-53d8-479a-8ff1-4d7d9d856a50"
	DatacenterName = "ams1"
	VpsPlanID      = "381347529"
	VpsPlanName    = "start-xs"
	VpsUpgPlanName = "start-m"
	VpsUpgPlanID   = "381347841"
	VolumePlanID   = "381347560"
	VolumePlanName = "hdd2-ash1"
	ClusterID      = ""
	NodeID         = "2486b2f8-f7a6-4207-979b-9b94d93c174e"
	K8SVersion     = "v1.19.0"
	WorkerPoolType = "public"
	LBType         = "http"
)

Variables

View Source
var WorkerPoolSchema = map[string]*schema.Schema{
	"id": {
		Type:     schema.TypeString,
		Computed: true,
	},
	"name": {
		Type:     schema.TypeString,
		Computed: true,
	},
	"type": {
		Type:         schema.TypeString,
		Required:     true,
		ValidateFunc: validation.StringInSlice([]string{"public", "private"}, false),
	},
	"nodes_count": {
		Type:     schema.TypeInt,
		Optional: true,
	},
	"created_at": {
		Type:     schema.TypeString,
		Computed: true,
	},
	"labels": {
		Type:     schema.TypeMap,
		Optional: true,
		Elem: &schema.Schema{
			Type: schema.TypeString,
		},
	},
	"auto_scale": {
		Type:     schema.TypeBool,
		Optional: true,
		Default:  false,
	},
	"min_count": {
		Type:     schema.TypeInt,
		Optional: true,
		Default:  0,
	},
	"max_count": {
		Type:     schema.TypeInt,
		Optional: true,
		Default:  0,
	},
	"public_properties": {
		Type:     schema.TypeMap,
		Optional: true,
		Elem:     &schema.Schema{Type: schema.TypeInt},
	},
	"private_properties": {
		Type:     schema.TypeMap,
		Optional: true,
	},
}

Functions

func IsUUID

func IsUUID(s string) bool

IsUUID checks if string is in valid UUID format.

func Provider

func Provider() *schema.Provider

Provider returns a terraform.ResourceProvider.

Types

type Config

type Config struct {
	Token       string
	APIEndpoint string
}

Config represents provider's configuration

func (*Config) Client

func (c *Config) Client() (*ah.APIClient, error)

Client returns a new client to communicate with AH Cloud

type PlanSorting added in v0.2.0

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

Jump to

Keyboard shortcuts

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