Documentation ¶
Overview ¶
Package genconfig implements config generation from provided state values.
Index ¶
- func GenerateResourceContents(addr addrs.AbsResourceInstance, schema *configschema.Block, ...) (string, tfdiags.Diagnostics)
- func MaybeWriteGeneratedConfig(plan *plans.Plan, out string) (wroteConfig bool, diags tfdiags.Diagnostics)
- func ValidateTargetFile(out string) tfdiags.Diagnostics
- func WrapResourceContents(addr addrs.AbsResourceInstance, config string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateResourceContents ¶
func GenerateResourceContents(addr addrs.AbsResourceInstance, schema *configschema.Block, pc addrs.LocalProviderConfig, stateVal cty.Value) (string, tfdiags.Diagnostics)
GenerateResourceContents generates HCL configuration code for the provided resource and state value.
If you want to generate actual valid Terraform code you should follow this call up with a call to WrapResourceContents, which will place a Terraform resource header around the attributes and blocks returned by this function.
func ValidateTargetFile ¶
func ValidateTargetFile(out string) tfdiags.Diagnostics
func WrapResourceContents ¶
func WrapResourceContents(addr addrs.AbsResourceInstance, config string) string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.