This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Tf backend

Http terraform backend backed by Vault

The plugin tracks each running backend for shutdown, including backends created before a later call fails. Shutdown drains HTTP requests before revoking the backend’s invocation-owned Vault credentials. If the shutdown deadline expires, connections are forcibly closed and the timeout is reported. Normal HTTP server closure is not an error. Vault requests use their incoming request context. The HTTP listener accepts state and lock payloads of up to 32 MiB and returns HTTP 413 for larger bodies. The limit matches the default Vault TCP listener request limit. A new Vault record is initialized with a create-only write.

Use vault_tf_backend(path = ..., labels = ...) from :defs.bzl to construct an al_config plugin-call dictionary. The helper owns the plugin binding and the default secrets mount; callers own their backend path and selection labels. Optional vault_auth, vault_conn, and mount select other named inputs. The shared //tools/al:config registers the executable and propagates runfiles.

1 - api

Proto docs for api.proto
load("@rules_java//java:defs.bzl", "java_library")

java_library(
    name = "name",
    deps = [
        "@com_alwaldend_src//tools/vault/tf_backend:api_java_library",
    ],
)
load("@rules_go//go:def.bzl", "go_library")

go_library(
    name = "name",
    deps = [
        "@com_alwaldend_src//tools/vault/tf_backend:tf_backend",
    ],
)
syntax = "proto3";

package com.alwaldend.src.tools.vault.tf_backend.tf_backend_proto;

option go_package = "git.alwaldend.com/alwaldend/src/tools/vault/tf_backend/tf_backend_proto";

message Config {
  string vault_conn = 1;
  string vault_auth = 2;
  string vault_secret = 3;
  string vault_secret_mount = 4;
}