Quantcast
Channel: Terraform - HashiCorp Discuss
Viewing all articles
Browse latest Browse all 11354

Adding automatic environment variable to EC2 instance

$
0
0

Is there any way to set environment variables on the EC2 instance automatically via terraform?
the EC2 instance lunching a bash script that includes passphrases, right now they are hardcoded, I would like to use $env_var in the bash script, that this var be automatically set by terraform.
The preferred way:
set env variable in local environment (maybe TF_VAR_*)
terraform takes this var and sets it when EC2 system boots (automation)
bash script is running using the env variable that was set automatically during boot.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 11354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>