-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: cross object reference for input variable validation #59
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?
Conversation
/run pipeline |
/run pipeline |
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.
LGTM
/run pipeline |
Updated the validation in the module
Negative testcases:
Positive testcases: |
/run pipeline |
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.
LGTM
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.
found only a message not clear in the original code in master that could be fixed
The rest is ok
} | ||
|
||
variable "sm_secret_id" { | ||
description = "Secrets-Manager secret ID where source data will be synchronized with Kubernetes secret. It can be null only in the case of a dockerjsonconfig secrets chain" | ||
type = string | ||
validation { | ||
condition = (var.sm_secret_id == null && local.is_dockerjsonconfig_chain == false) ? false : true | ||
error_message = "The input variable sm_secret_id can be null only a dockerjsonconfig secrets chain is going to be created" |
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.
the original message had a typo and maybe it was also not clear enough, please change with
The input variable sm_secret_id cannot be null unless the secret to create is a dockerjsonconfig secrets chain
Description
Used cross-object referencing for input variable validation and updated required terraform version to >= 1.9.0.
Git_issue
Release required?
x.x.X
)x.X.x
)X.x.x
)Release notes content
Used cross-object referencing for input variable validation and updated required terraform version to >= 1.9.0.
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
Checklist for reviewers
For mergers