{"id":48531,"date":"2023-06-08T19:21:18","date_gmt":"2023-08-11T10:19:11","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/"},"modified":"2024-04-30T07:56:02","modified_gmt":"2024-04-29T23:56:02","slug":"%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/","title":{"rendered":"\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528Terraform\uff0c\u800c\u662f\u8207GitLab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5"},"content":{"rendered":"<h1>\u7531\u4e8e\u6240\u6709\u7684\u64cd\u4f5c\u90fd\u53ef\u4ee5\u5728GitLab\u4e0a\u5b8c\u6210\uff0c\u6240\u4ee5\u975e\u5e38\u65b9\u4fbf\u3002<\/h1>\n<p>\u5728\u4f7f\u7528Terraform\u65f6\uff0c\u901a\u5e38\u9700\u8981\u5728\u7f16\u8f91\u5668\u4e2d\u51c6\u5907\u914d\u7f6e\u6587\u4ef6\uff0c\u5e76\u5728\u9002\u5f53\u7684\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5\u548c\u8fd0\u884cTerraform\u3002\u4f46\u5982\u679c\u4f7f\u7528GitLab\uff0c\u53ef\u4ee5\u5b9e\u73b0\u66f4\u9ad8\u7ea7\u7684\u64cd\u4f5c\uff08\u6216\u8005\u8bf4\uff0c\u8de8\u8d8a\u6570\u4e2a\u9636\u6bb5\u7684\u64cd\u4f5c\uff09\uff0c\u56e0\u6b64\u6211\u5f3a\u70c8\u63a8\u8350\u4f7f\u7528\u3002<\/p>\n<h1>\u4ec0\u4e48\u8ba9\u4f60\u5f00\u5fc3\uff1f<\/h1>\n<p>\u53ea\u9700\u4e00\u4e2a\u9009\u9879\uff01\u4ee5\u4e0b\u662f\u539f\u6587\u7684\u4e2d\u6587\u91ca\u4e49\uff1a<\/p>\n<p>1. \u6211\u4eec\u53ef\u4ee5\u59d4\u6258\u60a8\u7ba1\u7406tf\u6587\u4ef6\u7684\u7248\u672c\u63a7\u5236\u3002<br \/>\n2. \u6211\u4eec\u4e5f\u53ef\u4ee5\u59d4\u6258\u60a8\u5b8c\u6210state\u6587\u4ef6\u7684\u8865\u5168\u3002<br \/>\n3. \u540c\u65f6\u8fd8\u63d0\u4f9b\u4e86\u79d8\u5bc6\u4fe1\u606f\u68c0\u6d4b\u529f\u80fd\u3002<br \/>\n4. \u60a8\u53ef\u4ee5\u4f7f\u7528\u95ee\u9898\u8ffd\u8e2a\u7cfb\u7edf\uff0c\u901a\u8fc7\u534f\u4f5c\u8fdb\u884c\u4fee\u6b63\u548c\u66f4\u6539\u7ba1\u7406\u3002<\/p>\n<p>\u65e0\u8bba\u5982\u4f55\uff0c\u8ba9\u6211\u4eec\u8bd5\u7528\u5427\u3002<\/p>\n<h1>\u8be6\u7ec6\u7684\u6b65\u9aa4 de<\/h1>\n<h2>\u5173\u4e8e\u673a\u5236<\/h2>\n<p>\u9996\u5148\uff0c\u6211\u7b80\u8981\u89e3\u91ca\u4e00\u4e0b\u673a\u5236\u3002<\/p>\n<p>GitLab\u6709\u4e24\u79cd\u7c7b\u578b\u3002\u4e00\u79cd\u662fGitLab SaaS\u7248\uff0c\u53e6\u4e00\u79cd\u662fGitLab\u81ea\u6258\u7ba1\u7248\u3002<br \/>\nSaaS\u7248\u53ea\u9700\u6ce8\u518c\u8d26\u6237\u5373\u53ef\u7acb\u5373\u4f7f\u7528\u3002\u81ea\u6258\u7ba1\u7248\u5219\u9700\u8981\u81ea\u5df1\u51c6\u5907\u4e91\u670d\u52a1\u5668\u6216\u672c\u5730\u673a\u5668\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<p>\u4f7f\u7528SaaS\u7248\uff0c\u5b9e\u9645\u4e0a\u6240\u6709\u7684\u73af\u5883\u90fd\u53ef\u4ee5\u5b8c\u5168\u4ea4\u7ed9GitLab\u516c\u53f8\u5904\u7406\uff0c\u56e0\u6b64\u5fc3\u7406\u4e0a\u4f1a\u8f7b\u677e\u5f88\u591a\u3002\u800c\u81ea\u7ba1\u7406\u7248\u5219\u9700\u8981\u81ea\u5df1\u8d1f\u8d23\u5b9e\u4f8b\u7684\u7e41\u7410\u4e8b\u52a1\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u89e3\u91ca\u5982\u4f55\u5728GitLab\u4e0a\u8fd0\u884cTerraform\u3002<\/p>\n<p>\u901a\u8fc7\u67e5\u770bHashicorp\u793e\u7684\u4e66\u7c4d\u6216Terraform\u7684\u4e66\u7c4d\uff0c\u53ef\u4ee5\u4e86\u89e3\u5230\uff0c\u9996\u5148\u9700\u8981\u5728\u4e00\u4e2a\u9002\u5f53\u7684\u673a\u5668\u4e0a\uff08\u4f8b\u5982\u81ea\u5df1\u7684Mac\uff09\u5b89\u88c5Homebrew\uff0c\u6216\u8005\u4eceHashicorp\u793e\u7684\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u7a0b\u5e8f\u8fdb\u884c\u5b89\u88c5\u3002\u7136\u540e\uff0c\u9996\u5148\u8981\u786e\u8ba4\u662f\u5426\u6210\u529f\u5b89\u88c5\uff0c\u5e76\u4e14\u521b\u5efa\u4e00\u4e2amain.tf\u6587\u4ef6\uff0c\u6309\u7167\u89c4\u5b9a\u7684\u65b9\u5f0f\u7f16\u5199\u5b9a\u4e49\u3002\u8fd9\u5c06\u5305\u62ec\u586b\u5199\u4e0eAWS\u3001GCP\u3001Azure\u7b49\u670d\u52a1\u8d26\u53f7\u76f8\u5173\u7684ID\uff0c\u5e76\u8fdb\u884c\u8fd0\u884c\u3002<\/p>\n<p>\u4f7f\u7528GitLab\u6765\u8fd0\u884c\uff0c\u610f\u5473\u7740\u4ec0\u4e48\u5462\uff1f\u7b80\u800c\u8a00\u4e4b\uff0c\u9996\u5148\u4e0d\u518d\u9700\u8981\u5b89\u88c5Terraform\u3002\u786e\u5207\u6765\u8bf4\uff0c\u6211\u4eec\u5728GitLab\u7684\u4ee3\u7406\u7a0b\u5e8f\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u79f0\u5176\u4e3a\u201cRunner\u201d\uff0c\u6765\u8fd0\u884cTerraform\u3002\u5b9e\u9645\u4e0a\uff0cRunner\u4e3a\u6211\u4eec\u5904\u7406\u4e86\u8fd9\u4e9b\u64cd\u4f5c\u3002\u518d\u8fdb\u4e00\u6b65\u89e3\u91ca\u4e00\u4e0b\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u8fd9\u4e2aRunner\u4e0a\u8fd0\u884c\u4e00\u4e2a\u5df2\u5b89\u88c5Terraform\u7684Docker\u955c\u50cf\uff0c\u5e76\u5728\u5176\u4e2d\u6267\u884c\u6211\u4eec\u81ea\u5df1\u7f16\u5199\u7684Terraform\u5b9a\u4e49\u6587\u4ef6\uff08\u4f8b\u5982main.tf\uff09\u3002\u6211\u4eec\u6709\u4e24\u4e2a\u9009\u62e9\uff0c\u4e00\u662f\u5728Runner\u4e0a\u8fdb\u884c\u5b89\u88c5Terraform\u5e76\u9a8c\u8bc1\u8fd0\u884cmain.tf\u7b49\u6587\u4ef6\u7b49\u65b9\u6cd5\uff0c\u56e0\u4e3aRunner\u672c\u8d28\u4e0a\u4e5f\u53ea\u662f\u4e00\u53f0Linux\u7b49\u7cfb\u7edf\u7684\u673a\u5668\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u8fd9\u91cc\u4f7f\u7528Terraform\u5b89\u88c5\u7a0b\u5e8f\u8fdb\u884c\u5b89\u88c5\u548c\u9a8c\u8bc1\u3002\u4f46\u5728\u8fd9\u4e2a\u65f6\u4ee3\uff0c\u540e\u8005\u8fc7\u4e8e\u8fc7\u65f6\uff0c\u56e0\u6b64\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u89e3\u91ca\u4f7f\u7528\u524d\u8005\u7684Docker\u955c\u50cf\u6765\u8fd0\u884c\u7684\u65b9\u6cd5\u3002\u5982\u679c\u53ea\u80fd\u9009\u62e9\u540e\u8005\uff0c\u56e0\u4e3a\u65e0\u6cd5\u4f7f\u7528\u540e\u6587\u4e2d\u63d0\u5230\u7684include\u8bed\u6cd5\uff0c\u5c06\u9700\u8981\u81ea\u884c\u52aa\u529b\u89e3\u51b3\u3002\u56e0\u4e3a\u8fd9\u592a\u9ebb\u70e6\u4e86\uff0c\u6240\u4ee5\u5728\u672c\u6587\u4e2d\u4e0d\u8fdb\u884c\u89e3\u91ca\u3002<\/p>\n<p>\u5728Linux\u3001Mac\u3001Windows\u7b49\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u90fd\u53ef\u4ee5\u4f7f\u7528Runner\uff0c\u4f46\u662f\u5982\u679c\u4f7f\u7528GitLab\u7684SaaS\u7248\u672c\uff0c\u6211\u4eec\u5c31\u4e0d\u9700\u8981\u8003\u8651\u90a3\u4e48\u591a\u4e86\uff0c\u53ea\u9700\u8981\u5728Linux\u7248\u7684Runner\u4e0a\u8fd0\u884c\u3002\u56e0\u4e3aGitLab\u7684SaaS\u5df2\u7ecf\u4e3a\u6211\u4eec\u51c6\u5907\u597d\u4e86\uff0c\u6240\u4ee5\u6211\u4eec\u4e0d\u9700\u8981\u518d\u53bb\u8003\u8651\u5176\u4ed6\u3002\u5176\u5b9e\uff0c\u6267\u884cTerraform\u5b9a\u4e49\u7684\u673a\u5668\u7684\u64cd\u4f5c\u7cfb\u7edf\u5e76\u4e0d\u91cd\u8981\uff0c\u53ea\u9700\u8981\u6309\u7167main.tf\u7b49\u6587\u4ef6\u7684\u5185\u5bb9\u8fdb\u884c\u6b63\u786e\u914d\u7f6e\u5373\u53ef\u3002<\/p>\n<p>\u5982\u679c\u4f7f\u7528Self-Managed\u7248\u672c\u7684GitLab\uff0c\u60a8\u9700\u8981\u81ea\u884c\u51c6\u5907Runner\u7528\u673a\u5668\uff0c\u5e76\u5b8c\u6210GitLab\u670d\u52a1\u5668\u548cRunner\u7684\u534f\u4f5c\u8bbe\u7f6e\u3002\u8fd9\u662f\u4e4b\u524d\u89e3\u91ca\u8fc7\u7684\u90e8\u5206\u3002\u5982\u679c\u9009\u62e9\u4f7f\u7528Docker\uff0c\u53ea\u9700\u901a\u8fc7Yum\u7b49\u65b9\u5f0f\u786e\u4fddDocker\u53ef\u4ee5\u8fd0\u884c\u5373\u53ef\u3002<\/p>\n<h2>\u5982\u679c\u4f7f\u7528GitLab SaaS\u7248\uff0c\u9700\u8981\u8fdb\u884c\u8bbe\u7f6e\u5f00\u59cb\u3002<\/h2>\n<p>\u672c\u6587\u5c06\u4ecb\u7ecdGitLab\u7684SaaS\u7248\u672c\u3002<\/p>\n<h3>\u6b65\u9aa41. \u6ce8\u518c\u8d26\u6237<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/18-0.png\" alt=\"image.png\" \/><\/div>\n<h3>\u7b2c\u4e8c\u6b65\uff1a\u521b\u5efa\u56e2\u4f53<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/20-2.png\" alt=\"image.png\" \/><\/div>\n<h3>\u7b2c\u4e09\u6b65\u3002\u524d\u5f80\u5b58\u50a8\u5e93\u3002<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/22-1.png\" alt=\"image.png\" \/><\/div>\n<h3>\u7b2c\u56db\u6b65\u3002\u521b\u5efa.gitlab-ci.yml\u6587\u4ef6\u3002<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/24-0.png\" alt=\"image.png\" \/><\/div>\n<pre class=\"post-pre\"><code>include:\r\n  - template: Terraform.latest.gitlab-ci.yml\r\n\r\nvariables:\r\n TF_STATE_NAME: default\r\n TF_CACHE_KEY: default\r\n TF_ROOT: terraform\r\n<\/code><\/pre>\n<p>\u987a\u4fbf\u63d0\u4e00\u4e0b\uff0c\u8fd9\u91cc\u5728TF_ROOT\u91cc\u6307\u5b9a\u4e86\u201cterraform\u201d\u3002\u8fd9\u662f\u56e0\u4e3a\u6211\u4e0d\u559c\u6b22\u5728\u8fd9\u4e2a\u4ed3\u5e93\u7684\u76f4\u5c5e\u76ee\u5f55\u4e0b\u521b\u5efamain.tf\u4e4b\u7c7b\u7684\u6587\u4ef6\uff0c\u800c\u662f\u60f3\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cterraform\u201d\u7684\u6587\u4ef6\u5939\u6765\u7ba1\u7406\u3002\u4e0d\u8fc7\u5176\u5b9e\u8fd9\u4e2a\u6307\u5b9a\u662f\u53ef\u6709\u53ef\u65e0\u7684\u3002<\/p>\n<p>\u57fa\u672c\u4e0a\uff0c\u8fd9\u65b9\u9762\u7684\u5185\u5bb9\u5df2\u7ecf\u5728\u8fd9\u91cc\uff08https:\/\/docs.gitlab.com\/ee\/user\/infrastructure\/iac\/\uff09\u8fdb\u884c\u4e86\u89e3\u91ca\uff0c\u8bf7\u52aa\u529b\u9605\u8bfb\u3002\u5728\u8fd9\u91cc\uff0c<\/p>\n<pre class=\"post-pre\"><code>include:\r\n  - template: Terraform.latest.gitlab-ci.yml\r\n<\/code><\/pre>\n<p>\u8fd9\u53e5\u8bdd\u7684\u610f\u601d\u662f\uff0c\u5728\u8fd9\u91cc\u6307\u5b9a\u4e86\u8fd9\u4e2a\u52a8\u4f5c\u3002\u7531\u4e8e\u6709\u4e86\u8fd9\u4e2a\u6307\u5b9a\uff0c\u8fd9\u4e2aGitLab\u4f1a\u4f7f\u7528Docker\u6765\u6267\u884cTerraform\u7684\u914d\u7f6e\u3002<\/p>\n<p>\u66ab\u6642\u5148\u4e0d\u7528\u601d\u8003\uff0c\u76f4\u63a5\u6309\u4e0b\u300c\u63d0\u4ea4\u66f4\u6539\u300d\u7136\u5f8c\u5132\u5b58\u3002<\/p>\n<h3>\u7b2c\u4e94\u6b65\uff1a\u521b\u5efaterraform\u6587\u4ef6\u5939<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/31-1.png\" alt=\"image.png\" \/><\/div>\n<h3>\u7b2c\u516d\u6b65\uff1a\u521b\u5efamain.tf\u6587\u4ef6\u3002<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/33-1.png\" alt=\"image.png\" \/><\/div>\n<p>\u56e0\u4e3a\u8fd9\u4e2amain.tf\u6587\u4ef6\u9700\u8981\u8be6\u7ec6\u8bf4\u660e\uff0c\u6240\u4ee5\u5728\u8fd9\u91cc\u6211\u4f1a\u8fdb\u884c\u89e3\u91ca\u3002<br \/>\n\u9996\u5148\uff0c<\/p>\n<pre class=\"post-pre\"><code>terraform {\r\n  backend \"http\" {\r\n  }\r\n  required_providers {\r\n    gitlab = {\r\n      source  = \"gitlabhq\/gitlab\"\r\n      version = \"16.0.3\"\r\n    }\r\n  }\r\n}\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/36-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5982\u679c\u4ed4\u7ec6\u770b\u7684\u8bdd\uff0c\u5b83\u5df2\u7ecf\u88ab\u5b9a\u5236\u8fc7\u4e86\uff0c\u9996\u5148\u662f\u8fd9\u4e2a\u3002<\/p>\n<pre class=\"post-pre\"><code>  backend \"http\" {\r\n  }\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/39-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u63a5\u4e0b\u6765<\/p>\n<pre class=\"post-pre\"><code>variable \"gitlab_access_token\" {\r\n  type = string\r\n}\r\n\r\nprovider \"gitlab\" {\r\n  # Configuration options\r\n  token = var.gitlab_access_token\r\n}\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/42-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4e0b\u4e00\u6b65\u662f\u906e\u853d\u7684\u90e8\u5206<\/p>\n<pre class=\"post-pre\"><code>data \"gitlab_project\" \"example_project\" {\r\n  id = xxxxxxxx\r\n}\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/45-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u7136\u540e\u6700\u540e<\/p>\n<pre class=\"post-pre\"><code>resource \"gitlab_project_variable\" \"sample_project_variable\" {\r\n  project = data.gitlab_project.example_project.id\r\n  key     = \"example_variable\"\r\n  value   = \"Greeting Master!\"\r\n}\r\n<\/code><\/pre>\n<p>\u8fd9\u53ea\u662f\u4e00\u4e2a\u5b8c\u5168\u6beb\u65e0\u610f\u4e49\u7684\u52a8\u4f5c\uff0c\u53ea\u662f\u5728Terraform\u4e2d\u7ed9\u4e00\u4e2a\u968f\u610f\u7684\u53d8\u91cf\u8d4b\u503c\u3002\u672c\u6765\uff0c\u5728\u8fd9\u91cc\u4f60\u53ef\u4ee5\u5c3d\u60c5\u5730\u5199\u4e0b\u5404\u79cd\u5de8\u5927\u7684\u914d\u7f6e\uff0c\u4f8b\u5982\u5b9e\u4f8b\u7684\u5927\u5c0f\u3001CPU\u6838\u5fc3\u6570\u3001\u5185\u5b58\u5927\u5c0f\u7b49\u7b49\u3002<\/p>\n<p>\u6700\u540e\u70b9\u51fb\u201c\u63d0\u4ea4\u66f4\u6539\u201d\uff0c\u8fdb\u884c\u63d0\u4ea4\u548c\u4fdd\u5b58\u3002<\/p>\n<h3>\u7b2c\u4e03\u6b65\u3002\u8bbf\u95ee\u4ee4\u724c\u7684\u8bbe\u7f6e\u3002<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/51-2.png\" alt=\"image.png\" \/><\/div>\n<pre class=\"post-pre\"><code>TF_VAR_gitlab_access_token\r\n<\/code><\/pre>\n<p>&#8220;TF_VAR_&#8221;\u8fd9\u4e2a\u524d\u7f00\u6709\u70b9\u5947\u602a\uff0c\u4f46\u662f\u5b83\u88ab\u6dfb\u52a0\u5230\u4e86main.tf\u4e2d\uff0c\u8fd9\u6837Access_Token\u5c31\u4f1a\u88ab\u6b63\u786e\u8d4b\u503c\u3002\u8fd9\u4e2a\u89c4\u5219\u662f\u5728&#8221;.gitlab-ci.yml&#8221;\u6587\u4ef6\u4e2d\u6307\u5b9a\u7684\uff0c\u901a\u8fc7include\u6587\u4ef6\u8fdb\u884c\u5b9a\u4e49\u3002<\/p>\n<h3>\u7b2c\u516b\u6b65\u3002\u6267\u884cmain.tf\u6587\u4ef6\u3002<\/h3>\n<p>\u5176\u5b9e\u5728\u6211\u5230\u8fd9\u91cc\u4e4b\u524d\uff0cGitLab\u5c1d\u8bd5\u6267\u884c\u4e86\u591a\u6b21\u3002\u8fd9\u662fGitLab\u7684\u9ed8\u8ba4\u884c\u4e3a\uff0c\u5b83\u4f1a\u59cb\u7ec8\u6267\u884c\uff0c\u5c31\u597d\u50cf\u6709\u4efb\u4f55\u53d8\u5316\u90fd\u4f1a\u88ab\u5b9e\u65f6\u6267\u884c\u4e00\u6837\u3002\u5f53\u7136\uff0c\u8fd9\u662f\u53ef\u4ee5\u8fdb\u884c\u63a7\u5236\u7684\u3002\u5173\u4e8e\u8fd9\u65b9\u9762\u7684\u5185\u5bb9\uff0c\u9700\u8981\u5bf9GitLab\u8fdb\u884c\u8be6\u7ec6\u5b66\u4e60\uff0c\u6240\u4ee5\u5728\u8fd9\u91cc\u7701\u7565\u4e86\u89e3\u91ca\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/56-0.png\" alt=\"image.png\" \/><\/div>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/57-2.png\" alt=\"image.png\" \/><\/div>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/58-7.png\" alt=\"image.png\" \/><\/div>\n<p>\u592a\u68d2\u4e86\u3002\u4f60\u53ef\u4ee5\u81ea\u7531\u5730\u5728main.tf\u6587\u4ef6\u4e2d\u7684&#8221;resource&#8221;\u90e8\u5206\u505a\u4efb\u4f55\u4f60\u559c\u6b22\u7684\u4fee\u6539\uff0c\u6216\u8005\u6839\u636eterraform\u6587\u4ef6\u5939\u4e0b\u7684\u5404\u79cdterraform\u4e66\u7c4d\u8fdb\u884c\u53c2\u8003\uff0c\u81ea\u7531\u5730\u5c06\u6587\u4ef6\u5206\u5272\u6210\u4f60\u559c\u6b22\u7684\u65b9\u5f0f\uff0c\u6700\u540e\u8bf7\u6309\u7167\u4f60\u7684\u559c\u597d\u7ee7\u7eed\u64cd\u4f5c\u3002<\/p>\n<h1>\u4f60\u5df2\u7ecf\u51c6\u5907\u597d\u4e86<\/h1>\n<p>\u95ee\u4e00\u4e0b\uff0c\u5047\u8bbe\u8981\u8bf4\u7684\u8bdd\u662f\uff0c\u53ef\u4ee5\u901a\u8fc7\u7f16\u5199Terraform\u7684main.tf\u4e4b\u7c7b\u7684\u4e1c\u897f\uff0c\u5728\u6d4b\u8bd5\u73af\u5883\uff08\u5982VPC\uff09\u4e0a\u4efb\u610f\u505a\u4e00\u4e9b\u6df7\u4e71\u7684\u4e8b\u60c5\uff0c\u7136\u540e\u5b8c\u6210\u540e\u5c06\u5176\u7528\u4f5c\u751f\u4ea7\u73af\u5883\uff0c\u662f\u8fd9\u6837\u7684\u611f\u89c9\u5bf9\u5427\u3002<br \/>\n\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u5728.gitlab-ci.yml\u6587\u4ef6\u4e2d\u5b9e\u73b0\u7c7b\u4f3c\u7684\u529f\u80fd\uff0c\u6bd4\u5982&#8221;\u5982\u679c\u5206\u652f\u540d\u662fmain\uff0c\u5219\u6307\u5b9a\u7528\u4e8e\u751f\u4ea7\u7684VPC&#8221;\uff0c&#8221;\u5982\u679c\u5206\u652f\u540d\u4e0d\u662fmain\uff0c\u6216\u8005\u4ee5xxx\u5f00\u5934\uff0c\u5219\u6307\u5b9a\u7528\u4e8estaging\u7684VPC&#8221;\u4e4b\u7c7b\u7684\u4e8b\u60c5\u662f\u53ef\u4ee5\u5b9e\u73b0\u7684\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u7531\u4e8e\u9700\u8981\u5b66\u4e60GitLab\u7684yml\u6587\u4ef6\u8bed\u6cd5\uff0c\u6211\u4eec\u5c06\u5728\u53e6\u4e00\u4e2a\u673a\u4f1a\u8fdb\u884c\u5b66\u4e60\u3002<\/p>\n<p>\u8bf7\u5728\u67e5\u770b\u672c\u6587\u65f6\uff0c\u53ea\u9700\u5173\u6ce8\u5728GitLab\u4e0a\u8fd0\u884cTerraform\u6240\u9700\u7684\u6b65\u9aa4\u548c\u6d41\u7a0b\u3002<\/p>\n<p>GitLab\u4e07\u5c81.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u4e8e\u6240\u6709\u7684\u64cd\u4f5c\u90fd\u53ef\u4ee5\u5728GitLab\u4e0a\u5b8c\u6210\uff0c\u6240\u4ee5\u975e\u5e38\u65b9\u4fbf\u3002 \u5728\u4f7f\u7528Terraform\u65f6\uff0c\u901a\u5e38\u9700\u8981\u5728\u7f16\u8f91\u5668\u4e2d\u51c6\u5907\u914d [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-48531","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528Terraform\uff0c\u800c\u662f\u8207GitLab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528terraform\uff0c\u800c\u662f\u8207gitlab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528Terraform\uff0c\u800c\u662f\u8207GitLab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"\u7531\u4e8e\u6240\u6709\u7684\u64cd\u4f5c\u90fd\u53ef\u4ee5\u5728GitLab\u4e0a\u5b8c\u6210\uff0c\u6240\u4ee5\u975e\u5e38\u65b9\u4fbf\u3002 \u5728\u4f7f\u7528Terraform\u65f6\uff0c\u901a\u5e38\u9700\u8981\u5728\u7f16\u8f91\u5668\u4e2d\u51c6\u5907\u914d [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528terraform\uff0c\u800c\u662f\u8207gitlab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-11T10:19:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T23:56:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/18-0.png\" \/>\n<meta name=\"author\" content=\"\u97f5, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u97f5, \u79d1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/\",\"name\":\"\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528Terraform\uff0c\u800c\u662f\u8207GitLab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-08-11T10:19:11+00:00\",\"dateModified\":\"2024-04-29T23:56:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528Terraform\uff0c\u800c\u662f\u8207GitLab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\",\"name\":\"\u97f5, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"caption\":\"\u97f5, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528Terraform\uff0c\u800c\u662f\u8207GitLab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528terraform\uff0c\u800c\u662f\u8207gitlab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528Terraform\uff0c\u800c\u662f\u8207GitLab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5","og_description":"\u7531\u4e8e\u6240\u6709\u7684\u64cd\u4f5c\u90fd\u53ef\u4ee5\u5728GitLab\u4e0a\u5b8c\u6210\uff0c\u6240\u4ee5\u975e\u5e38\u65b9\u4fbf\u3002 \u5728\u4f7f\u7528Terraform\u65f6\uff0c\u901a\u5e38\u9700\u8981\u5728\u7f16\u8f91\u5668\u4e2d\u51c6\u5907\u914d [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528terraform\uff0c\u800c\u662f\u8207gitlab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-08-11T10:19:11+00:00","article_modified_time":"2024-04-29T23:56:02+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d85c3913a08637a6ba230\/18-0.png"}],"author":"\u97f5, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u97f5, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/","name":"\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528Terraform\uff0c\u800c\u662f\u8207GitLab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-08-11T10:19:11+00:00","dateModified":"2024-04-29T23:56:02+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4e0d\u662f\u53ea\u55ae\u7368\u4f7f\u7528Terraform\uff0c\u800c\u662f\u8207GitLab\u4e00\u8d77\u4f7f\u7528\u7684\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e","name":"\u97f5, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","caption":"\u97f5, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%b8%8d%e6%98%af%e5%8f%aa%e5%96%ae%e7%8d%a8%e4%bd%bf%e7%94%a8terraform%ef%bc%8c%e8%80%8c%e6%98%af%e8%88%87gitlab%e4%b8%80%e8%b5%b7%e4%bd%bf%e7%94%a8%e7%9a%84%e6%96%b9%e6%b3%95%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/48531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=48531"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/48531\/revisions"}],"predecessor-version":[{"id":90660,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/48531\/revisions\/90660"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=48531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=48531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=48531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}