chalice
chalice copied to clipboard
Support Terraform 1.4
The current version limits are set to disallow terraform >= 1.4
yeah.. its a bit painful, I've brought this up before with @jamesls before about not doing this pin, when I wrote the terraform support for it, and in subsequent convos.
otoh hashicorp going bsl does, make me wonder about a pin below <= 1.5.5
I hope this helps someone, but I just added a method to manipulate the JSON generated by Chalice. This is working fine for me with Terraform version 1.7.4
import json
config_file = "file path"
new_version = "1.7.4"
with open(config_file, "r") as file:
config = json.load(file)
config["terraform"]["required_version"] = new_version
with open(config_file, "w", encoding="utf-8") as f:
json.dump(config, f, ensure_ascii=False, indent=2)