terraform-module/terraform-kubernetes-velero

iam_deploy input parameter not working as expected

Closed this issue ยท 2 comments

  • I've searched for similar issues and didn't find any solution

๐Ÿ’ป Environment

  • Platform: macOS
  • OS: macOS 11.5.1
  • Version(s):

๐Ÿ’ฏ Expected behavior

I dont want to create the iam role through this module so was expecting that on passing iam_deploy = false, it wouldnt deploy the iam role. I am using 0.14.0 version of the module.

๐Ÿž Actual behavior

The documentation here: https://registry.terraform.io/modules/terraform-module/velero/kubernetes/latest mentions that iam_deploy isnt a required parameter and its default value is true. Since i didnt want to deploy the iam role through this module, i passed in iam_deploy = false. However on running terraform plan i am encountering the below error

on .terraform/modules/velero/main.tf line 45, in resource "helm_release" "this":
โ”‚ 45: EKS_ROLE_ARN = aws_iam_role.this[0].arn
โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
โ”‚ โ”‚ aws_iam_role.this is empty tuple

Bug description

Full code that generated the error

module "velero" {
  source                      = "terraform-module/velero/kubernetes"
  version                     = "0.14.0"
  namespace_deploy            = true
  app_deploy                  = true
  cluster_name                = local.cluster_name
  iam_deploy                  = "false"
  openid_connect_provider_uri = "xxx"
  bucket                      = "xxx"
  values = [<<EOF
  "pertinent values" 
  EOF
  ]
}

Full error message

 Error: Invalid index
โ”‚ 
โ”‚   on .terraform/modules/velero/main.tf line 45, in resource "helm_release" "this":
โ”‚   45:         EKS_ROLE_ARN = aws_iam_role.this[0].arn
โ”‚     โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
โ”‚     โ”‚ aws_iam_role.this is empty tuple
โ”‚ 
โ”‚ The given key does not identify an element in this collection value: the
โ”‚ collection has no elements.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale commented

This issue has been automatically closed because it has not had recent activity since being marked as stale.