## 版本控制和锁定terraform state文件 ## 如何保存terraform state 文件,实际上阿里云已经提供了解决方案那就是oss backend https://help.aliyun.com/document_detail/145541.html ![oss backend 流程图](https://img.kancloud.cn/9b/5d/9b5dd582a4deb68560da800852dbfbad_839x362.png) ``` terraform { backend "oss" { bucket = "bucket-website-my-00001" endpoint = "oss-cn-qingdao.aliyuncs.com" region = "cn-qingdao" tablestore_endpoint = "https://myinstance.cn-qingdao.ots.aliyuncs.com" tablestore_table = "mytable" profile = "course" } } ```