app

package
v0.0.0-...-d19c0ef Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultProvidersCacheDir        = "/.m1-terraform-provider-helper"
	DefaultTerraformPluginDir       = "/.terraform.d/plugins"
	DefaultTerraformPluginBackupDir = "/.terraform.d/plugins_backup"
	DefaultTerraformRegistryURL     = "https://registry.terraform.io/v1/providers/"
	FileModePerm                    = 0777
	DefaultRequestTimeoutInSeconds  = 10
)

Variables

This section is empty.

Functions

func CheckIfError

func CheckIfError(err error)

func GetCurrentGoPath

func GetCurrentGoPath() string

Types

type App

type App struct {
	Config *Config
	Out    io.Writer
}

func New

func New() *App

func (*App) Activate

func (a *App) Activate()

func (*App) CheckStatus

func (a *App) CheckStatus()

func (*App) Deactivate

func (a *App) Deactivate()

func (*App) GetProviderData

func (a *App) GetProviderData(providerName string) (Provider, error)

func (*App) Init

func (a *App) Init()

func (*App) Install

func (a *App) Install(providerName string, version string, customBuildCommand string) bool

func (*App) IsTerraformPluginDirExistent

func (a *App) IsTerraformPluginDirExistent() bool

func (*App) ListProviders

func (a *App) ListProviders()

func (*App) SetCustomProviderRepositoryURL

func (a *App) SetCustomProviderRepositoryURL(url string)

func (*App) SetTerraformRegistryURL

func (a *App) SetTerraformRegistryURL(url string)

func (*App) UpgradeLockfile

func (a *App) UpgradeLockfile(inputLockfilePath string, outputLockfilePath string)
  1. find lockfile parse the correct location man kann auch per parameter den genauen pfad an den command mitgeben
  2. parse lockfile
  3. find the entries that have local providers
  4. what to do when versions differ?
  5. calculate hash sum of local providers and replace the has of the entries
  6. Write HCL file back to original destination.

type BuildCommandInformation

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

type Config

type Config struct {
	TerraformPluginDir       string
	TerraformPluginBackupDir string
	BaseDir                  string
	GoPath                   string
	ProvidersCacheDir        string
	TerraformRegistryURL     string
	ProviderRepositoryURL    string
	RequestTimeoutInSeconds  int
}

type Lockfile

type Lockfile struct {
	Provider []ProviderConfig `hcl:"provider,block"`
}

type Provider

type Provider struct {
	Repo        string `json:"source"`
	Description string `json:"description"`
}

type ProviderConfig

type ProviderConfig struct {
	Name        string   `hcl:"name,label"`
	Version     string   `hcl:"version"`
	Constraints *string  `hcl:"constraints"`
	Hashes      []string `hcl:"hashes"`
}

type TerraformVersion

type TerraformVersion struct {
	Version string `json:"terraform_version"`
}

Jump to

Keyboard shortcuts

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