sumaform icon indicating copy to clipboard operation
sumaform copied to clipboard

terraform is higher version in main Leap 15.3 repo than the systemsmanagement

Open ktsamis opened this issue 2 years ago • 3 comments

i  | terraform                          | package    | 0.13.4-6.3.1                            | x86_64 | Main Repository
v  | terraform                          | package    | 0.12.13-lp153.1.4                       | x86_64 | Using Terraform to create a SUSE Manager test environment (openSUSE_Leap_15.3)

that causes:

Initializing modules...                                                                                                                                                                                            
- base.base_backend in backend_modules/libvirt/base                                                                                                                                                                
- server.server.host in backend_modules/libvirt/host                                                                                                                                                               
- server41.server.host in backend_modules/libvirt/host                                                                                                                                                             
- sles15sp3o.host in backend_modules/libvirt/host                                                                                                                                                                  
                                                                                                                                                                                                                   
Warning: Interpolation-only expressions are deprecated                                                                                                                                                             
                                                                                                                                                                                                                   
  on main.tf line 84, in module "sles15sp3o":                                                                                                                                                                      
  84:   base_configuration = "${module.base.configuration}"                                                                                                                                                        
                                                                                                                                                                                                                   
Terraform 0.11 and earlier required all non-constant expressions to be                                                                                                                                             
provided via interpolation syntax, but this pattern is now deprecated. To                                                                                                                                          
silence this warning, remove the "${ sequence from the start and the }"                                                                                                                                            
sequence from the end of this expression, leaving just the inner expression.                                                                                                                                       
                                                                                                                                                                                                                   
Template interpolation syntax is still used to construct strings from                                                                                                                                              
expressions when the template includes multiple interpolation sequences or a                                                                                                                                       
mixture of literal strings and interpolations. This deprecation applies only                                                                                                                                       
to templates that consist entirely of a single interpolation sequence.                                                                                                                                             
                                                                                                                                                                                                                   
                                                                                                                                                                                                                   
Error: Unsupported Terraform Core version                                                                                                                                                                          
                                                                                                                                                                                                                   
  on modules/base/versions.tf line 2, in terraform:                                                                                                                                                                
   2:   required_version = "~> 0.12.9"                                                                                                                                                                             
                                                                                                                                                                                                                   
Module module.base (from ./modules/base) does not support Terraform version                                                                                                                                        
0.13.4. To proceed, either choose another supported Terraform version or                                                                                                                                           
update this version constraint. Version constraints are normally set for good                                                                                                                                      
reason, so updating the constraint may lead to other errors or unexpected                                                                                                                                          
behavior.                                                                                                                                                                                                          

for syntax that I know was working in Leap 15.2. We need to update the version we support in the sumaform versions.tf files

ktsamis avatar Oct 13 '21 10:10 ktsamis

The easy workaround is of course to downgrade the version of terraform you use:

 
ktsamis@kostas:~/Git/sumaform> terraform init
Initializing modules...

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "template" (hashicorp/template) 2.2.0...
- Downloading plugin for provider "null" (hashicorp/null) 3.1.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.template: version = "~> 2.2"


Terraform has been successfully initialized!

ktsamis avatar Oct 13 '21 10:10 ktsamis

The installation instructions were wrong: https://github.com/uyuni-project/sumaform/pull/992

Since with those instructions, the package will be installed with the sumaform vendor, updates from openSUSE will never be installed unless the user allows a vendor change.

For others having this issue, they need to downgrade as you did (changing the vendor).

Can we close this, @ktsamis?

juliogonzalez avatar Nov 12 '21 10:11 juliogonzalez

And also terraform for sumaform is now 1.0.10

juliogonzalez avatar Nov 12 '21 10:11 juliogonzalez