gcloudtf

package module
v0.0.0-...-8c6d3c7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package gcloudtf handles parsing Terraform files to extract structured information out of it, to support a few tools to speed up the DeployStack authoring process

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Name string
	Text string
	Kind string
	Type string
	Attr map[string]string
	// contains filtered or unexported fields
}

Block represents one of several kinds of Terraform constructs: resources, variables, module

func NewModuleBlock

func NewModuleBlock(t *tfconfig.ModuleCall) (Block, error)

NewModuleBlock converts a parsed Terraform Module to a Block

func NewResourceBlock

func NewResourceBlock(t *tfconfig.Resource) (Block, error)

NewResourceBlock converts a parsed Terraform Resource to a Block

func NewVariableBlock

func NewVariableBlock(t *tfconfig.Variable) (Block, error)

NewVariableBlock converts a parsed Terraform Variable to a Block

type Blocks

type Blocks []Block

Blocks is a slice of type Block

func Extract

func Extract(path string) (*Blocks, error)

Extract points to a path that includes Terraform files and extracts all of the information out of it for use with DeployStack Tools

func NewBlocks

func NewBlocks(mod *tfconfig.Module) (*Blocks, error)

NewBlocks converts the results from a Terraform parse operation to Blocks.

type List

type List []string

List is a slice of strings that we add extra functionality to

func (List) Matches

func (l List) Matches(s string) bool

Matches determines if a given string is an entry in the list.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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