Skip to content

Secondary range services&pods name cannot be null #2438

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

Closed
fulyagonultas opened this issue Jul 22, 2024 · 3 comments · Fixed by #2439
Closed

Secondary range services&pods name cannot be null #2438

fulyagonultas opened this issue Jul 22, 2024 · 3 comments · Fixed by #2439

Comments

@fulyagonultas
Copy link
Contributor

fulyagonultas commented Jul 22, 2024

In gke autopilot, standard and nodepool, var.vpc_config.secondary_range_names appends "pods" and "services" values to the secondary service and pods name which causes error if you don't have a services and pods with these values. We want to make the service name optional and keep them null but not adding "services". Is that to set them null and remove those values from the variable?

variable "vpc_config" {
  description = "VPC-level configuration."
  type = object({
    network                    = string
    subnetwork                 = string
    master_ipv4_cidr_block     = optional(string)
    master_endpoint_subnetwork = optional(string)
    secondary_range_blocks = optional(object({
      pods     = string
      services = string
    }))
    secondary_range_names = optional(object({
      pods     = optional(string, "pods")
      services = optional(string, "services")
    }))
    additional_ranges        = optional(list(string))
    master_authorized_ranges = optional(map(string))
    stack_type               = optional(string)
  })
  nullable = false
}
@fulyagonultas
Copy link
Contributor Author

fulyagonultas commented Jul 22, 2024

Like this

variable "vpc_config" {
  description = "VPC-level configuration."
  type = object({
    network = string
    subnetwork = string
    master_ipv4_cidr_block = optional(string)
    master_endpoint_subnetwork = optional(string)
    secondary_range_blocks = optional(object({
      pods = string
      services = string
    }))
    secondary_range_names = optional(object({
      pods = optional(string)
      services = optional(string)
    }))
    additional_ranges = optional(list(string))
    master_authorized_ranges = optional(map(string))
    stack_type = optional(string)
  })
  nullable = false
}

@ludoo
Copy link
Collaborator

ludoo commented Jul 22, 2024

Can you send a PR?

@fulyagonultas
Copy link
Contributor Author

PR created: #2439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants