-
Notifications
You must be signed in to change notification settings - Fork 594
feat: Adding terminal autoclass variable for simple and multiple bucket #406
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
base: main
Are you sure you want to change the base?
feat: Adding terminal autoclass variable for simple and multiple bucket #406
Conversation
7d00f3b to
2d7b4ef
Compare
bharathkkb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @snskArora
variables.tf
Outdated
| type = map(string) | ||
| default = {} | ||
| validation { | ||
| condition = alltrue([for _, v in var.terminal_autoclass : var.autoclass == false || v == "NEARLINE" || v == "ARCHIVE"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we maintain a min TF compat with tf 1.3 we cannot use cross variable reference in validation rules (i.e checking var.autoclass) which was introduced in 1.9. If there is a validation error if this is set and autoclass is disabled could we perform a check before passing value to terminal_storage_class - something like lookup(var.autoclass..) ? lookup(var.terminal_autoclass...) : null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bharathkkb
The lookup during the assignment would be of no use as this is specifically to root out the wrong input (basically converting the string to an enum). Since it has to be compatible with v1.3 I will remove the autoclass check from the validation block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bharathkkb any other change that you suggest i should do?
This would resolve #405