Last active
August 19, 2016 23:15
-
-
Save steve-jansen/cc99c0bd190477573997 to your computer and use it in GitHub Desktop.
Bookmarklet to create a terraform.tfvars file from an Atlas Terraform environment variables page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:var s='';for(i=0;;i++){k=document.forms[0]["runtime_configuration[tf_vars_attributes]["+i+"][key]"];v=document.forms[0]["runtime_configuration[tf_vars_attributes]["+i+"][value]"]; if(k && v){s+=[k.value,'=',v.value,'\n'].join('');}else{break};};window.location="data:text/plain;base64,"+btoa(s); |
Updated for Atlas' new variables page. Tested in OS X Safari 9.1.2.
Works great in chrome as well. Tested on OS X Chrome v 51.0.2704.106 .
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested in OS X Safari 9.1. YMMV.