Terraform package failed to install on CentOS Stream with fips enabled in the kernel args

Platform : CentOs 8 Stream

Problem , terraform package is probably signed with md5 which is not supported for el8[1]

Cause : fips=1 in kermel args

[1] package fails to install on centos8 with fips mode enabled. (#5938) · Issues · GitLab.org / omnibus-gitlab · GitLab

# dnf config-manager --add-repo "https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo"
Adding repo from: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
# dnf  install -y terraform 
Hashicorp Stable - x86_64                                                        4.2 kB/s | 1.4 kB     00:00    
Dependencies resolved.
=================================================================================================================
 Package                    Architecture            Version                     Repository                  Size
=================================================================================================================
Installing:
 terraform                  x86_64                  1.0.4-1                     hashicorp                   25 M

Transaction Summary
=================================================================================================================
Install  1 Package

Total download size: 25 M
Installed size: 75 M
Downloading Packages:
terraform-1.0.4-1.x86_64.rpm                                                     5.4 MB/s |  25 MB     00:04    
-----------------------------------------------------------------------------------------------------------------
Total                                                                            5.4 MB/s |  25 MB     00:04     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                         1/1 
  Installing       : terraform-1.0.4-1.x86_64                                                                1/1 
Error unpacking rpm package terraform-1.0.4-1.x86_64
  Verifying        : terraform-1.0.4-1.x86_64                                                                1/1 

Failed:
  terraform-1.0.4-1.x86_64                                                                                       


# cat /etc/default/grub | grep GRUB_CMDLINE_LINUX=
GRUB_CMDLINE_LINUX="consoleblank=0 net.ifnames=0 console=hvc0 crashkernel=auto boot=UUID=a950cd46-7cc8-444a-8a29-f8edc6dd8bd8 resume=UUID=3cefdc20-4416-48d6-b20a-bef479c40ba8 fips=1 console=ttyS0,115200"


editing /etc/default/grub  and changing fips arg value to 0

# cat /etc/default/grub | grep GRUB_CMDLINE_LINUX=
GRUB_CMDLINE_LINUX="consoleblank=0 net.ifnames=0 console=hvc0 crashkernel=auto boot=UUID=a950cd46-7cc8-444a-8a29-f8edc6dd8bd8 resume=UUID=3cefdc20-4416-48d6-b20a-bef479c40ba8 fips=0 console=ttyS0,115200"

#grub2-mkconfig -o /boot/grub2/grub.cfg

# shutdown -r now

# dnf  install -y terraform 

================================================================================
 Package            Architecture    Version            Repository          Size
================================================================================
Installing:
 terraform          x86_64          1.0.4-1            hashicorp           25 M

Transaction Summary
================================================================================
Install  1 Package

Total download size: 25 M
Installed size: 75 M
Downloading Packages:
terraform-1.0.4-1.x86_64.rpm                    5.2 MB/s |  25 MB     00:04    
--------------------------------------------------------------------------------
Total                                           5.2 MB/s |  25 MB     00:04     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : terraform-1.0.4-1.x86_64                               1/1 
  Verifying        : terraform-1.0.4-1.x86_64                               1/1 

Installed:
  terraform-1.0.4-1.x86_64                                                      

Complete!