Documentation ¶
Overview ¶
Package terraform implements methods and functions for running Terraform commands, such as terraform init/plan/apply.
The intention of this package is to call and run inside a CI/CD pipeline.
Index ¶
- type CmdOutput
- type Commander
- func (s *Commander) Apply() error
- func (c *Commander) BulkApply() error
- func (c *Commander) BulkPlan() error
- func (s *Commander) CheckDivergence() error
- func (s *Commander) Init(p bool) error
- func (s *Commander) Kubectl(args ...string) (*CmdOutput, error)
- func (s *Commander) Plan() error
- func (s *Commander) SelectWs(ws string) error
- func (s *Commander) Terraform(args ...string) (*CmdOutput, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commander ¶
type Commander struct { AccessKeyID string SecretAccessKey string Workspace string VarFile string DisplayTfOutput bool BulkTfPaths string // contains filtered or unexported fields }
Commander struct holds all data required to execute terraform.
func (*Commander) BulkApply ¶
BulkApply executes teraform apply against all directories that changed in the PR.
func (*Commander) CheckDivergence ¶
CheckDivergence check that there are not changes within certain state, if there are it will return non-zero and pipeline will fail.
Click to show internal directories.
Click to hide internal directories.