-
Notifications
You must be signed in to change notification settings - Fork 63
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
add additional checks for instance ssh key conditional #70
Comments
@calorbeer Would you be volunteer to fix that? :-) For the implementation details, I suggest that the test should be done uppon Let's keep the conditional as simple as possible. |
Yes to check for null should be sufficient. |
Based on a review comment that appeared in PR #71, we should also adapt the variable names to be semantically correct: using plural form. rename For |
…file This change simplify how ssh_authorized_keys is handled and support more scenarios. The module input variable now expect a string. It gives more flexibility to the module user to construct the string as needed: heredoc, file function ... Fix oracle-terraform-modules#70
Sometimes, less is more :-) All the use cases can be handled by only one variable: This greatly simplify the code in the module, and will be probably less confusing for the user.
The conditional is here only for backward compatibility with
The module user will assign value to this argument like this:
To provide multiple keys at once, just use Heredoc strings:
If the module user prefer to provide keys from a file, that's also possible:
|
From discussion Originally posted by @calorbeer in #67 (comment)
There is an issue with
ssh_public_key
variables having default value set tonull
.If
var.ssh_public_key
value is set by the user,ssh_authorized_keys
argument is set correctly however if it'snull
the condition is also evaluated totrue
and as a result it is set tonull
. The file statements are never reached. To avoid this the variables either need to default to "" or the conditions have to test for != null and "".To do:
null
and we also initialize relavant variables tonull
ssh_public_key_path
tossh_public_keys_file
(plural form forkeys
and mentionfile
explicitely)The text was updated successfully, but these errors were encountered: