Skip to content

Instantly share code, notes, and snippets.

@No9
Created November 5, 2022 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save No9/87deca30a9c43b52c574396fde4bbd33 to your computer and use it in GitHub Desktop.
Save No9/87deca30a9c43b52c574396fde4bbd33 to your computer and use it in GitHub Desktop.
Notes on using the architecture toolkit

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"
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment