Prerequisite: Nix or install Terraform by hand.
$ nix run nixpkgs#terraform init
[...]
$ nix run nixpkgs#terraform plan
[...]
Changes to Outputs:
+ foo = {
+ bar = {}
+ foo = [
+ 1,
+ 2,
+ 3,
]
}
You can apply this plan to save these new output values to the Terraform state, without changing any real infrastructure.