确保 Bitbucket 账户已与 Terraform Enterprise 进行了集成,并已正确设置 Webhook。
确保您的账户具有运行 Terraform Enterprise 的适当权限。
确保您的代码路径正确,并在 Terraform Enterprise 中配置了相应的仓库。
若上述步骤都没有解决问题,你可以使用类似于下面的代码来检查是否有 webhook 发送请求:
resource "null_resource" "run_terraform" {
triggers = {
timestamp = timestamp()
}
provisioner "local-exec" {
command = "curl -X POST -d '{}' "
}
}
这将创建一个资源,以便在 Bitbucket 仓库中检测要触发的更新,并确保 Webhook 已正确设置。