Help us shape the future of Go! Take the 2026 Go Developer Survey

hcl

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderBlockSchema = hcl.BodySchema{
	Blocks: []hcl.BlockHeaderSchema{
		{
			Type:       "provider",
			LabelNames: []string{"type"},
		},
	},
}
View Source
var ResourceBlockSchema = hcl.BodySchema{
	Blocks: []hcl.BlockHeaderSchema{
		{
			Type:       "resource",
			LabelNames: []string{"type", "name"},
		},
	},
}
View Source
var VarBlockSchema = hcl.BodySchema{
	Blocks: []hcl.BlockHeaderSchema{
		{
			Type:       "variable",
			LabelNames: []string{"name"},
		},
	},
}

Functions

func FindTfFiles

func FindTfFiles(path string) (*[]string, error)

func MarshalIndent

func MarshalIndent(input interface{}, prefix, indent string) string

func ParseAzapiResource

func ParseAzapiResource(f hcl.File) (*[]AzapiResource, []error)

func ParseAzureProvider

func ParseAzureProvider(f hcl.File) (*[]AzureProvider, []error)

func ParseHclFile

func ParseHclFile(path string) (*hcl.File, []error)

func ParseVariables

func ParseVariables(f hcl.File) (*map[string]Variable, []error)

Types

type AzapiResource

type AzapiResource struct {
	Name       string
	Type       string
	Body       string
	FileName   string
	LineNumber int
}

type AzureProvider

type AzureProvider struct {
	Type                      string
	Alias                     string
	SubscriptionId            string
	TenantId                  string
	AuxiliaryTenantIds        []string
	AuxiliaryTenantIdsString  string
	ClientId                  string
	ClientCertificate         string
	ClientCertificatePassword string
	ClientSecret              string
	OidcRequestToken          string
	OidcToken                 string
	FileName                  string
	LineNumber                int
}

could be azurerm or azapi

func (AzureProvider) Name

func (p AzureProvider) Name() string

type Variable

type Variable struct {
	Name        string
	HasDefault  bool
	FileName    string
	LineNumber  int
	IsSensitive bool
}

Jump to

Keyboard shortcuts

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