mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-27 09:21:14 -06:00
4833d2aa79
Our "Parse..." functions all take hcl.Traversal objects rather than strings, assuming that in most cases we've already parsed a traversal out of some larger construct (usually a config file) before interpreting it as an address. However, there are some situations -- particularly tests -- where being able to easily parse a string directly is helpful. These new "Parse...Str" functions all wrap the function of the same name with no "Str" suffix and first parse the string with the HCL native syntax traversal parser. As noted in the function doc comments, this should not be used in "real" code except in exceptional circumstances, since it creates addresses and diagnostics that do not have useful source location information for reporting diagnostics. |
||
---|---|---|
.. | ||
count_attr.go | ||
doc.go | ||
input_variable.go | ||
instance_key.go | ||
local_value.go | ||
module_call.go | ||
module_instance.go | ||
module.go | ||
output_value.go | ||
parse_ref_test.go | ||
parse_ref.go | ||
parse_target_test.go | ||
parse_target.go | ||
path_attr.go | ||
provider_config_test.go | ||
provider_config.go | ||
referenceable.go | ||
resource_phase.go | ||
resource.go | ||
resourcemode_string.go | ||
self.go | ||
targetable.go | ||
terraform_attr.go |