Skip to content

Conversation

@taustgen
Copy link
Contributor

@taustgen taustgen commented Apr 18, 2025

Describe your changes

Module cannot be used with terraform older than 1.9 despite only requiring >= 1.3 because it is doing variable cross validation.
Since 1.9 is after the license change in 1.6, I removed the validation rather than bumping the required terraform version to 1.9

Extra context: I tried using 10.0.0-beta now that it supports the upgrade_override block and the module is throwing error on init for invalid variable validation

Downloading registry.terraform.io/Azure/aks/azurerm 10.0.0-beta for aks...
- aks in .terraform/modules/aks/v4
╷
│ Error: Invalid reference in variable validation
│
│   on .terraform/modules/aks/v4/variables.tf line 398, in variable "client_id":
│  398:     condition     = var.identity_ids == null || var.client_id == ""
│
│ The condition for variable "client_id" can only refer to the variable
│ itself, using var.client_id.

Issue number

#000

Checklist before requesting a review

  • The pr title can be used to describe what this pr did in CHANGELOG.md file
  • I have executed pre-commit on my machine
  • I have passed pr-check on my machine

Thanks for your cooperation!

@lonegunmanb
Copy link
Member

@taustgen Thanks for reporting this issue to us and thanks for trying our beta version! Quite good catch! I'm so glad that you found this issue while we're still in beta version, but I'll do some tiny modification base on your pr, instead of removing the validation I'll refactor it as resource's precondition.

@lonegunmanb lonegunmanb changed the base branch from main to fix-variable-validation-bug April 21, 2025 01:43
@lonegunmanb lonegunmanb merged commit a4ed421 into Azure:fix-variable-validation-bug Apr 21, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Azure Module Kanban Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants