Skip to content

Error on order_num when creating rewrite rules #189

@mapperr

Description

@mapperr

Hi!

I was trying to create a bunch of rewrite rules to enable the 'tag' thingy with the plus symbol made popular by google (I guess).

So, I just bumped from version 2023.7.12 to 2024.6.6 and renamed the resource from migadu_rewrite to migadu_rewrite_rule.
That the resource I'm using:

resource "migadu_rewrite_rule" "plus" {
  for_each = merge(local.all_mailboxes, local.aliases)

  domain_name     = local.my_domain
  name            = "${try(each.value.local_part, each.value.alias)}_plus"
  local_part_rule = "${try(each.value.local_part, each.value.alias)}+*"

  destinations = [
    "${try(each.value.local_part, each.value.alias)}@${local.qilab_domain}",
  ]
}

But with the new version I get:

│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to migadu_rewrite_rule.plus["myname"], provider "provider[\"registry.terraform.io/metio/migadu\"]" produced an unexpected new value: .order_num: was cty.NumberIntVal(0), but now cty.NumberIntVal(4).
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Those are some things I tried that unfortunately led to the same error:

  • delete the rewrites and create them from scratch
  • set the order_num property to 0 for all elements of for_each (I know that's stupid, but I tried first, thinked after xD)
  • set the order num to a sequential number for each element of the for_each (with the help of the index terraform function)

None of that worked out, I haven't got an idea of the problem, It's like I'm trying to set order number from the api, but the api returns an order number that do not match the one I'm specifing, so terraform gets angry. But it's just a wild hypotesis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions