purple-lion-47621
07/31/2023, 9:49 AMUser1
sends in a request to create vault1
. User2
sends in a request to create vault2
.
Is this architecture supported by Pulumi automation API ? Or does Pulumi strictly requires the entire state to be defined in the source of truth (100% IaaC) ?echoing-dinner-19531
07/31/2023, 3:34 PMhallowed-horse-57635
07/31/2023, 9:07 PMpurple-lion-47621
08/01/2023, 4:11 AMUser1
sends a request to create the secret placeholder-1
(fine it will be created).
• User2
sends a request to create secret placeholder-2
. New placeholder-2
will be created but it will destroy placeholder-1
, correct ?
How do to handle this scenario ? Do you have your own layer implemented to reflect the complete state ? Or instead of generic endpoints do you define everything explicitly ?
@app.get('/gcp/{project}/{stack}/secret/add/{secret_id}')
async def add_secret(project: str, stack: str, secret_id: str):
try:
selected_stack = auto.select_stack(stack_name=stack, project_name=project, program=GcpSecret(secret_id).provision)
selected_stack.export_stack()
selected_stack.up(debug=True, on_output=print)
out = "success"
except Exception as e:
out = str(e)
<http://logging.info|logging.info>(out)
return UJSONResponse(content={
"status": out
})
echoing-dinner-19531
08/01/2023, 7:55 AMpurple-lion-47621
08/01/2023, 11:14 AMechoing-dinner-19531
08/01/2023, 11:15 AMpurple-lion-47621
08/01/2023, 11:30 AMechoing-dinner-19531
08/01/2023, 11:39 AMhallowed-horse-57635
08/01/2023, 1:46 PMpurple-lion-47621
08/01/2023, 1:49 PMhallowed-horse-57635
08/01/2023, 2:04 PMpurple-lion-47621
08/01/2023, 2:24 PMhallowed-horse-57635
08/01/2023, 2:28 PM