openstack - Unable to load password for provider in Terraform using vault_secret_generic -


i have terraform builds vm using openstack provider. username , password provider being stored in hashicorp vault secret. i've set plan enable vault provider , access secret using privileged token. here's plan looks like:

provider "vault" { }  data "vault_generic_secret" "openstack" {   path = "secret/openstack" }  provider "openstack" {   user_name = "${data.vault_generic_secret.openstack.data["username"]}"   password = "${data.vault_generic_secret.openstack.data["password"]}"   tenant_name = "${var.openstack_tenant_name}"   domain_id = "${var.openstack_domain_id}"   auth_url = "${var.openstack_auth_url}" } 

when try run plan following error:

* provider.openstack: must provide password authenticate 

so far i've been able verify vault provider , vault_generic_secret data item work in different plan displaying secret values output variables. additionally, know openstack provider plan works because i'm able hard code user_name , password proper values , plan works fine.

it seems me though data.vault_generic_secret.openstack vertex being walked before provider.openstack vertex (verified in tf_log trace output), data values aren't loaded or available use @ point. reason thinking because when tested leaving password/username fields blank see same error. if set username , password invalid credentials different error fails authenticate against actual openstack auth url.

* provider.openstack: authentication failed 

has every used vault load secrets configure vm provider? input people might have huge help.

terraform v0.9.2

update 1:

i found terraform issues appear related i'm experiencing: https://github.com/hashicorp/terraform/issues/11264 https://github.com/hashicorp/terraform/issues/12393

based on first issue, when tried running terraform plan -input=false works.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -