Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Edit list type #50

Open
alanbccoe opened this issue May 5, 2022 · 1 comment
Open

feat: Edit list type #50

alanbccoe opened this issue May 5, 2022 · 1 comment

Comments

@alanbccoe
Copy link

I'm trying to programmatically modify tfvars files, but it appears attribute append doesn't work for them.

E.g. given this file:

owner = [
  "tom",
  "dave"
]

I was hoping I could append a new item with:

hcledit -f terraform.tfvars attribute append owner '"me"'

but this just replaces the whole list to give owner = "me"

It'd be great if this program supported append/rm/set operations just on terraform vars in tfvars files.

Get does seem to work already - I haven't tried the others yet since I need append.

@minamijoyo
Copy link
Owner

Thank you for opening this.

It's a missing feature to add an element to list. To implement this, we need to a feature to hclwrite, which is a library we depends on.

@minamijoyo minamijoyo changed the title Support working on tfvars files feat: Edit list type Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants