When giving the variable enable_repository_storage = false to the module I got this error:
│ Error: Invalid index
│
│ on .terraform/modules/eks-jx/modules/cluster/irsa.tf line 361, in data "aws_iam_policy_document" "bucketrepo-policy":
│ 361: resources = [aws_s3_bucket.repository_jenkins_x.*.arn[0], "${aws_s3_bucket.repository_jenkins_x.*.arn[0]}/*"]
│ ├────────────────
│ │ aws_s3_bucket.repository_jenkins_x is empty tuple
│
│ The given key does not identify an element in this collection value: the
│ collection has no elements.
╵
╷
│ Error: Invalid index
│
│ on .terraform/modules/eks-jx/modules/cluster/irsa.tf line 361, in data "aws_iam_policy_document" "bucketrepo-policy":
│ 361: resources = [aws_s3_bucket.repository_jenkins_x.*.arn[0], "${aws_s3_bucket.repository_jenkins_x.*.arn[0]}/*"]
│ ├────────────────
│ │ aws_s3_bucket.repository_jenkins_x is empty tuple
│
│ The given key does not identify an element in this collection value: the
│ collection has no elements.
The work around now is to explicitly also give create_bucketrepo_role = false. With this PR that work around should be not be needed.
Description
When giving the variable
enable_repository_storage = false
to the module I got this error:The work around now is to explicitly also give
create_bucketrepo_role = false
. With this PR that work around should be not be needed.