Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Check existence of correct bucket for bucketrepo #341

Merged
merged 2 commits into from
Mar 30, 2022
Merged

fix: Check existence of correct bucket for bucketrepo #341

merged 2 commits into from
Mar 30, 2022

Conversation

msvticket
Copy link
Member

Description

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.

@ankitm123 ankitm123 merged commit 4240b95 into jenkins-x:master Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants