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

Bump terraform-json to v0.22.1 #5

Merged
merged 1 commit into from
May 30, 2024

Conversation

AislingHPE
Copy link

@AislingHPE AislingHPE commented May 30, 2024

There is an issue in v0.17.1 of terrraform-json where state files can't
be read when there are checks present, since checks are an arrray, and
the tool tries to marshal them to a strruct. This causes an issue with
the ShowStateFile function.

Bumping terraform-json to the latest version and running go mod tidy
to pull in its dependencies.

Original issue in tfexec:
hashicorp#415

Line which doesn't work currently in this repo:

tofu-exec/tfexec/show.go

Lines 95 to 99 in e5963f1

showCmd := tf.showCmd(ctx, true, mergeEnv, statePath)
var ret tfjson.State
ret.UseJSONNumber(true)
err = tf.runTerraformCmdJSON(ctx, showCmd, &ret)

Patch to terraform-json:
hashicorp/terraform-json#101

Changlog from v0.17.1 to v0.22.1:
https://github.com/hashicorp/terraform-json/releases

There is an issue in v0.17.1 of terrraform-json where state files can't
be read when there are checks present, since checks are an arrray, and
the tool tries to marshal them to a strruct. This causes an issue with
the ShowStateFile function.

Bumping terraform-json to the latest version and running `go mod tidy`
to pull in its dependencies.

Original issue in tfexec:
hashicorp#415

Line which doesn't work currently in this repo:
https://github.com/opentofu/tofu-exec/blob/e5963f176ec5f21e5d059428189439290554c25c/tfexec/show.go#L95-L99

Patch to terraform-json:
hashicorp/terraform-json#101

Changlog from v0.17.1 to v0.22.1:
https://github.com/hashicorp/terraform-json/releases
@AislingHPE AislingHPE force-pushed the bump-terraform-json-v0.22.1 branch from d61be94 to 5fca4f3 Compare May 30, 2024 12:44
@cam72cam cam72cam requested a review from Yantrio May 30, 2024 13:33
@Yantrio
Copy link
Member

Yantrio commented May 30, 2024

Hi, Thanks for this contribution. Right now we are not sure if we want to maintain this repository/fork or not because of the maintainance cost included with that. However right now I am happy to merge this as it's an extremely simple change. But I do recommend that you continue to use terraform-json if possible in the meantime.

If/When we do make a choice to maintain this package, I will let you know.

@Yantrio Yantrio merged commit cf3d41b into opentofu:main May 30, 2024
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

Successfully merging this pull request may close these issues.

2 participants