terraform

package
v0.4.0-beta Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MPL-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package terraform reads local Terraform configuration and tfvars inputs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudConfig

type CloudConfig struct {
	// Organization is the configured HCP Terraform organization name.
	Organization string
	// Workspace is the configured HCP Terraform workspace name.
	Workspace string
}

CloudConfig describes the organization and workspace discovered from Terraform configuration.

func FindCloudConfig

func FindCloudConfig(root string) (*CloudConfig, error)

FindCloudConfig scans the given directory for Terraform cloud or remote workspace configuration.

type ImportedVariable

type ImportedVariable struct {
	// Key is the variable name.
	Key string
	// Value is the serialized variable value.
	Value string
	// Category is the HCP Terraform variable category, such as terraform or env.
	Category string
	// HCL reports whether Value should be interpreted as HCL.
	HCL bool
	// Sensitive reports whether the variable should be marked sensitive.
	Sensitive bool
}

ImportedVariable describes a variable ready to send to the HCP Terraform API.

func ParseTFVarsFile

func ParseTFVarsFile(path string) ([]ImportedVariable, error)

ParseTFVarsFile parses an HCL or JSON tfvars file into importable variables.

Jump to

Keyboard shortcuts

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