Documentation ¶
Index ¶
- func AddEnvVars(options *terraform.Options, envVars map[string]string) *terraform.Options
- func AddEnvVarsFromHost(options *terraform.Options) *terraform.Options
- func AddTFVars(options *terraform.Options, varFiles ...string) *terraform.Options
- func AddVars(options *terraform.Options, vars map[string]interface{}) *terraform.Options
- func OverrideTFVars(options *terraform.Options, varFiles ...string) *terraform.Options
- func OverrideVars(options *terraform.Options, vars map[string]interface{}) *terraform.Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEnvVars ¶
AddEnvVars adds the specified environment variables to the Terraform options.
Parameters:
- options: The Terraform options to which environment variables will be added.
- envVars: A map of environment variables to add.
Returns:
- *terraform.Options: The updated Terraform options with the added environment variables.
Example:
options := &terraform.Options{} envVars := map[string]string{"FOO": "bar"} updatedOptions := AddEnvVars(options, envVars) fmt.Printf("Updated Terraform options: %+v\n", updatedOptions)
func AddEnvVarsFromHost ¶
AddEnvVarsFromHost adds all environment variables from the host to the Terraform options.
Parameters:
- options: The Terraform options to which environment variables will be added.
Returns:
- *terraform.Options: The updated Terraform options with the added environment variables from the host.
Example:
options := &terraform.Options{} updatedOptions := AddEnvVarsFromHost(options) fmt.Printf("Updated Terraform options with host environment variables: %+v\n", updatedOptions)
func AddTFVars ¶
AddTFVars adds the specified Terraform variable files to the options.
Parameters:
- options: The Terraform options to which variable files will be added.
- varFiles: A list of variable file paths to add.
Returns:
- *terraform.Options: The updated Terraform options with the added variable files.
Example:
options := &terraform.Options{} updatedOptions := AddTFVars(options, "vars.tfvars", "prod.tfvars") fmt.Printf("Updated Terraform options with variable files: %+v\n", updatedOptions)
func AddVars ¶
AddVars adds the specified variables to the existing Terraform variables in the options.
Parameters:
- options: The Terraform options to which variables will be added.
- vars: A map of variables to add to the options.
Returns:
- *terraform.Options: The updated Terraform options with the added variables.
Example:
options := &terraform.Options{} vars := map[string]interface{}{"instance_type": "t2.micro"} updatedOptions := AddVars(options, vars) fmt.Printf("Updated Terraform options: %+v\n", updatedOptions)
func OverrideTFVars ¶
OverrideTFVars overrides the existing Terraform variable files in the options with the specified variable files.
Parameters:
- options: The Terraform options whose variable files will be overridden.
- varFiles: A list of variable file paths to override.
Returns:
- *terraform.Options: The updated Terraform options with the overridden variable files.
Example:
options := &terraform.Options{} updatedOptions := OverrideTFVars(options, "vars.tfvars", "prod.tfvars") fmt.Printf("Updated Terraform options with overridden variable files: %+v\n", updatedOptions)
func OverrideVars ¶
OverrideVars overrides the existing Terraform variables in the options with the specified variables.
Parameters:
- options: The Terraform options whose variables will be overridden.
- vars: A map of variables to override in the options.
Returns:
- *terraform.Options: The updated Terraform options with the overridden variables.
Example:
options := &terraform.Options{} vars := map[string]interface{}{"instance_type": "t2.micro"} updatedOptions := OverrideVars(options, vars) fmt.Printf("Updated Terraform options: %+v\n", updatedOptions)
Types ¶
This section is empty.