hcl

package
v0.0.0-...-3750d73 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultStateName = "default"

Variables

This section is empty.

Functions

func GetCurrentWorkspaceName

func GetCurrentWorkspaceName(cwd string) string

Types

type BackendBlock

type BackendBlock struct {
	Name               string   `hcl:"name,label"`
	Path               string   `hcl:"path,optional"`
	WorkspaceDir       string   `hcl:"workspace_dir,optional"`
	Bucket             string   `hcl:"bucket,optional"`
	Key                string   `hcl:"key,optional"`
	Region             string   `hcl:"region,optional"`
	Prefix             string   `hcl:"prefix,optional"`
	ContainerName      string   `hcl:"container_name,optional"`
	WorkspaceKeyPrefix string   `hcl:"workspace_key_prefix,optional"`
	Remain             hcl.Body `hcl:",remain"`
}

func (BackendBlock) SupplierConfig

func (b BackendBlock) SupplierConfig(workspace string) *config.SupplierConfig

type CloudBlock

type CloudBlock struct {
	Organization string               `hcl:"organization"`
	Workspaces   CloudWorkspacesBlock `hcl:"workspaces,block"`
	Remain       hcl.Body             `hcl:",remain"`
}

func (CloudBlock) SupplierConfig

func (c CloudBlock) SupplierConfig(workspace string) *config.SupplierConfig

type CloudWorkspacesBlock

type CloudWorkspacesBlock struct {
	Name   string   `hcl:"name,optional"`
	Tags   []string `hcl:"tags,optional"`
	Remain hcl.Body `hcl:",remain"`
}

type MainBodyBlock

type MainBodyBlock struct {
	Terraform TerraformBlock `hcl:"terraform,block"`
	Remain    hcl.Body       `hcl:",remain"`
}

type TerraformBlock

type TerraformBlock struct {
	Backend *BackendBlock `hcl:"backend,block"`
	Cloud   *CloudBlock   `hcl:"cloud,block"`
	Remain  hcl.Body      `hcl:",remain"`
}

func ParseTerraformFromHCL

func ParseTerraformFromHCL(filename string) (*TerraformBlock, error)

Jump to

Keyboard shortcuts

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