terraformutils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2018 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToTerraformCompliantName added in v0.1.8

func ConvertToTerraformCompliantName(name string) string

ConvertToTerraformCompliantName will convert the input string into a terraform compatible field name following Terraform's snake case field name convention (lower case and snake case).

func CreateStringSchemaProperty added in v0.6.0

func CreateStringSchemaProperty(propertyName string, required bool, defaultValue string) *schema.Schema

CreateStringSchemaProperty creates a terraform schema of type string configured based upon the parameters passed in

func MultiEnvDefaultFunc added in v0.6.0

func MultiEnvDefaultFunc(ks []string, defaultValue interface{}) schema.SchemaDefaultFunc

MultiEnvDefaultFunc is a helper function that returns the value of the first environment variable in the given list 'ks' that returns a non-empty value. If none of the environment variables return a value, the default value is returned.

Types

type TerraformUtils

type TerraformUtils struct {
	Runtime string
}

TerraformUtils defines a struct that exposes some handy terraform utils functions

func (*TerraformUtils) GetTerraformPluginsVendorDir

func (t *TerraformUtils) GetTerraformPluginsVendorDir() (string, error)

GetTerraformPluginsVendorDir returns Terraform's global plugin vendor directory where Terraform suggests installing custom plugins such as the OopenAPI Terraform provider. This function supports the most used platforms including windows, darwin and linux

Jump to

Keyboard shortcuts

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