Documentation ¶
Index ¶
- func GetParsed[T any](state *TfState, resourceRef string) (*T, error)
- func GetParsedById[T any](state *TfState, resourceId string) (*T, error)
- func GetResourceName(r any) string
- func WrapWithBlockType(block TfBlock) (any, error)
- type DataSourceWrapper
- type ResourceWrapper
- type TerraformDataSource
- type TerraformResource
- type TfBlock
- type TfResource
- type TfState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetParsedById ¶ added in v0.1.46
func GetResourceName ¶
func WrapWithBlockType ¶
Types ¶
type DataSourceWrapper ¶
type DataSourceWrapper struct {
R any `hcl:"data"`
}
func (DataSourceWrapper) GetR ¶
func (r DataSourceWrapper) GetR() any
type ResourceWrapper ¶
type ResourceWrapper struct {
R any `hcl:"resource"`
}
ResourceWrapper just to add a resource {} around when encoding into hcl
func (ResourceWrapper) GetR ¶
func (r ResourceWrapper) GetR() any
type TerraformDataSource ¶
type TerraformDataSource struct { ResourceName string `hcl:",key"` ResourceId string `hcl:",key"` DependsOn []string `hcl:"depends_on,expr" hcle:"omitempty"` }
func (*TerraformDataSource) AddDependency ¶
func (t *TerraformDataSource) AddDependency(dep string)
func (TerraformDataSource) GetBlockType ¶
func (t TerraformDataSource) GetBlockType() string
func (TerraformDataSource) GetFullResourceRef ¶
func (t TerraformDataSource) GetFullResourceRef() string
func (*TerraformDataSource) GetResourceId ¶ added in v0.1.38
func (t *TerraformDataSource) GetResourceId() string
func (*TerraformDataSource) SetName ¶
func (t *TerraformDataSource) SetName(name string)
type TerraformResource ¶
type TerraformResource struct { ResourceName string `hcl:",key"` ResourceId string `hcl:",key"` DependsOn []string `hcl:"depends_on,expr" hcle:"omitempty"` }
func (*TerraformResource) AddDependency ¶
func (t *TerraformResource) AddDependency(dep string)
func (TerraformResource) GetBlockType ¶
func (t TerraformResource) GetBlockType() string
func (TerraformResource) GetFullResourceRef ¶
func (t TerraformResource) GetFullResourceRef() string
func (*TerraformResource) GetResourceId ¶ added in v0.1.38
func (t *TerraformResource) GetResourceId() string
func (*TerraformResource) SetName ¶
func (t *TerraformResource) SetName(name string)
type TfResource ¶
type TfState ¶
type TfState struct { Values struct { RootModule struct { Resources []TfResource `json:"resources"` } `json:"root_module"` } `json:"values"` }
Click to show internal directories.
Click to hide internal directories.