iits-consulting / terraform-opentelekomcloud-project-factory

This repository helps to create an OTC-based cloud-native infrastructure landscape with Kubernetes, load balancers, VPCs, etc. With these modules, we provide you a rocket start while you can still deep-dive into detailed configuration later.
GNU General Public License v3.0
83 stars 20 forks source link

Experiment "module_variable_optional_attrs" is no longer available #46

Closed generalpax closed 1 year ago

generalpax commented 2 years ago

Getting an error when trying to use cce module with latest terraform version:

[linux]$ cat cce.tf
module "cce" {
  source             = "registry.terraform.io/iits-consulting/project-factory/opentelekomcloud//modules/cce"
  name               = "var.${cce_cluster_name}_test"
  autoscaling_config = {
    nodes_max = 8
  }
  cluster_config     = {
    vpc_id            = module.vpc.vpc_id
    subnet_id         = lookup(module.vpc.subnet_list, "tos-cce")
    cluster_version   = "v1.21"
    high_availability = true
    enable_scaling    = true #set this flag to false to disable auto scaling
  }
  node_config        = {
    availability_zones = ["eu-ch2a", "eu-ch2b"]
    node_count         = 3
    node_flavor        = local.node_spec_default
    node_storage_type  = "SSD"
    node_storage_size  = 100
  }
}

Error is:

│ Error: Experiment has concluded
│
│   on .terraform/modules/cce/modules/cce/versions.tf line 9, in terraform:
│    9:     module_variable_optional_attrs,
│
│ Experiment "module_variable_optional_attrs" is no longer available. The final feature corresponding to this experiment
│ differs from the experimental form and is available in the Terraform language from Terraform v1.3.0 onwards.
╵

terraform version:

[linux]$ terraform --version
Terraform v1.3.0-alpha20220803
on linux_amd64
+ provider registry.terraform.io/opentelekomcloud/opentelekomcloud v1.31.0
victorgetz commented 2 years ago

Hi thanks for pointing that out. But the latest stable version is still 1.2.7 https://www.terraform.io/downloads

You are currently using a alpha version which i would not recommend to use till it becomes stable.

We will try it out with 1.3.0 when it becomes stable and will remove the experiments part from the versions.tf

canaykin commented 2 years ago

It is also important to note that the syntax for optional attributes change entirely with 1.3.x, with which we will have to make a major release following the new syntax.

victorgetz commented 1 year ago

@generalpax is fixxed now in version 5.0.0