Documentation ¶
Overview ¶
provider is a Terraform provider for MAAS.
Index ¶
- func DataRackController() *schema.Resource
- func DataSubnet() *schema.Resource
- func Provider() terraform.ResourceProvider
- func ResourceNetworkInterfaceLink() *schema.Resource
- func ResourceNetworkInterfacePhysical() *schema.Resource
- func ResourceServer() *schema.Resource
- type BlockDevice
- type Instance
- func (i *Instance) AllocateParams() *maas.MachinesAllocateParams
- func (i *Instance) DeployParams() *maas.MachineDeployParams
- func (i *Instance) FromMachine(m *maas.Machine) *Instance
- func (i *Instance) GetMetadata() interface{}
- func (i *Instance) UpdateState(resource *schema.ResourceData)
- func (i *Instance) UserDataStateFunc(v interface{}) string
- type MACAddress
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataRackController ¶
DataRackController provides a lookup for MaaS Rack Controllers
func Provider ¶
func Provider() terraform.ResourceProvider
Provider exports a Terraform resource provider and is meant to be called from main().
func ResourceNetworkInterfaceLink ¶
ResourceNetworkInterfaceLink provides a resource that can be used to manage links between interfaces
func ResourceNetworkInterfacePhysical ¶
ResourceNetworkInterfacePhysical provides a resource to manage physical interfaces
func ResourceServer ¶
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 ¶
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