首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Terraform - gitlab提供者没有启动

Terraform - gitlab提供者没有启动
EN

DevOps用户
提问于 2020-12-22 02:03:44
回答 1查看 1.3K关注 0票数 1

我使用的是terraform码头映像hashicorp/terraform:latest,我在main.tf中将提供程序定义为:

代码语言:javascript
运行
复制
terraform {
  required_providers {
    gitlab = {
      source = "gitlabhq/gitlab"
      version = "3.3.0"
    }
  }
}

provider "gitlab" {
    token = var.gitlab_token
}

当我运行terraform时,会得到以下错误:

代码语言:javascript
运行
复制
Initializing provider plugins...
- Finding gitlabhq/gitlab versions matching "3.3.0"...
- Finding latest version of hashicorp/aws...
- Finding latest version of hashicorp/gitlab...
- Installing gitlabhq/gitlab v3.3.0...
- Installed gitlabhq/gitlab v3.3.0 (signed by a HashiCorp partner, key ID BC097C3333027B14)
- Installing hashicorp/aws v3.22.0...
- Installed hashicorp/aws v3.22.0 (signed by HashiCorp)
Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/plugins/signing.html
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/gitlab: provider registry registry.terraform.io does not have a
provider named registry.terraform.io/hashicorp/gitlab
If you have just upgraded directly from Terraform v0.12 to Terraform v0.14
then please upgrade to Terraform v0.13 first and follow the upgrade guide for
that release, which might help you address this problem.
Did you intend to use gitlabhq/gitlab? If so, you must specify that source
address in each module which requires that provider. To see which modules are
currently depending on hashicorp/gitlab, run the following command:
    terraform providers

我无法从文档中找到这个问题的解决方案。有什么建议吗?

terraform -版本Terraform v0.14.3

EN

回答 1

DevOps用户

发布于 2020-12-22 04:26:23

GitHub是提供者之一,尚未包括在Terraform注册表中 -参见文档的这种差异。这似乎是一种临时情况:

以下提供程序将很快在Terraform上发布,但还没有完全准备好。在它们发布之前,它们的文档可以在下面的链接中获得:

我无法从发布说明中判断这是否仅在0.14.x中,但我可以确认“旧”(即编写本报告时的当前) github提供程序与0.12.x一起工作。

票数 1
EN
页面原文内容由DevOps提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://devops.stackexchange.com/questions/13014

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档