Documentation ¶
Index ¶
- func Apply(tfCfg *configs.Config, cfg *Config) (*configs.Config, error)
- func HasConfig(dir string) (bool, error)
- type Config
- type JSONPointerPathOperator
- func (op JSONPointerPathOperator) Add(resource *configs.Resource, value Value) (*configs.Resource, error)
- func (op JSONPointerPathOperator) Remove(resource *configs.Resource) (*configs.Resource, error)
- func (op JSONPointerPathOperator) Replace(resource *configs.Resource, value Value) (*configs.Resource, error)
- func (op JSONPointerPathOperator) Search(resource *configs.Resource) (target, parent any, err error)
- func (op JSONPointerPathOperator) Set(resource *configs.Resource, value Value) (*configs.Resource, error)
- func (op JSONPointerPathOperator) String() string
- type JSONPointerPathToken
- type Operation
- type Patch
- type PathOperator
- type TerraformResources
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JSONPointerPathOperator ¶
type JSONPointerPathOperator []JSONPointerPathToken
func (JSONPointerPathOperator) Search ¶
func (op JSONPointerPathOperator) Search(resource *configs.Resource) (target, parent any, err error)
func (JSONPointerPathOperator) String ¶
func (op JSONPointerPathOperator) String() string
type JSONPointerPathToken ¶
func TokenizeJSONPointerPath ¶
func TokenizeJSONPointerPath(path string) []JSONPointerPathToken
type PathOperator ¶
type PathOperator interface { // Add adds Value at the path if not found in the given configs.Resource. Add(*configs.Resource, Value) (*configs.Resource, error) // Replace replaces the value at the path if found in the given configs.Resource. Replace(*configs.Resource, Value) (*configs.Resource, error) // Remove removes the value at the path if found in the given configs.Resource. Remove(*configs.Resource) (*configs.Resource, error) // Set sets the value at the path of the given configs.Resource. Set(*configs.Resource, Value) (*configs.Resource, error) }
func NewJSONPointerPathOperator ¶
func NewJSONPointerPathOperator(path string) (PathOperator, error)
type TerraformResources ¶
func Operate ¶
func Operate(tfRess TerraformResources, patch *Patch, pathSyntax string) (TerraformResources, error)
Operate operates the patch on the given Terraform resources.
Click to show internal directories.
Click to hide internal directories.