Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Permanent Terraform diff on Azure #17

Open
johananl opened this issue Jun 12, 2019 · 2 comments
Open

Permanent Terraform diff on Azure #17

johananl opened this issue Jun 12, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@johananl
Copy link
Contributor

When deploying on Azure, terraform plan always shows a diff on the worker scale set which causes a re-creation of all the workers:

Terraform will perform the following actions:

-/+ module.johannes-test.module.workers.azurerm_monitor_autoscale_setting.workers (new resource required)
      id:                                                                                              "/subscriptions/.../resourceGroups/johannes-test/providers/microsoft.insights/autoscalesettings/johannes-test-maintain-desired" => <computed> (forces new resource)
      enabled:                                                                                         "true" => "true"
      location:                                                                                        "westeurope" => "westeurope"
      name:                                                                                            "johannes-test-maintain-desired" => "johannes-test-maintain-desired"
      profile.#:                                                                                       "1" => "1"
      profile.0.capacity.#:                                                                            "1" => "1"
      profile.0.capacity.0.default:                                                                    "2" => "2"
      profile.0.capacity.0.maximum:                                                                    "2" => "2"
      profile.0.capacity.0.minimum:                                                                    "2" => "2"
      profile.0.name:                                                                                  "default" => "default"
      resource_group_name:                                                                             "johannes-test" => "johannes-test"
      tags.%:                                                                                          "0" => <computed>
      target_resource_id:                                                                              "/subscriptions/.../resourceGroups/johannes-test/providers/Microsoft.Compute/virtualMachineScaleSets/johannes-test-workers" => "${azurerm_virtual_machine_scale_set.workers.id}" (forces new resource)

-/+ module.johannes-test.module.workers.azurerm_virtual_machine_scale_set.workers (new resource required)
      id:                                                                                              "/subscriptions/.../resourceGroups/johannes-test/providers/Microsoft.Compute/virtualMachineScaleSets/johannes-test-workers" => <computed> (forces new resource)
      automatic_os_upgrade:                                                                            "false" => "false"
      eviction_policy:                                                                                 "" => "Delete" (forces new resource)
      identity.#:                                                                                      "0" => <computed>
...

Steps to reproduce

  1. Create an Azure cluster using the docs.
  2. After terraform apply completes, run terraform plan again. A diff is shown.
@johananl johananl added the bug Something isn't working label Jun 12, 2019
@invidian
Copy link
Contributor

It is now fixed in typhoon poseidon/typhoon@28506df#diff-da21b06db37ed8a8289fc79eb4cb5405, and fix for Terraform 0.11.X seem non-trivial (allow eviction_policy parameter in provider to accept empty string and then convert it to null if it's empty), so I think the reasonable thing to do would be to upgrade to Terraform 0.12.

@johananl
Copy link
Contributor Author

OK. We are already tracking the 0.12 upgrade internally.

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

No branches or pull requests

2 participants