Documentation ¶
Overview ¶
Package space manages the settings of space. A space is an environment of which Terraform operates on.
Index ¶
- Variables
- type Space
- type Spaces
- func (s *Spaces) AddBackend(name, backend string)
- func (s *Spaces) AddVarfile(name, varfile string)
- func (s *Spaces) Env(name string, hasApply bool) ([]string, error)
- func (s *Spaces) RemoveBackend(name, backend string)
- func (s *Spaces) RemoveVarfile(name, varfile string)
- func (s *Spaces) SetWorkspace(name, workspace string)
- func (s *Spaces) UnsetWorkspace(name string)
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("space not found")
ErrNotFound indicates when a space is not found.
Functions ¶
This section is empty.
Types ¶
type Spaces ¶
type Spaces []*Space
Spaces is a list of Space.
func (*Spaces) AddBackend ¶
AddBackend adds backend into the space of name. If the space does not exist, a new one will be created. If the backend already exists in the space, it will not do anything.
func (*Spaces) AddVarfile ¶
AddVarfile adds var-file into the space of name. If the space does not exist, a new one will be created. If the var-file already exists in the space, it will not do anything.
func (*Spaces) Env ¶
Env return list of environment variables in the form of key=value that can be passed to exec.Command.Env.
func (*Spaces) RemoveBackend ¶
RemoveBackend removes backend from the space. If the space does not exist, it does not do anything. If the backend does not exist in the space, it will not do anything.
func (*Spaces) RemoveVarfile ¶
RemoveVarfile removes var-file from the space. If the space does not exist, it does not do anything. If the var-file does not exist in the space, it will not do anything.
func (*Spaces) SetWorkspace ¶
SetWorkspace set the value of workspace to the input value. If space does not exist, if does not do anything.
func (*Spaces) UnsetWorkspace ¶
UnsetWorkspace set the value of workspace to empty string. If space does not exist, if does not do anything.