I'm trying to use terraform to create a new descop...
# ask-a-descoper
s
I'm trying to use terraform to create a new descope project, and generate a management key that is restricted to the new project. My goal is to get the newly created project id and management key and immediately put them into our cloud provider's secret manager so our app can access the values, but it doesn't seem like terraform can create or access this information. Is there a way to do this, or a better method to use? Right now we are manually creating the project and key in the UI, then copying the values over manually which is very much not ideal.
g
Hi Steve, Don't think we support programmatically creating management keys like that. @Gil Shapira keep me honest please. Why do you need to create a management key per project? CAn you elaborate a bit on the use case?
g
There's no programmatic API for creating management keys at the moment. I'd also like to hear the use case and maybe we already have or we can find some other mechanism to help here.
s
When we instantiate a new enterprise customer, we create a whole new instance of our application. These are completely disparate from other instances -- separate cloud projects, databases, etc. We want to guarantee separation there's no chance of one enterprise customer accessing or writing to another customer's data. This means each enterprise customer has their own Descope project with their own SSO settings, etc. We have been generating a management key that has project level access only to the project specific to that customer. We then use that management key for our application for authentication, etc. But we have to manually get the project ID and management key from Descope, put it into our cloud's secret manager and authorize the application to access the secret. We're trying to automate that process to reduce mistakes.