Last active
August 23, 2018 12:54
-
-
Save mitchelldavis/28f9d50e21297f6774376c11b407a686 to your computer and use it in GitHub Desktop.
This Gist is a reference on how to use Terraform's null_resource to apply configuration to Vault when the configuration endpoint doesn't define all of the expected http methods. (GET, PUT, POST, DELETE)
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
resource "null_resource" "secret_tune" { | |
triggers { | |
config_content = "${sha512("${file("data/sys/mounts/secret/tune.json")}")}" | |
} | |
provisioner "local-exec" { | |
command = "curl -X POST -H \"X-VAULT-TOKEN:$VAULT_TOKEN\" -d '${file("data/sys/mounts/secret/tune.json")}' $VAULT_ADDR/v1/sys/mounts/secret/tune" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment