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

object updates #46

Open
networksecadmin opened this issue Sep 14, 2020 · 0 comments
Open

object updates #46

networksecadmin opened this issue Sep 14, 2020 · 0 comments

Comments

@networksecadmin
Copy link

Hi together,

I hope you can help us with our updating problems.

Terraform Version

v0.12

Affected Resource(s)

icinga2_host

Terraform Configuration Files

We added some icinga host objects and services in our azure terraform infrastructur code and the deployment worked without any problems.
After that we added a new variable (deployment = "terraform").
The terraform plan said that the host will be changing (nothing will remove), The result of this was that we saw the host object with the new variable in the icinga2 web portal but all associated services were missed.
Now when we trigger a new deployment it will fail because the tfstate file says: "Error: Failed to Read Service".

resource "icinga2_host" "icinga_pg_host" {
  hostname      = azurerm_postgresql_server.pg_server.name
  address       = azurerm_postgresql_server.pg_server.id
  **vars = {
    deployment       = "terraform"
  }**
}

resource "icinga2_service" "icinga_pg_service_ressourcehealth" {
  name          = var.service_pg_ressourcehealth
  hostname      = icinga2_host.icinga_pg_host.hostname
}

I think the problem is that terraform will change the object without touching any service of it. icinga otherwise delete this host object with every associated service. The service objects still exist in the tfstate file.

We have many problems with updating services or host objects. Sometimes we get the following error after changing some existing objects: "Error: 500 Internal Server Error". Only this problem can be solved by restarting icinga.

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant