Skip to content

Error when Terraform Helm Module Version higher than 2.x #129

@scottbisker

Description

@scottbisker

If you happen to have a newer version of the helm terraform module installed, you will receive the following error when trying to deploy:

│ Error: Unsupported block type
│ 
│   on providers.tf line 53, in provider "helm":
│   53:   kubernetes {
│ 
│ Blocks of type "kubernetes" are not expected here. Did you mean to define argument "kubernetes"? If so, use the equals sign to assign it a value.

The error is present whether you are using ECS or EKS for DEPLOYMENT_PLATFORM . Apparently this type of configuration is no longer supported in the 3.x version of the helm provider. It's not clear what the new syntax should be. The 3.x version was released within the past week.

In order to correct this error, the version of the helm provider needs to be pegged.

provider "helm" {
  version = "2.17.0"
  kubernetes {
    host                   = local.platform == "EKS" ? module.eks_cluster[0].cluster_endpoint : ""
    cluster_ca_certificate = local.platform == "EKS" ? base64decode(module.eks_cluster[0].cluster_ca) : ""
    token = local.platform == "EKS" ? data.aws_eks_cluster_auth.cluster[0].token : ""
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions