Documentation ¶
Overview ¶
Package tf provides parsing and abstractions specific to Terraform.
Index ¶
Constants ¶
View Source
const ( // ErrUnsupportedModSrc indicates that a module source string is unsupported. ErrUnsupportedModSrc errors.Kind = "unsupported module source" // ErrInvalidModSrc indicates that a module source string is invalid. ErrInvalidModSrc errors.Kind = "invalid module source" )
View Source
const ErrHCLSyntax errors.Kind = "HCL syntax error"
ErrHCLSyntax represents a HCL syntax error
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Module ¶
type Module struct {
Source string // Source is the module source path (eg.: directory, git path, etc).
}
Module represents a terraform module. Note that only the fields relevant for terramate are declared here.
func ParseModules ¶
ParseModules parses blocks of type "module" containing a single label.
type Source ¶
type Source struct { // URL is the Git URL of the source. URL string // Path is the path of the source URL. It includes the domain of the URL on it. // Eg. github.com/terramate-io/example Path string // PathScheme is the scheme of the path part. PathScheme string // Subdir is the subdir component of the source path, if any, as defined // here: https://www.terraform.io/language/modules/sources#modules-in-package-sub-directories Subdir string // Ref is the specific reference of this source, if any. Ref string // Raw source Raw string }
Source represents a module source
func ParseSource ¶
ParseSource parses the given modsource string. The modsource must be a valid Terraform Git/Github source reference as documented in:
- https://www.terraform.io/language/modules/sources
Source references that are not Git/Github are not supported.
Click to show internal directories.
Click to hide internal directories.