Easy Passwords in Terraform

It’s a common use case to want to create a random password for a new service – such as an RDS database – inside of terraform. Terraform actually allows for a very simple way to handle these using the random provider. This will create a new password only on resource creation saving the value into the statefile. This means the password will be created the first time you run terraform apply, and each subsequent time the password will not change.

Intro

I am Sam Johnson, a software engineer with over 10 years of experience. From large to small companies I have worked on all sides of application development. My mom got me involved at computers at a young age. She signed me up for a Pascal class when I was in the 6th grade. I was hooked, and I haven’t looked back since. Currently I am learning japanese (recently passed the N3 exam) and am working at a small Japanese startup called Autify.