terraform

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FastlyService

type FastlyService struct {
	Name         string
	Vcls         []*TerraformVcl
	Backends     []*TerraformBackend
	Acls         []*TerraformAcl
	Dictionaries []*TerraformDictionary
	Snippets     []*TerraformSnippet
}

func UnmarshalTerraformPlannedInput

func UnmarshalTerraformPlannedInput(buf []byte) ([]*FastlyService, error)

type TerraformAcl

type TerraformAcl struct {
	Name string
}

type TerraformBackend

type TerraformBackend struct {
	Name   string
	Shield *string
}

TODO(davinci26): We can unmarshall all the properties from the TF file and lint them to make sure they have sane values.

type TerraformDictionary

type TerraformDictionary struct {
	Name string
}

type TerraformFetcher

type TerraformFetcher struct {
	// contains filtered or unexported fields
}

func NewTerraformFetcher

func NewTerraformFetcher(s []*FastlyService) *TerraformFetcher

func (*TerraformFetcher) Acls

func (f *TerraformFetcher) Acls() ([]*types.RemoteAcl, error)

func (*TerraformFetcher) Backends

func (f *TerraformFetcher) Backends() ([]*types.RemoteBackend, error)

func (*TerraformFetcher) Dictionaries

func (f *TerraformFetcher) Dictionaries() ([]*types.RemoteDictionary, error)

func (*TerraformFetcher) Snippets

func (f *TerraformFetcher) Snippets() ([]*types.RemoteVCL, error)

type TerraformPlannedInput

type TerraformPlannedInput struct {
	PlannedValues *struct {
		RootModule *struct {
			Resources    []*TerraformPlannedResource `json:"resources"`
			ChildModules []*struct {
				Resources []*TerraformPlannedResource `json:"resources"`
			} `json:"child_modules"`
		} `json:"root_module"`
	} `json:"planned_values"`
}

type TerraformPlannedResource

type TerraformPlannedResource struct {
	ProviderName string `json:"provider_name"`
	Type         string `json:"type"`
	Values       *struct {
		Name       string                 `json:"name"`
		Vcl        []*TerraformVcl        `json:"vcl"`
		Acl        []*TerraformAcl        `json:"acl"`
		Backend    []*TerraformBackend    `json:"backend"`
		Dictionary []*TerraformDictionary `json:"dictionary"`
		Snippets   []*TerraformSnippet    `json:"snippet"`
	} `json:"values"`
}

type TerraformSnippet

type TerraformSnippet struct {
	Name     string
	Type     string
	Content  string
	Priority int64
}

type TerraformVcl

type TerraformVcl struct {
	Content string
	Main    bool
	Name    string
}

Terraform planned input struct This struct could be unmarshled from input of `terraform show -json [planned json]

Jump to

Keyboard shortcuts

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