Terraform-provider-vault: Support allowed_domains_template from hashicorp/vault #8509

Created on 21 Aug 2020  路  1Comment  路  Source: hashicorp/terraform-provider-vault

This is a feature request to support the recently added allowed_domains_template field, added in https://github.com/hashicorp/vault/pull/8509

This functionality was recently implemented/merged, and is not yet available in any official release. It is not in v1.5.0, the latest release at the time of this writing, only in the master branch.

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

Most helpful comment

This is now in 1.5.3. I was able to hack it into terraform using:

resource "null_resource" "fix_cockroach_user" {
  for_each = var.cockroach_deployments

  provisioner "local-exec" {
    command = "vault read -format=json ${vault_mount.cockroach_pki[each.key].path}/roles/user | jq '.data | .allowed_domains_template = true' | vault write ${vault_mount.cockroach_pki[each.key].path}/roles/user -"
  }

  triggers = {
    on_change = jsonencode(vault_pki_secret_backend_role.cockroach_user[each.key])
  }

  depends_on = [
    vault_pki_secret_backend_role.cockroach_user
  ]
}

>All comments

This is now in 1.5.3. I was able to hack it into terraform using:

resource "null_resource" "fix_cockroach_user" {
  for_each = var.cockroach_deployments

  provisioner "local-exec" {
    command = "vault read -format=json ${vault_mount.cockroach_pki[each.key].path}/roles/user | jq '.data | .allowed_domains_template = true' | vault write ${vault_mount.cockroach_pki[each.key].path}/roles/user -"
  }

  triggers = {
    on_change = jsonencode(vault_pki_secret_backend_role.cockroach_user[each.key])
  }

  depends_on = [
    vault_pki_secret_backend_role.cockroach_user
  ]
}
Was this page helpful?
0 / 5 - 0 ratings