Issue with Terraform Core Version

╷
│ Error: Unsupported Terraform Core version
│ 
│   on .terraform/modules/network/modules/firewall-rules/versions.tf line 18, in terraform:
│   18:   required_version = ">=0.12.6, <0.14"
│ 
│ Module module.network.module.firewall_rules (from ./modules/firewall-rules) does not support Terraform version 1.4.6. 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.
╵

Hello everyone is there a work around for this issue ?

1 Like

This is part of your own code, or a module that your own code references.

You have not told us which…

Hey maxb, this is a module that my code references not one that I built

And are you going to tell us which one, then?

Sure, I created a folder called the network and it houses three files main.tf, variables.tf, and output.tf. In my root directory, there is a main.tf that orchestrates the build and my network is in a module

module "network" {
  source  = "terraform-google-modules/network/google"
  version = "3.1.0"

  network_name              = var.network_name
  subnet_count              = var.subnet_count
  subnet_ips                = var.subnet_ips
  routing_mode              = var.routing_mode
  subnet_flow_logs          = var.subnet_flow_logs
  subnet_flow_logs_sampling = var.subnet_flow_logs_sampling
  secondary_ip_range        = var.secondary_ip_range
  firewall_rules            = var.firewall_rules
  subnet_regions            = var.subnet_regions
  subnet_private_access     = var.subnet_private_access
  subnet_names              = var.subnet_names
  routes                    = var.routes
  subnet_flow_logs_metadata = var.subnet_flow_logs_metadata
  subnet_flow_logs_interval = var.subnet_flow_logs_interval
}

Well, why don’t you upgrade the version of that module, then?

You’re using a modern Terraform version, with a module version released over 2 years ago.

Facing similar issues. Is there any fix for it?

You will need to either select a version of the module that is compatible with your chosen Terraform Core version, or select a version of Terraform Core that is compatible with the modules you have chosen to use.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.