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: Make eks_cluster_oidc_issuer_url Non-optional and Add Validation Rule #27

Merged
merged 2 commits into from
Feb 14, 2022

Conversation

korenyoni
Copy link
Member

@korenyoni korenyoni commented Feb 13, 2022

what

  • Make eks_cluster_oidc_issuer_url non-optional and add validation rule.

why

  • eks_cluster_oidc_issuer_url is currently optional, except it supplies the same value directly to cloudposse/eks-iam-role/aws, which has a validation rule on it not being empty. This results in a run-time error if eks_cluster_oidc_issuer_url is empty.
╷
│ Error: Invalid value for variable
│ 
│   on .terraform/modules/ocean_controller/main.tf line 28, in module "eks_iam_role":28:   eks_cluster_oidc_issuer_url = var.eks_cluster_oidc_issuer_url
│ 
│ The eks_cluster_oidc_issuer_url value must have a value.
│ 
│ This was checked by the validation rule at .terraform/modules/ocean_controller.eks_iam_role/variables.tf:38,3-13.
╵
Releasing state lock. This may take a few moments...
exit status 1

See: https://github.com/cloudposse/terraform-aws-eks-iam-role/blob/7fbf1965f71d6897ec583c30fac2875a6582a8d2/variables.tf#L34-L42

references

@korenyoni korenyoni added the patch A minor, backward compatible change label Feb 13, 2022
@korenyoni korenyoni requested review from a team as code owners February 13, 2022 23:45
@korenyoni korenyoni requested review from adamcrews and leb4r February 13, 2022 23:45
@korenyoni
Copy link
Member Author

/test all

@korenyoni korenyoni force-pushed the fix/oidc-issuer-validation branch from 7e249f5 to d9102d8 Compare February 13, 2022 23:51
@korenyoni korenyoni added the bug 🐛 An issue with the system label Feb 14, 2022
@korenyoni korenyoni merged commit bfe4bcf into master Feb 14, 2022
@korenyoni korenyoni deleted the fix/oidc-issuer-validation branch February 14, 2022 11:33
@nitrocode
Copy link
Member

Hmm the problem with this change is that now I have to provide this value even if I dont want to create an IAM role.

cc: @korenyoni

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system patch A minor, backward compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Optional" eks_cluster_oidc_issuer_url Variable is Actually Required
3 participants