当前位置: 首页 > news >正文

爱网站免费一站二站瑞安 网站建设培训班

爱网站免费一站二站,瑞安 网站建设培训班,简单网页制作模板图片,建立主题网站的知识点terrafrom 是一款常用来实现 IaC#xff08;基础设施即代码#xff09;的工具。通常的第一个命令往往是 terrafrom init。在执行此命令时#xff0c;terrafrom 会根据已经配置好的 provdier 信息去下载安装对应云厂商的 provider。比如下面是一个腾讯云的 provider#xff…terrafrom 是一款常用来实现 IaC基础设施即代码的工具。通常的第一个命令往往是 terrafrom init。在执行此命令时terrafrom 会根据已经配置好的 provdier 信息去下载安装对应云厂商的 provider。比如下面是一个腾讯云的 provider provider tencentcloud {secret_id your-secret-idsecret_key your-secret-keyregion your-region }terraform {required_providers {tencentcloud {source tencentcloudstack/tencentcloudversion 1.81.70}} }接着执行 terraform init terraform initInitializing the backend...Initializing provider plugins... - Finding tencentcloudstack/tencentcloud versions matching 1.81.70... ╷ │ Error: Failed to install provider │ │ Error while installing tencentcloudstack/tencentcloud v1.81.70: could not query provider registry for registry.terraform.io/tencentcloudstack/tencentcloud: failed to │ retrieve authentication checksums for provider: the request failed after 2 attempts, please try again later: Get │ https://github.com/tencentcloudstack/terraform-provider-tencentcloud/releases/download/v1.81.70/terraform-provider-tencentcloud_1.81.70_SHA256SUMS: net/http: request │ canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)可以看到由于要连接 github 去下载对应版本的 plugin。但是 github 在国内访问有网络问题所以就发生了 timeout 的错误。 查看了 terrafrom 文档后发现 init 是有一个 -plugin-dir 参数的也就是说可以先将 provider 所需的 plugin 下载下来然后在执行 init 命令的时候指定该路径即可。但是在尝试之后会报错 terraform init -plugin-dir/root/.terraform.d/pluginsInitializing the backend...Initializing provider plugins... - Finding tencentcloudstack/tencentcloud versions matching 1.81.70... ╷ │ Error: Failed to query available provider packages │ │ Could not retrieve the list of available versions for provider tencentcloudstack/tencentcloud: provider registry.terraform.io/tencentcloudstack/tencentcloud was not │ found in any of the search locations │ │ - /root/.terraform.d/plugins最后在腾讯云官方找到了一劳永逸的解决方案。 具体来说就是设置国内能够访问的 terrafrom registry 源。terraform 默认的 registry 源是 registry.terraform.io。只需要把这个源换成国内可访问的即可。 在用户目录下创建一个 .terrafromrc 文件写入如下内容 provider_installation {network_mirror {url https://mirrors.tencent.com/terraform/// 限制只有腾讯云相关Provider, 从url中指定镜像源下载include [registry.terraform.io/tencentcloudstack/*]}direct {// 声明除了腾讯云相关Provider, 其它Provider依然从默认官方源下载exclude [registry.terraform.io/tencentcloudstack/*]} }接着重新执行 init 命令即可 terraform initInitializing the backend...Initializing provider plugins... - Finding tencentcloudstack/tencentcloud versions matching 1.81.70... - Installing tencentcloudstack/tencentcloud v1.81.70... - Installed tencentcloudstack/tencentcloud v1.81.70 (verified checksum)Terraform has created a lock file .terraform.lock.hcl to record the provider selections it made above. Include this file in your version control repository so that Terraform can guarantee to make the same selections by default when you run terraform init in the future.╷ │ Warning: Incomplete lock file information for providers │ │ Due to your customized provider installation methods, Terraform was forced to calculate lock file checksums locally for the following providers: │ - tencentcloudstack/tencentcloud │ │ The current .terraform.lock.hcl file only includes checksums for linux_amd64, so Terraform running on another platform will fail to install these providers. │ │ To calculate additional checksums for another platform, run: │ terraform providers lock -platformlinux_amd64 │ (where linux_amd64 is the platform to generate) ╵Terraform has been successfully initialized!You may now begin working with Terraform. Try running terraform plan to see any changes that are required for your infrastructure. All Terraform commands should now work.If you ever set or change modules or backend configuration for Terraform, rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary.timeout 的问题就此得到解决。
http://www.sczhlp.com/news/152072/

相关文章:

  • 网站流量怎么变现呢最好的活动策划公司
  • 有什么做详情页的参考网站顺义的网站建设公司
  • 域名解析到网站需要怎么做dede如何做网站
  • 用dw个人网站怎么做黑龙江建设安全监督网查询
  • 网站制作风格深圳住房城乡建设局网站首页
  • 5分钟理清:Session、JWT、Token、SSO、OAuth 2.0 认证逻辑
  • 2025年10.1~10.6日信息竞赛计划安排表
  • 网页策划书 网站建设定位做网站需要哪些人才
  • 织梦网站调用工具虚拟电子商务网站建设前期规划方案
  • 无锡前洲行业网站建设iis6 网站无法访问
  • 做ppt卖给网站360免费wifi怎么连接
  • 免费手机小说网站建设百度网站流量查询
  • 北京网站建设排行榜HTML5怎么做自适应网站
  • 建设美食网站模板做图 网站
  • 东道设计老板seo平台优化
  • 怎样下载做网站的软件毕业设计网站开发任务安排
  • 做母婴产品的网站网站快照怎么做
  • 报纸网站建设南昌外包建站
  • 学做饼干网站制作一个营销型网站
  • a站播放量最高的视频小企业网站建设口碑
  • 网站开发怎么进行数据库连接phpcms 专题网站模板
  • 丹东做网站的百度小说官网
  • 国产数据库-达梦docker镜像安装
  • CAP 8.4 版本发布通告
  • 02. 初识ECMAScript
  • wordpress获取页面图片seo网站优化策划案
  • 网站制作 网站建设 杭州宁夏网站开发
  • 网站开发的国内外研究现状seo推广有哪些公司
  • 手机网站被禁止访问怎么打开网络营销基本含义
  • 企业网站网页设计费用郑州网站建设公司招聘