当我尝试terraform apply在Google上启动一些节点时,我得到了一个错误,仅仅是为Kubernetes上的GitLab Ci/CD管道做准备。
terraform apply -auto-approve -lock=false
google_container_cluster.default: Creating...
google_container_cluster.default: Still creating... [10s elapsed]
Failed to save state: HTTP error: 308
Error: Failed to persist state to backend.
The error shown above has prevented Terraform from writing the updated state
to the configured backend. To allow for recovery, the state has been written
to the file "errored.tfstate" in the current working directory.
Running "terraform apply" again at this point will create a forked state,
making it harder to recover.
To retry writing this state, use the following command:
terraform state push errored.tfstate发布于 2020-09-29 19:00:23
感谢Michael Crilly,@ninja和@ashishonnet在The DevOps Lounge不和谐社区上的建议,来评论backend "http" {}这一行,并尝试一些其他的东西。实际上,评论在HTTP error: 308 on Google Cloud Platform上运行得很好。
多亏了@guillaume blaquiere,当他发现我使用项目名称而不是项目ID时,他在point上是正确的。
provider "google" {
credentials = file("~/gitops-project-290611-01b6aabd6093.json")
project = "gitops-project-290611"
region = "us-central1-a"
}https://stackoverflow.com/questions/63960775
复制相似问题