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

[BUG] Removing firewall_id setting from civo_instance resource setting does not revert to default value #232

Closed
fernando-villalba opened this issue Jun 20, 2024 · 3 comments · Fixed by #237
Assignees
Labels
bug Something isn't working

Comments

@fernando-villalba
Copy link
Contributor

Description

If you apply this, then remove firewall_id setting and apply again, no change is registered by terraform

If the setting for firewall_id is removed, instead, I would expect it to revert to the default value and change the resource accordingly.

resource "civo_network" "test-issue" {
    label = "test-something"
}

resource "civo_firewall" "no_default_rules" {
  name                 = "no_default_rules"
  network_id           = civo_network.test-issue.id
  create_default_rules = false
    ingress_rule {
    label      = "ssh"
    protocol   = "tcp"
    port_range = "22"
    cidr       = ["192.168.1.1/32", "192.168.10.4/32", "192.168.10.10/32"]
    action     = "allow"
  }

}


resource "civo_instance" "foo" {
    hostname = "amazingthingy"
    tags = ["python", "nginx"]
    notes = "He perepepppppepepe"
    size = "g3.xsmall"
    network_id = civo_network.test-issue.id # Then change to this
     firewall_id = civo_firewall.no_default_rules.id # remove this and apply again
    disk_image = "debian-10"
}

Screenshots

No response

Additional information

No response

@fernando-villalba fernando-villalba added the bug Something isn't working label Jun 20, 2024
@rootxrishabh
Copy link

Hi @fernando-villalba, can I work on this?

@uzaxirr
Copy link
Member

uzaxirr commented Jun 20, 2024

If the setting for firewall_id is removed, instead, I would expect it to revert to the default value and change the resource accordingly.

hii @rootxrishabh can you please elaborate your approach that you would take to solve this issue.

@rootxrishabh
Copy link

rootxrishabh commented Jun 20, 2024

Hey @uzaxirr, I think to test out resource provisioning, it will require access to a running civo instance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants