provider

package
v0.0.0-...-e443136 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

provider is a Terraform provider for MAAS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataRackController

func DataRackController() *schema.Resource

DataRackController provides a lookup for MaaS Rack Controllers

func DataSubnet

func DataSubnet() *schema.Resource

DataSubnet provides a lookup for a MaaS Subnet

func Provider

func Provider() terraform.ResourceProvider

Provider exports a Terraform resource provider and is meant to be called from main().

func ResourceNetworkInterfaceLink() *schema.Resource

ResourceNetworkInterfaceLink provides a resource that can be used to manage links between interfaces

func ResourceNetworkInterfacePhysical

func ResourceNetworkInterfacePhysical() *schema.Resource

ResourceNetworkInterfacePhysical provides a resource to manage physical interfaces

func ResourceServer

func ResourceServer() *schema.Resource

ResourceServer manages global MaaS configuration options ala the MaaS Server endpoint

Types

type BlockDevice

type BlockDevice struct {
	BlockSize int
	ID        int
	IDPath    string
	Model     string
	Name      string
	Path      string
	Serial    string
	Size      int
	Tags      []string
}

BlockDevice is used by the maas_instance resource

type Instance

type Instance struct {
	DeployTags             []string      `optional:"true" forcenew:"true"`
	Tags                   []string      `optional:"true" forcenew:"true"`
	IPAddresses            []string      `optional:"true" forcenew:"true"`
	MACAddressSet          []MACAddress  `optional:"true" forcenew:"true"`
	PhysicalBlockDeviceSet []BlockDevice `optional:"true" forcenew:"true" name:"physicalblockdevice_set"`
	PXEMac                 []MACAddress  `optional:"true" type:"Set"`
	Routers                []string      `optional:"true"`
	TagNames               []string      `optional:"true"`
	Zone                   []Zone        `optional:"true" type:"Set"`
	Architecture           string        `optional:"true" forcenew:"true"`
	BootType               string        `optional:"true" forcenew:"true"`
	DistroSeries           string        `optional:"true" forcenew:"true"`
	Hostname               string        `optional:"true" forcenew:"true"`
	DeployHostname         string        `optional:"true" forcenew:"true"`
	OSystem                string        `optional:"true" forcenew:"true"`
	Owner                  string        `optional:"true" forcenew:"true"`
	PowerState             string        `optional:"true"`
	PowerType              string        `optional:"true"`
	ResourceURI            string        `optional:"true" forcenew:"true"`
	SystemID               string        `optional:"true" forcenew:"true"`
	UserData               string        `optional:"true" forcenew:"true" statefunc:"true"`
	HWEKernel              string        `optional:"true" forcenew:"true"`
	Comment                string        `optional:"true"`
	CPUCount               int           `optional:"true" forcenew:"true"`
	Memory                 int           `optional:"true" forcenew:"true"`
	Status                 int           `optional:"true"`
	Storage                int           `optional:"true"`
	SwapSize               int           `optional:"true"`
	DisableIPv4            bool          `optional:"true" name:"disable_ipv4"`
	ReleaseErase           bool          `optional:"true" forcenew:"true" default:"false"`
	ReleaseEraseSecure     bool          `optional:"true" forcenew:"true" default:"false"`
	ReleaseEraseQuick      bool          `optional:"true" forcenew:"true" default:"false"`
	Netboot                bool          `optional:"true" forcenew:"true"`
	InstallKVM             bool          `optional:"true" forcenew:"true" default:"false"`
	Lock                   bool          `optional:"true" default:"false"`
}

Instance models the maas_instance Terraform resource

func NewInstance

func NewInstance(resource *schema.ResourceData) *Instance

NewInstance creates a new instance from the value of the Terraform resource

func (*Instance) AllocateParams

func (i *Instance) AllocateParams() *maas.MachinesAllocateParams

AllocateParams creates parameters based on the current value of the Instance

func (*Instance) DeployParams

func (i *Instance) DeployParams() *maas.MachineDeployParams

DeployParams creates parameters based on the current value of the Instance

func (*Instance) FromMachine

func (i *Instance) FromMachine(m *maas.Machine) *Instance

FromMachine updates the instance to reflect the state of a Machine

func (*Instance) GetMetadata

func (i *Instance) GetMetadata() interface{}

GetMetadata implements the Endpoint interface

func (*Instance) UpdateState

func (i *Instance) UpdateState(resource *schema.ResourceData)

UpdateState updates the Terraform state to match the Instance state

func (*Instance) UserDataStateFunc

func (i *Instance) UserDataStateFunc(v interface{}) string

type MACAddress

type MACAddress maas.MACAddress

MACAddress is used by the maas_instance resource

type Zone

type Zone struct {
	Name        string
	Description string
	ResourceURI string
}

Zone is used by the maas_instance resource

Jump to

Keyboard shortcuts

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