Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change routes variable type. #583

Open
KevinAbregu opened this issue Nov 17, 2024 · 0 comments
Open

Change routes variable type. #583

KevinAbregu opened this issue Nov 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@KevinAbregu
Copy link

KevinAbregu commented Nov 17, 2024

TL;DR

Changing the "routes" variable type to be more specific on the main network module and on the routes module.
Right now, it's too generic.

Terraform Resources

On version 9.3.0
variable "routes" {
type = list(map(string))
description = "List of routes being created in this VPC"
default = []
}

Detailed design

I suggest a solution where the specific choices are visible, for example:

variable "routes" {
type = list(map(object({
name = optional(string)
description = optional(string)
tags = string
destination_range = string
next_hop_internet = optional(bool, false)
next_hop_ip = optional(string)
next_hop_instance = optional(string)
next_hop_instance_zone = optional(string)
next_hop_vpn_tunnel = optional(string)
priority = optional(string, "1000")
})))
description = "List of routes being created in this VPC"
default = []
}

This implies changing it on root/variables.tf and on root/modules/routes/variables.tf

Additional information

This solution will help developers who uses the network module or directly the route module, to design a solution where we can specify the variable elements directly, and it would be more similar to the rest of the resources (firewall, secondary networks, etc.)

@KevinAbregu KevinAbregu added the enhancement New feature or request label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant