【发布时间】:2017-08-28 20:54:45
【问题描述】:
我正在尝试使用此处提供的示例使用 terraform 创建一个 bitbucket 存储库:https://www.terraform.io/docs/providers/bitbucket/index.html。 为了简单起见,我硬编码了所有值,如用户名、密码、repo 名称等...... 我可以运行 terraform 计划,上面写着要创建 1 个资源,但是当我应用该计划时它会抛出错误:
Error applying plan:
2017/04/03 16:54:26 [DEBUG] plugin: waiting for all plugin processes to complete...
1 error(s) occurred:
bitbucket_repository.bbrepo: 1 error(s) occurred:
bitbucket_repository.bbrepo: EOF
2017/04/03 16:54:26 [DEBUG] plugin: terraform: bitbucket-provider (internal) 2017/04/03 16:54:26 [DEBUG] plugin: waiting for all plugin processes to complete...
tf 文件:
# Configure the Bitbucket Provider
provider "bitbucket" {
username = "<BITBUCKET LOGIN EMAIL>"
password = "<BITBUCKET PASSWORD>"
}
# Manage your repository
resource "bitbucket_repository" "bbrepo" {
owner = "<OWNER USER ID>"
name = "<REPO NAME TO CREATE>"
}
如果我有内部托管的 bitbucket,如何提供 bitbucket url? Terraform 版本 - 0.9.2
谢谢
【问题讨论】:
-
bitbucket 提供程序目前仅适用于云中的 Bitbucket 而不是 Bitbucket 服务器,尽管文档并没有说得太清楚。我猜这是你的问题,如果你的凭据在 bitbucket.org 上无效,它只是没有给出有用的错误消息?
-
@ydaetskcoR 我还针对云中的 bitbucket(即 bitbucket.org)尝试了这个示例,并给出了同样的错误。我确信我的凭据没问题,因为我能够使用这些凭据登录到 bitbucket.org,并且能够运行 terraforim import bitbucket_repository 命令来导入 terraform 上现有 repo 的状态。