Можете ли вы сделать атрибут не инициировать изменение ресурса? - PullRequest
1 голос
/ 23 января 2020

В Terraform есть способ установить атрибут, чтобы он не инициировал обновление ресурса?

Пример:

resource "google_cloudfunctions_function" "sometimes_changes" {
  ...

  # label the function with timestamp - don't let this trigger an update.

  labels = {
    timestamp = timestamp
  }
}

1 Ответ

0 голосов
/ 23 января 2020

Попробуйте блок ignore_changes:

resource "google_cloudfunctions_function" "sometimes_changes" {

...
    lifecycle {
        ignore_changes = [
          labels,
        ]
    }
}
...