Chore: install terraform in devcontainer - #3417
Conversation
|
Preview url: https://benefits-3417--cal-itp-previews.netlify.app |
4df6f80 to
4328b0f
Compare
| echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \ | ||
| tee /etc/apt/sources.list.d/hashicorp.list && \ | ||
| apt update && \ | ||
| apt install -y terraform |
There was a problem hiding this comment.
not sure if there'd be an advantage to it in benefits, but i've used mise in the past as a terraform version manager too...
There was a problem hiding this comment.
Thanks for the suggestion @jgravois. I looked into mise and it just felt like a little bit more overhead than what is necessary here (at least for now... good to know more about that tooling though).
But I took your note and pinned the version of terraform that we install to match that in the terraform/deploy/pipeline.yml to minimize any potential version mismatch issues.
Also FWIW, Terraform's v1.x Compatibility Promises seem to indicate that we don't necessarily need to be concerned about this, but it certainly doesn't hurt to eliminate one more possible source of confusion.
There was a problem hiding this comment.
mise has a genuine upside in our other repos that use netlify to deploy because netlify uses it too.
in this repo I don't see any disadvantage to just installing the desired version of terraform explicitly and directly in a DevContainer as you're proposing.
regardless, thanks for tackling this 'quality of life' fix!
3ab94f4 to
345e30b
Compare
345e30b to
195fae4
Compare
lalver1
left a comment
There was a problem hiding this comment.
Looks great! I also tested locally and everything worked as expected 👍
Closes #3297
Reviewing
bin/build.shand confirm no errorscd terraform/thenaz login --tenant <DevSecOps tenant ID>./init.sh devto confirm the Terraform workspace is initialized and selected as expectedterraform -helpand confirm expected help output.tffile (e.g. add some extra space), save, confirm the auto-formatting removes your change