ddelnano / terraform-provider-mikrotik

MIT License
127 stars 28 forks source link

Inconsistent Result after Applying Changes to `mikrotik_ip_address` Resource #229

Closed DavidChevallier closed 4 months ago

DavidChevallier commented 4 months ago

Hello :)

I encountered an issue while applying changes to the mikrotik_ip_address resource using version 0.15.0 of the ddelnano/mikrotik Provider Provider. Below are the details:

Terraform will perform the following actions:
  # mikrotik_ip_address.eth1_ip will be updated in-place
  ~ resource "mikrotik_ip_address" "eth1_ip" {
      ~ address   = "10.10.0.253/16" -> "10.22.0.253/16"
      + comment   = (known after apply)
      ~ disabled  = false -> (known after apply)
        id        = "*2"
        # (2 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
mikrotik_ip_address.eth1_ip: Modifying... [id=*2]
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to mikrotik_ip_address.eth1_ip, provider "provider[\"registry.terraform.io/ddelnano/mikrotik\"]" produced an
│ unexpected new value: .network: was cty.StringVal("10.10.0.0"), but now cty.StringVal("10.22.0.0").
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵

Here is the Terraform configuration I used:

resource "mikrotik_ip_address" "eth1_ip" {
    provider  = mikrotikd
    address   = "10.22.0.253/16"
    interface = "ether1"
}

Expected Behavior: The IP address change should occur without errors. Instead, the network attribute was unexpectedly changed.

Current Impact: This issue prevents the correct management of IP addresses in my MikroTik configuration through Terraform.

Could you please investigate this bug and provide a fix? If additional information is needed, I am happy to assist.

Merci for your support!

DavidChevallier commented 4 months ago

It was a self inflicted error, therefore closing this. /close Sorry. 🤦🏾‍♂️

maksym-nazarenko commented 4 months ago

hi @DavidChevallier, no worries about false positive alerting ;) Thanks for using our provider and trying to make it better!