Closed lvets closed 6 years ago
@lvets I am going to look into it but I am very busy at the moment so it won't be soon. Feel free to fork the repo, add the vault provider and submit a pull request if you feel confident to do so.
The following works with release 0.5.0.
from terrascript import *
ts = Terrascript()
ts += provider('vault', address='https://address.to.vault.provider:1234', token='TOKEN')
ts.validate()
Obviously this is a dummy example. Can you adapt this to your needs and provide feedback whether it works for you? Thanks, Markus
I'll give it a try. I did a quick test and saw this:
$ python test1.py
{
"provider": {
"vault": {
"__DEFAULT__": {
"address": "https://address.to.vault.provider:1234",
"token": "TOKEN"
}
}
}
}
$
Any idea why that DEFAULT is there?
This __DEFAULT__
key in the vault
dictionary is there to satisfy JSON syntax. It's a dummy key when a provider does not have an alias which is possible in HCL. If you look a the Multiple Provider section in the Terrafrom documentation you will see that only the second AWS provider has an alias.
Would you be able to add the 'vault' provider? See https://www.terraform.io/docs/providers/vault/index.html.