Documentation
¶
Overview ¶
Package terraform contains structures for Terraform's alternative representations. The reason for providing these is to avoid depending on Terraform for this plugin.
The structures provided by this package are minimal used for static analysis. Also, this is often not transferred directly from the host process, but through an intermediate representation. See the package tflint for details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶ added in v0.3.0
type Backend struct {
Type string
Config hcl.Body
ConfigRange hcl.Range
TypeRange hcl.Range
DeclRange hcl.Range
}
Backend is an alternative representation of configs.Backend. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/backend.go#L12-L18
type Connection ¶
type Connection struct {
Config hcl.Body
DeclRange hcl.Range
}
Connection is an alternative representation of configs.Connection. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/provisioner.go#L164-L170
type ManagedResource ¶
type ManagedResource struct {
Connection *Connection
Provisioners []*Provisioner
CreateBeforeDestroy bool
PreventDestroy bool
// IgnoreChanges []hcl.Traversal
IgnoreAllChanges bool
CreateBeforeDestroySet bool
PreventDestroySet bool
}
ManagedResource is an alternative representation of configs.ManagedResource. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/resource.go#L35-L47 IgnoreChanges is not supported due to the difficulty of intermediate representation.
type ModuleCall ¶ added in v0.4.0
type ModuleCall struct {
Name string
SourceAddr string
SourceAddrRange hcl.Range
SourceSet bool
Config hcl.Body
ConfigRange hcl.Range
Version VersionConstraint
Count hcl.Expression
CountRange hcl.Range
ForEach hcl.Expression
ForEachRange hcl.Range
Providers []PassedProviderConfig
DeclRange hcl.Range
}
ModuleCall is an alternative representation of configs.ModuleCall. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/module_call.go#L11-L31 DependsOn is not supported due to the difficulty of intermediate representation.
type PassedProviderConfig ¶ added in v0.4.0
type PassedProviderConfig struct {
InChild *ProviderConfigRef
InParent *ProviderConfigRef
}
PassedProviderConfig is an alternative representation of configs.PassedProviderConfig. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/module_call.go#L155-L158
type ProviderConfigRef ¶
type ProviderConfigRef struct {
Name string
NameRange hcl.Range
Alias string
AliasRange *hcl.Range
}
ProviderConfigRef is an alternative representation of configs.ProviderConfigRef. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/resource.go#L371-L376
type Provisioner ¶
type Provisioner struct {
Type string
Config hcl.Body
Connection *Connection
When ProvisionerWhen
OnFailure ProvisionerOnFailure
DeclRange hcl.Range
TypeRange hcl.Range
}
Provisioner is an alternative representation of configs.Provisioner. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/provisioner.go#L9-L20
type ProvisionerOnFailure ¶
type ProvisionerOnFailure int
ProvisionerOnFailure is an alternative representation of configs.ProvisionerOnFailure. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/provisioner.go#L183-L193
const ( // ProvisionerOnFailureInvalid is the zero value of ProvisionerOnFailure. ProvisionerOnFailureInvalid ProvisionerOnFailure = iota // ProvisionerOnFailureContinue indicates continuation on failure. ProvisionerOnFailureContinue // ProvisionerOnFailureFail indicates failure on failure. ProvisionerOnFailureFail )
type ProvisionerWhen ¶
type ProvisionerWhen int
ProvisionerWhen is an alternative representation of configs.ProvisionerWhen. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/provisioner.go#L172-L181
const ( // ProvisionerWhenInvalid is the zero value of ProvisionerWhen. ProvisionerWhenInvalid ProvisionerWhen = iota // ProvisionerWhenCreate indicates the time of creation. ProvisionerWhenCreate // ProvisionerWhenDestroy indicates the time of deletion. ProvisionerWhenDestroy )
type Resource ¶
type Resource struct {
Mode ResourceMode
Name string
Type string
Config hcl.Body
Count hcl.Expression
ForEach hcl.Expression
ProviderConfigRef *ProviderConfigRef
Managed *ManagedResource
DeclRange hcl.Range
TypeRange hcl.Range
}
Resource is an alternative representation of configs.Resource. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/resource.go#L13-L33 DependsOn is not supported due to the difficulty of intermediate representation.
type ResourceMode ¶
type ResourceMode rune
ResourceMode is an alternative representation of addrs.ResourceMode. https://github.com/hashicorp/terraform/blob/v0.12.26/addrs/resource.go#L253-L271
const ( // InvalidResourceMode is the zero value of ResourceMode. InvalidResourceMode ResourceMode = 0 // ManagedResourceMode indicates a managed resource. ManagedResourceMode ResourceMode = 'M' // DataResourceMode indicates a data resource. DataResourceMode ResourceMode = 'D' )
type VersionConstraint ¶ added in v0.4.0
type VersionConstraint struct {
Required version.Constraints
DeclRange hcl.Range
}
VersionConstraint is an alternative representation of configs.VersionConstraint. https://github.com/hashicorp/terraform/blob/v0.12.26/configs/version_constraint.go#L16-L19