-
Notifications
You must be signed in to change notification settings - Fork 553
[terraform] - Fix terraform installation in ubuntu noble. #1421
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
[terraform] - Fix terraform installation in ubuntu noble. #1421
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
This PR fixes terraform installation on Ubuntu Noble (24.04) by addressing GPG key handling changes in the newer Ubuntu version. Ubuntu Noble has stricter GPG validation and deprecated apt-key usage, requiring keys in specific formats and locations.
- Adds Ubuntu Noble detection and alternate GPG key import method using keybase.io source
- Implements fallback verification logic for both Terraform and Sentinel installations
- Adds comprehensive test coverage for Ubuntu Noble with both standard and Sentinel installations
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/terraform/install.sh | Core installation logic with Noble detection and alternate GPG handling |
| src/terraform/devcontainer-feature.json | Version bump from 1.4.0 to 1.4.1 |
| test/terraform/scenarios.json | Test scenarios for Ubuntu Noble installations |
| test/terraform/install_in_ubuntu_noble.sh | Test script for basic Noble installation |
| test/terraform/install_in_ubuntu_noble_sentinel.sh | Test script for Noble installation with Sentinel |
|
As a side note, is there a way to bypass the key verification? If the key ever went away, we might want to allow the user to be able to get running without it |
|
And lastly, would this be an alternative URL for the GPG key? |
Hello @AlvaroRausell , They don't appear to be the same key. so won’t work. |
Hello @AlvaroRausell , I think it should work but I will test and confirm. Edit :- I have verified the same, we can proceed with installation with basic checksum validation alone. So now I have kept it as a fallback mechanism for ubuntu noble, if the key download or verification fails. |
|
Hello @AlvaroRausell , Thank you for the detailed review and the suggestions. I have corrected the implementation accordingly. Would you kindly have another look and let me know in case of any further concern. With Regards, |
Co-authored-by: Álvaro Rausell Guiard <33221237+AlvaroRausell@users.noreply.github.com>
|
Hello @AlvaroRausell , I have slightly changed the error handling for the part of the code when gpg validation of the download package fails even with the correct key which you had highlighted in the last review. Would you kindly have a look and let me know in case of any further concern. |
|
Hello @AlvaroRausell, |
Ref: #1418
Description: This PR aims to solve #1418 to solve broken terraform installation in ubuntu noble (24.04). The issue is happening in ubuntu noble platform while installing terraform as noble has stricter GPG validation and different default keyserver behavior compared to jammy/focal due to changes in how GPG keys are handled in Ubuntu Noble (24.04) and newer versions have deprecated the use of apt-key and require keys to be in a specific format (usually .gpg or .asc) and placed in
/etc/apt/keyringsfolder. But as the given approach where in the feature the binary is downloaded from hashicorp release site verified against the GPG key, as part of this PR added alternate source for the key & imported the same for Ubuntu noble (24.04).Changelog: The following changes are included.
Checklist: