For subnets this error may occour:
terraform init
Initializing modules...
Downloading registry.terraform.io/cloud-native-toolkit/vpc/ibm 1.17.0 for ibm-vpc...
- ibm-vpc in .terraform/modules/ibm-vpc
Downloading registry.terraform.io/cloud-native-toolkit/vpc-gateways/ibm 1.10.0 for ibm-vpc-gateways...
- ibm-vpc-gateways in .terraform/modules/ibm-vpc-gateways
Downloading registry.terraform.io/cloud-native-toolkit/vpc-subnets/ibm 1.14.0 for ibm-vpc-subnets...
- ibm-vpc-subnets in .terraform/modules/ibm-vpc-subnets
Downloading git::https://github.com/terraform-ibm-modules/terraform-ibm-toolkit-resource-group.git?ref=v3.3.5 for resource_group...
- resource_group in .terraform/modules/resource_group
Downloading registry.terraform.io/cloud-native-toolkit/clis/util 1.18.1 for resource_group.clis...
- resource_group.clis in .terraform/modules/resource_group.clis
There are some problems with the configuration, described below.
The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.
╷
│ Error: Experiment has concluded
│
│ on .terraform/modules/ibm-vpc-subnets/version.tf line 10, in terraform:
│ 10: experiments = [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
Terraform v1.3.4
on linux_amd64
go to the file ./terraform/.terraform/modules/ibm-vpc-subnets/version.tf
change
terraform {
required_version = ">= 0.15.0"
required_providers {
ibm = {
source = "ibm-cloud/ibm"
version = ">= 1.22.0"
}
}
experiments = [module_variable_optional_attrs]
}
to
terraform {
required_version = ">= 1.3"
required_providers {
ibm = {
source = "ibm-cloud/ibm"
version = ">= 1.22.0"
}
}
}