vcfa

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildVersion = "unset"

BuildVersion holds version which is meant to be injected at build time using ldflags (e.g. 'go build -ldflags="-X 'github.com/vmware/terraform-provider-vcfa/vcfa.BuildVersion=v1.0.0'"')

View Source
var (

	// ImportSeparator is the separation string used for import operations
	// Can be changed using either "import_separator" property in Provider
	// or environment variable "VCFA_IMPORT_SEPARATOR"
	ImportSeparator = "."
)

Functions

func DataSources

func DataSources(nameRegexp string, includeDeprecated bool) (map[string]*schema.Resource, error)

DataSources is a public function which allows filtering and access all defined data sources When 'nameRegexp' is not empty - it will return only those matching the regexp When 'includeDeprecated' is false - it will skip out the resources which have a DeprecationMessage set

func IsIntAndAtLeast

func IsIntAndAtLeast(min int) schema.SchemaValidateDiagFunc

IsIntAndAtLeast returns a SchemaValidateFunc which tests if the provided value string is convertable to int and is at least min (inclusive)

func Provider

func Provider() *schema.Provider

Provider returns a terraform.ResourceProvider.

func ProviderAuthenticate

func ProviderAuthenticate(client *govcd.VCDClient, user, password, token, org, apiToken, apiTokenFile, saTokenFile string) error

TODO Look into refactoring this into a method of *Config

func Resources

func Resources(nameRegexp string, includeDeprecated bool) (map[string]*schema.Resource, error)

Resources is a public function which allows filtering and access all defined resources When 'nameRegexp' is not empty - it will return only those matching the regexp When 'includeDeprecated' is false - it will skip out the resources which have a DeprecationMessage set

Types

type ClientContainer

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

ClientContainer is a structure that is being passed by Terraform SDK internally into resources via meta `meta interface{}` argument. It is being initialized in providerConfigure method

type Config

type Config struct {
	User                    string
	Password                string
	Token                   string // Token used instead of user and password
	ApiToken                string // User generated token used instead of user and password
	ApiTokenFile            string // File containing a user generated API token
	AllowApiTokenFile       bool   // Setting to suppress API Token File security warnings
	ServiceAccountTokenFile string // File containing the Service Account API token
	AllowSATokenFile        bool   // Setting to suppress Service Account Token File security warnings
	SysOrg                  string // Org used for authentication
	Org                     string // Default Org used for API operations
	Href                    string
	InsecureFlag            bool
}

func (*Config) Client

func (c *Config) Client() (*VCDClient, error)

type StringMap

type StringMap map[string]interface{}

StringMap type is used to simplify reading resource definitions

type VCDClient

type VCDClient struct {
	*govcd.VCDClient
	SysOrg       string
	Org          string // name of default Org
	InsecureFlag bool
}

Source Files

Jump to

Keyboard shortcuts

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