No, the access_key and secret_key in the video aren't real. How to pass the output from a terraform created object to ansible as a variable using Terraform's local_file resource.
Nice video =) You could also 'upgrade' the creation of your local yaml file from a 'full heredoc within local_file' to a templatefile() implementation and only pass through the variables from your tf scripts. This doesnt result in anything different than what you have now, but enables you to store a template file in the dir of your final resultant directory (/vars) that would prompt future you, or other developers working in that project that the required file is templated from somwhere else - rather than it being an empty dir and scratching your head on where that comes from. Also prevents you from needing to store the entire vault config file within your tf scripts, potentially splitting out context to where it is better placed. As I say though - no real outcome difference, it will get you to the same place - just another option you could use. =)
Thanks for that tip Dan! There’s so many different ways of doing things. Someone is always teaching me something new every week! It’s awesome having 5 ways to a skin a cat!
@@TheSudo Ah yeah absolutely!!! I use both in my scripts for various different things - tend to opt for the templatefile version when I'm just modifying a small part of something like a pre-existing config file.