Open rawkode opened 1 month ago
We include only stable endpoints in the OpenAPI schema, but some APIs used by deployctl may have breaking change in future so not included.
I understand. This is making it rather difficult for me to automate my deployments, as each service relies on project level secrets.
I could solve this with deployment level secrets, but those are applied after the deployment has taken; which is failing because the secrets don't exist.
Catch 22
I could solve this with deployment level secrets, but those are applied after the deployment has taken; which is failing because the secrets don't exist.
I see what you mean. When using deployctl deploy --env
, it deploys once only with the project envs and then redeploys with a mix of the project env variables and the env variables provided). We are aware that this is suboptimal because of the scenario you described. However, when using the public API you can create deployments with specific env variables. Deployments created with the API will boot with the env variables already present, and your catch 22 situation should not take place.
I'm not sure I understand why you need the list_organizations endpoint though, can you clarify?
@arnauorriols Creating a deployment with the API needs the project ID, which I was going to find by listing projects within an organization, and I need to find the organization ID first.
I could get around this with hard coding some IDs, but I'd like to make this a reusable module I can deploy all my projects with.
The reason we don't provide a API to list organizations is because it is considered that all automatisms should be performed within the realm of a single organization. Creating an organization is expected to be a manual and infrequent procedure. Maybe you can get by keeping a mapping of organization ids in a config file or something similar?
Can we have the ability to create a project with environment variables via deployctl?
Can you please add this to the schema?