-
Notifications
You must be signed in to change notification settings - Fork 47
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
moving secrets off var.tfvars file and to command line args #86
Conversation
Welcome @miyamotoh! It looks like this is your first PR to ocp-power-automation/ocp4-upi-powervs 🎉 |
Hi @miyamotoh. Thanks for your PR. I'm waiting for a ocp-power-automation member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Good input. FYI Terraform support passing variables directly from env. |
Do you want me to change this PR to go with |
docs/quickstart.md
Outdated
@@ -38,14 +38,20 @@ All further instructions assumes you are in the code directory eg. `ocp4-upi-pow | |||
|
|||
Update the [var.tfvars](../var.tfvars) based on your environment. Description of the variables are available in the following [link](./var.tfvars-doc.md). | |||
|
|||
For sensitive variables that should not be saved on disk, set these environment variables; |
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.
How about rephrasing it to -
"You can use environment variables for sensitive data that should not be saved to disk"
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.
Sure!
docs/var.tfvars-doc.md
Outdated
@@ -119,7 +120,7 @@ Please note that only OpenSSH formatted keys are supported. Refer to the followi | |||
Create the SSH key-pair and keep it under the `data` directory | |||
|
|||
These set of variables specify the RHEL subscription details. | |||
Update the variables with your subscription id and password. | |||
They are here just to keep all Terraform variables in use in one place, and because they are secrets, you should not set your values and save it on disk. Instead, set environment variables `RHEL_SUBS_USERNAME` and `RHEL_SUBS_PASSWORD` and pass them to `terraform apply` command as shown in the [Quickstart guide](./quickstart.md). |
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.
""This is sensitive data and if you don't want to save it on disk, use environment variables and pass it to terraform apply
command as shown in .."
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.
Yep, will be in the next push.
Signed-off-by: Hiro Miyamoto <miyamotoh@us.ibm.com>
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
Thanks @miyamotoh
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bpradipt, miyamotoh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Saving sensitive data in a text file on disk is not a good practice. Moving them off to command line args with
-var
for theterraform apply
command. Tested fine by building a 4.5 cluster in tor01. Open to different env vars naming and wording for the doc. Just let me know.Signed-off-by: Hiro Miyamoto miyamotoh@us.ibm.com