terraform: generate conf with http backend

This commit is contained in:
Iain Learmonth 2022-08-30 10:05:12 +01:00
parent affa0f0149
commit 32239c379a
16 changed files with 43 additions and 4 deletions

View file

@ -24,6 +24,7 @@ def handle_update(key):
return "OK", 200
state = TerraformState(key=key)
if state.lock and not (request.method == "UNLOCK" and request.args.get('ID') is None):
# force-unlock seems to not give an ID to verify so accept no ID being present
if json.loads(state.lock)['ID'] != request.args.get('ID'):
return Response(state.lock, status=409, content_type="application/json")
if request.method == "POST":