chalice icon indicating copy to clipboard operation
chalice copied to clipboard

Support Terraform 1.4

Open Matt343 opened this issue 2 years ago • 2 comments

The current version limits are set to disallow terraform >= 1.4

Matt343 avatar Aug 21 '23 16:08 Matt343

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

kapilt avatar Aug 21 '23 21:08 kapilt

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)

jeffersonferrari avatar Mar 14 '24 19:03 jeffersonferrari