terraform

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

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