Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Don't change the permissions of the bastion private key file generated by terraform #79

Open
edisongustavo opened this issue Mar 28, 2019 · 1 comment
Labels
baictl `baictl` is the tool/cli to use the benchmark-ai system blocked Requires action from an external party not in our control infrastructure Infrastructure related (terraform/aws)

Comments

@edisongustavo
Copy link
Contributor

The permissions of the terraform generated file is changed here:

chmod 400 $bastion_pem_filename

Which can lead to problems if terraform ever wants to write to the file again:

Error: Error applying plan:

1 error(s) occurred:

* local_file.bastion_privatekey_pem: 1 error(s) occurred:

* local_file.bastion_privatekey_pem: open bastion_private.pem: permission denied

In my case it didn't want to change the contents of the file, but terraform was failing anyway.

I believe we can trust terraform to do the right thing, ie, if it wants to change the contents of the file, then it will re-recreate the bastion instance.

Places that need changing

This file is required to run commands against the bastion (eg.: baictl get benchmark).

These commands should be updated to deal with this situation.

@edisongustavo edisongustavo added baictl `baictl` is the tool/cli to use the benchmark-ai system infrastructure Infrastructure related (terraform/aws) labels Mar 28, 2019
@edisongustavo
Copy link
Contributor Author

PR #83 moves the permissions change inside Terraform, however, I don't believe that this is enough.

This depends on hashicorp/terraform-provider-local#19 to be solved.

@edisongustavo edisongustavo added the blocked Requires action from an external party not in our control label Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
baictl `baictl` is the tool/cli to use the benchmark-ai system blocked Requires action from an external party not in our control infrastructure Infrastructure related (terraform/aws)
Projects
None yet
Development

No branches or pull requests

1 participant