tpretz / terraform-provider-zabbix

Terraform Zabbix Provider
MIT License
30 stars 27 forks source link

Host macros tend to overwrite each other #19

Open vicioussn opened 2 years ago

vicioussn commented 2 years ago

Hello!

Host macros want to over-write each other on each apply:

 ~ resource "zabbix_host" "qa_sipp" {
        id             = "10775"
        name           = "SIPP QA"
        # (6 unchanged attributes hidden)

      ~ macro {
          ~ name  = "{$APIM.ENVIRONMENT_SUFFIX}" -> "{$ENVIRONMENT}"
          ~ value = "test" -> "qa"
        }
      ~ macro {
          ~ name  = "{$ENVIRONMENT}" -> "{$APIM.ENVIRONMENT_SUFFIX}"
          ~ value = "qa" -> "test"
        }

        # (3 unchanged blocks hidden)
    }
tpretz commented 2 years ago

Hi, yup, thats a bug these were being stored as an ordered list, rather than a set

Should be resolved when i merge in https://github.com/tpretz/terraform-provider-zabbix/commit/ee01e3db0bdad264166e54b69984360c9abf92e6

which turns them into a set, but given that branch has a fair few library updates too, i want to get more of a test suite in place to detect other similar issues first

Ikke commented 2 years ago

i want to get more of a test suite in place to detect other similar issues first

Do you appreciate any help with this?

ywh-jmorillo commented 3 months ago

Hello, We are also impacted with this bug. I will be glad to help you in order to have your fix merged in a release Thanks and have a nice day