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

Add firewall support for Kubernetes cluster #73

Merged
merged 3 commits into from
Sep 2, 2021
Merged

Add firewall support for Kubernetes cluster #73

merged 3 commits into from
Sep 2, 2021

Conversation

zulh-civo
Copy link
Member

@zulh-civo zulh-civo commented Aug 26, 2021

Depends on civo/civogo#60. Close #35.


Example configuration file:

resource "civo_network" "my_custom_network" {
  label  = "my-custom-network"
}

resource "civo_firewall" "my_custom_firewall" {
  name       = "my-custom-firewall"
  network_id = civo_network.my_custom_network.id
}

resource "civo_firewall_rule" "http" {
  firewall_id = civo_firewall.my_custom_firewall.id
  protocol    = "tcp"
  start_port  = "80"
  end_port    = "80"
  direction   = "ingress"
  label       = "web-server"
  depends_on  = [civo_firewall.my_custom_firewall]
}

resource "civo_kubernetes_cluster" "my_cluster" {
  name              = "my_cluster"
  num_target_nodes  = 1
  target_nodes_size = "g3.k3s.medium"
  network_id        = civo_network.my_custom_network.id
  firewall_id       = civo_firewall.my_custom_firewall.id
}

@zulh-civo zulh-civo marked this pull request as draft August 26, 2021 02:10
@zulh-civo zulh-civo self-assigned this Aug 26, 2021
@zulh-civo zulh-civo marked this pull request as ready for review August 27, 2021 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need a way to specify Firewall ID on a K8S Cluster
2 participants