Terraform apply产生以下输出:
module.helm-services.helm_release.php-nginx: Creation complete after 1s [id=php-nginx-php3]
,其中php3是terraform.workspace
和.Release.Namespace
。
我的理解是,地形实际上应该在幕后召唤头盔,因此头盔释放应该出现在helm ls
输出中-但不存在。我也检查了helm ls --all
并搜索了其他名称空间,但是缺少该版本。
这是示例代码:
resource "helm_release" "php-nginx" {
name = "php-${terraform.workspace}"
chart = "${var.path-to-helm-charts-repo-locally}/php-nginx
namespace = terraform.workspace
depends_on = [var.db_depends_on, kubernetes_namespace.namespace]
values = [
file("${var.path-to-helm-charts-repo-locally}/php-nginx/values/default.yaml")
]
timeout = 120
recreate_pods = true
wait = false
set {
name = "image"
value = var.php-nginx-tag
}
set {
name = "domain"
value = "net"
}
set {
name = "replicaCount"
value = "1"
}
}
$ terraform version
Terraform v0.12.24
+ provider.aws v2.53.0
+ provider.helm v1.0.0
+ provider.kubernetes v1.11.1
+ provider.null v2.1.2
+ provider.vault v2.9.0
$ helm version
Client: &version.Version{SemVer:"v2.16.5", GitCommit:"89bd14c1541fa93a09492010030fd3699ca65a97", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.5", GitCommit:"89bd14c1541fa93a09492010030fd3699ca65a97", GitTreeState:"clean"}
答案 0 :(得分:1)
好的,经过几天的调查,我指定了可用于的helm_provider的确切版本:
provider "helm" {
version = "0.10.4"
}
它不适用于v1.0.0,v1.1.0和v1.1.1版本。
使用v0.10.4时,版本会显示在helm ls
输出中