-
Notifications
You must be signed in to change notification settings - Fork 37
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: migrate to use tofu #969
Conversation
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/187247378 The labels on this github issue will be updated when the story is started. |
d25a988
to
365141d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. There are a couple of additional things to highlight.
- The project is "OpenTofu" and the command is "tofu". Sometimes I see "Tofu" in the code, and I think this should either be a reference to the OpenTofu project, or a reference to the (lowercase) "tofu" command.
- I don't see any changes to the docs yet
return &manifest.Manifest{} | ||
} | ||
|
||
// TODO: can we avoid passing URL template if we change the logic in the packer? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A "TODO" should either be done, or removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed, haven't look at that one yet.
} | ||
} | ||
|
||
func testManifestTwoTofus() *manifest.Manifest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Go, a function name starting Test...
in a ..._test.go
file is a test. To avoid confusion, it would be better to rename these functions as fakeManifestTofu()
or similar to make it clear that they are test fakes, and not typo'd test functions.
}, | ||
TerraformVersions: []manifest.TerraformVersion{ | ||
{ | ||
Version: version1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version.Must(version.NewVersion("1.6.0"))
is safer and also neater
There is a separate story for the docs. Indeed the tofu versus Tofu versus OpenTofu is confusing, we did have tf vs Terraform vs terraform before. I tried to be as consistent as I could given the amount of changes. It can definitely be improved but I am leaning towards reviewing after we have it working in the pipelines. |
Also changed log messages to mention Tofu instead of terraform For now we test explicitely passing the URL template for tofu binaries We'll look into changing the default behaviour later so that it doesn't need to be specified. [#187199910](https://www.pivotaltracker.com/story/show/187199910)
Also update all integration tests to use tofu instead of terraform [#187199910](https://www.pivotaltracker.com/story/show/187199910)
14e3679
to
d3cd4ea
Compare
Checklist:
* [ ] Have you added Release Notes in the docs repositories?