Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config interface { HasConfigurationFiles() bool HasProviderBlock(context.Context) (bool, error) HasTerraformBlock(context.Context) (bool, error) Write(context.Context, string) error }
Config defines an interface implemented by all types that represent Terraform configuration:
- [config.configurationDirectory]
- [config.configurationFile]
- [config.configurationString]
func Configuration ¶
func Configuration(req ConfigurationRequest) Config
Configuration uses the supplied ConfigurationRequest to determine which of the types that implement Config to instantiate. If none of the fields in ConfigurationRequest are populated nil is returned.
type ConfigurationRequest ¶
ConfigurationRequest is used by the Configuration func to determine the underlying type to instantiate.
func (ConfigurationRequest) Validate ¶
func (c ConfigurationRequest) Validate() error
Validate ensures that only one of Directory, File or Raw are non-empty.
type PrepareConfigurationRequest ¶
type PrepareConfigurationRequest struct { Directory config.TestStepConfigFunc File config.TestStepConfigFunc Raw string TestStepConfigRequest config.TestStepConfigRequest }
PrepareConfigurationRequest is used to simplify the generation of a ConfigurationRequest which is required when calling the Configuration func.
func (PrepareConfigurationRequest) Exec ¶
func (p PrepareConfigurationRequest) Exec() ConfigurationRequest
Exec returns a Configuration request which is required when calling the Configuration func.