简体   繁体   中英

How to securely access github from an EC2 instance using terraform

I have code running on an EC2 instance, as well as a terraform configuration I keep on my local machine. I'm trying to commit changes from the EC2 instance, but in order to do so I need to store an ssh key on the instance. How do I do this using terraform?

This is what we do and hope it helps. We store GitHub creds in AWS SSMParamterStore. Whenever Github wants to commit changes it pulls the creds from ParameterStore and uses it. In that case, nothing gets ever stored on EC2 machine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM