userdata

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package userdata provides a way to generate user data for cloud instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeHash

func ComputeHash(dat []byte) string

ComputeHash returns the SHA256 hash of the user data byte array.

func GzipBytes

func GzipBytes(dat []byte) ([]byte, error)

GzipBytes will gzip a byte array.

func NewBastion

func NewBastion(input *BastionInput) (string, error)

NewBastion returns the user data string to be used on a bastion instance.

Types

type BastionInput

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

BastionInput defines the context to generate a bastion instance user data.

type Files

type Files struct {
	// Path specifies the full path on disk where to store the file.
	Path string `json:"path"`

	// Owner specifies the ownership of the file, e.g. "root:root".
	Owner string `json:"owner"`

	// Permissions specifies the permissions to assign to the file, e.g. "0640".
	Permissions string `json:"permissions"`

	// Content is the actual content of the file.
	Content string `json:"content"`
}

Files defines the input for generating write_files in cloud-init.

Jump to

Keyboard shortcuts

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