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

How to add an extra firewall rule, when creating k8s cluster? #161

Open
stefan-korchahin opened this issue Nov 28, 2024 · 2 comments
Open

Comments

@stefan-korchahin
Copy link

stefan-korchahin commented Nov 28, 2024

Hi, have an issue or missunderstanding.
Here is manifest from my module:

resource "gcore_k8sv2" "this" {
  region_name   = var.gcore_region
  project_name  = var.gcore_project_name
  name          = var.name
  fixed_network = var.network_ids
  fixed_subnet  = var.subnet_ids
  keypair       = var.keypair
  version       = var.k8s_version
  security_group_rules {
        direction      = "ingress"
        ethertype      = "IPv4"
        protocol       = "tcp"
        port_range_min = 22
        port_range_max = 22
        remote_ip_prefix = "my_source_ip/32"
  }
  dynamic "pool" {
    for_each = var.pools
    content {
      name                 = pool.value.name
      flavor_id            = pool.value.flavor_id
      min_node_count       = pool.value.min_node_count
      max_node_count       = pool.value.max_node_count
      boot_volume_size     = pool.value.boot_volume_size
      boot_volume_type     = pool.value.boot_volume_type
      is_public_ipv4       = pool.value.is_public_ipv4
      servergroup_policy   = pool.value.servergroup_policy
      auto_healing_enabled = pool.value.auto_healing_enabled
    }
  }
}

When I'm setting security_group_rules, it shows that it will be created, provisioning passed without any problems, but rule not present anywhere, even in firewall which provisioned automatically after k8s creation:
2024-11-28_12-38

how to add correctly extra rule for workers?

@stefan-korchahin stefan-korchahin changed the title How to add extra firewall rule, when creating k8s cluster? How to add an extra firewall rule, when creating k8s cluster? Nov 28, 2024
@alexk53
Copy link
Collaborator

alexk53 commented Dec 24, 2024

HI!. Could it be the reason or you just replaced real data?
remote_ip_prefix = "my_source_ip/32"

@stefkkkk
Copy link

HI!. Could it be the reason or you just replaced real data? remote_ip_prefix = "my_source_ip/32"

replaced real data

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

No branches or pull requests

3 participants