【发布时间】:2021-08-12 09:52:31
【问题描述】:
当我跑步时
terraform plan
它显示了由 Terraform 所做的更改列表,并且在输出结束时,它还通知“没有更改。您的基础架构与配置匹配。”:
Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the last "terraform apply":
# google_sql_database_instance.db1 has been changed
~ resource "google_sql_database_instance" "db1" {
id = "db1"
name = "db1"
# (12 unchanged attributes hidden)
....
whole list of objects to update
....
....
Unless you have made equivalent changes to your configuration, or ignored the relevant attributes using ignore_changes, the following plan may include actions to undo or respond to these changes.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
No changes. Your infrastructure matches the configuration.
Your configuration already matches the changes detected above. If you'd like to update the Terraform state to match, create and apply a refresh-only plan:
terraform apply -refresh-only
不知道为什么它首先说基础设施发生了变化,但又说配置与基础设施相匹配。 我运行了一个“应用”测试,Terraform 没有改变任何东西,但我想知道为什么它会显示这两个不同的语句,并且还想确保没有任何意外更改。
【问题讨论】:
标签: terraform terraform-provider-gcp