terraform-provider-elasticstack
terraform-provider-elasticstack copied to clipboard
[Feature] Support for API Key Management
Is your feature request related to a problem? Please describe. Managing Elasticsearch API keys is somewhat cumbersome, especially on large scale deployments where you want fine grain permission controls.
Describe the resource you would like to have implemented. Ability to manage/create API keys via Terraform.
Describe the solution you'd like I'd like to be able to specify an API key resource:
- For creation and be able to get back the information needed for using the API key.
- That exists and delete it via terraform.
I'd like to be able to get a list of existing API keys via a data source.
Describe alternatives you've considered You can use the Elasticsearch API via something like curl:
- Create API Key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
- Grant API Key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html
- Delete API Key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html
- API Key Data Source https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html
- API Key List Data Source https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html
Additional context Security Resources are already partially supported via user and role
I started work here: https://github.com/jitbasemartin/terraform-provider-elasticstack/tree/feature/issue-70 but I think it's too much for me :/ I will try to continue later but if someone wants to start something else I won't be angry ^^
+1
+1 on this feature
This has been released with 0.5.0