Skip to content

null key#10

Closed
fghaas wants to merge 3 commits intocleura:mainfrom
fghaas:null-key
Closed

null key#10
fghaas wants to merge 3 commits intocleura:mainfrom
fghaas:null-key

Conversation

@fghaas
Copy link
Contributor

@fghaas fghaas commented Mar 5, 2026

  • fix: Set ssh_public_key to null (not "") in heat/environment.yaml
  • fix: Comment ssh_public_key in ansible/vars.yaml
  • fix: Comment ssh_public_key in tf/vars.tfvars

fghaas added 3 commits March 5, 2026 12:28
Without this change, if the user neglects to set the ssh_public_key
stack parameter, they get an error message that is rather unhelpful to
a new user:

ERROR: The public_key property is required by the nova API version currently used.

By setting it to null (instead of the empty string) in
heat/environment.yaml, they instead get:

ERROR: The Parameter (ssh_public_key) was not provided.

... which is a much more self-explanatory message.
When setting ssh_public_key to null or the empty string, the Ansible
playbook proceeds and completes successfully, but creates an invalid
SSH keypair and thus an invalid authorized_keys file in the Pad Ramp
host.

Thus, comment out the variable in ansible/vars.yaml (leaving it
undefined), which causes the playbook to fail outright because of a
reference to an undefined variable.
When setting ssh_public_key to null or the empty string, "tofu apply"
proceeds and completes successfully, but creates an invalid SSH
keypair and thus an invalid authorized_keys file in the Pad Ramp host.

Thus, comment out the variable in tf/vars.tfvars (leaving it
undefined), which causes OpenTofu to prompt for the missing variable
(unless a TF_VAR_ssh_public_key environment variable is set).
@fghaas
Copy link
Contributor Author

fghaas commented Mar 5, 2026

Superseded by #11.

@fghaas fghaas closed this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant