cloudinit

package
v0.0.0-...-a7f6617 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserDataKeys = []string{"cloud-init.user-data", "user.user-data"}

UserDataKeys contains the keys used to store cloud-init's user-data.

View Source
var VendorDataKeys = []string{"cloud-init.vendor-data", "user.vendor-data"}

VendorDataKeys contains the keys used to store cloud-init's vendor-data.

Functions

func GetEffectiveConfigKey

func GetEffectiveConfigKey(instanceConfig map[string]string, configType string) string

GetEffectiveConfigKey gets the correct config key for some type of cloud-init configuration. Supported configTypes are "user-data", "vendor-data" or "network-config".

Types

type Config

type Config struct {
	UserData   string
	VendorData string
}

Config contains the user-data and vendor-data used as configuration data for cloud-init.

func GetEffectiveConfig

func GetEffectiveConfig(instanceConfig map[string]string, requestedKey string, instanceName string, instanceProject string) (config Config)

GetEffectiveConfig returns the resulting vendor-data and/or user-data for a certain instance. This method takes in an optional requestedKey that point either user-data or vendor-data. If no requiredKey is provided, it is understood that the caller wants the resulting values for both [vendor|user]-data.

Jump to

Keyboard shortcuts

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