hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.68k stars 9.55k forks source link

AmazonLinux Unable to find a match: terraform #32905

Open Mentolz opened 1 year ago

Mentolz commented 1 year ago

Terraform Version

no version

Terraform Configuration Files

...terraform config...

Debug Output

image

Expected Behavior

Terraform should be installed properly. This exact solution was working a few weeks ago and im follow exactly the steps on the documentation for the AmazonLinux https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli

image

Actual Behavior

Last metadata expiration check: 0:00:14 ago on Wed Mar 22 15:53:18 2023.
No match for argument: terraform
Error: Unable to find a match: terraform

Steps to Reproduce

  1. docker run -it amazonlinux bash
  2. yum install -y yum-utils
  3. yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
  4. yum -y install terraform

Additional Context

No response

References

No response

crw commented 1 year ago

Thanks for filing this issue. For future reference, here is the hashicorp.repo file as of this moment:

[hashicorp]
name=Hashicorp Stable - $basearch
baseurl=https://rpm.releases.hashicorp.com/AmazonLinux/latest/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://rpm.releases.hashicorp.com/gpg

[hashicorp-test]
name=Hashicorp Test - $basearch
baseurl=https://rpm.releases.hashicorp.com/AmazonLinux/latest/$basearch/test
enabled=0
gpgcheck=1
gpgkey=https://rpm.releases.hashicorp.com/gpg

I am guessing we are missing aarch64 as a valid target in some way (not a yum expert, so not entirely sure what this means in terms of packaging, but seems like a safe starting point).

crw commented 1 year ago

Hi @Mentolz, one possible solution for the moment would be to specify an amd64 version of the container used to install Terraform:

docker run --platform linux/amd64 -it amazonlinux bash

This assumes the platform you are using for docker has the ability to run amd64 containers, e.g. MacOS or similar.

ashwaq06 commented 1 year ago

Is the issue is still open? I would like to work on this

crw commented 1 year ago

@ashwaq06 The HashiCorp official packaging and distribution system is not open source and is not open to contribution.

raguser commented 7 months ago

What is the status? I have the same problem!

sudo dnf config-manager --set-enabled hashicorp
No match for argument: terraform
Error: Unable to find a match: terraform