Documentation ¶
Index ¶
- func CheckAliasExists(expectedName string) resource.TestCheckFunc
- func CheckIPSetExists(IPSetContent proxmox.VirtualEnvironmentClusterIPSetContent) resource.TestCheckFunc
- func CheckRole(expectedPrivileges []string) resource.TestCheckFunc
- func GenerateResourceName() string
- func GetProvider() *schema.Provider
- func GetProviders() map[string]terraform.ResourceProvider
- func HclAliasResource(name string, cidr string, comment string) string
- func HclIPSetResource(name string, comment string, ...) string
- func HclIPSetWithAliasResource(name string, comment string, ...) string
- func HclRoleResource(name string, privileges []string) string
- func HclVMResource(vm map[string]string) string
- func PreCheck(t *testing.T, extraEnvVars *[]string)
- func ReadVM(clients proxmoxtf.ProviderConfiguration, nodeName string, vmID int) (*proxmox.VirtualEnvironmentVMGetResponseData, error)
- type VMStateAttributes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAliasExists ¶
func CheckAliasExists(expectedName string) resource.TestCheckFunc
CheckAliasExists Given the name of alias, this will return a function that will check whether or not an alias - (1) exists in the state - (2) exist in Proxmox VE - (3) has the correct name
func CheckIPSetExists ¶
func CheckIPSetExists(IPSetContent proxmox.VirtualEnvironmentClusterIPSetContent) resource.TestCheckFunc
CheckIPSetExists Given the name of an IPSet, this will return a function that will check whether or not an IPSet - (1) exists in the state - (2) exist in Proxmox VE - (3) has the correct name
func CheckRole ¶
func CheckRole(expectedPrivileges []string) resource.TestCheckFunc
CheckRole Given the name of role, this will return a function that will check whether or not a role - (1) exists in the state - (2) exist in Proxmox VE - (3) has correct privileges
func GenerateResourceName ¶
func GenerateResourceName() string
GenerateResourceName generates a random name with a constant prefix
func GetProviders ¶
func GetProviders() map[string]terraform.ResourceProvider
GetProviders returns a map of all providers needed for the project
func HclAliasResource ¶
HclAliasResource HCL describing of a PVE alias resource
func HclIPSetResource ¶
func HclIPSetResource(name string, comment string, cidr proxmox.VirtualEnvironmentClusterIPSetContent) string
HclIPSetResource HCL describing of a PVE IPSet resource
func HclIPSetWithAliasResource ¶
func HclIPSetWithAliasResource(name string, comment string, cidr proxmox.VirtualEnvironmentClusterIPSetContent) string
HclIPSetWithAliasResource HCL describing of a PVE IPSet resource with alias
func HclRoleResource ¶
HclRoleResource HCL describing of a PVE role resource
func HclVMResource ¶
HclVMResource HCL describing of a PVE VM resource
func ReadVM ¶
func ReadVM(clients proxmoxtf.ProviderConfiguration, nodeName string, vmID int) (*proxmox.VirtualEnvironmentVMGetResponseData, error)
readVM is helper function that reads VM
Types ¶
type VMStateAttributes ¶
func GetVMFromState ¶
func GetVMFromState(s *terraform.State, resourceName string) (VMStateAttributes, error)
GetVMFromState helper function that retrieves VM Attributes from TF state