You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a piece of code using hclwrite to modify some Terraform code, in that it will conditionally remove attributes/blocks. The question raises when I encounter, e.g. the following HCL (regarded as a TF attribute):
foo = {
bar = {
}
baz = "xxx"
}
(The above code is not prevalent in SDKv2 based providers, but will prevail for FW based ones as attributes are preferred to blocks)
I don't know how could I, e.g., remove the bar inside the foo attribute's expression (i.e. the collectionValue).
I've tried with something similar to below, but doesn't output what I expected:
I have a piece of code using
hclwrite
to modify some Terraform code, in that it will conditionally remove attributes/blocks. The question raises when I encounter, e.g. the following HCL (regarded as a TF attribute):(The above code is not prevalent in SDKv2 based providers, but will prevail for FW based ones as attributes are preferred to blocks)
I don't know how could I, e.g., remove the
bar
inside thefoo
attribute's expression (i.e. thecollectionValue
).I've tried with something similar to below, but doesn't output what I expected:
The text was updated successfully, but these errors were encountered: