Hello, I am not sure if I can ask for help in this forum, but I have a question.
I have “password” as one of the variables that has to be passed to the terraform script
I tried passing this password in 3 ways
- terraform apply -var password=abc
- In terraform.auto.tfvars
- By passing it as env variable -> TF_VAR_Password=abc
But in all these 3 cases, it gets stored in the tfstate file. Is there a way I can - not set - the password or anyother field for that matter in the tfstate file??
I tried passing it as an env variable without the TF_VAR and then reading it in the custom provider via os.LookupENV… and this works!! It doesnt store the password. But is there a nicer way to avoid storing the value in tfstate file
I also know there is something called remote state. wherein it stores the details at a remote place like s3, vault, etc… But that will need another subscription to say aws, or hashicorp, etc. Is there a way you do it perhaps easily without registering or buying anything else?