ionoscloud

package
v6.4.15 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MPL-2.0 Imports: 55 Imported by: 0

Documentation

Index

Constants

View Source
const (
	K8sVersion                  = "1.26.4"
	UpgradedK8sVersion          = "1.26.6"
	K8sBucket                   = "test_k8s_terraform_v7"
	K8sPrivateClusterNodeSubnet = "192.168.0.0/16"
)

K8s values

View Source
const DNSRecordConfig = DNSZoneConfig + `
resource ` + constant.DNSRecordResource + ` ` + constant.DNSRecordTestResourceName + ` {
	zone_id = ` + constant.DNSZoneResource + `.` + constant.DNSZoneTestResourceName + `.id
	` + recordNameAttribute + ` = "` + recordNameValue + `"
	` + recordTypeAttribute + ` = "` + recordTypeValue + `"
	` + recordContentAttribute + ` = "` + recordContentValue + `"
	` + recordTtlAttribute + ` = ` + recordTtlValue + `
	` + recordPriorityAttribute + ` = ` + recordPriorityValue + `
	` + recordEnabledAttribute + ` = ` + recordEnabledValue + `
}
`
View Source
const DNSZoneConfig = `
resource ` + constant.DNSZoneResource + ` ` + constant.DNSZoneTestResourceName + ` {
	` + zoneNameAttribute + ` = "` + zoneNameValue + `"
	` + zoneDescriptionAttribute + ` = "` + zoneDescriptionValue + `"
    ` + zoneEnabledAttribute + ` = ` + zoneEnabledValue + `
}
`
View Source
const HDDImage = "HDD"
View Source
const ImmutableError = "attribute is immutable, therefore not allowed in update requests"
View Source
const LoggingPipelineConfig = `
resource ` + constant.LoggingPipelineResource + ` ` + constant.LoggingPipelineTestResourceName + ` {
	` + pipelineNameAttribute + ` = "` + pipelineNameValue + `"
	` + pipelineLog + `
}
`

Standard configuration

View Source
const ServerImagePassword = `
resource ` + constant.RandomPassword + ` "server_image_password" {
  length           = 16
  special          = false
}
`
View Source
const ServerImagePasswordUpdated = `
resource ` + constant.RandomPassword + ` "server_image_password_updated" {
  length           = 16
  special          = false
}
`

Variables

View Source
var Version = "DEV"

Functions

func DiffBasedOnVersion

func DiffBasedOnVersion(_, old, new string, _ *schema.ResourceData) bool

DiffBasedOnVersion used for k8 node pool and cluster ignores downgrades of the patch versions.

func DiffCidr added in v6.1.3

func DiffCidr(_, old, new string, _ *schema.ResourceData) bool

DiffCidr terraform suppress differences between ip and cidr

func DiffExpiryDate added in v6.3.3

func DiffExpiryDate(_, old, new string, _ *schema.ResourceData) bool

DiffExpiryDate terraform suppress differences between layout and default +0000 UTC time format

func ForceNewForFlowlogChanges added in v6.4.11

func ForceNewForFlowlogChanges(_ context.Context, d *schema.ResourceDiff, _ interface{}) error

ForceNewForFlowlogChanges - sets ForceNew either on `flowlog` if it is being deleted, or on the field that changes. This is needed because the API does not support PATCH for all flowlog fields except name. The API also does not support DELETE on the flowlog, so the whole resource needs to be re-created.

func ImageSetData added in v6.1.6

func ImageSetData(d *schema.ResourceData, image *ionoscloud.Image) error

func IpBlockSetData

func IpBlockSetData(d *schema.ResourceData, ipBlock *ionoscloud.IpBlock) error

func K8sClusterProperties added in v6.4.13

func K8sClusterProperties(ctx context.Context, cluster ionoscloud.KubernetesCluster, client *ionoscloud.APIClient) (map[string]any, error)

K8sClusterProperties returns a map equivalent of dataSourceK8sClusterSchema

func NewClientByType added in v6.3.2

func NewClientByType(clientOpts ClientOptions, clientType clientType) interface{}

func Provider

func Provider() *schema.Provider

Provider returns a schema.Provider for ionoscloud

func SetCdromProperties added in v6.3.1

func SetCdromProperties(image ionoscloud.Image) map[string]interface{}

func SetCubeVolumeProperties added in v6.3.3

func SetCubeVolumeProperties(volume ionoscloud.Volume) map[string]interface{}

func SetServerProperties added in v6.3.0

func SetServerProperties(server ionoscloud.Server) map[string]interface{}

func SetVolumeProperties

func SetVolumeProperties(volume ionoscloud.Volume) map[string]interface{}

func VerifyUnavailableIPs added in v6.1.0

func VerifyUnavailableIPs(val interface{}, key string) (warns []string, errs []error)

VerifyUnavailableIPs used for DBaaS cluster to check the provided IPs

Types

type ClientOptions added in v6.3.3

type ClientOptions struct {
	Username         string
	Password         string
	Token            string
	Url              string
	Version          string
	TerraformVersion string
}

type Config

type Config struct {
	Username string
	Password string
	Endpoint string
	Retries  int
	Token    string
}

Config represents

func (*Config) Client

func (c *Config) Client(terraformVersion string) (*ionoscloud.APIClient, error)

Client returns a new client for accessing ionoscloud.

type KubeConfig

type KubeConfig struct {
	ApiVersion string `yaml:"apiVersion"`
	Clusters   []struct {
		Name    string
		Cluster struct {
			CaData string `yaml:"certificate-authority-data"`
			Server string
		}
	}
	Contexts []struct {
		Name    string
		Context struct {
			Cluster string
			User    string
		}
	}
	CurrentContext string `yaml:"current-context"`
	Kind           string
	Users          []struct {
		Name string
		User struct {
			Token string
		}
	}
}

type Label added in v6.3.4

type Label map[string]string

type LabelsService added in v6.3.4

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

Source Files

Jump to

Keyboard shortcuts

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