hqdncw / vault-autopilot

HashiCorp Vault management made easy. Define your desired state, automate the rest.
https://hqdncw.github.io/vault-autopilot/
MIT License
2 stars 0 forks source link

Add support for specifying durations with unit suffixes #25

Open hqdncw opened 1 month ago

hqdncw commented 1 month ago

Root Cause

The Vault Autopilot does not support specifying durations with unit suffixes (e.g. 'h','m','s', etc.) and expects a plain integer value instead.

Manifest

kind: SecretsEngine
spec:
  path: pki
  engine:
    type: pki
    config:
      maxLeaseTtl: 87600h

Output

[+] Applying manifests (0.0054 seconds) FAILED
Oops! Something went wrong while applying the manifests.

Error: Validation failed for manifest file '/etc/vault-autopilot/secretsengines.yaml'.

[{'type': 'int_parsing', 'loc': ('spec', 'engine', 'config', 'maxLeaseTtl'), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': '87600h'}]