Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseConfig ¶
type BaseConfig struct {
WildProvider *ProviderConfig
Providers []*ProviderConfig `hcl:"provider,block"`
}
type Drift ¶
type Drift struct {
// contains filtered or unexported fields
}
func (*Drift) Execute ¶
func (d *Drift) Execute(ctx context.Context, req *module.ExecuteRequest) *module.ExecutionResult
type Parser ¶
type Parser struct {
HCLContext *hcl.EvalContext
// contains filtered or unexported fields
}
func (*Parser) Decode ¶
func (p *Parser) Decode(body hcl.Body, diags hcl.Diagnostics) (*BaseConfig, hcl.Diagnostics)
type ProviderConfig ¶
type ProviderConfig struct {
WildResource *ResourceConfig
Name string `hcl:"name,label"`
Resources map[string]*ResourceConfig `hcl:"resource,block"`
Version string `hcl:"version,optional"`
SkipResources []string `hcl:"skip_resources,optional"`
// contains filtered or unexported fields
}
type ResourceConfig ¶
type ResourceConfig struct {
Identifiers []string `hcl:"identifiers,optional"`
IgnoreIdentifiers []string `hcl:"ignore_identifiers,optional"`
Attributes []string `hcl:"attributes,optional"`
IgnoreAttributes []string `hcl:"ignore_attributes,optional"`
Deep *bool `hcl:"deep,optional"` // Check attributes if true, otherwise just match identifiers
Filters []string `hcl:"filters,optional"` // SQL filters to exclude cloud providers default resources
IAC map[string]*IACConfig
// contains filtered or unexported fields
}
type ResourceList ¶
type ResourceList []*Resource
func (ResourceList) IDs ¶
func (r ResourceList) IDs(exclude ...*Resource) []string
type Result ¶
type Result struct {
IAC string `json:"iac"`
Provider string `json:"provider"`
ResourceType string `json:"resource_type"`
// Deep mode
Different ResourceList `json:"diff,omitempty"` // Resources don't match fully (id + attributes don't match)
DeepEqual ResourceList `json:"deep_equal,omitempty"` // Resource exists in both places (attributes match)
// Shallow mode
Equal ResourceList `json:"equal,omitempty"` // Resource exists in both places (attributes not checked)
// Both modes
Missing ResourceList `json:"missing"` // Missing in cloud provider, defined in iac
Extra ResourceList `json:"extra"` // Exists in cloud provider, not defined in iac
// Options
ListManaged bool `json:"-"` // Show or hide Equal/DeepEqual output
Debug bool `json:"-"` // Print debug output regarding results
}
Click to show internal directories.
Click to hide internal directories.