Skip to content

Spoke Peering Import Export of Routes Configuration does not work in networking stage #2462

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
sudhirrs opened this issue Aug 2, 2024 · 1 comment · Fixed by #2464
Closed
Assignees

Comments

@sudhirrs
Copy link
Contributor

sudhirrs commented Aug 2, 2024

Describe the bug
Spoke Peering import/export of route configurations do not work in the networking stage due to incorrect definition of the variable.

This is the routes_config that is passed to net-vpc-peering module

module "peering-dev" {
  count         = local.spoke_connection == "peering" ? 1 : 0
  source        = "../../../modules/net-vpc-peering"
  prefix        = "dev-peering-0"
  local_network = module.dev-spoke-vpc.self_link
  peer_network  = module.landing-vpc.self_link
  routes_config = var.spoke_configs.peering_configs.dev
}

The var peering_configs.dev is defined in this manner

dev = optional(object({
        export        = optional(bool, true)
        import        = optional(bool, true)
        public_export = optional(bool)
        public_import = optional(bool)
      }), {})

This does not work because module net-vpc-peering expects this

type = object({
    local = optional(object({
      export        = optional(bool, true)
      import        = optional(bool, true)
      public_export = optional(bool)
      public_import = optional(bool)
    }), {})
    peer = optional(object({
      export        = optional(bool, true)
      import        = optional(bool, true)
      public_export = optional(bool)
      public_import = optional(bool)
    }), {})
  })

Current behavior - this route config configuration even if set, has no effect.

@ludoo ludoo self-assigned this Aug 3, 2024
@ludoo
Copy link
Collaborator

ludoo commented Aug 3, 2024

Good catch, thanks for reporting!

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

Successfully merging a pull request may close this issue.

2 participants