Comments (1)
@wjam Not sure if you're still looking for a solution here but I ran into the same exact problem with github auth. One pure tf solution that currently works is to use a null resource to do the configuration instead of a vault_generic_secret
directly:
# main.tf of a module called null-write i use to get around this issue
resource "null_resource" "config" {
triggers = {
path = "${var.path}"
data = "${var.data}"
}
provisioner "local-exec" {
command = "echo '${var.data}' | vault write ${var.path} -"
}
}
which you would use like so... (the data must be json, you can use the builtin jsonencode
function along with the builtin list
/map
funcs to build the data properly)
# main.tf of a module using the null-write module to configure an auth backend
resource "vault_auth_backend" "backend" {
type = "${var.type}"
path = "${var.path}"
description = "${var.description}"
}
# you could repeat this block numerous times to create multiple approle roles etc.
module "config" {
source = "../null-write"
path = "${var.config_path}"
data = "${var.config_data}"
}
Unfortunately this is much less obvious than using the generic secret resource and many people are unfamiliar with null_resource. It would be nice if we could configure the auth backends directly in a cleaner way. It really comes down to just writing json data to a path, but some auth backends like approle
may require more than one k=v configuration (multiple roles for example).
from terraform-provider-vault.
Related Issues (20)
- [Enhancement]: vault_azure_secret_backend_role support for EntraID Roles
- [Bug]: vault_jwt_auth_backend tune block always updates unless config matches Vault server defaults
- [Enhancement]: Allow setting num_uses and ttl for vault_approle_auth_backend_role_secret_id
- [Enhancement]: `signature_bits ` field missing on some resources
- [Enhancement]: Allow setting not_after for vault_pki_secret_backend_root_cert
- [Bug]: Error 404: Unsupported Path for IdentityOidcRole API Request when using email as name HOT 1
- [Bug]: Wrong creation of intermediate CA certificate with `max_path_length = 0`
- [Bug]: vault_nomad_secret_backend can't be initialized without token
- [Bug]: vault_jwt_auth_backend sends request to false API path HOT 2
- [Docs]: MFA type is not documented HOT 1
- [Enhancement]: Allow updating `vault_kv_secret_v2 metadata` with `disable_read=true`
- [Bug]: `add_address_to_env` does not affect `local-exec` provisioners
- [Enhancement]: data source for getting Vault server address
- [Bug]: vault_ssh_secret_backend_ca gets replaced after provider upgrade HOT 2
- [Docs]: Update docs to include 'address' Argument for TFC/E Secrets backend
- [Enhancement]: Add persist_app parameter to vault_azure_secret_backend_role resource
- [Bug]: Snapshot agent local_max_space 0 is not allowed
- [Bug]: resource vault_identity_oidc_provider doesn't support import
- [Bug]: auth_login_userpass ignores password_file parameter
- Support database dynamic credential_type & credential_config block
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-vault.